S4.2.1 Decode the Map

EasyImplement15 minIcarus Verilog · serverReview the topic

Turn a bridge selection and a local page number into one of seven device selects or a local error.

Hardware context: ap_soc address and response fabric. MCU bus integration and debug

Implement the second stage of the ap_soc map. The first stage has already tested the 64 KiB APB envelope. page carries address bits 15 through 12.

Signals in the Timeline

SignalWidthRole
sample10input of each check
Full specification
PageOwner
0UART0
1GPIO
2Timer and PWM
3Watchdog
4System control
5SPI
6DMA control

Each implemented page drives the corresponding device bit. Page 7 is a hole. Pages 8 through 15 are reserved.

Examples

Example 1

Console Page
Input
bridge=1, page=0
Output
device = 0x1, local_error = 0

The lowest page reaches the console.

Example 2

DMA Control
Input
bridge=1, page=6
Output
device = 0x40, local_error = 0

Page six selects the DMA registers.

Example 3

Growth Reserve
Input
bridge=1, page=8
Output
device = 0x0, local_error = 1

The parent routes the request here but the page is empty.

Constraints and Contract

  • Inside the bridge select exactly the named device or local_error. Outside the bridge drive every output low. Use combinational logic.

Hints

Hint 1

Decide first whether this bridge owns the address.

Hint 2

Use the map order to number the wires.

Hint 3

Check the last implemented page and its neighbor.

What the grader checks: All page numbers are tested with both parent selections.

35 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

Console Page

Input
bridge=1, page=0
Expected output
device = 0x1, local_error = 0

The lowest page reaches the console.

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

Icarus Verilog · server