S6.5.2 Same Event, Four Controllers

MediumImplement22 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input of each check
Full specification
ControllerContract used on this ticket
PLICA claim returns a source ID. Complete the claimed ID after service.
GICRead the acknowledge register for the ID. The chosen mode combines priority drop and deactivation at EOI.
NVICException entry selects the vector. On return an eligible exception can reuse the stacked context.
CLICThis 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.

EntryYour decision
CLAIMWhich interface calls the ID read a claim?
GROUPWhich of the four uses a distributor and group-aware CPU interface?
STACKWhich ticket can reuse the Cortex-M exception frame?
LOCALWhich ticket explicitly selected local hardware vectoring?
SECOND_CLAIMOn PLIC, does a notification alone supply the claimed ID?
ACKSTwo GIC interrupts enter service one after another. How many successful acknowledges occur?
END_FIRSTDoes GIC EOI itself remove unread data from UART?
RESTORESWith one NVIC tail-chain, how many restores of thread context occur between the two handlers?
CLAIM_READSHow many PLIC claim reads does the vectored CLIC path require?
RETURNSBoth NVIC handlers finish and no more work is pending. How many returns to thread mode occur?
ID_OPERATIONSFour 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

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

CLAIM

Input
Which interface calls the ID read a claim?
Expected output
controller = PLIC (1)

PLIC uses claim and complete.

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

Icarus Verilog · server