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 9 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

Hi @hellow554 sorry for the late reply. I will take a look into this problem in the coming days and try to fix it as soon as possible. Thanks for the report, did you find any workaround in the meantime to catch from the tb code? Although I know catching the exception in the tb is not an optimal solution and this should be handled by the simulator itself.

Also which simulator did you use? The ParametricSimulator or TywavesSimulator?

rameloni avatar Mar 16 '25 09:03 rameloni

did you find any workaround in the meantime to catch from the tb code

Unfortunately no.

IIRC I used TywavesSimulator

hellow554 avatar Mar 16 '25 14:03 hellow554