Open danielkasza opened 4 years ago
It looks like it works if I do:
when (numResets > 0.U) {
assert(aReg ^ bReg === true.B)
}
Would it make sense to move that check inside assert? I think that would be consistent with how Chisel modules are normally used. Another assert function could be provided for the special case when you care about behavior before a reset.
This is a reasonable idea: make the default use of assert the one we usually want. I don't see any reason not to do this, but I will bring it up at the next chisel dev meeting to see if there are any good objections. If we're clear, I'll make the change. If you're keen to submit a patch implementing this, that would also be welcome!
This passes:
This does not:
Failed to assert condition at (filename:line)
I suspect that this has to do with how Chisel treats reset values on registers, but I am not sure. Can you help me understand what's wrong here?