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. AXI backpressure and deadlock risk

Part 9 · Senior · Senior

AXI backpressure and deadlock risk

AXI channels, ordering, and backpressure: where a fabric can deadlock and how to keep it moving.

On this page

    Why this matters

    Four masters sharing one slave can hang with no protocol violation on any single channel, because each side waits on a channel the other stopped serving. The interviewer asks where you look first to hear if you know the channels are coupled.

    After this lesson you can: name the five AXI channels, explain how AW and W dependencies and a lost response create a hang, and say where to start debugging.

    The question

    The interviewer asks: four masters share one SRAM through an AXI fabric and the design hangs. Where do you look first, and how would you have prevented it?

    This tests channel independence. Every AXI channel carries its own valid/ready, and a hang is almost always one side waiting on a channel the other side stopped serving.

    Five channels, each with its own handshake

    AXI separates address, data, and response into independently handshaken channels. Each moves on its own valid/ready pair. Transaction dependencies and shared capacity can nevertheless couple their progress: AW and W may arrive in either order, and a write response needs both accepted address and data.

    The five AXI channels between one master and one slave. AW, W and AR run master to slave; the two response channels, B and R, run back in the accent colour.

    Read the picture top to bottom: three write-side channels, then two read-side channels. Every arrow is its own valid/ready link.

    • The two highlighted arrows are responses. A hang usually means one of them never comes, or comes and is never accepted.

    • B depends on both AW and W. That cross-channel dependency is where most write hangs start.

    • Nothing in the picture forces AW before W. A slave must accept them in either order.

    Channel

    Direction

    Carries

    AW

    Master to slave

    Write address and control.

    W

    Master to slave

    Write data, byte strobes, and the last-beat flag.

    B

    Slave to master

    Write response for each write transaction: OKAY, SLVERR or DECERR (EXOKAY for exclusive accesses in full AXI).

    AR

    Master to slave

    Read address and control.

    R

    Slave to master

    Read data, response, and the last-beat flag.

    The source holds address, control, and data stable until each handshake, exactly as in the previous lesson. Bursts end with the last-beat flag, and the response follows the last beat.

    Three hangs and what the trace shows

    Each hang below is a wait that never ends. On a waveform it looks the same every time: a VALID held high, or a response that never forms, for as long as you scroll.

    1. Starved response

    The master waits for R before accepting B, while shared slave capacity waits for B retirement before producing R.

    Signal

    Trace

    Meaning

    BVALID

    1, held

    The write response is offered

    BREADY

    0, held

    The master will not take B until its read returns

    RVALID

    0, held

    The slave's only slot is still owned by the unretired write

    Three nodes in a cycle: the master waits for R, R waits for a free slave slot, and the slot waits for the master to accept B.
    Wait-for graph of the starved-response hang. Each arrow points at what that party is waiting for; the arrows close a cycle, so nobody can move.

    Read each arrow as waits for. A deadlock is a closed loop in this graph; breaking any one arrow frees all three.

    • Prevention: provide response capacity, or prove the dependency graph has no cycle.

    • Drain R and B independently where possible, so a master never makes acceptance of one response wait for another.

    2. Orphaned address

    A write address is accepted but the write data never follows, so the response never forms.

    Signal

    Trace

    Meaning

    AWVALID / AWREADY

    Both 1 at one edge, then 0

    The address was accepted

    WVALID

    0, held

    The data beat never comes

    BVALID

    0, held

    No response can form without the data

    Prevention: generate AW and W independently without waiting for READY; monitor missing data and define system-level fault recovery. A timeout cannot authorize an early B response.

    3. Unmapped request

    No slave is selected, so no response ever comes.

    Signal

    Trace

    Meaning

    AWVALID (or ARVALID)

    1, held

    The master keeps offering, as it must

    AWREADY (or ARREADY)

    0, held

    Nothing answers

    Slave selects

    All 0

    The address hit a hole in the map

    Prevention: decode every address to one slave or the default slave, as the next lessons show.

    A legal rendezvous, and the forbidden circular wait

    Common pitfall

    Independence of handshakes does not forbid AWREADY or WREADY waiting for AWVALID/WVALID. AXI permits a subordinate to rendezvous those offers. The master must offer each VALID without waiting for READY. Keep AXI interface input-to-output combinational paths absent and analyze the complete wait graph.

    The one-write AXI-Lite slave below registers READY after observing both offers and a free write slot. This policy needs the master to hold both offers; it is not a universal throughput recommendation.

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    // snippet: one-slot AXI-Lite control sketch; payload capture uses these handshakes.
    // AWVALID and WVALID must remain asserted with stable payload until acceptance.
    always_ff @(posedge ACLK) begin
      if (!ARESETn) begin
        AWREADY <= 0; WREADY <= 0; BVALID <= 0;
      end else if (AWREADY && WREADY) begin
        AWREADY <= 0; WREADY <= 0;
        // Both handshakes occur here; captured write completes successfully in this sketch.
        BVALID <= 1;
      end else if (BVALID) begin
        if (BREADY) BVALID <= 0;
      end else begin
        AWREADY <= AWVALID && WVALID;
        WREADY <= AWVALID && WVALID;
      end
    end

    Each slot is one ACLK cycle, sampled just after the rising edge. WREADY is identical to AWREADY in this sketch, so only AWREADY is drawn.

    • Slot 1: AWVALID is high but WVALID is not, so the slave keeps READY low. The master keeps offering; it does not wait for AWREADY.

    • Slots 2 to 3: WVALID joins in slot 2, the slave registers READY high for slot 3, and both handshakes happen at the edge that ends slot 3.

    • Slots 4 to 5: BVALID holds for two slots because BREADY is low in slot 4. The response is accepted at the edge that ends slot 5.

    • Slot 6: the slot is free again and READY can rise for the next write.

    Forbidden circular wait: master waits for AWREADY before asserting WVALID; subordinate waits for WVALID before registering AWREADY. Starting with both low, neither can move. The master dependency violates AXI. A compliant master offers WVALID from pending data, as slot 2 shows, allowing the registered rendezvous to progress. In a real slave, BVALID additionally waits for actual write completion; capture payloads, strobes and error status and check stable B offers through acceptance.

    Interview

    Every channel can say not-ready. A design that cannot tolerate that on any channel will hang.

    Follow-ups

    AWVALID is stuck high with no AWREADY. Check the slave clock and reset first, then the interconnect select and ready path, then the address map. A missing decode leaves no slave selected at all.

    Check yourself The read data channel stalls for ten cycles with ARVALID held high. Which rule keeps the request alive?

    The same stability rule as any valid/ready link. Address and control stay stable until ARREADY joins ARVALID. Nothing about the R stall weakens that.

    Check yourself A master ignores the B channel because its writes are posted. What eventually stops it?

    The outstanding count. Every address consumes one slot until its response returns, so dropping responses fills the table and the master stalls forever behind its own writes.

    Check yourself AW has handshaken, no W beat has arrived, and a watchdog expires. May the slave assert BVALID with SLVERR?

    No. An error response still obeys write-response dependencies. Report the timeout separately and use the documented recovery protocol; do not retire the address or pair late data with a new transaction.

    Common wrong answers

    Backpressure means the bus is broken. Backpressure is flow control doing its job. Sustained backpressure means the buffering or arbitration is undersized, not that the protocol failed.

    Posted writes need no response. The B response is still required for every address. Ignoring it leaks outstanding slots until the master stops.

    “SLVERR always means retry” is unsafe. SLVERR means a slave could not complete an access successfully, for example because of an unsupported operation, internal timeout or unavailable resource. An interconnect that cannot decode an address returns DECERR. Retry policy depends on the device contract and whether repeating the access is safe and idempotent; an error alone is not permission to replay a write.

    Notes: AXI4-Lite depth and timeouts

    AXI4-Lite has no IDs but supports multiple outstanding transactions with ordered responses. A simple slave may deliberately limit each direction to one outstanding transaction using backpressure. Full AXI adds IDs to distinguish transaction streams and permit applicable cross-ID response reordering; concurrency alone does not require IDs.

    Outstanding depth is an implementation limit, not a universal one-transaction AXI4-Lite rule. Lite can queue requests and respond in order without IDs; a one-entry slave is merely the smallest implementation.

    If AW is accepted but W never comes, the slave must retain the outstanding transaction: AXI has no timeout-based cancellation handshake. In AXI4, BVALID requires an accepted address and all write data through the accepted WLAST beat; AXI4-Lite requires both accepted AW and W. A watchdog may report a separate system fault, stop admission and initiate coordinated isolation/reset, but must not fabricate an early B response or reuse the slot for an unrelated write. If recovery retains the link, define how late W data is drained and paired with the original address before returning an error. AW and W need not arrive together; neither VALID may wait for the other channel's READY.

    Remember

    • Each channel has its own valid/ready, yet a write response needs both the accepted address and all the data.

    • A master must offer each VALID without waiting for READY. A slave may wait for both offers before READY.

    • Every address consumes an outstanding slot until its response returns. Dropped responses fill the table and stall the master.

    Rule of thumb: every channel can say not ready, so no side may wait on another channel's READY before offering VALID.

    How this was checked

    The rendezvous waveform is simulated with Icarus Verilog 13.0 (2026-10-17) from the page's one-slot sketch, driven by a compliant master; the expected lanes were written by hand and matched. The bench also checks that AWREADY and WREADY never differ. It shows one write only, not a fabric, an outstanding queue or the deadlocks described.

    Keep going

    • Practice: Waveform debug: a write transaction timeout

    • Interview: run a mock interview on this topic

    Related topics

    • AXI-Lite

    • AXI-Stream

    Previous

    334 / 350

    Next: Register file vs SRAM

    Up next

    Up nextRegister file vs SRAM

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Unmapped addresses, decode errors and SLVERR
    ACLKAWVALIDWVALIDAWREADYBVALIDBREADY
    The one-slot sketch simulated with a compliant master: the address is offered first, data joins a cycle later, both are accepted together, and the response waits one cycle for BREADY