tywaves-chisel-demo icon indicating copy to clipboard operation
tywaves-chisel-demo copied to clipboard

VCD do not generated when test fails

Open hellow554 opened this issue 8 months ago • 2 comments

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?

hellow554 avatar Feb 25 '25 13:02 hellow554