mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-11 15:50:56 +00:00
Add docs/examples/abstract
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
f918e2369a
commit
afe6960ffe
6 changed files with 124 additions and 0 deletions
29
docs/examples/abstract/README.md
Normal file
29
docs/examples/abstract/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
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.sv` and/or `demo.v`. Make a prediction if the
|
||||
change will make `sby -f abstr.sby` or `sby -f props.sby prv` fail and test your
|
||||
prediction.
|
||||
|
||||
- What happens if we remove `abstr.sv` from `props.sby`, but leave the `cutpoint`
|
||||
command in place?
|
||||
|
||||
- What happens if we remove the `cutpoint` command from `props.sby`, but leave
|
||||
`abstr.sv` in place?
|
Loading…
Add table
Add a link
Reference in a new issue