Pick a service method for a startup latch, a door switch and a capture port under three different deadlines.
Hardware context: ap_soc UART0 transmit path. Firmware bring-up and service budgeting
Use this board’s exercise budgets. The method codes are 1 for polling, 2 for interrupts and 3 for DMA.
This worksheet uses named constants. The first three entries show how to record your decisions.
Replace unresolved entries with your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
The startup latch is ready on its first read. The core must wait here and the latch has no interrupt or DMA request.
The door switch can interrupt but cannot request DMA. Its next change is unpredictable. The core must sleep until then.
The capture port supports all three methods. Minimize occupied core cycles. For N bytes the costs are 5N, 5 + 3N and 12 + N in code order. The 5 is one handler entry for the block. Choose the smaller code on a tie.
| Entry | Your decision |
|---|---|
| POLL_COST | How many occupied cycles would polling two capture bytes cost? |
| IRQ_COST | How many cycles for interrupt service on three capture bytes? |
| DMA_COST | How many cycles for a seven-byte capture using DMA? |
| LATCH | Which method can read the startup latch? |
| DOOR | Which method lets the core sleep until the switch changes? |
| ENTRY | How many occupied cycles does interrupt service cost for one capture byte? |
| SETUP | How many occupied cycles does DMA cost for four capture bytes? |
| BLOCK_1 | Choose for a capture of 1 bytes. |
| BLOCK_2 | Choose for a capture of 2 bytes. |
| BLOCK_3 | Choose for a capture of 3 bytes. |
| BLOCK_4 | Choose for a capture of 4 bytes. |
| BLOCK_6 | Choose for a capture of 6 bytes. |
| BLOCK_16 | Choose for a capture of 16 bytes. |
| CAPTURE | Choose for a capture of COUNT bytes. |
Examples
Example 1
POLL COST- Input
How many occupied cycles would polling two capture bytes cost?
- Output
entry = 10
Two groups of five cost ten cycles.
Example 2
IRQ COST- Input
How many cycles for interrupt service on three capture bytes?
- Output
entry = 14
Five entry cycles plus three groups of three gives fourteen.
Example 3
DMA COST- Input
How many cycles for a seven-byte capture using DMA?
- Output
entry = 19
Twelve setup cycles plus seven byte cycles gives nineteen.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For CAPTURE, enter a constant expression using COUNT. Only this entry changes with the parameter. The supported integer range is 1 through 16, inclusive.
Hints
Hint 1
Remove methods the device cannot support.
Hint 2
Decide whether the core can stay awake.
Hint 3
Charge entry and setup once per block in this budget.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
18 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