Search code examples
chisel

How to get the PeekPokeTester expect function to print signal values in hex?


By default when I call the expect() function in the tester the values come up as decimals. Although in the provided example here: https://github.com/freechipsproject/chisel-testers/wiki/Using-the-PeekPokeTester the outputs comes out as hex. How can you select this?

example:

[info] [0.026] EXPECT AT 5 io_key_column got 979262996 expected 4293125357 FAIL


Solution

  • Try using the Driver.execute to run your test. It allows you to set a bunch of options by passing in an array of strings. In this case try

    val args = Array("--display-base", "16")
    iotesters.Driver.execute(args, () => new RealGCD2) { c =>
      new GCDPeekPokeTester(c)
    } should be (true)