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
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Code | Stimulus |
|---|---|
| 1 | Firmware on the core |
| 2 | A bus manager in the core's seat |
| 3 | A pad-level model: UART model, GPIO driver, flash model |
| 4 | The JTAG driver |
| 5 | A back-door load of memory before reset |
| Code | Checker |
|---|---|
| 11 | Self-checking firmware |
| 12 | A passive bus monitor and protocol checker |
| 13 | An end-to-end scoreboard at the pads |
| 14 | Retire-trace compare against a reference model of the core |
| 15 | An 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.
| Entry | Your decision |
|---|---|
| ECHO_IN | Stimulus for: a byte arrives at the receive pad. |
| ECHO_OUT | Checker for: the echoed byte must match what was sent. |
| BOOT_IMAGE | Stimulus for: a test program placed in SRAM before reset. |
| BUTTON_IN | Stimulus for: a push button on the board makes a rising edge on GPIO pin 5. The edge must raise the GPIO interrupt. |
| LOCK_IN | Stimulus for: with the debug lock set, try to read SRAM the way someone with a probe on the board would. |
| BAD_SIZE | Stimulus for: give the APB bridge a transfer size the core never issues, and see how it answers. |
| COPY_CHECK | Checker for: six bytes copied by the DMA must arrive in a second SRAM buffer, in order. No pad is involved. |
| FUTURE_CHECK | Checker for: the team fears that some test, someday, will make the bridge change PADDR while a transfer waits for PREADY. |
| BRANCH_CHECK | Checker for: after a compiler change, every branch the core retires must still go to the right next instruction. |
| CYCLE_CHECK | Checker for: the UART0 RX_READY flag must drop within 2 cycles of the RXDATA read that empties the queue. |
| TIMEOUT | The 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