A handler finishes its work, yet the same source immediately interrupts again. Trace the service command that kept it alive.
Hardware context: External interrupt service path. Interrupt handler bring-up
A service adapter translates a handler snapshot into one requested transaction. Its one-shot device keeps asking for attention after the handler returns.
Run the failing trace. Locate the first divergent signal and cycle, choose a cause, then repair the adapter.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
snapshot | 9 | input of each check |
Full specification
This adapter services timer source 3. The raw input is its peripheral flag. The serviced input means software finished processing the event.
Drive command 0 unless the handler is active, work is serviced and the claim belongs to this adapter.
For an eligible snapshot request a device clear (1) while raw is high. Once raw falls request controller completion (2).
Diagnose the Failing Run
The test below runs the buggy design. Read its log, then find where it first goes wrong in the waveform.
Log
Waveform
Click a signal at a cycle to select it. Or focus the waveform and use the arrow keys: Left and Right move one cycle, Up and Down one signal.
Step 3 is optional: fix the code in the editor, then run the tests.
Examples
Example 1
Outside Handler- Input
in_handler=0, serviced=0, raw=0, claimed=0
- Output
command = 0
No handler owns this idle snapshot.
Example 2
Cause Present- Input
in_handler=1, serviced=1, raw=1, claimed=3
- Output
command = 1
The claimed device still holds its flag.
Example 3
Cause Removed- Input
in_handler=1, serviced=1, raw=0, claimed=3
- Output
command = 2
The device has dropped its request and the gateway can reopen.
Constraints and Contract
- Keep the service_port ports and widths. Drive the current snapshot combinationally. Treat every other five-bit ID as unowned. All inputs are known.
Hints
Hint 1
Find the claimed source in the trace.
Hint 2
Compare the first eligible snapshot with its device status.
Hint 3
Check what the command receiver will do.
What the grader checks: All binary combinations of the claim and service inputs are tested. The debug waveform observes the adapter boundary.
283 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