-
Notifications
You must be signed in to change notification settings - Fork 89
Update staged verification test #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
81a0af3
d6252f7
d82ef4d
9389f3a
022323b
b23e01c
fcba8d3
5e6e984
501a054
b66bbe4
e89f71b
551d8df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,78 +1,122 @@ | ||
| [tasks] | ||
| stage_1_init init | ||
| stage_1_cover cover | ||
| stage_2_init init | ||
| stage_2a_cover cover | ||
| stage_2b_assert assert | ||
| prep | ||
| stage_1 cover | ||
| stage_2 cover | ||
| stage_3_init | ||
| stage_3a_cover cover | ||
| stage_3b_assert | ||
|
|
||
| [options] | ||
| init: | ||
| prep: | ||
| mode prep | ||
|
|
||
| cover: | ||
| mode cover | ||
| depth 40 | ||
| skip_prep on | ||
|
|
||
| assert: | ||
| stage_3_init: | ||
| mode prep | ||
| skip_prep on | ||
|
|
||
| stage_3b_assert: | ||
| mode prove | ||
| depth 40 | ||
| skip_prep on | ||
|
|
||
| -- | ||
|
|
||
| [engines] | ||
| init: none | ||
| cover: smtbmc | ||
| assert: smtbmc | ||
|
|
||
| prep: | ||
| none | ||
|
|
||
| cover: | ||
| smtbmc | ||
|
|
||
| stage_3_init: | ||
| none | ||
|
|
||
| stage_3b_assert: | ||
| smtbmc | ||
|
|
||
| -- | ||
|
|
||
| [script] | ||
| stage_1_init: | ||
|
|
||
| # This separate prep step generates model_prep.il, which is our ground-truth | ||
| # design file from which all other checkpoints are derived. It is essential | ||
| # to have at least one prep step in `mode prep`, as we must produce a .il file | ||
| # which has had the SBY-internal prep routine run on it. Any file written | ||
| # in the user-provided script below will represent the state of the design | ||
| # *before* the SBY prep routine. (Note that the `prep` pass below is *not* | ||
| # the SBY prep routine, but just the Yosys synthesis pass.) | ||
| prep: | ||
| verific -formal Req_Ack.sv | ||
| hierarchy -top DUT | ||
| prep | ||
|
|
||
| stage_1_cover: | ||
| stage_1: | ||
| read_rtlil design_prep.il | ||
| # This selection computes (all phase-labeled things) - (all phase-1-labeled | ||
| # things) to remove all phase-tagged SVA constructs not intended for phase 1. | ||
| select */c:phase* */c:phase1_* %d | ||
|
|
||
| # Write checkpoint file. | ||
| write_rtlil stage_1_init.il | ||
|
|
||
| # This selection computes (all stage-labeled things) - (all stage-1-labeled | ||
| # things) to remove all stage-tagged SVA constructs not intended for stage 1. | ||
| select */c:stage* */c:stage1* %d | ||
| delete | ||
|
|
||
| stage_2_init: | ||
| read_rtlil design_prep.il | ||
| stage_2: | ||
| # Read the stage 1 checkpoint, and then use the stage 1 trace to simulate up | ||
| # to the end of stage 1. | ||
| # Note that, in stage 2, we do not use -noinitstate on sim, as this first | ||
| # simulation begins at t=0 and thus $initstate cells should be active. All | ||
| # future calls to sim should include -noinitstate. | ||
|
||
| read_rtlil stage_1_init.il | ||
| sim -a -w -scope DUT -r trace0.yw | ||
| write_rtlil stage_2_init.il | ||
|
|
||
| stage_2a_cover: | ||
| read_rtlil design_prep.il | ||
| # This selection computes (all phase-labeled things) - (phase2 shared + phase2a) | ||
| # to remove all phase-tagged SVA constructs not intended for this branch. | ||
| select */c:phase* */c:phase2_shared_* */c:phase2a_* %u %d | ||
| select */c:stage* */c:stage2* %d | ||
| delete | ||
|
|
||
| stage_2b_assert: | ||
| read_rtlil design_prep.il | ||
| # This selection computes (all phase-labeled things) - (phase2 shared + phase2b) | ||
| # to remove all phase-tagged SVA constructs not intended for this branch. | ||
| select */c:phase* */c:phase2_shared_* */c:phase2b_* %u %d | ||
| stage_3_init: | ||
| read_rtlil stage_2_init.il | ||
|
|
||
| # Use -noinitstate, as this simulation does not begin at t=0. | ||
| sim -a -w -scope DUT -r trace0.yw -noinitstate | ||
|
|
||
| write_rtlil stage_3_init.il | ||
|
|
||
| stage_3a_cover: | ||
| read_rtlil stage_3_init.il | ||
| select */c:stage* */c:stage3_shared* */c:stage3a* %u %d | ||
| delete | ||
|
|
||
| stage_3b_assert: | ||
| read_rtlil stage_3_init.il | ||
| select */c:stage* */c:stage3_shared* */c:stage3b* %u %d | ||
| delete | ||
|
|
||
|
|
||
| -- | ||
|
|
||
| [files] | ||
|
|
||
| stage_1_init: | ||
| prep: | ||
| Req_Ack.sv | ||
|
|
||
| stage_1_cover: | ||
| skip_staged_flow_stage_1_init/model/design_prep.il | ||
| stage_1: | ||
| skip_staged_flow_prep/model/design_prep.il | ||
|
|
||
| stage_2: | ||
| skip_staged_flow_stage_1/src/stage_1_init.il | ||
| skip_staged_flow_stage_1/engine_0/trace0.yw | ||
|
|
||
| stage_2_init: | ||
| skip_staged_flow_stage_1_init/model/design_prep.il | ||
| skip_staged_flow_stage_1_cover/engine_0/trace0.yw | ||
| stage_3_init: | ||
| skip_staged_flow_stage_2/src/stage_2_init.il | ||
| skip_staged_flow_stage_2/engine_0/trace0.yw | ||
|
|
||
| stage_2a_cover: | ||
| skip_staged_flow_stage_2_init/model/design_prep.il | ||
| stage_3a_cover: | ||
| skip_staged_flow_stage_3_init/src/stage_3_init.il | ||
|
|
||
| stage_2b_assert: | ||
| skip_staged_flow_stage_2_init/model/design_prep.il | ||
| stage_3b_assert: | ||
| skip_staged_flow_stage_3_init/src/stage_3_init.il | ||
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.
Isn't that an oxymoron? Is it just running the user script and nothing else?
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.
That's exactly right -- normally we'd combine the "init" and "verification" step for a given stage for exactly this reason. However, stage 3 forks into two verification steps that need the same init process.
Maybe it's weird to run this through SBY, but the alternative (i think, unless you have something cleaner) is to put it in its own script. I think it's nicer to have everything in the same SBY script.
Let me know if you have cleaner ideas!