tywaves-chisel-demo
tywaves-chisel-demo copied to clipboard
VCD do not generated when test fails
If any of the checks fails in the simulate body, e.g. c.io.out.expect(1200.U), then it will panic, like so:
chisel3.simulator.PeekPokeAPI$FailedExpectationException: Failed Expectation: Observed value '1232' != 1200. Expectation failed: observed value 1232 != 1200 @[simple32/test/src/ProgramCounterTest.scala 76:22]
but also there will be no generated vcd file.
But especially in a failure case it is very interesting to see why the expect fails.
Is there a way around this, e.g. catching the execption, writing the vcd file and rethrowing it?