|
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| abstr.sby | ||
| abstr.sv | ||
| demo.v | ||
| props.sby | ||
| props.sv | ||
| README.md | ||
A simple example for using abstractions
Consider the design in demo.v and the properties in props.sv. Obviously the
properties are true, but that is hard to prove because it would take thousands of
cycles to get from the activation of one output signal to the next.
This can be solved by replacing counter with the abstraction in abstr.sv.
In order to do this we must first prove that the abstraction is correct. This is
done with sby -f abstr.sby.
Then we apply the abstriction by assuming what we have just proven and otherwise
turn counter into a cutpoint. See props.sby for details.
Running sby -f props.sby prv proves the properties and sby -f props.sby cvr
produces a cover trace that shows the abstraction in action.
Suggested exercises:
-
Make modifications to
abstr.svand/ordemo.v. Make a prediction if the change will makesby -f abstr.sbyorsby -f props.sby prvfail and test your prediction. -
What happens if we remove
abstr.svfromprops.sby, but leave thecutpointcommand in place? -
What happens if we remove the
cutpointcommand fromprops.sby, but leaveabstr.svin place?