V1.5.2 Pick the Stimulus and the Checker

MediumImplement22 minIcarus Verilog · serverReview the topic

For each subsystem test choose where the stimulus comes from and what checks the response, then size a timeout at the pads.

Hardware context: ap_soc cut into subsystems, each with an input and an output. Choosing checkers and timeouts for subsystem tests.

Stimulus codes are 1 to 5, checker codes 11 to 15. Each entry says which kind it asks for.

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 65535 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
CodeStimulus
1Firmware on the core
2A bus manager in the core's seat
3A pad-level model: UART model, GPIO driver, flash model
4The JTAG driver
5A back-door load of memory before reset
CodeChecker
11Self-checking firmware
12A passive bus monitor and protocol checker
13An end-to-end scoreboard at the pads
14Retire-trace compare against a reference model of the core
15An assertion on internal wires

Planned value for ap_soc v1.5 tests (the chip is being built): the UART divider gives 8 system clocks a bit. A byte on the line is ten bits: a start bit, eight data bits and a stop bit. So one byte costs 80 cycles.

EntryYour decision
ECHO_INStimulus for: a byte arrives at the receive pad.
ECHO_OUTChecker for: the echoed byte must match what was sent.
BOOT_IMAGEStimulus for: a test program placed in SRAM before reset.
BUTTON_INStimulus for: a push button on the board makes a rising edge on GPIO pin 5. The edge must raise the GPIO interrupt.
LOCK_INStimulus for: with the debug lock set, try to read SRAM the way someone with a probe on the board would.
BAD_SIZEStimulus for: give the APB bridge a transfer size the core never issues, and see how it answers.
COPY_CHECKChecker for: six bytes copied by the DMA must arrive in a second SRAM buffer, in order. No pad is involved.
FUTURE_CHECKChecker for: the team fears that some test, someday, will make the bridge change PADDR while a transfer waits for PREADY.
BRANCH_CHECKChecker for: after a compiler change, every branch the core retires must still go to the right next instruction.
CYCLE_CHECKChecker for: the UART0 RX_READY flag must drop within 2 cycles of the RXDATA read that empties the queue.
TIMEOUTThe pad scoreboard waits for BYTES echoed bytes, at 80 cycles each, plus a margin of 200 cycles for the handler. How many cycles should its timeout be?

Examples

Example 1

ECHO IN
Input
Stimulus for: a byte arrives at the receive pad.
Output
matches = 1

Only a model on the pad can play the outside world.

Example 2

ECHO OUT
Input
Checker for: the echoed byte must match what was sent.
Output
matches = 1

Compare at the pads, end to end.

Example 3

BOOT IMAGE
Input
Stimulus for: a test program placed in SRAM before reset.
Output
matches = 1

A back-door load costs no simulated cycles.

Constraints and Contract

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

Hints

Hint 1

Software, a manager, a pad model, the debugger or a back-door load.

Hint 2

The pads, the bus, the trace, the firmware or a wire.

Hint 3

Bytes times cycles a byte, plus a margin.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

15 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

ECHO IN

Input
Stimulus for: a byte arrives at the receive pad.
Expected output
matches = 1

Only a model on the pad can play the outside world.

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

Icarus Verilog · server