Closed B10615053 closed 1 year ago
Memories are not reset by default since that is the behavior you would expect on an ASIC. Thus your two memories will start out with potentially different data and thus your check fails. You can initialize both memories to zero through a firrtl annotation: https://github.com/ucb-bar/chiseltest/blob/0894e8fba74674bcd32e7070211b40eb5be1b20b/src/test/scala/chiseltest/formal/MemoryTests.scala#L179
Please let me know if this fixes your issue.
Hi @ekiwi , I appreciate your reply. Add the following code indeed solve the Reset problem.
// Initial with all zeros
annotate(new ChiselAnnotation {
override def toFirrtl = MemoryScalarInitAnnotation(rf.toTarget, 0)
})
But I was facing another issue of dumping waveform with following command.
testOnly cpu.RFTest -- -DwriteVcd=1
Why won't this generate vcd waveform file under test_run_dir
direcotry?
Will Seq(BoundedCheck(6))
generate a cover waveform of 6 cycle clock?
Thank you again for the help!:smile:
Why won't this generate vcd waveform file under
test_run_dir
direcotry?
The formal verify
command only generates a VCD if it find an assertion violation. No flag needed in that case.
Will
Seq(BoundedCheck(6))
generate a cover waveform of 6 cycle clock?
Unfortunately cover
trace generation is not implemented yet :(.
Haven't had time to work on that.
I tried to verify following Register File with Chisel Formal, and I got an assertion failed.
To solve this problem, I dumped the waveform file, and found out the DUT didn't seem to be Reset. If the DUT had been Reset, the
io_dataRS2
should be 0 instead of 8000_0000. I also found the register in the RFFormal was not been Reset. My running environment are listed below:My Chisel code are listed as following:
Register File
Chisel Formal