B2.2.1 Name the Part

EasyImplement12 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input of each check
Full specification
CodePart
1Generator: decides which transactions to send
2Driver: turns a transaction into pin values
3Monitor: watches pins, never drives, reports transactions
4Checker: decides whether each result is right
5Coverage: counts which situations happened
EntryYour decision
PICK_OPCode that picks "push 5a" or "pop" for the next clock from a seed.
SET_PINSCode that sets push = 1 and din = 8'h5a before a rising edge.
RECORD_OUTCode that, at each rising edge, records dout when pop is 1 and empty is 0.
COMPARECode that takes the oldest recorded input and compares it with each recorded output.
COUNT_FULLCode that adds 1 whenever push is 1 while full is 1.
NO_ERRORS_NO_FULLMissing part: every test passes, and nobody can say whether the FIFO ever filled.
NO_VERDICTMissing part: the bench prints every byte, and a person must read the log to decide.
TIMING_EVERYWHEREMissing part: every test sets push, pop and din itself, so a protocol change breaks them all.
EDGE_CODEA 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

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

PICK OP

Input
Code that picks "push 5a" or "pop" for the next clock from a seed.
Expected output
matches = 1

It decides what to do, not how pins move.

Run samples executes all 3 public checks. Check all tests runs 13 checks on the server.

Icarus Verilog · server