← Protocols Interviews

Interview Question · Concept

The Five AXI Channels

L0 FresherL1 Junioraxichannels
  • Likely at NVIDIA
  • Likely at Microchip
  • Likely at Broadcom

The Question

The interviewer asks

AXI has five channels. Name them, say who drives each, and tell me why reads and writes are kept apart.

Reveal the Model Answer

AW, W and B carry writes; AR and R carry reads. The manager drives AW, W and AR, and the subordinate drives B and R. Each channel has its own valid/ready handshake. The split lets a read and a write be in flight at once. It also lets write data move independently of its address. And you can add a register slice (a pipeline stage) to any one channel alone.

A Write and a Read in Flight at the Same TimeFive channels between one manager and one memory. Each channel is a valid/ready handshake of its own.
AWWBARRManagerissues transactionsMemorysubordinate

A lit wire carries a 1 on its VALID. A pill is a transfer in that cycle.

0123456789clkawvalidawreadywvalidwreadywdatax1122334455667788xbvalidbreadyarvalidarreadyrvalidrreadyrdataxc3c2c1c0c7c6c5c4
  1. Cycle 1

    Reset is active until after edge 1: every VALID is low, and the memory keeps its READYs low too.

  2. Cycle 2

    Reset is over. After this edge the memory raises every READY: it can take a request on any channel.

  3. Cycle 3

    The write address moves on AW: address 0x1000, two beats of four bytes, id 1.

  4. Cycle 4

    Two channels in one cycle: the first write beat on W, and a read address on AR. Nothing waited for anything.

  5. Cycle 5

    The second write beat, flagged as the last one. The write data is complete; the response is still to come.

  6. Cycle 7

    The first read beat arrives on R before the write has been answered. Reads and writes are independent.

  7. Cycle 8

    The write response on B and the last read beat on R, in the same cycle. One write, one read, five channels, seven cycles.

Measured on the bench of this lesson. Five handshakes, two transactions, no channel waiting on another.

ChannelDriven byCarriesPer transaction
AWmanagerwrite address and attributesone transfer
Wmanagerwrite data, WSTRB, WLASTAWLEN + 1 transfers
Bsubordinatewrite response, BIDone completion response
ARmanagerread address and attributesone transfer
Rsubordinateread data, RRESP per beat, RLAST, RIDARLEN + 1 transfers

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Fresher)

A good fresher answer names all five channels and who drives each one. It says a transfer happens at a rising edge where VALID and READY are both high.

Cross-Questions

Where the interviewer goes next. Open a node to practise that follow-up.

WhyWhat IfProve ItCompareScale It

  1. The Five AXI Channels
  2. WhyWhy Writes Need a B ChannelL0 FresherL1 Junior

    Why not just let the write finish when the last data beat is accepted? What does B give you?

    Reveal the Model Answer

    Accepting a beat only means the next stage had room, not that the write reached its target or succeeded. B is the completion response, and it carries the error code. The subordinate sends it only after it has the address and the last beat. For a Non-bufferable write, B also guarantees the write is visible to any manager. A manager that needs ordering waits for B.

    One Write: An Address, Four Beats, One ResponseA four-beat write of four bytes per beat to 0x100. The memory takes every transfer in the cycle it is offered.
    AWWBManagerone write, four beatsMemorytakes beats as offered

    The slots of the memory fill one beat at a time; the response comes only when all four are in.

    012345678910clkawvalidawreadyawaddrx100xwvalidwreadywdataxa0a1a2a3xwlastbvalidbready
    1. Cycle 3

      The address transfer: 0x100, AWLEN = 3 (four beats), AWSIZE = 2 (four bytes each), AWBURST = INCR, id 1.

    2. Cycle 4

      Beat 0 on W. The strobes say which byte lanes carry data; here all four.

    3. Cycle 6

      Beats 1 and 2 followed in consecutive cycles because WREADY stayed high.

    4. Cycle 7

      Beat 3 carries WLAST: the manager says this is the final beat of the burst. AWLEN said four, and this is the fourth.

    5. Cycle 10

      The response, three edges later on this bench: one BVALID, one BRESP of OKAY, with BID = 1 so the manager knows which write it answers.

    Measured on the bench. One transaction, six transfers: one on AW, four on W, one on B.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Fresher)

    A good fresher answer says B reports whether the whole write succeeded or failed.

  3. What IfA Read Issued Before the Write ResponseL1 JuniorL2 Mid-Level

    A manager writes a word, and right after its last W beat it reads the same address with the same ID. Is it guaranteed to see the new value?

    Reveal the Model Answer

    No. AXI never orders a read against a write, whatever the IDs, so the read may return the old value. The manager's tool is to wait for the write's B response before issuing the read. Lesson P2.12 measured exactly this, with a posted write and a six-cycle write latency. The read issued after the last data beat returned the old word.

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "Same ID means same ordering stream, so the read waits for the write."

    Same-ID ordering applies within reads and within writes. Read and write channels have no ordering guarantee between them.

    Source AMBA AXI Protocol Specification IHI 0022L §A5.3 Request ordering

  4. Scale ItOrdering a Flag After a BufferL2 Mid-LevelL3 Senior

    A DMA writes a 4 KB buffer, then writes a "done" flag that the CPU polls. How do you make sure the CPU never sees the flag before the data?

    Reveal the Model Answer

    Before writing the flag, wait for the B responses of every buffer write. Only a completion response makes an access observable. Same-ID writes stay in order only to the same location, so one ID does not order the buffer against the flag. A Bufferable B can come from a buffer partway along the path. It then guarantees observability only inside the write's Domain, so the CPU must sit in that Domain.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Mid-Level)

    A good mid-level answer says the manager must wait for every B response before it writes the flag.

  5. Prove ItSolve P2.12.1: The Stale ReadSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem P2.12.1

  6. What IfA Read Issued Before the Write ResponseL1 JuniorL2 Mid-Level

    A manager writes a word, and right after its last W beat it reads the same address with the same ID. Is it guaranteed to see the new value?

    Reveal the Model Answer

    No. AXI never orders a read against a write, whatever the IDs, so the read may return the old value. The manager's tool is to wait for the write's B response before issuing the read. Lesson P2.12 measured exactly this, with a posted write and a six-cycle write latency. The read issued after the last data beat returned the old word.

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "Same ID means same ordering stream, so the read waits for the write."

    Same-ID ordering applies within reads and within writes. Read and write channels have no ordering guarantee between them.

    Source AMBA AXI Protocol Specification IHI 0022L §A5.3 Request ordering

  7. Scale ItOrdering a Flag After a BufferL2 Mid-LevelL3 Senior

    A DMA writes a 4 KB buffer, then writes a "done" flag that the CPU polls. How do you make sure the CPU never sees the flag before the data?

    Reveal the Model Answer

    Before writing the flag, wait for the B responses of every buffer write. Only a completion response makes an access observable. Same-ID writes stay in order only to the same location, so one ID does not order the buffer against the flag. A Bufferable B can come from a buffer partway along the path. It then guarantees observability only inside the write's Domain, so the CPU must sit in that Domain.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Mid-Level)

    A good mid-level answer says the manager must wait for every B response before it writes the flag.

  8. Prove ItSolve P2.12.1: The Stale ReadSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem P2.12.1

  9. CompareFive Channels Against One Shared BusL1 Junior

    APB moves one transfer at a time over one set of wires. What does AXI gain with its five channels, and what does it cost?

    Reveal the Model Answer

    AXI gains concurrency: reads and writes overlap, and many transactions can be outstanding (issued but not yet finished). Each channel can also be pipelined on its own. APB is not pipelined, and every transfer takes at least two cycles. The cost is wires and logic: five handshakes, ID tracking, reorder buffers and a much harder verification job. That is why register blocks often sit on APB or AXI4-Lite.

    Self-Check

    Tick each key point you covered in your answer.

  10. Prove ItSolve P2.2.1: Catch the Broken ManagersSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem P2.2.1

What People Get Wrong

Common wrong answers and why they fail.

Misconception

"There are four channels: read address, read data, write address, write data."

Forgets B. A write must be acknowledged, and the response must come after the last data beat. Without B, the manager cannot know whether a write completed or failed.

Source AMBA AXI Protocol Specification IHI 0022L §A2.3.2 Dependencies between channel handshake signals; §A3.3.1 Write response

Spec Misquote

"The read response comes on its own channel, like B."

Read responses ride on R, one RRESP with every data beat. Only writes have a separate response channel.

Source AMBA AXI Protocol Specification IHI 0022L §A3.3.2 Read response

Learn It, Then Prove It