Follow two UART events across four service paths and decide what software can observe.
Hardware context: Interrupt service slot. Interrupt handler integration
UART interrupts a running thread after receiving a byte. A second eligible interrupt arrives just as the UART handler finishes. Compare the service contracts below.
This worksheet uses named constants. The first three entries show how to record your decisions.
Replace the unfinished entries with your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Controller | Contract used on this ticket |
|---|---|
| PLIC | A claim returns a source ID. Complete the claimed ID after service. |
| GIC | Read the acknowledge register for the ID. The chosen mode combines priority drop and deactivation at EOI. |
| NVIC | Exception entry selects the vector. On return an eligible exception can reuse the stacked context. |
| CLIC | This ticket enables selective hardware vectoring. The selected local input identifies the handler. |
Controller codes are PLIC 1, GIC 2, NVIC 3 and CLIC 4. For yes/no decisions use 1 or 0. For counts enter a decimal number.
| Entry | Your decision |
|---|---|
| CLAIM | Which interface calls the ID read a claim? |
| GROUP | Which of the four uses a distributor and group-aware CPU interface? |
| STACK | Which ticket can reuse the Cortex-M exception frame? |
| LOCAL | Which ticket explicitly selected local hardware vectoring? |
| SECOND_CLAIM | On PLIC, does a notification alone supply the claimed ID? |
| ACKS | Two GIC interrupts enter service one after another. How many successful acknowledges occur? |
| END_FIRST | Does GIC EOI itself remove unread data from UART? |
| RESTORES | With one NVIC tail-chain, how many restores of thread context occur between the two handlers? |
| CLAIM_READS | How many PLIC claim reads does the vectored CLIC path require? |
| RETURNS | Both NVIC handlers finish and no more work is pending. How many returns to thread mode occur? |
| ID_OPERATIONS | Four enabled-group sources at priorities 0, 3, 3 and 5 each arrive once. A disabled group also has priority 0 pending. Service all eligible sources in sequence. Admit numbers strictly below MASK. Count acknowledges plus combined EOIs. |
Examples
Example 1
CLAIM- Input
Which interface calls the ID read a claim?
- Output
controller = PLIC (1)
PLIC uses claim and complete.
Example 2
GROUP- Input
Which of the four uses a distributor and group-aware CPU interface?
- Output
controller = GIC (2)
The GIC separates routing from CPU delivery.
Example 3
STACK- Input
Which ticket can reuse the Cortex-M exception frame?
- Output
controller = NVIC (3)
NVIC arbitrates the next Cortex-M exception during return.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For ID_OPERATIONS, enter a constant expression using MASK. Only this entry changes with the parameter. The supported integer range is 0 through 7, inclusive.
Hints
Hint 1
Decide whether the CPU reads an ID or enters a vector.
Hint 2
Separate the UART condition from the controller record.
Hint 3
Count only transitions across the boundary asked about.
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 2 problems on this path