S4.3.1 Build the Read Mux

MediumImplement20 minIcarus Verilog · serverReview the topic

Route one saved owner’s entire reply and make conflicting owners visible at a diagnostic port.

Hardware context: ap_soc read return path. Peripheral integration

Four targets feed a diagnostic return bank. The select vector has already crossed into the data phase. Build the combinational bank that lets a service processor inspect that phase.

Signals in the Timeline

SignalWidthRole
sample10input of each check
Full specification

Lane 0 occupies words[31:0]. Each higher lane occupies the next 32 bits. done and fault use the same lane order.

One selected lane forwards its word, done and fault independently, even during a wait. Zero selects give zero data, ready high and error low.

Two or more selects give zero data, ready high and error high. This collision report belongs to the diagnostic interface. It is not an AHB ERROR sequencer.

Examples

Example 1

ROM Answers
Input
select=0001, done=1, fault=0, words (low first)=11, 22, 33, 44
Output
data = 0x11, ready = 1, error = 0

The low word and its completion bit travel together.

Example 2

A Waiting Fault
Input
select=0100, done=b, fault=4, words (low first)=11, 22, 33, 44
Output
data = 0x33, ready = 0, error = 1

Lane two supplies the word even though its done bit is low.

Example 3

No Transfer
Input
select=0000, done=f, fault=f, words (low first)=11, 22, 33, 44
Output
data = 0x0, ready = 1, error = 0

Stray fault bits on idle targets are quiet at the port.

Constraints and Contract

  • Drive all three outputs for every binary select vector.

Hints

Hint 1

Start with the idle result.

Hint 2

Read a single lane as a whole reply.

Hint 3

Try adding one extra select bit.

What the grader checks: All select vectors, varied independent target payloads and walking data bits.

411 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

ROM Answers

Input
select=0001, done=1, fault=0, words (low first)=11, 22, 33, 44
Expected output
data = 0x11, ready = 1, error = 0

The low word and its completion bit travel together.

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

Icarus Verilog · server