2

Is there a way to get the step value in iotesters ? Currently I'm using a var counter but I'm sure there is a better way :

class MyTest (dut: MyModule) extends PeekPokeTester(dut) {
  var timeCounter = 0
  for(i <- 0 to 10) {
    step(1)
    timeCounter = timeCounter + 1
  }
  println("Step value is " + timeCounter)

Is there a getStepValue() like function to get that ?

FabienM
  • 3,421
  • 23
  • 45

1 Answers1

2

You can get this using the (presently undocumented) method t.

There's an internal var simTime that is tracking time. This is automatically incremented on a step (just like how you're doing it). The method t lets you query the query its value.

seldridge
  • 2,704
  • 15
  • 19