Pick with CPU, without CPU or a fast platform for each chip test. Then use a measured speed to see when software is too long for RTL.
Hardware context: ap_soc driven by its core, by a bus manager, or on a fast platform. Deciding which chip tests are firmware tests and which are bench tests.
One chip, three ways to drive it. For each test, enter the mode that suits it best.
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 | Mode |
|---|---|
| 1 | With CPU: firmware on the real core |
| 2 | Without CPU: a bus manager in the core's seat |
| 3 | Fast platform: a virtual platform, emulator or FPGA prototype |
Measured (laptop, the five-stage core alone in its bench, Verilator 5.032): 534 thousand cycles a second. The whole chip will be slower; this sheet uses 534 for the sums.
| Entry | Your decision |
|---|---|
| STACK | Check that start-up code sets the stack pointer before main. |
| SWEEP | Write and read back every register of every peripheral, the day the bus first works. |
| LINUX | Boot an operating system to its login prompt. |
| HANDLER | Measure how many cycles pass from the timer interrupt to the first handler instruction. |
| BACK_TO_BACK | Hit the APB bridge with writes on every cycle, faster than any program could. |
| ILLEGAL | Drive a transfer size the core never produces and check the error response. |
| DRIVER_STACK | Run the full UART driver suite of the software team: about 40 billion cycles. |
| WFI_WAKE | Put the core to sleep with wfi and wake it with a GPIO edge. |
| EARLY | Test the DMA registers in week two, before the core is integrated. |
| RUN_MODE | A software test needs MCYCLES million cycles. At 534 thousand cycles a second, it may use at most 10 minutes on RTL. Enter 1 if it fits with the CPU on RTL, 3 if it needs a fast platform. |
Examples
Example 1
STACK- Input
Check that start-up code sets the stack pointer before main.
- Output
matches = 1
Only real instructions on the real core run start-up code.
Example 2
SWEEP- Input
Write and read back every register of every peripheral, the day the bus first works.
- Output
matches = 1
Fast to write, no software needed, and it works before the boot code exists.
Example 3
LINUX- Input
Boot an operating system to its login prompt.
- Output
matches = 1
Billions of instructions: far too long for RTL simulation.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For RUN_MODE, enter a constant expression using MCYCLES. Only this entry changes with the parameter. The supported integer range is 10 through 640, inclusive.
Hints
Hint 1
Instructions, traps and sleep need the core. Exact or illegal bus traffic needs a manager.
Hint 2
Billions of cycles do not fit in RTL simulation.
Hint 3
Seconds times cycles a second gives the cycle budget.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
14 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