S5.8.2 The Wake That Arrived During Entry

HardDebug25 minIcarus Verilog · serverReview the topic

A door switch rings exactly as a clock island parks. Read the failing edge, diagnose the race and repair the entry controller.

Hardware context: ap_soc sleep controller. GPIO wake from MCU sleep

The always-on controller gets one clean event pulse. At one edge, entry, quiet, the pulse and a service acknowledgment coincide. Find the first wrong output in the waveform.

Signals in the Timeline

SignalWidthRole
sample12input of each check
Full specification

All inputs are sampled on rising edges. Synchronous active-high reset clears both outputs. An event sets pending even during acknowledgment. Without an event, acknowledgment clears pending.

An event or a previously pending cause forces parked low on that edge, even during entry or acknowledgment. Otherwise enter and quiet together park the island. In every other case keep its previous park state.

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 1 · The first bad cycle and signal
Step 2 · The cause

Step 3 is optional: fix the code in the editor, then run the tests.

Examples

Example 1

Reset
Input
Reset sampled high
Output
status = 0

Both state bits clear.

Example 2

Request While Busy
Input
enter=1, quiet=0
Output
status = 0

The island stays awake to finish work.

Example 3

Quiet Without Entry
Input
enter=0, quiet=1
Output
status = 0

Being idle alone leaves the running clock alone.

Constraints and Contract

  • Identify the first divergent cycle and signal, select its cause, then repair entry_watch. Status packs parked above pending.

Hints

Hint 1

Compare old pending with the input event at the capture edge.

Hint 2

Read parked and pending separately.

Hint 3

Compare the first disagreement with a quiet entry that succeeds.

What the grader checks: Every binary input combination is exercised from each reachable output state.

304 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

Reset

Input
Reset sampled high
Expected output
status = 0

Both state bits clear.

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

Icarus Verilog · server