Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
    • Low-Power RTL Hub
    • DFT and Scan Hub
    • Physical Awareness Hub
    • Waveform Debug Hub
    • STA and ECO Hub
    • RTL-to-Implementation Closure
    • DFT-Ready RTL
    • Capstone: Resilient Streaming Peripheral
    • Principal Design Review
    • Senior RTL Interview Questions & Model Answers
      • Interview: Combinational and Arithmetic
      • Interview: Sequential and Pipelines
      • Interview: FSM and Control
      • Interview: Timing and STA
      • Interview: CDC and Reset
      • Interview: Memories and Buses
        • The valid/ready contract
        • AXI backpressure and deadlock risk
        • Register file vs SRAM
        • Unmapped addresses, decode errors and SLVERR
      • Interview: Low-Power Design
      • Interview: Debug and ECO
      • Interview: Coding and Whiteboard
  • Glossary and Notation
Loading lesson

‹Interview: Memories and Buses
  1. Topics
  2. RTL Design
  3. Senior & Interview
  4. Senior RTL Interview Questions & Model Answers
  5. Interview: Memories and Buses
  6. Unmapped addresses, decode errors and SLVERR

Part 9 · Senior · Senior

Unmapped addresses, decode errors and SLVERR

Unmapped addresses need a default response: distinguish AXI decode errors from a private bus error flag.

On this page

    Why this matters

    A read of an unmapped address that returns OKAY and zeros looks like valid idle status, and software spins on it for a week. The interviewer asks what the fabric should have done to test whether you design the map to fail loudly.

    After this lesson you can: design an address decoder with a default slave that returns an error, and tell DECERR from SLVERR.

    The question

    The interviewer asks: a master reads an address nobody owns and gets OKAY with garbage data. Software then spins on a fake status bit for a week. What is broken, and what should the fabric have done?

    This tests map completeness. Every address must hit exactly one slave or the default slave, and the default slave must answer with an error, never with OKAY. Fabric-level holes return DECERR (or a documented error); reserved offsets inside a slave follow that slave's documented policy, often SLVERR or RAZ/WI (read-as-zero, write-ignored).

    Model answer

    A decoder turns each address into exactly one select. Addresses outside every region route to a default slave, which returns an error response so the bug surfaces on the first access instead of in the field.

    The address map of the decoder below: addr[7:4] = 0 selects the RAM, 1 selects the UART, and every other value goes to the default slave, which answers with an error. Bands are not drawn to scale.

    Read the bar from the top: each band is one select, and the bands together cover all 256 addresses with no gap.

    • The two named regions cover only 32 of 256 addresses. The default slave owns the other 224.

    • Its response is AXI DECERR; a private bus may use its documented error flag. Never silent OKAY or a hang.

    • Adding a slave carves a band out of the default region. The default arm itself never goes away.

    For AXI, an interconnect that cannot decode an address returns DECERR, commonly through a default slave. A selected slave reports its own access failure as SLVERR. The small decoder below is a private-bus illustration with a Boolean signal named slverr, not an AXI BRESP/RRESP implementation. The flag keeps the name slverr, but for an unmapped address it stands for what AXI calls DECERR; an AXI adapter must preserve the distinction.

    Private-bus contract here: one request at a time, address held while req is high; done = ack || slverr. Exactly one completion flag is asserted for each active request, ack for success and slverr for error. The master samples done at a rising edge and drops req before the next edge. This combinational decoder completes in one sampled edge; it is not a pipelined AXI slave.

    Edge

    req / address

    ack / slverr / done

    Master action

    Before 1

    1 / 0x80

    0 / 1 / 1

    Hold address until sampling

    1

    1 / 0x80

    0 / 1 / 1

    Retire once as an error; do not wait for ack alone

    2

    0 / irrelevant

    0 / 0 / 0

    Idle; no duplicate retirement

    Keep one central map. Decoding independently in each slave invites gaps and overlaps, and a gap that returns OKAY with garbage is the failure in the question.

    Common pitfall

    Answering unmapped reads with OKAY and zeros so software keeps working. It keeps working until the field return. An error response points at the map on the first access.

    Follow-ups

    In an AXI adapter, register or buffer the error response according to AXI interface timing and hold its valid/payload through acceptance. The private combinational decoder below instead has an explicitly single-edge completion contract.

    A watchdog reports missing progress, but cannot cancel accepted downstream work by itself. Stop new admission, retain ownership of the original transaction, and drain/quarantine late responses or use coordinated reset before slot reuse. Track accepted = delivered + cancelled + outstanding, where cancellation requires the recovery contract. See Error paths and timeouts for late-response recovery and the preceding AXI lesson for write-response dependencies.

    Two regions claim the same address. Priority order in one decoder, with an assertion that the regions never overlap. Overlapping selects mean two slaves drive the response.

    Check yourself A status poll hits an AXI address hole and returns zeros with OKAY. What is the symptom, and what should change?

    Software can read false idle flags forever or silently take a wrong mode. The interconnect should return DECERR. The CPU/bridge/software contract determines whether that becomes a trap, a status error or another reported fault; the AXI response alone does not guarantee a CPU exception.

    Check yourself The map gains a third slave. What changes in the decoder?

    One more case arm and a narrower default region. The default arm stays: it must catch everything the named arms do not.

    Interview

    Every address decodes to exactly one slave or to the default slave, and the default slave answers with an error, never with OKAY. Reserved offsets inside a slave follow its documented policy.

    Common wrong answers

    Return OKAY with zeros for holes. Zeros look like valid idle status, so drivers spin or misconfigure. The error response exists precisely for this case.

    Hang the transfer until software is fixed. A hung transfer locks every master behind the same fabric. Errors propagate; hangs accumulate.

    Let each slave decode its own range. Independent decoders drift apart across edits. One map, one decoder, one default.

    Testbench

    A decoder with a default-slave error arm, plus a testbench that sweeps all 256 addresses and checks every select and response.

    bus_decode.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    `timescale 1ns/1ps
    module bus_decode (
      input  logic       req,
      input  logic [7:0] addr,
      output logic       sel_ram, sel_uart, ack, slverr
    );
      always_comb begin
        sel_ram = 1'b0; sel_uart = 1'b0; ack = 1'b0; slverr = 1'b0;
        if (req) begin
          case (addr[7:4])
            4'h0:    begin sel_ram = 1'b1; ack = 1'b1; end
            4'h1:    begin sel_uart = 1'b1; ack = 1'b1; end
            default: begin slverr = 1'b1; end              // default slave: error, never OKAY
          endcase
        end
      end
    endmodule
    

    Remember

    • Every address decodes to exactly one slave or to the default slave. The default slave answers with an error, never OKAY.

    • The interconnect returns DECERR for an address it cannot decode. A selected slave reports its own failure as SLVERR.

    • Keep one central map. Per-slave decoders drift apart and leave gaps and overlaps.

    Rule of thumb: a hole in the address map must produce an error response on the first access.

    How this was checked

    The decoder in this lesson is a private-bus illustration with a Boolean flag named slverr, not an AXI BRESP or RRESP implementation. Its testbench sweeps all 256 addresses and checks every select and response.

    Keep going

    • Practice: AXI4-Lite slave with invalid address protection

    • Interview: run a mock interview on this topic

    Related topics

    • Bus integration

    • AXI-Lite

    Previous

    336 / 350

    Next: Interview: Low-Power Design

    Up next

    Up nextInterview: Low-Power Design

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • The valid/ready contract
    • AXI backpressure and deadlock risk