-
Notifications
You must be signed in to change notification settings - Fork 76
Conversation
5a2a6ad
to
ab8d7a2
Compare
Do you know why this is happening? Asserts should only be evaluated if there is a positive clock edge. |
I did not delve into how the clock is generated by chisel-unit-tests. However, in the waveforms I saw, there was activity on the clock and reset before reset got pegged high. |
Do you know what timestep the assert is triggered at? |
BTW, both this kind of assert:
and this kind of assert fire:
|
I see this in the output:
|
The |
Can you see a rising edge on the clock at |
I have also set |
No matter how far in I zoom at 0, I always see a solid yellow bar for clock+reset. I can never actually SEE the transition, because it's presumably instantaneous. |
I mean, you should be able to reproduce this problem as easily as adding an |
@terpstra: could your problem be fixed by setting |
The clock already IS set to |
Hah! I just tried setting clock to 0; ie:
... and THAT fixed it also. |
I like that fix. Happy to merge if you can update this PR. |
It seems that clock=1 at time zero qualifies as a posedge for vcs. This caused assertions to fire as registers have not yet been reset.
ab8d7a2
to
35070e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I've confirmed that by applying/unapplying/applying this change that it does cause the bug to toggle off/on/off respectively. |
@jackkoenig Could we get this backported onto 9f408a5 ? |
@Mergifyio backport 0.5.x |
It seems that clock=1 at time zero qualifies as a posedge for vcs. This caused assertions to fire as registers have not yet been reset. (cherry picked from commit 541ae8c)
✅ Backports have been created
|
The 'reset' signal cannot glitch from 0 to 1 at power on.
If it does, then all the assertions in a vcs design will fire.