Give each verification question to the tool that can answer it, and work out how rare a sequence random stimulus must hit.
Hardware context: A lock that opens on three exact bytes. Deciding between simulation and formal for a rule.
The lock of the lesson opens on three exact bytes in a row. A million random clocks never opened it; the formal engine found the sequence at step 5 in 592 ms (recorded).
This worksheet uses named constants. The first three entries show how to record your decisions.
Replace each unresolved value of 4294967295 with your result.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Code | Tool |
|---|---|
| 1 | Simulation with a self-checking bench |
| 2 | Formal property checking |
| 3 | Equivalence checking |
| 4 | Lint and static checks |
| 5 | Emulation or an FPGA prototype |
| Entry | Your decision |
|---|---|
| Q_NEVER_OPEN | Show that no input sequence of any length opens the lock in normal use. |
| Q_BOOT_OS | Boot an operating system on the whole chip, billions of clocks. |
| Q_SAME_GATES | Show the netlist from synthesis does the same as the RTL. |
| Q_UNUSED_WIRE | Find a signal that is declared and never driven, without running anything. |
| Q_UART_BYTES | Send 500 random bytes through the transmitter and compare them at a receiver model. |
| Q_FIFO_RULE | Show the FIFO never says full and empty at once, for every input. |
| ODDS_3 | Three exact bytes in a row from random bytes: 1 in how many clocks? |
| FORMAL_STEP | At which step did the formal run report the failure? |
| ODDS | A bug needs NBITS exact random bits at once. Enter how many random draws give one hit on average (1 in how many). |
Examples
Example 1
Q NEVER OPEN- Input
Show that no input sequence of any length opens the lock in normal use.
- Output
matches = 1
Only a proof covers every sequence of any length.
Example 2
Q BOOT OS- Input
Boot an operating system on the whole chip, billions of clocks.
- Output
matches = 1
Far too long for a simulator.
Example 3
Q SAME GATES- Input
Show the netlist from synthesis does the same as the RTL.
- Output
matches = 1
Two versions of one design, compared.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For ODDS, enter a constant expression using NBITS. Only this entry changes with the parameter. The supported integer range is 1 through 24, inclusive.
Hints
Hint 1
Formal.
Hint 2
Equivalence.
Hint 3
Emulation or a prototype.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
13 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 1 problem on this path