tdb-alcorn / chisel-formal

Other
23 stars 3 forks source link

RFC: FormalAfterReset #7

Closed danielkasza closed 4 years ago

danielkasza commented 4 years ago

This is related to #4.

These changes add a new FormalAfterReset trait for modules where the assertions should only apply after a reset. This is just a prototype to start the discussion. I will to redo the whole thing if I have to.

danielkasza commented 4 years ago

I am going to close this and work on a bigger rework of the library. A couple of things I want to change:

tdb-alcorn commented 4 years ago
  • Use FIRRTL transformations to add cover statements

Sounds like a great approach.

  • Remove numResets and timeSinceReset

Do you have any ideas on how to replace them? IMO timeSinceReset is necessary because sometimes you know that an assertion will need some time to become valid.

  • Focus only on verification after the initial reset

This is good, I'd only caution to make sure you include some kind of escape valve for the odd situation where you do want a property to be true universally.

danielkasza commented 4 years ago

Do you have any ideas on how to replace them?

Yes. My plan is to:

This way, we do not have to worry about the counter ever overflowing.

I am also planning to change the past API to:

The reason for this is that I found that requiring a block for each past value leads to very nested code when asserting the behavior of state machines because you have to grab multiple values from the past.

I'd only caution to make sure you include some kind of escape valve for the odd situation where you do want a property to be true universally.

I agree. I will include this in my prototype.