S7.4.1 Mux Four Pads from the Table

MediumImplement22 minIcarus Verilog · serverReview the topic

Wire an independently selectable data and enable pair for each of four package pins.

Hardware context: ap_sysctl four-pad routing slice. Board bring-up and package sharing

Build a structural netlist from the supplied route4 cell. Ports s, a, b, c, d and y are all two bits wide. Select codes 0, 1, 2 and 3 pass a, b, c and d respectively.

Each bus packs four pairs. Pair zero is bits 1:0. In a data pair the high bit is output enable and the low bit is output data. Preserve both bits, even for a disabled driver.

Signals in the Timeline

SignalWidthRole
sample12input of each check
Full specification
Pad / select pair0123
000gpio 0serial_fn 2aux 3
100gpio 1serial_fn 0aux 2
200gpio 2serial_fn 3aux 1
300gpio 3serial_fn 1aux 0

Examples

Example 1

All Released
Input
sel=8'h00, gpio=8'hff, serial_fn=8'hff, aux=8'hff
Output
pads = 0x0

Each select field chooses a constant release pair.

Example 2

Four GPIO Bundles
Input
sel=8'h55, gpio=8'he4, serial_fn=8'h00, aux=8'h00
Output
pads = 0xe4

Every pad passes its matching GPIO pair.

Example 3

Serial Permutation
Input
sel=8'haa, gpio=8'h00, serial_fn=8'he4, aux=8'h00
Output
pads = 0x72

Each pad draws from a different serial bundle.

Constraints and Contract

  • Use route4 cell instances and wiring only. Write explicit instances with literal wiring indices. Connect each result to its own pair in pads.

Hints

Hint 1

Read the table horizontally for one destination.

Hint 2

Find the low bit of each pair before wiring it.

Hint 3

Keep output enable with its data.

What the grader checks: All 256 select words plus walking data and enable bits. The structural parser rejects behavioral substitutes.

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 3 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

All Released

Input
sel=8'h00, gpio=8'hff, serial_fn=8'hff, aux=8'hff
Expected output
pads = 0x0

Each select field chooses a constant release pair.

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

Icarus Verilog · server