Labs & tool setup
Every lesson's example code is a real file you can download and run. This page explains how to run them with free open-source tools or with a commercial formal tool, and lists every file.
What a lab folder contains
| File | Purpose |
|---|---|
<design>.sv | The RTL under test (sometimes with a deliberate bug — read the lesson). |
<design>_fv.sv | The formal wrapper: instantiates the design, leaves its inputs free and holds assumptions, assertions and covers. |
<design>.sby | A SymbiYosys run script with a prove task and a cover task. |
Option A — open-source flow (SymbiYosys)
- Download the latest OSS CAD Suite build for your OS from the YosysHQ
oss-cad-suite-buildreleases on GitHub and extract it. - Activate it in your shell:
source oss-cad-suite/environment(Linux/macOS) or runstart.bat(Windows). - Put the example files of one lab in a folder and run:
shell sby -f rr_arbiter.sby # runs all tasks (prove and cover) sby -f rr_arbiter.sby cover # just the cover task - Each task creates a folder such as
rr_arbiter_prove/. The summary says PASS or FAIL; counterexamples and cover traces are written as.vcdfiles underengine_*/. Open them with GTKWave (included in the suite).
Rewriting a concurrent property for the plain open-source front end
// Standard SVA (as used in the lessons)
a_req_gnt: assert property (@(posedge clk) disable iff (rst) req |=> gnt);
// Equivalent immediate-assertion style accepted by every Yosys build
logic past_valid = 1'b0;
always_ff @(posedge clk) past_valid <= 1'b1;
always_ff @(posedge clk)
if (past_valid && !rst && !$past(rst) && $past(req))
a_req_gnt_imm: assert (gnt);Option B — commercial formal tools
Commercial FPV tools read the .sv files directly. A typical script looks like the pseudo-Tcl below; command names differ by
vendor, so treat it as a checklist rather than exact syntax.
# generic FPV script (adapt to your tool's command names)
analyze -sv rr_arbiter.sv rr_arbiter_fv.sv
elaborate -top rr_arbiter_fv
clock clk
reset rst ;# or: rely on the 'initial assume (rst)' in the wrapper
prove -all
reportEvery example file
All example files are also included in the examples/ folder of the site source.