I have a ChiselTest tester written as follows:
class EccTester extends FlatSpec with ChiselScalatestTester with Matchers {
behavior of "Testers2"
it should "send data without errors" in {
test(new EccPair(width=8)) {
c => {
val rnd = new Random()
for (i <- 0 to 20) {
val testVal = rnd.nextInt(1 << c.getWidthParam)
c.io.dataIn.poke(testVal.U)
c.io.errorLocation.poke(0.U)
c.io.injectError.poke(false.B)
c.io.injectSecondError.poke(false.B)
c.clock.step(1)
c.io.dataOut.expect(testVal.U)
c.io.outputNotEqual.expect(false.B)
}
}
}
}
}
I am able to run the test in the shell with
testOnly chisel.lib.ecc.EccTester
But when I try to generate waveforms per the ChiselTest documentation,
testOnly chisel.lib.ecc.EccTester -- -DvwriteVcd=1
The test executes OK but does not dump a waveform.
Documentation I referenced is https://github.com/ucb-bar/chisel-testers2, and the full source code is at https://github.com/hutch31/ip-contributions/blob/ecc/src/test/scala/chisel/lib/ecc/EccTester.scala