S6.2.2 The Event Lost on Clear

MediumFix25 minIcarus Verilog · serverReview the topic

Repair a sticky event word that passes isolated tests yet drops a fresh notification during service.

Hardware context: Peripheral interrupt register bank. Peripheral register design

Eight event producers share a status byte. A driver sometimes finds its queue occupied after the interrupt flags have gone quiet. Repair the event word.

Signals in the Timeline

SignalWidthRole
step12input of each check
Full specification

At each rising clock, a low rst_n clears every flag and takes precedence. Otherwise each asserted events bit sets its matching flag.

A write commits only with sel, access_phase, ready, writing and low_lane high and word_index equal to 5.

On that edge each one in write_data clears the corresponding old flag. A simultaneous event on the same bit must remain pending.

All other bits retain their previous value. Between rising edges pending holds. All inputs carry known binary values.

Examples

Example 1

Empty Word
Input
Reset edge, events=00
Output
pending = 0x0

Reset empties all flags.

Example 2

First Report
Input
Idle bus, events=41
Output
pending = 0x41

Two distinct producers report work in the same cycle.

Example 3

One Acknowledgement
Input
Accepted low-byte write at word 5, data=01, events=00
Output
pending = 0x40

The driver acknowledges bit 0 and leaves bit 6 for its owner.

Constraints and Contract

  • Keep event_word and the given port widths. The index is in words. The byte strobe low_lane selects this byte.

Hints

Hint 1

Locate one event relative to the accepting edge.

Hint 2

Trace each bit independently through a collision.

Hint 3

Check an adjacent word with the same data.

What the grader checks: The fixture drives synchronous event pulses and individual register-interface phases. Each output bit is checked across qualified and unqualified writes.

381 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

Empty Word

Input
Reset edge, events=00
Expected output
pending = 0x0

Reset empties all flags.

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

Icarus Verilog · server