step() in simif can be deceptive for users who are familiar with Chisel's PeekPokeTesters. Consider the following example:
import chisel3._
class ShiftRegister extends Module {
val io = IO(new Bundle {
val in1 = Input(UInt(8.W))
val in2 = Input(UInt(8.W))
val out = Output(UInt(8.W))
val enable = Input(Bool())
})
val out = RegInit(0.U(8.W))
io.out := out
when (io.enable) {
out := io.in1 + io.in2
}
}
In chisel-testers, the poke-step-expect sequence works as expected, but since simif's "step" is really "fire one cycle of targetFire", the expect line actually dequeues the old value of io_out right before the posedge, which is different from what the chisel-testers do.
Suggestions: either document this, or perhaps rename as "targetFireStep()" or some other disambiguated name, or provide step(1) as an alias for targetFireStep(2), etc.
step()
in simif can be deceptive for users who are familiar with Chisel's PeekPokeTesters. Consider the following example:In chisel-testers, the poke-step-expect sequence works as expected, but since simif's "step" is really "fire one cycle of targetFire", the expect line actually dequeues the old value of io_out right before the posedge, which is different from what the chisel-testers do.
Suggestions: either document this, or perhaps rename as "targetFireStep()" or some other disambiguated name, or provide
step(1)
as an alias fortargetFireStep(2)
, etc.@davidbiancolin