Read short descriptions of bench code and name the part each one is: generator, driver, monitor, checker or coverage. Then say which part is missing when a bench goes wrong.
Hardware context: A four-entry FIFO with registered read data, inside a bench with a generator, driver, monitor, checker and coverage. A reusable monitor for a FIFO interface.
The bench is the FIFO bench of the lesson. Enter the code of the part.
This worksheet uses named constants. The first three entries show how to record your decisions.
Replace each unresolved value of 255 with your result.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Code | Part |
|---|---|
| 1 | Generator: decides which transactions to send |
| 2 | Driver: turns a transaction into pin values |
| 3 | Monitor: watches pins, never drives, reports transactions |
| 4 | Checker: decides whether each result is right |
| 5 | Coverage: counts which situations happened |
| Entry | Your decision |
|---|---|
| PICK_OP | Code that picks "push 5a" or "pop" for the next clock from a seed. |
| SET_PINS | Code that sets push = 1 and din = 8'h5a before a rising edge. |
| RECORD_OUT | Code that, at each rising edge, records dout when pop is 1 and empty is 0. |
| COMPARE | Code that takes the oldest recorded input and compares it with each recorded output. |
| COUNT_FULL | Code that adds 1 whenever push is 1 while full is 1. |
| NO_ERRORS_NO_FULL | Missing part: every test passes, and nobody can say whether the FIFO ever filled. |
| NO_VERDICT | Missing part: the bench prints every byte, and a person must read the log to decide. |
| TIMING_EVERYWHERE | Missing part: every test sets push, pop and din itself, so a protocol change breaks them all. |
| EDGE_CODE | A block of bench code runs at each rising edge and reads push, pop and din. DRIVES is 1 if it also assigns din, 0 if it never assigns any pin. Which part is it? |
Examples
Example 1
PICK OP- Input
Code that picks "push 5a" or "pop" for the next clock from a seed.
- Output
matches = 1
It decides what to do, not how pins move.
Example 2
SET PINS- Input
Code that sets push = 1 and din = 8'h5a before a rising edge.
- Output
matches = 1
It turns one decision into pin values.
Example 3
RECORD OUT- Input
Code that, at each rising edge, records dout when pop is 1 and empty is 0.
- Output
matches = 1
It reads pins and reports what came out, without driving anything.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For EDGE_CODE, enter a constant expression using DRIVES. Only this entry changes with the parameter. The supported integer range is 0 through 1, inclusive.
Hints
Hint 1
Only the driver and the monitor do. The driver writes them; the monitor only reads.
Hint 2
That is the checker.
Hint 3
That is coverage.
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 2 problems on this path