B1.5.1 Which Level Checks It?

EasyImplement12 minIcarus Verilog · serverReview the topic

Place each check at the lowest level that can see it: block, subsystem, chip or system.

Hardware context: A small chip: processor, memory path, UART, timer and interrupt controller, with firmware. Splitting a chip's checks between block, subsystem and chip benches.

A small chip: a processor, a memory path, a UART, a timer and an interrupt controller, with firmware. The memory path is a memory controller and an SRAM, an on-chip memory. A UART is a serial port that sends and receives bytes one bit at a time. Parity and a CRC are check bits computed from the data, and the baud register sets the bit rate. Enter the level code.

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
CodeLevel
1Block: one module alone
2Subsystem: a few blocks with one job
3Chip: every block wired together, with firmware
4System: the chip on its board with its real software
EntryYour decision
UART_PARITYThe UART computes parity right for every byte.
MEM_PATHThe memory controller and the SRAM together return the byte last written to each address.
TIMER_IRQ_WIREThe timer's interrupt reaches the interrupt controller on input 3, as the map says.
FIFO_DEPTHThe UART's receive FIFO holds exactly 16 bytes.
BOOT_OSThe operating system boots and shows its login prompt.
FIRMWARE_REGThe firmware's UART driver writes the baud register at the address the hardware decodes.
TIMER_WRAPThe timer counter wraps from its maximum value to 0.
CHAT_APPA chat application sends a message over the serial port while a timer interrupt fires.
CRC_LEVELA check of the CRC on each received packet. IN_HARDWARE is 1 if logic inside the UART block computes the CRC. It is 0 if firmware on the processor computes it. What is the lowest level that can check it?

Examples

Example 1

UART PARITY
Input
The UART computes parity right for every byte.
Output
matches = 1

Inside one block; its own bench sees it fastest.

Example 2

MEM PATH
Input
The memory controller and the SRAM together return the byte last written to each address.
Output
matches = 1

Two blocks that do one job together.

Example 3

TIMER IRQ WIRE
Input
The timer's interrupt reaches the interrupt controller on input 3, as the map says.
Output
matches = 1

A wire between blocks.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For CRC_LEVEL, enter a constant expression using IN_HARDWARE. Only this entry changes with the parameter. The supported integer range is 0 through 1, inclusive.

Hints

Hint 1

Inside one block, a group of blocks, between blocks, or in software?

Hint 2

Check it there, where it is fastest to run and easiest to debug.

Hint 3

Firmware enters at chip level; real software at system level.

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

Report a problem with this page

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

UART PARITY

Input
The UART computes parity right for every byte.
Expected output
matches = 1

Inside one block; its own bench sees it fastest.

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

Icarus Verilog · server