AXI4 – Advanced eXtensible Interface
AXI4 is the highest-performance bus in the AMBA 4 family. Its five independent channels — write address, write data, write response, read address, and read data — allow simultaneous read and write operations, out-of-order transaction completion, and burst transfers up to 256 beats, making it the standard backbone interconnect in ARM Cortex SoC designs.
Overview
AXI4 (Advanced eXtensible Interface 4) is part of the AMBA 4 specification released by Arm. It is designed for high-bandwidth, low-latency on-chip communication — typically connecting high-performance masters such as CPUs, DMA engines, and GPUs to memory controllers, peripherals, and other slaves in an SoC.
The defining feature of AXI4 is its channel-based architecture. Rather than a single multiplexed bus, it uses five independent channels, each with its own VALID/READY handshake. This allows the address of the next transaction to be issued before the previous one completes, enabling pipelined and out-of-order operation.
AXI4 variants: AXI4 (full) supports bursts up to 256 beats and is used for memory-mapped transfers. AXI4-Lite is a simplified subset with no bursts, used for low-bandwidth control registers. AXI4-Stream removes address channels entirely for unidirectional data pipelines.
| Protocol | Bandwidth | Burst | Channels | Typical Use |
|---|---|---|---|---|
| APB | Low | None | 1 shared | Peripheral registers (UART, SPI, GPIO) |
| AHB | Medium | Up to 16 | Pipelined | On-chip bus for medium-speed masters |
| AXI4-Lite | Low–Medium | None | 5 (no burst) | Control/status register access |
| AXI4 | High | Up to 256 | 5 independent | DDR, DMA, CPU interconnect |
| AXI4-Stream | Very High | Unlimited | 1 (no addr) | DSP, video, DMA streaming |
Five Independent Channels
AXI4 separates traffic into five channels. Each operates independently with its own VALID/READY pair, so a slow response on the write response channel cannot block progress on the read address channel.
Signal Reference
Global
| Signal | Dir | Description |
|---|---|---|
| ACLK | – | Global clock. All channel signals sampled on rising edge. |
| ARESETn | – | Active-low synchronous reset. |
Write Address Channel (AW) — Master → Slave
| Signal | Width | Description |
|---|---|---|
| AWID | variable | Transaction ID. Allows out-of-order responses. |
| AWADDR | 32/64 | Start address of the burst. |
| AWLEN | 8 | Burst length minus one. 0x00=1 beat … 0xFF=256 beats. |
| AWSIZE | 3 | Bytes per beat: 0=1B, 1=2B, 2=4B, 3=8B, 4=16B … |
| AWBURST | 2 | Burst type: 00=FIXED, 01=INCR, 10=WRAP. |
| AWLOCK | 1 | Lock type for exclusive access sequences. |
| AWCACHE | 4 | Cache attributes: bufferable, cacheable, allocate hints. |
| AWPROT | 3 | Protection: privileged, secure, instruction/data. |
| AWQOS | 4 | Quality of Service priority (0=lowest, 15=highest). |
| AWVALID | 1 | Master asserts: address channel info is valid. |
| AWREADY | 1 | Slave asserts: ready to accept address. |
Write Data Channel (W) — Master → Slave
| Signal | Width | Description |
|---|---|---|
| WDATA | 32/64/128… | Write data for this beat. |
| WSTRB | WDATA/8 | Byte enable strobe. Bit n=1 means byte lane n is valid. |
| WLAST | 1 | Asserted on the final beat of a burst. |
| WVALID | 1 | Master: write data is valid. |
| WREADY | 1 | Slave: ready to accept write data. |
Write Response Channel (B) — Slave → Master
| Signal | Width | Description |
|---|---|---|
| BID | variable | Matches the AWID of the completed write transaction. |
| BRESP | 2 | Write response status: OKAY, EXOKAY, SLVERR, DECERR. |
| BVALID | 1 | Slave: response is valid. |
| BREADY | 1 | Master: ready to accept response. |
Read Address Channel (AR) — Master → Slave
| Signal | Width | Description |
|---|---|---|
| ARID | variable | Transaction ID for the read. |
| ARADDR | 32/64 | Start address of the read burst. |
| ARLEN | 8 | Burst length minus one. |
| ARSIZE | 3 | Bytes per beat. |
| ARBURST | 2 | Burst type: FIXED, INCR, WRAP. |
| ARLOCK | 1 | Exclusive access lock. |
| ARCACHE | 4 | Cache attributes. |
| ARPROT | 3 | Protection attributes. |
| ARQOS | 4 | QoS priority. |
| ARVALID | 1 | Master: read address is valid. |
| ARREADY | 1 | Slave: ready to accept read address. |
Read Data Channel (R) — Slave → Master
| Signal | Width | Description |
|---|---|---|
| RID | variable | Matches ARID of the request. |
| RDATA | 32/64/128… | Read data for this beat. |
| RRESP | 2 | Read response status per beat. |
| RLAST | 1 | Asserted on the final beat of the read burst. |
| RVALID | 1 | Slave: read data is valid. |
| RREADY | 1 | Master: ready to accept read data. |
VALID / READY Handshake
Every AXI4 channel uses the same two-signal handshake. A transfer completes on the clock edge where both VALID and READY are HIGH simultaneously.
Key rule: The source (e.g. master on AW channel) may not de-assert VALID once asserted, until the transfer completes. The destination (slave) may assert READY at any time — even before VALID — without restriction.
Write Transaction
A write transaction uses all three write channels: AW → W → B. The address and data channels can operate concurrently — the master does not need to wait for AW to complete before issuing data on W.
Steps: (1) Master drives write address on AW channel — accepted when AWVALID & AWREADY. (2) Master drives write data beats on W channel, asserting WLAST on the final beat — each beat accepted when WVALID & WREADY. (3) Slave issues write response on B channel — accepted when BVALID & BREADY.
Read Transaction
A read uses two channels: AR → R. The master sends the read address; the slave returns data beats with RLAST on the final beat. No separate response channel is needed — the per-beat RRESP carries status.
Burst Types & Attributes
| AWBURST | Name | Address Behaviour | Use Case |
|---|---|---|---|
| 2'b00 | FIXED | Same address for every beat | FIFO / circular buffer fills |
| 2'b01 | INCR | Increments by transfer size each beat | Sequential memory reads/writes (most common) |
| 2'b10 | WRAP | Like INCR but wraps at a power-of-2 boundary | Cache-line fills (cache line boundary wrap) |
The transfer size (AWSIZE / ARSIZE) encodes bytes per beat as a power of two, and must not exceed the data bus width:
| AXSIZE[2:0] | Bytes/beat |
|---|---|
| 3'b000 | 1 |
| 3'b001 | 2 |
| 3'b010 | 4 |
| 3'b011 | 8 |
| 3'b100 | 16 |
| 3'b101 | 32 |
| 3'b110 | 64 |
| 3'b111 | 128 |
Response Codes (BRESP / RRESP)
| Code | Name | Meaning |
|---|---|---|
| 2'b00 | OKAY | Normal successful completion. |
| 2'b01 | EXOKAY | Exclusive access succeeded (for LL/SC operations). |
| 2'b10 | SLVERR | Slave error — transaction reached the slave but was rejected (e.g., write to read-only register). |
| 2'b11 | DECERR | Decode error — no slave exists at that address (issued by interconnect). |
BRESP covers the entire write burst — one response after WLAST. RRESP is per-beat and travels with each R-channel transfer, allowing fine-grained error signalling within a burst.
Verilog RTL — AXI4-Lite Slave (Register File)
A minimal AXI4-Lite slave with a 4×32-bit register file. AXI4-Lite is the simplified subset (no bursts), widely used for control register access.
module axi4lite_slave #( parameter AW = 32, parameter DW = 32 ) ( input wire ACLK, ARESETn, // Write address channel input wire [AW-1:0] AWADDR, input wire AWVALID, output reg AWREADY, // Write data channel input wire [DW-1:0] WDATA, input wire [DW/8-1:0] WSTRB, input wire WVALID, output reg WREADY, // Write response channel output reg [1:0] BRESP, output reg BVALID, input wire BREADY, // Read address channel input wire [AW-1:0] ARADDR, input wire ARVALID, output reg ARREADY, // Read data channel output reg [DW-1:0] RDATA, output reg [1:0] RRESP, output reg RVALID, input wire RREADY ); // 4-register file reg [DW-1:0] regs [0:3]; reg [AW-1:0] aw_addr_lat; integer i; // ── Write path ────────────────────────────── always @(posedge ACLK) begin if (!ARESETn) begin AWREADY <= 1'b0; WREADY <= 1'b0; BVALID <= 1'b0; BRESP <= 2'b00; for (i=0; i<4; i=i+1) regs[i] <= 32'h0; end else begin // Accept write address AWREADY <= AWVALID && !AWREADY; if (AWVALID && AWREADY) aw_addr_lat <= AWADDR; // Accept write data and update register WREADY <= WVALID && !WREADY; if (WVALID && WREADY) begin if (aw_addr_lat[3:2] < 4) begin if (WSTRB[0]) regs[aw_addr_lat[3:2]][7:0] <= WDATA[7:0]; if (WSTRB[1]) regs[aw_addr_lat[3:2]][15:8] <= WDATA[15:8]; if (WSTRB[2]) regs[aw_addr_lat[3:2]][23:16] <= WDATA[23:16]; if (WSTRB[3]) regs[aw_addr_lat[3:2]][31:24] <= WDATA[31:24]; BRESP <= 2'b00; // OKAY end else BRESP <= 2'b10; // SLVERR BVALID <= 1'b1; end // Clear response once master accepts it if (BVALID && BREADY) BVALID <= 1'b0; end end // ── Read path ─────────────────────────────── always @(posedge ACLK) begin if (!ARESETn) begin ARREADY <= 1'b0; RVALID <= 1'b0; RDATA <= 32'h0; RRESP <= 2'b00; end else begin ARREADY <= ARVALID && !ARREADY; if (ARVALID && ARREADY) begin RDATA <= (ARADDR[3:2] < 4) ? regs[ARADDR[3:2]] : 32'hDEAD_BEEF; RRESP <= (ARADDR[3:2] < 4) ? 2'b00 : 2'b10; RVALID <= 1'b1; end if (RVALID && RREADY) RVALID <= 1'b0; end end endmodule