AXI Protocol Verification in 2026: SystemVerilog and UVM Guide

In short: AXI protocol verification is the work of proving that every AXI interface in a chip follows the AMBA AXI rules: VALID and READY handshakes on five channels, legal bursts, correct IDs and ordering, the right responses, and correct data end to end. You do it with a UVM agent, SVA protocol checks, a scoreboard and functional coverage.

New to the protocol itself? Start with AXI Protocol and Cache Coherency: Concepts and Interview Q&A, then come back here to verify it.

  • What it is: checking the handshake, burst, ID, ordering and response rules on the AW, W, B, AR and R channels, plus data integrity through a scoreboard.
  • What changed in 2026: Arm released AXI Issue L on 27 August 2025, adding an optional credited transport next to VALID/READY, and vendors shipped AXI-L verification IP in early 2026.
  • Where bugs hide: not in single reads and writes, but in many outstanding transactions, ID reuse, backpressure, 4KB boundaries, narrow transfers and exclusive access.
  • The catch: AI assistants can draft agents, SVA and covergroups fast, but NVIDIA’s FVEval study (2024) found the best model wrote functionally correct SVA only about 46% of the time.
  • The rule: assertions catch the protocol, the scoreboard catches the data, coverage proves you looked. You need all three.

Why AXI protocol verification matters in 2026

Open almost any SoC and the blocks talk over AXI. The CPU cluster, the DMA engines, the GPU, the memory controller and a long tail of peripherals all read and write through AXI ports and an AXI interconnect.

That makes AXI the most reused interface you will ever verify. One agent, written well, gets used on every port of every project. One agent written badly lets the same class of bug slip through on every port too.

The pressure on verification is real. The 2024 Wilson Research Group study, run with Siemens EDA, reported that only 14% of IC/ASIC projects hit first-silicon success, the lowest level in two decades of the study. The 2026 executive findings (604 participants, published September 2026) say first-silicon success keeps falling, most projects run behind schedule, and verification takes roughly half of project time.

AXI itself keeps moving too. Arm’s AXI specification (ARM IHI 0022) went from Issue K in September 2023 to Issue L in August 2025. Issue L adds credited transport as an option next to the classic VALID/READY handshake, plus new security and compression features. If your agent was written for AXI4 in 2015, it is time to look at it again.

This guide walks through AXI from the ground up, then builds a working UVM environment: interface, transaction, driver with outstanding transactions, monitor, scoreboard, coverage and SVA. It also covers AXI4 versus AXI5, cache coherency basics with ACE and CHI, and how to use AI tools for this work without getting burned.

What the industry data says about AXI verification

SourceWhat was reportedHow to read it
Wilson Research Group and Siemens EDA, IC/ASIC trend report (2024)Only 14% of projects reached first-silicon success, from 597 eligible participants.Most respins are not exotic. Interface and integration bugs are a big share, and AXI sits on almost every interface.
Wilson Research Group 2026 executive findings (Sept 2026)604 participants; first-silicon success continues to decline; most projects behind schedule; verification about half of project time.There is no slack. An AXI agent you can reuse on day one saves weeks per project.
Arm AMBA AXI specification, Issue L (27 Aug 2025)Adds credited transport as an alternative to VALID/READY, plus new chapters on PAS signalling, compression and cache maintenance.Your protocol checks must now be configurable by interface property, not hard-coded to one handshake.
Synopsys blog on AXI-L VIP (March 2026)Lists Credited Transport, Arm Compression Technology, PAS Signalling, GDI and wrapping burst restrictions as AXI-L features.Commercial VIP already tracks Issue L. Home-grown agents usually lag, so know what yours does not check.
Arm AMBA CHI specification, Issue G (March 2024)Ninth public CHI release, used for coherent CPU and interconnect traffic.On big SoCs the coherent fabric is CHI, and AXI or ACE-Lite sits at the edges. Verify both sides of each bridge.
NVIDIA FVEval benchmark (Oct 2024)Best zero-shot model (gpt-4o) reached about 46% functional correctness turning spec text into SVA.AI-written AXI assertions need proof, by formal or simulation, before they guard anything.

What is the AXI protocol? A simple way to picture it

AXI stands for Advanced eXtensible Interface. It is part of Arm’s AMBA family, next to APB for slow registers, AHB for older simple buses, and CHI for coherent high-end fabrics.

Picture a busy restaurant kitchen. A waiter holds up a plate and says “I have an order to hand over”. That is VALID. The cook, when free, says “I can take it”. That is READY.

The plate only changes hands at the moment both are true. If the cook is busy, the waiter keeps holding the plate, and is not allowed to swap it for a different one while waiting.

Now picture five waiter and cook pairs working at the same time: one for write addresses, one for write data, one for write responses, one for read addresses and one for read data. Because the pairs are separate, many orders can be in flight at once. That is why AXI is fast, and also why it is hard to verify.

Recent Arm documents call the two sides Manager and Subordinate. Older documents and a lot of code still say master and slave. This guide uses Manager and Subordinate in prose and keeps short names in code.

Key features of AXI, and why each one exists

  • Separate address and data phases. The address goes out on its own channel, so address and data can pipeline instead of waiting on each other.
  • Burst transfers with one address. One address covers up to 256 beats for INCR in AXI4, which cuts address traffic.
  • Byte strobes (WSTRB). A write can start off a natural boundary or touch only some bytes of the bus.
  • Separate read and write channels. A DMA engine can read and write at the same time.
  • Transaction IDs. Responses for different IDs may come back out of order, so a fast subordinate does not wait behind a slow one.
  • Register slices are easy. Every channel is one-way with a handshake, so timing stages can be added anywhere without breaking the protocol.

AXI architecture: the five channels and the signals that matter

AXI splits reads and writes into five independent one-way channels. Each channel has its own VALID, READY and payload. The diagram shows the direction of each one.

The five AXI channels between a Manager and a SubordinateA Manager box on the left and a Subordinate box on the right. Three arrows point right: write address AW, write data W, read address AR. Two arrows point left: write response B and read data R. Each arrow carries VALID from the sender and READY from the receiver.ManagerCPU, DMA, GPUSubordinatememory, IP, bridgeAW: write address (AWID, AWADDR, AWLEN, AWSIZE, AWBURST)W: write data (WDATA, WSTRB, WLAST)B: write response (BID, BRESP), one per burstAR: read address (ARID, ARADDR, ARLEN, ARSIZE, ARBURST)R: read data (RID, RDATA, RRESP, RLAST), one per beat
Figure 1. The five AXI channels. Every channel has VALID from the sender and READY from the receiver.
ChannelDirectionCarriesKey verification rule
Write address (AW)Manager to SubordinateAWID, AWADDR, AWLEN, AWSIZE, AWBURST, AWCACHE, AWPROT, AWQOSPayload stable while AWVALID is high and AWREADY is low
Write data (W)Manager to SubordinateWDATA, WSTRB, WLAST (no WID in AXI4)Beat count equals AWLEN + 1, WLAST only on the final beat
Write response (B)Subordinate to ManagerBID, BRESPOne B per write burst, only after the AW handshake and the last W beat
Read address (AR)Manager to SubordinateARID, ARADDR, ARLEN, ARSIZE, ARBURSTSame stability rule as AW
Read data (R)Subordinate to ManagerRID, RDATA, RRESP, RLASTSame-ID reads return in request order; RLAST on beat ARLEN + 1

Why does a read need only two channels but a write needs three? A read’s data flows back to the Manager, so the R channel can carry the response on every beat. A write’s data flows away from the Manager, so a separate B channel is needed to say “done”.

Bursts: FIXED, INCR and WRAP

AxBURSTAddress behaviourTypical useLength limit (AXI4)
FIXED (0b00)Same address every beatPushing into or draining a FIFO1 to 16 beats
INCR (0b01)Address grows by the transfer size each beatNormal memory access, DMA1 to 256 beats
WRAP (0b10)Grows, then wraps at a boundary of (beats x bytes)Cache line fills, critical word first2, 4, 8 or 16 beats; start address aligned to the size

AxLEN is beats minus one, so AWLEN of 4 means five beats. AxSIZE is log2 of bytes per beat, so AxSIZE of 3 means 8 bytes. Off-by-one confusion here is one of the most common agent bugs.

Responses

xRESPNameMeaning
0b00OKAYNormal success, or an exclusive access that failed
0b01EXOKAYExclusive access succeeded
0b10SLVERRThe Subordinate was reached but reported an error
0b11DECERRThe interconnect found no Subordinate at that address

How AXI works step by step

The handshake rules

  • A transfer happens on the rising edge of ACLK where VALID and READY are both high.
  • The source must not wait for READY before raising VALID. Making VALID depend on READY can deadlock the bus.
  • Once VALID is high, it stays high, with the payload unchanged, until the handshake completes.
  • The destination may wait for VALID before raising READY, and may raise or drop READY freely before VALID arrives.
  • During reset, the Manager drives ARVALID, AWVALID and WVALID low, and the Subordinate drives RVALID and BVALID low.

Example: one 2-beat INCR write, channel by channel

StepChannelWhat happens
1AWManager drives AWVALID with the address, AWLEN = 1, AWSIZE and AWBURST = INCR. The Subordinate raises AWREADY and the address is accepted.
2WManager drives beat 1 with WSTRB and WLAST = 0. WREADY is high, so beat 1 is accepted. In AXI this beat may even come before the AW handshake.
3WManager drives beat 2 with WLAST = 1. The final beat is accepted.
4BThe Subordinate drives BVALID with BRESP = OKAY. BREADY is high, so one response closes the whole burst.

Example: WRAP address calculation

Take a 4-beat WRAP burst of 4-byte beats (AxSIZE = 2, AxLEN = 3) starting at 0x24. The wrap size is 4 x 4 = 16 bytes, so the wrap boundary is 0x20.

BeatAddressNote
10x24Start: the critical word the CPU asked for
20x28Add 4
30x2CTop of the 16-byte block 0x20 to 0x2F
40x20Wraps back to the boundary

This is how a cache line fill returns the word the CPU is waiting for first, then fills the rest of the line.

Example: the 4KB boundary

A burst must not cross a 4KB address boundary, because 4KB is the smallest page a Subordinate region can be mapped to. An 8-beat INCR read of 4 bytes from 0xFF0 would run into 0x1000, so the Manager must split it.

BurstStartBeatsAddresses
A0xFF040xFF0, 0xFF4, 0xFF8, 0xFFC
B0x100040x1000, 0x1004, 0x1008, 0x100C

Example: a narrow transfer

A 32-bit Manager writes on a 64-bit bus (AxSIZE = 2 on an 8-byte bus). In an INCR burst from 0x00, the active byte lanes move with the address.

BeatAddressActive lanesWSTRB
10x000 to 30000_1111
20x044 to 71111_0000
30x080 to 30000_1111

Outstanding transactions, IDs and ordering

A Manager may issue many addresses before any response returns. These are outstanding transactions. A DMA engine with 16 outstanding reads keeps the memory controller busy while each read is in flight.

The ID decides ordering. Transactions with the same ID must complete in the order they were issued. Transactions with different IDs may complete in any order. In AXI4, write data has no ID and must arrive in the same order as the write addresses.

AXI3 allowed write data interleaving using WID. AXI4 removed WID, so W beats from one burst cannot mix with another. Read data from different IDs may still interleave on the R channel, beat by beat, unless the Subordinate is configured not to.

Exclusive access

Exclusive access gives you atomic read-modify-write without locking the bus. The Manager does an exclusive read (AxLOCK = 1), modifies the value, then does an exclusive write to the same address with the same ID.

The write returns EXOKAY only if no other Manager wrote that location in between. Otherwise it returns OKAY, the write does not update memory, and software retries. A Subordinate that does not support exclusives returns OKAY to the exclusive read, which tells the Manager the feature is missing.

Buffered writes and AxCACHE

An interconnect or bridge may accept a write and send BRESP before the data reaches its final target. That is a bufferable write. An early response means “accepted”, not “stored in DRAM”. AxCACHE bits tell the system whether that is allowed, and AxPROT marks privileged, secure and instruction accesses.

AXI3 vs AXI4 vs AXI5: what changed

Most AXI you will meet in 2026 is AXI4 or AXI5. AXI3 still shows up in older IP and bridges. The table summarises what matters for a verification engineer.

FeatureAXI3AXI4AXI5 (AMBA 5)
INCR burst lengthUp to 16 beatsUp to 256 beatsUp to 256 beats
Write data interleaving (WID)AllowedRemovedRemoved
Locked transactionsYesRemoved; exclusive onlyExclusive plus atomic transactions
QoS, REGION, USER signalsNoAddedKept
Lite and Stream variantsNoAXI4-Lite, AXI4-StreamAXI5-Lite and AXI5-Stream exist
Atomic transactions, cache stashingNoNoYes
Data poison and interface parityNoNoYes (parity added in Issue G)
Unique ID indicator, read data chunkingNoNoYes (Issue G)
MPAM and MTE supportNoNoYes (Issues G and H)
Write Deferrable, PBHA, Subsystem IDNoNoYes (Issue J)
Credited transport, compression, PAS signallingNoNoOptional in Issue L (2025)

AXI5 is not one fixed signal list. The specification describes optional features through interface properties, so an AXI5 port might use only parity and atomics. Your agent should read a configuration object and switch checks on per feature, instead of assuming every port has everything.

The big Issue L change is credited transport. When enabled, the receiver hands credits to the sender, and the sender may only send when it holds a credit. Cadence’s September 2025 write-up describes resource planes, shared credits and a limit of 1 to 15 credits per resource plane. For verification, this means a new class of checks: never send without a credit, never return more credits than the limit, and never lose a credit across reset or power gating.

Cache coherency basics: ACE and CHI pointers

Plain AXI has no way to ask another cache what it holds. If a CPU has a dirty copy of a line and a DMA engine reads that address from DRAM, the DMA gets stale data. Coherency protocols fix that.

MESI in one minute

StateMeaningCan it write without asking?
Modified (M)Only copy, dirty, memory is staleYes
Exclusive (E)Only copy, cleanYes, and it becomes M
Shared (S)Other caches may have it, cleanNo, must invalidate others first
Invalid (I)No valid copyNo, must fetch first

ACE uses five states (UniqueDirty, SharedDirty, UniqueClean, SharedClean, Invalid), a close cousin of MOESI. The idea is the same: before writing, a cache must be the only holder.

ACE and ACE-Lite on top of AXI

ACE keeps the five AXI channels and adds three snoop channels so the interconnect can question each cache.

Added channelDirectionPurpose
AC (snoop address)Interconnect to cacheAsks a cache about a line
CR (snoop response)Cache to interconnectSays whether it has the line and in what state
CD (snoop data)Cache to interconnectReturns the line if it holds a dirty copy

Full ACE is for Managers with their own coherent cache, such as CPU clusters. ACE-Lite is for Managers with no cache that still need coherent reads and writes, such as an I/O coherent DMA or GPU. ACE-Lite adds the coherency signals on AW and AR but has no snoop channels, because there is nothing in it to snoop.

Where CHI fits

CHI (Coherent Hub Interface) is Arm’s packet-based coherent protocol for large designs. Instead of wires per field, it sends request, response, snoop and data packets between nodes: Request Nodes (RN), Home Nodes (HN) and Subordinate Nodes (SN). The latest public issue is CHI Issue G, March 2024.

A typical 2026 SoC uses CHI between CPU clusters and the coherent mesh, then AXI or ACE-Lite at the edges for I/O masters and memory. The bridges between CHI and AXI are rich bug territory: ordering, response mapping, and exclusive and atomic translation all change across them.

Snoop-based coherency (broadcast every request) is simple but traffic grows with every cache added. Directory-based coherency keeps a record of who holds each line and snoops only those caches. Most large CHI meshes use a directory or snoop filter for that reason.

Verifying coherency is its own discipline. For AXI verification the practical message is: know which ports are plain AXI, which are ACE-Lite and which cross into CHI, and pick VIP and checkers for each one.

AXI from the RTL and verification point of view

From the RTL side, an AXI port is a handful of small state machines and FIFOs: an AW queue, a W data path, a response queue per ID, and an R return path. Designers worry about throughput and area. Verification worries about the corners those choices create.

RTL choiceBug it tends to createWhat catches it
Skid buffer or register slice on a channelPayload changes while VALID is high and READY is lowStability SVA on every channel
Shared response FIFO across IDsSame-ID responses reordered when one path is fasterPer-ID ordering check in the monitor or scoreboard
W data accepted before AWData written to the wrong address, or B sent before AWWrite dependency SVA plus scoreboard
Beat counter for WLAST or RLASTLAST on the wrong beat, especially at AxLEN = 0 or 255Beat-count SVA and len coverage with edge bins
Address generator for WRAP or narrow transfersWrong lanes or wrong wrap pointScoreboard with a byte-accurate memory model
Exclusive monitorEXOKAY after another Manager wrote the lineDirected two-Manager race test plus checker
ID width growth in the interconnectResponse routed to the wrong ManagerEnd-to-end scoreboard per Manager

A good rule: the protocol checker owns the pins, the scoreboard owns the data, and coverage owns the question “did we really try that?”. Mixing those jobs makes each one weaker.

Where AXI sits in a UVM environment

An AXI agent is a standard UVM agent. In active mode it has a sequencer, a driver and a monitor. In passive mode it only has the monitor, which is what you use on internal ports in a subsystem or SoC. If the layering is new to you, the classic UVM testbench architecture post is a good warm-up.

UVM environment for AXI protocol verificationA test contains an environment. The environment holds an active AXI manager agent with sequencer, driver and monitor, a scoreboard and a coverage collector. The driver and monitor connect through a virtual interface to the DUT. An SVA protocol checker is bound to the same interface. The monitor sends transactions to the scoreboard and coverage.axi_test, axi_envaxi_agent (active)sequencerdrivermonitorscoreboardbyte memory model, per-ID ordercoverageburst x len x size x resp, depthaxi_if (virtual interface)AW, W, B, AR, RDUTSVA checker(bind)
Figure 2. A typical AXI UVM environment. The checker is bound to the interface so it runs in every test.
ComponentJobNotes
axi_txnOne complete burst, independent of pin timingFields mirror AxID, AxADDR, AxLEN, AxSIZE, AxBURST, data, strobes, responses
axi_seq and friendsConstrained-random and directed trafficLayer them with virtual sequences in a subsystem
axi_driverTurns transactions into handshakes on five channelsMust support many outstanding transactions and random backpressure
axi_monitorRebuilds complete transactions from pinsPairs AW with W, matches B and R by ID, publishes on an analysis port
axi_scoreboardChecks data and ordering end to endByte memory model plus per-ID expected queues
axi_covFunctional coverageBurst, length class, size, response, ID reuse, outstanding depth
axi_protocol_checkerSVA on the pinsBound to the DUT port, also reusable in formal
axi_cfgConfigurationData width, ID width, max outstanding, which AXI5 features are on

The monitor reaches the pins through a virtual interface set in the config database. If that pattern is new, see passing a virtual interface with uvm_config_db. Monitor to scoreboard traffic uses TLM analysis ports.

SystemVerilog and UVM implementation of an AXI agent

The code below is a compact but complete AXI4 Manager environment: package, interface, transaction, sequences, a driver that keeps up to 8 transactions in flight, a monitor that matches responses by ID, a scoreboard, coverage, and a small behavioural memory Subordinate so the whole thing runs. It targets IEEE 1800-2023 SystemVerilog and the Accellera UVM library for IEEE 1800.2 (current reference release: UVM 2020-3.2).

Widths are fixed in the package to keep the virtual interface simple: 32-bit address, 64-bit data, 4-bit ID.

Package constants and the interface

// axi_pkg_defs.svh : shared widths and encodings
package axi_defs_pkg;
  localparam int AXI_AW  = 32;           // address width
  localparam int AXI_DW  = 64;           // data width (8 byte lanes)
  localparam int AXI_IDW = 4;            // ID width
  localparam int AXI_NB  = AXI_DW / 8;   // bytes per bus beat

  typedef enum logic [1:0] {AXI_FIXED = 2'b00, AXI_INCR = 2'b01, AXI_WRAP = 2'b10} axi_burst_e;
  typedef enum logic [1:0] {AXI_OKAY = 2'b00, AXI_EXOKAY = 2'b01, AXI_SLVERR = 2'b10, AXI_DECERR = 2'b11} axi_resp_e;
endpackage

// axi_if.sv : the five AXI channels with VALID/READY on each
interface axi_if (input logic aclk, input logic aresetn);
  import axi_defs_pkg::*;
  // Write address channel (AW)
  logic [AXI_IDW-1:0] awid;   logic [AXI_AW-1:0] awaddr;
  logic [7:0]         awlen;  logic [2:0]        awsize;
  logic [1:0]         awburst;
  logic               awvalid, awready;
  // Write data channel (W): no WID in AXI4
  logic [AXI_DW-1:0]  wdata;  logic [AXI_NB-1:0] wstrb;
  logic               wlast, wvalid, wready;
  // Write response channel (B)
  logic [AXI_IDW-1:0] bid;    logic [1:0]        bresp;
  logic               bvalid, bready;
  // Read address channel (AR)
  logic [AXI_IDW-1:0] arid;   logic [AXI_AW-1:0] araddr;
  logic [7:0]         arlen;  logic [2:0]        arsize;
  logic [1:0]         arburst;
  logic               arvalid, arready;
  // Read data channel (R)
  logic [AXI_IDW-1:0] rid;    logic [AXI_DW-1:0] rdata;
  logic [1:0]         rresp;
  logic               rlast, rvalid, rready;

  // Driver view: outputs change 1 time unit after the clock edge,
  // inputs are sampled just before the edge.
  clocking mcb @(posedge aclk);
    default input #1step output #1;
    output awid, awaddr, awlen, awsize, awburst, awvalid;  input awready;
    output wdata, wstrb, wlast, wvalid;                    input wready;
    input  bid, bresp, bvalid;                             output bready;
    output arid, araddr, arlen, arsize, arburst, arvalid;  input arready;
    input  rid, rdata, rresp, rlast, rvalid;               output rready;
  endclocking

  // Monitor view: everything is an input.
  clocking moncb @(posedge aclk);
    default input #1step;
    input awid, awaddr, awlen, awsize, awburst, awvalid, awready;
    input wdata, wstrb, wlast, wvalid, wready;
    input bid, bresp, bvalid, bready;
    input arid, araddr, arlen, arsize, arburst, arvalid, arready;
    input rid, rdata, rresp, rlast, rvalid, rready;
  endclocking
endinterface : axi_if

All classes live in one package so the test can be found by name from run_test. Compile order: axi_defs_pkg, axi_if, axi_pkg, the checker, the Subordinate, then tb_top.

// axi_pkg.sv : one package for the whole agent
package axi_pkg;
  import uvm_pkg::*;
  `include "uvm_macros.svh"
  import axi_defs_pkg::*;
  `include "axi_txn.sv"
  `include "axi_driver.sv"       // driver before sequences: axi_wr_rd_seq holds a driver handle
  `include "axi_seqs.sv"
  `include "axi_monitor.sv"
  `include "axi_scoreboard.sv"   // also holds axi_cov, axi_agent, axi_env, axi_base_test
endpackage

The transaction: one burst, with address math built in

The transaction owns the address rules, so the driver, monitor and scoreboard all agree on where each beat goes. Constraints keep random stimulus legal: WRAP lengths, alignment and the 4KB rule.

// axi_txn.sv (inside package axi_pkg, which imports uvm_pkg and axi_defs_pkg)
class axi_txn extends uvm_sequence_item;
  rand bit                is_write;  // 1 = write, 0 = read
  rand bit [AXI_IDW-1:0]  id;
  rand bit [AXI_AW-1:0]   addr;      // start address
  rand bit [7:0]          len;       // beats minus one (AxLEN)
  rand bit [2:0]          size;      // log2(bytes per beat) (AxSIZE)
  rand axi_burst_e        burst;
  rand bit [AXI_DW-1:0]   data[];    // one entry per beat (variable-size array)
  bit      [AXI_NB-1:0]   strb[];    // filled in post_randomize from the lanes
  axi_resp_e              resp[];    // reads: one per beat, writes: index 0 only
  int unsigned            depth;     // outstanding count seen by the monitor

  `uvm_object_utils_begin(axi_txn)
    `uvm_field_int(is_write, UVM_ALL_ON)
    `uvm_field_int(id,       UVM_ALL_ON | UVM_HEX)
    `uvm_field_int(addr,     UVM_ALL_ON | UVM_HEX)
    `uvm_field_int(len,      UVM_ALL_ON | UVM_DEC)
    `uvm_field_int(size,     UVM_ALL_ON | UVM_DEC)
    `uvm_field_enum(axi_burst_e, burst, UVM_ALL_ON)
  `uvm_object_utils_end

  // Legal-value rules from the AXI specification
  constraint c_burst { burst inside {AXI_FIXED, AXI_INCR, AXI_WRAP}; }
  constraint c_size  { (1 << size) <= AXI_NB; }                 // no wider than the bus
  constraint c_len   { burst == AXI_FIXED -> len < 16;
                       burst == AXI_WRAP  -> len inside {1, 3, 7, 15}; }
  constraint c_wrap_align { burst == AXI_WRAP -> (addr % (1 << size)) == 0; }
  constraint c_4k    { burst != AXI_FIXED ->
                       (addr[11:0] + ((len + 1) << size)) <= 4096; } // never cross 4KB
  constraint c_data  { data.size() == len + 1; }

  function new(string name = "axi_txn");
    super.new(name);
  endfunction

  // Address of beat i, following the AXI burst rules
  function bit [AXI_AW-1:0] beat_addr(int unsigned i);
    bit [AXI_AW-1:0] nbytes, aligned, wrap_bytes, wrap_lo, a;
    nbytes     = 1 << size;
    aligned    = (addr / nbytes) * nbytes;
    wrap_bytes = nbytes * (len + 1);
    wrap_lo    = (addr / wrap_bytes) * wrap_bytes;
    case (burst)
      AXI_FIXED: return addr;
      AXI_INCR : return (i == 0) ? addr : aligned + i * nbytes;
      default  : begin                                        // WRAP
        a = addr + i * nbytes;
        return (a >= wrap_lo + wrap_bytes) ? a - wrap_bytes : a;
      end
    endcase
  endfunction

  // Which byte lanes carry real data on beat i (handles narrow and unaligned)
  function bit [AXI_NB-1:0] lane_mask(int unsigned i);
    bit [AXI_AW-1:0] a, nbytes;
    int unsigned lo, hi;
    lane_mask = '0;
    a      = beat_addr(i);
    nbytes = 1 << size;
    lo     = a % AXI_NB;
    hi     = ((a / nbytes) * nbytes) % AXI_NB + nbytes - 1;
    for (int b = lo; b <= hi; b++) lane_mask[b] = 1'b1;
  endfunction

  function void post_randomize();
    strb = new[len + 1];
    foreach (strb[i]) strb[i] = lane_mask(i);
  endfunction

  function string convert2string();
    return $sformatf("%s id=%0h addr=%0h len=%0d size=%0d burst=%s",
                     is_write ? "WR" : "RD", id, addr, len, size, burst.name());
  endfunction
endclass : axi_txn

Sequences: write then read back, and an outstanding stress

// axi_seqs.sv
class axi_wr_rd_seq extends uvm_sequence #(axi_txn);
  `uvm_object_utils(axi_wr_rd_seq)
  rand int unsigned n = 20;
  axi_driver drv;                     // set by the test, used to wait for B
  function new(string name = "axi_wr_rd_seq"); super.new(name); endfunction

  task body();
    axi_txn wr, rd;
    repeat (n) begin
      wr = axi_txn::type_id::create("wr");
      start_item(wr);
      if (!wr.randomize() with { is_write == 1; }) `uvm_fatal("RAND", "write randomize failed")
      finish_item(wr);
      drv.wait_idle();                // read-after-write needs the B first
      // Read the same burst back with the same shape
      rd = axi_txn::type_id::create("rd");
      start_item(rd);
      if (!rd.randomize() with { is_write == 0; addr == wr.addr; len == wr.len;
                                 size == wr.size; burst == wr.burst; })
        `uvm_fatal("RAND", "read randomize failed")
      finish_item(rd);
    end
  endtask
endclass

// Many reads in flight on only two IDs: this is where ordering bugs live
class axi_outstanding_seq extends uvm_sequence #(axi_txn);
  `uvm_object_utils(axi_outstanding_seq)
  function new(string name = "axi_outstanding_seq"); super.new(name); endfunction
  task body();
    axi_txn t;
    repeat (200) begin
      t = axi_txn::type_id::create("t");
      start_item(t);
      if (!t.randomize() with { is_write == 0; id inside {0, 1}; len inside {[0:7]}; })
        `uvm_fatal("RAND", "randomize failed")
      finish_item(t);
    end
  endtask
endclass

The driver: five channel threads and up to 8 outstanding

The driver takes items as fast as the sequencer offers them, up to a credit limit, and hands each to per-channel threads. Write data may go out before the write address, which AXI allows and many DUTs get wrong.

// axi_driver.sv
class axi_driver extends uvm_driver #(axi_txn);
  `uvm_component_utils(axi_driver)
  virtual axi_if        vif;
  int unsigned          max_outstanding = 8;
  int unsigned          ready_pct       = 70;   // chance of BREADY/RREADY high per cycle
  mailbox #(axi_txn)    aw_q, w_q, ar_q;
  semaphore             credits;
  int unsigned          in_flight;       // issued but not yet answered

  function new(string name, uvm_component parent); super.new(name, parent); endfunction

  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    if (!uvm_config_db#(virtual axi_if)::get(this, "", "vif", vif))
      `uvm_fatal("NOVIF", "axi_if not set for driver")
    aw_q = new(); w_q = new(); ar_q = new();
    credits = new(max_outstanding);
  endfunction

  task run_phase(uvm_phase phase);
    reset_outputs();
    wait (vif.aresetn === 1'b1);
    @(vif.mcb);
    fork
      get_items();  drive_aw();  drive_w();  drive_ar();
      accept_b();   accept_r();
    join
  endtask

  // A real Manager waits for B before a dependent read: AXI gives no
  // ordering between the read and write channels.
  task wait_idle();
    wait (in_flight == 0);
  endtask

  task reset_outputs();
    vif.awvalid <= 0; vif.wvalid <= 0; vif.arvalid <= 0;
    vif.bready  <= 0; vif.rready <= 0; vif.wlast  <= 0;
  endtask

  // Pull items and split them by channel; block when too many are in flight
  task get_items();
    forever begin
      seq_item_port.get_next_item(req);
      credits.get(1);
      in_flight++;
      if (req.is_write) begin aw_q.put(req); w_q.put(req); end
      else                    ar_q.put(req);
      seq_item_port.item_done();
    end
  endtask

  task drive_aw();
    axi_txn t;
    forever begin
      aw_q.get(t);
      vif.mcb.awid <= t.id;   vif.mcb.awaddr  <= t.addr; vif.mcb.awlen <= t.len;
      vif.mcb.awsize <= t.size; vif.mcb.awburst <= t.burst;
      vif.mcb.awvalid <= 1'b1;                     // never wait for READY first
      do @(vif.mcb); while (vif.mcb.awready !== 1'b1);
      vif.mcb.awvalid <= 1'b0;
    end
  endtask

  task drive_w();
    axi_txn t;
    forever begin
      w_q.get(t);
      foreach (t.data[i]) begin
        vif.mcb.wdata  <= t.data[i];
        vif.mcb.wstrb  <= t.strb[i];
        vif.mcb.wlast  <= (i == t.len);
        vif.mcb.wvalid <= 1'b1;
        do @(vif.mcb); while (vif.mcb.wready !== 1'b1);
      end
      vif.mcb.wvalid <= 1'b0;
      vif.mcb.wlast  <= 1'b0;
    end
  endtask

  task drive_ar();
    axi_txn t;
    forever begin
      ar_q.get(t);
      vif.mcb.arid <= t.id;   vif.mcb.araddr  <= t.addr; vif.mcb.arlen <= t.len;
      vif.mcb.arsize <= t.size; vif.mcb.arburst <= t.burst;
      vif.mcb.arvalid <= 1'b1;
      do @(vif.mcb); while (vif.mcb.arready !== 1'b1);
      vif.mcb.arvalid <= 1'b0;
    end
  endtask

  // Random backpressure on B; return a credit per write response
  task accept_b();
    bit rdy;
    forever begin
      rdy = ($urandom_range(99) < ready_pct);
      vif.mcb.bready <= rdy;
      @(vif.mcb);
      if (rdy && vif.mcb.bvalid === 1'b1) begin credits.put(1); in_flight--; end
    end
  endtask

  // Random backpressure on R; return a credit on each RLAST
  task accept_r();
    bit rdy;
    forever begin
      rdy = ($urandom_range(99) < ready_pct);
      vif.mcb.rready <= rdy;
      @(vif.mcb);
      if (rdy && vif.mcb.rvalid === 1'b1 && vif.mcb.rlast === 1'b1) begin credits.put(1); in_flight--; end
    end
  endtask
endclass : axi_driver

Note the handshake test in accept_b and accept_r: the driver samples on the edge after it set READY, which is exactly the edge where the transfer happens, because the clocking block drives outputs just after one edge and samples inputs just before the next.

The monitor: rebuild bursts and match responses by ID

// axi_monitor.sv
class axi_monitor extends uvm_monitor;
  `uvm_component_utils(axi_monitor)
  virtual axi_if               vif;
  uvm_analysis_port #(axi_txn) ap;
  axi_txn  aw_pend[$];                 // AW seen, W burst not finished yet
  axi_txn  b_pend[int][$];             // writes waiting for B, per ID
  axi_txn  r_pend[int][$];             // reads waiting for R, per ID (oldest first)
  bit [AXI_DW-1:0] wbeats[$];
  bit [AXI_NB-1:0] wstrbs[$];
  int unsigned     wr_out, rd_out;     // outstanding counters for coverage

  function new(string name, uvm_component parent);
    super.new(name, parent);
    ap = new("ap", this);
  endfunction

  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    if (!uvm_config_db#(virtual axi_if)::get(this, "", "vif", vif))
      `uvm_fatal("NOVIF", "axi_if not set for monitor")
  endfunction

  task run_phase(uvm_phase phase);
    forever begin
      @(vif.moncb);
      if (vif.aresetn !== 1'b1) begin
        aw_pend.delete(); b_pend.delete(); r_pend.delete();
        wbeats.delete();  wstrbs.delete(); wr_out = 0; rd_out = 0;
        continue;
      end
      // Order inside one cycle: AW, W, B, AR, R. W before AW is still paired correctly.
      if (vif.moncb.awvalid && vif.moncb.awready) begin
        axi_txn t = axi_txn::type_id::create("wr");
        t.is_write = 1; t.id = vif.moncb.awid; t.addr = vif.moncb.awaddr;
        t.len = vif.moncb.awlen; t.size = vif.moncb.awsize;
        t.burst = axi_burst_e'(vif.moncb.awburst);
        t.depth = ++wr_out;
        aw_pend.push_back(t);
      end
      if (vif.moncb.wvalid && vif.moncb.wready) begin
        wbeats.push_back(vif.moncb.wdata);
        wstrbs.push_back(vif.moncb.wstrb);
      end
      // A write is complete when its AW is known and all its W beats arrived
      if (aw_pend.size() > 0 && wbeats.size() >= aw_pend[0].len + 1) begin
        axi_txn t = aw_pend.pop_front();
        t.data = new[t.len + 1]; t.strb = new[t.len + 1];
        foreach (t.data[i]) begin t.data[i] = wbeats.pop_front(); t.strb[i] = wstrbs.pop_front(); end
        b_pend[t.id].push_back(t);
      end
      if (vif.moncb.bvalid && vif.moncb.bready) begin
        int id = vif.moncb.bid;
        if (!b_pend.exists(id) || b_pend[id].size() == 0)
          `uvm_error("AXI_MON", $sformatf("B with ID %0h but no complete write for that ID", id))
        else begin
          axi_txn t = b_pend[id].pop_front();   // same ID: oldest first
          t.resp = new[1]; t.resp[0] = axi_resp_e'(vif.moncb.bresp);
          wr_out--;
          ap.write(t);
        end
      end
      if (vif.moncb.arvalid && vif.moncb.arready) begin
        axi_txn t = axi_txn::type_id::create("rd");
        t.is_write = 0; t.id = vif.moncb.arid; t.addr = vif.moncb.araddr;
        t.len = vif.moncb.arlen; t.size = vif.moncb.arsize;
        t.burst = axi_burst_e'(vif.moncb.arburst);
        t.depth = ++rd_out;
        r_pend[t.id].push_back(t);
      end
      if (vif.moncb.rvalid && vif.moncb.rready) begin
        int id = vif.moncb.rid;
        if (!r_pend.exists(id) || r_pend[id].size() == 0)
          `uvm_error("AXI_MON", $sformatf("R beat with ID %0h but no read pending", id))
        else begin
          axi_txn t = r_pend[id][0];             // R belongs to the OLDEST read of this ID
          t.data = new[t.data.size() + 1](t.data);
          t.data[t.data.size() - 1] = vif.moncb.rdata;
          t.resp = new[t.resp.size() + 1](t.resp);
          t.resp[t.resp.size() - 1] = axi_resp_e'(vif.moncb.rresp);
          if (vif.moncb.rlast !== (t.data.size() == t.len + 1))
            `uvm_error("AXI_MON", $sformatf("RLAST wrong on beat %0d of %s", t.data.size(), t.convert2string()))
          if (vif.moncb.rlast) begin
            void'(r_pend[id].pop_front());
            rd_out--;
            ap.write(t);
          end
        end
      end
    end
  endtask
endclass : axi_monitor

Because each R beat is attached to the oldest read with that ID, any same-ID reordering by the DUT shows up as wrong data in the scoreboard or a wrong RLAST position here. You do not need a separate ordering checker for the simple case.

Scoreboard, coverage, agent, env and test

// axi_scoreboard.sv : byte-accurate memory model
class axi_scoreboard extends uvm_subscriber #(axi_txn);
  `uvm_component_utils(axi_scoreboard)
  bit [7:0] mem[bit [AXI_AW-1:0]];
  int unsigned n_wr, n_rd, n_err;
  function new(string name, uvm_component parent); super.new(name, parent); endfunction

  function void write(axi_txn t);
    foreach (t.data[i]) begin
      bit [AXI_AW-1:0] base = (t.beat_addr(i) / AXI_NB) * AXI_NB;  // bus-aligned beat base
      bit [AXI_NB-1:0] m    = t.is_write ? t.strb[i] : t.lane_mask(i);
      for (int b = 0; b < AXI_NB; b++) begin
        if (!m[b]) continue;
        if (t.is_write) begin
          if (t.resp[0] == AXI_OKAY) mem[base + b] = t.data[i][8*b +: 8];
        end
        else if (t.resp[i] == AXI_OKAY && mem.exists(base + b) &&
                 mem[base + b] !== t.data[i][8*b +: 8]) begin
          n_err++;
          `uvm_error("AXI_SB", $sformatf("Data mismatch at %0h: exp %0h got %0h (%s)",
                     base + b, mem[base + b], t.data[i][8*b +: 8], t.convert2string()))
        end
      end
    end
    if (t.is_write) n_wr++; else n_rd++;
  endfunction

  function void report_phase(uvm_phase phase);
    `uvm_info("AXI_SB", $sformatf("writes=%0d reads=%0d mismatches=%0d", n_wr, n_rd, n_err), UVM_LOW)
  endfunction
endclass

// axi_cov.sv : what did the stimulus really exercise?
class axi_cov extends uvm_subscriber #(axi_txn);
  `uvm_component_utils(axi_cov)
  axi_txn t;
  covergroup cg;
    cp_dir   : coverpoint t.is_write { bins rd = {0}; bins wr = {1}; }
    cp_burst : coverpoint t.burst;
    cp_len   : coverpoint t.len { bins single = {0}; bins short_b = {[1:15]};
                                  bins long_b = {[16:254]}; bins max_b = {255}; }
    cp_size  : coverpoint t.size { bins narrow[] = {[0:2]}; bins full = {3}; }
    cp_resp  : coverpoint t.resp[t.resp.size() - 1];
    cp_depth : coverpoint t.depth { bins one = {1}; bins few = {[2:4]}; bins many = {[5:8]}; }
    cp_id    : coverpoint t.id { bins low[] = {[0:3]}; bins other = default; }
    x_burst_len  : cross cp_burst, cp_len { ignore_bins wrap_long = binsof(cp_burst) intersect {AXI_WRAP}
                                                            && binsof(cp_len.long_b);
                                            ignore_bins wrap_max  = binsof(cp_burst) intersect {AXI_WRAP}
                                                            && binsof(cp_len.max_b);
                                            ignore_bins fixed_long = binsof(cp_burst) intersect {AXI_FIXED}
                                                            && (binsof(cp_len.long_b) || binsof(cp_len.max_b));
                                            ignore_bins wrap_one  = binsof(cp_burst) intersect {AXI_WRAP}
                                                            && binsof(cp_len.single); }
    x_dir_depth  : cross cp_dir, cp_depth;
  endgroup
  function new(string name, uvm_component parent); super.new(name, parent); cg = new(); endfunction
  function void write(axi_txn tr); t = tr; cg.sample(); endfunction
endclass

class axi_agent extends uvm_agent;
  `uvm_component_utils(axi_agent)
  uvm_sequencer #(axi_txn) sqr;
  axi_driver               drv;
  axi_monitor              mon;
  function new(string name, uvm_component parent); super.new(name, parent); endfunction
  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    mon = axi_monitor::type_id::create("mon", this);
    if (get_is_active() == UVM_ACTIVE) begin
      sqr = uvm_sequencer#(axi_txn)::type_id::create("sqr", this);
      drv = axi_driver::type_id::create("drv", this);
    end
  endfunction
  function void connect_phase(uvm_phase phase);
    if (get_is_active() == UVM_ACTIVE) drv.seq_item_port.connect(sqr.seq_item_export);
  endfunction
endclass

class axi_env extends uvm_env;
  `uvm_component_utils(axi_env)
  axi_agent agt; axi_scoreboard sb; axi_cov cov;
  function new(string name, uvm_component parent); super.new(name, parent); endfunction
  function void build_phase(uvm_phase phase);
    agt = axi_agent::type_id::create("agt", this);
    sb  = axi_scoreboard::type_id::create("sb", this);
    cov = axi_cov::type_id::create("cov", this);
  endfunction
  function void connect_phase(uvm_phase phase);
    agt.mon.ap.connect(sb.analysis_export);
    agt.mon.ap.connect(cov.analysis_export);
  endfunction
endclass

class axi_base_test extends uvm_test;
  `uvm_component_utils(axi_base_test)
  axi_env env;
  function new(string name, uvm_component parent); super.new(name, parent); endfunction
  function void build_phase(uvm_phase phase); env = axi_env::type_id::create("env", this); endfunction
  task run_phase(uvm_phase phase);
    axi_wr_rd_seq       s1 = axi_wr_rd_seq::type_id::create("s1");
    axi_outstanding_seq s2 = axi_outstanding_seq::type_id::create("s2");
    s1.drv = env.agt.drv;
    phase.raise_objection(this);
    s1.start(env.agt.sqr);
    s2.start(env.agt.sqr);
    #2us;                                  // let the last responses drain
    phase.drop_objection(this);
  endtask
endclass

The fixed drain delay at the end is a shortcut. In a real environment, wait until the monitor’s outstanding counters reach zero, with a timeout, before dropping the objection. See how to end a UVM test with objections.

A behavioural memory Subordinate and the top module

This tiny Subordinate handles one write and one read at a time, with random READY. It is not a real DUT, but it lets you run everything above on any simulator, including EDA Playground.

// axi_mem_sub.sv : toy Subordinate, one transaction per direction at a time
module axi_mem_sub import axi_defs_pkg::*; (axi_if s);
  bit [7:0] mem [bit [AXI_AW-1:0]];

  function automatic bit [AXI_AW-1:0] nxt(bit [AXI_AW-1:0] a, bit [2:0] sz,
                                          bit [1:0] bu, bit [7:0] ln, bit [AXI_AW-1:0] start);
    bit [AXI_AW-1:0] nb = 1 << sz, wb = nb * (ln + 1), lo = (start / wb) * wb;
    if (bu == AXI_FIXED) return a;
    a = (a / nb) * nb + nb;
    if (bu == AXI_WRAP && a >= lo + wb) a -= wb;
    return a;
  endfunction

  // Write side: AW, then W beats, then B
  initial begin
    bit [AXI_AW-1:0] a, st; bit [7:0] ln; bit [2:0] sz; bit [1:0] bu; bit [AXI_IDW-1:0] id;
    s.awready = 0; s.wready = 0; s.bvalid = 0;
    forever begin
      @(posedge s.aclk);
      s.awready <= $urandom_range(1);
      if (s.awvalid && s.awready) begin
        a = s.awaddr; st = s.awaddr; ln = s.awlen; sz = s.awsize; bu = s.awburst; id = s.awid;
        s.awready <= 0;
        for (int i = 0; i <= ln; i++) begin
          do begin @(posedge s.aclk); s.wready <= $urandom_range(1); end
          while (!(s.wvalid && s.wready));
          for (int b = 0; b < AXI_NB; b++)
            if (s.wstrb[b]) mem[(a / AXI_NB) * AXI_NB + b] = s.wdata[8*b +: 8];
          a = nxt(a, sz, bu, ln, st);
        end
        s.wready <= 0;
        s.bid <= id; s.bresp <= AXI_OKAY; s.bvalid <= 1;
        do @(posedge s.aclk); while (!s.bready);
        s.bvalid <= 0;
      end
    end
  end

  // Read side: AR, then R beats with RLAST on the final one
  initial begin
    bit [AXI_AW-1:0] a, st; bit [7:0] ln; bit [2:0] sz; bit [1:0] bu;
    s.arready = 0; s.rvalid = 0; s.rlast = 0;
    forever begin
      @(posedge s.aclk);
      s.arready <= $urandom_range(1);
      if (s.arvalid && s.arready) begin
        a = s.araddr; st = s.araddr; ln = s.arlen; sz = s.arsize; bu = s.arburst;
        s.arready <= 0; s.rid <= s.arid;
        for (int i = 0; i <= ln; i++) begin
          for (int b = 0; b < AXI_NB; b++)
            s.rdata[8*b +: 8] <= mem.exists((a / AXI_NB) * AXI_NB + b) ? mem[(a / AXI_NB) * AXI_NB + b] : 8'h00;
          s.rresp <= AXI_OKAY; s.rlast <= (i == ln); s.rvalid <= 1;
          do @(posedge s.aclk); while (!s.rready);
          a = nxt(a, sz, bu, ln, st);
        end
        s.rvalid <= 0; s.rlast <= 0;
      end
    end
  end
endmodule

// tb_top.sv
module tb_top;
  import uvm_pkg::*;
  import axi_pkg::*;
  logic aclk = 0, aresetn = 0;
  always #5 aclk = ~aclk;                    // 100 MHz
  initial begin repeat (10) @(posedge aclk); aresetn = 1; end
  axi_if      bus (aclk, aresetn);
  axi_mem_sub dut (bus);
  bind axi_mem_sub axi_protocol_checker u_chk (.aclk(s.aclk), .aresetn(s.aresetn),
       .awvalid(s.awvalid), .awready(s.awready), .awaddr(s.awaddr), .awlen(s.awlen),
       .awsize(s.awsize), .awburst(s.awburst), .awid(s.awid), .wvalid(s.wvalid),
       .wready(s.wready), .wlast(s.wlast), .wdata(s.wdata), .wstrb(s.wstrb),
       .bvalid(s.bvalid), .bready(s.bready), .bid(s.bid), .bresp(s.bresp),
       .arvalid(s.arvalid), .arready(s.arready), .araddr(s.araddr), .arlen(s.arlen),
       .arsize(s.arsize), .arburst(s.arburst), .arid(s.arid),
       .rvalid(s.rvalid), .rready(s.rready), .rlast(s.rlast), .rid(s.rid), .rdata(s.rdata), .rresp(s.rresp));
  initial begin
    uvm_config_db#(virtual axi_if)::set(null, "uvm_test_top.*", "vif", bus);
    run_test("axi_base_test");
  end
endmodule

Because the toy Subordinate serves one burst at a time, the outstanding sequence still runs, but responses come back in order. Swap in your real DUT, or a reactive Subordinate agent that reorders by ID, to stress the ordering logic properly. For more on binding checkers, see SVA bind.

AXI assertions: SVA protocol checks

Assertions watch every cycle of every test, so they catch handshake bugs the moment they happen, long before data goes wrong. The checker below covers the rules that break most often. It works in simulation and in a formal tool. For SVA basics, see assertions with examples and part 2.

// axi_protocol_checker.sv : bind this to any AXI4 port
module axi_protocol_checker import axi_defs_pkg::*; (
  input logic aclk, aresetn,
  input logic awvalid, awready, input logic [AXI_AW-1:0] awaddr, input logic [7:0] awlen,
  input logic [2:0] awsize, input logic [1:0] awburst, input logic [AXI_IDW-1:0] awid,
  input logic wvalid, wready, wlast, input logic [AXI_DW-1:0] wdata, input logic [AXI_NB-1:0] wstrb,
  input logic bvalid, bready, input logic [AXI_IDW-1:0] bid, input logic [1:0] bresp,
  input logic arvalid, arready, input logic [AXI_AW-1:0] araddr, input logic [7:0] arlen,
  input logic [2:0] arsize, input logic [1:0] arburst, input logic [AXI_IDW-1:0] arid,
  input logic rvalid, rready, rlast, input logic [AXI_IDW-1:0] rid,
  input logic [AXI_DW-1:0] rdata, input logic [1:0] rresp);

  default clocking cb @(posedge aclk); endclocking
  default disable iff (!aresetn);

  // 1. VALID stays high and payload stays stable until READY (all five channels)
  a_aw_stable: assert property (awvalid && !awready |=> awvalid && $stable({awaddr, awlen, awsize, awburst, awid}))
    else $error("AW: VALID dropped or payload changed before AWREADY");
  a_w_stable : assert property (wvalid && !wready |=> wvalid && $stable({wdata, wstrb, wlast}))
    else $error("W: VALID dropped or payload changed before WREADY");
  a_b_stable : assert property (bvalid && !bready |=> bvalid && $stable({bid, bresp}))
    else $error("B: VALID dropped or payload changed before BREADY");
  a_ar_stable: assert property (arvalid && !arready |=> arvalid && $stable({araddr, arlen, arsize, arburst, arid}))
    else $error("AR: VALID dropped or payload changed before ARREADY");
  a_r_stable : assert property (rvalid && !rready |=> rvalid && $stable({rid, rdata, rresp, rlast}))
    else $error("R: VALID dropped or payload changed before RREADY");

  // 2. No X on control while VALID is high
  a_aw_known: assert property (awvalid |-> !$isunknown({awaddr, awlen, awsize, awburst, awid}));
  a_ar_known: assert property (arvalid |-> !$isunknown({araddr, arlen, arsize, arburst, arid}));

  // 3. Legal burst encodings
  a_aw_burst : assert property (awvalid |-> awburst != 2'b11) else $error("AWBURST reserved value");
  a_aw_wrap  : assert property (awvalid && awburst == AXI_WRAP |-> awlen inside {1, 3, 7, 15}
                                && (awaddr % (1 << awsize)) == 0)
    else $error("WRAP burst with illegal length or unaligned address");
  a_aw_fixed : assert property (awvalid && awburst == AXI_FIXED |-> awlen < 16);
  a_aw_size  : assert property (awvalid |-> (1 << awsize) <= AXI_NB);

  // 4. INCR bursts never cross a 4KB boundary
  function automatic bit crosses_4k(logic [AXI_AW-1:0] a, logic [7:0] l, logic [2:0] s);
    return ({1'b0, a[11:0]} + ((l + 13'd1) << s)) > 13'd4096;
  endfunction
  a_aw_4k: assert property (awvalid && awburst == AXI_INCR |-> !crosses_4k(awaddr, awlen, awsize))
    else $error("Write burst crosses 4KB: addr=%h len=%0d size=%0d", awaddr, awlen, awsize);
  a_ar_4k: assert property (arvalid && arburst == AXI_INCR |-> !crosses_4k(araddr, arlen, arsize))
    else $error("Read burst crosses 4KB: addr=%h len=%0d size=%0d", araddr, arlen, arsize);

  // 5. WLAST on exactly beat AWLEN+1 (AXI4: W bursts in AW order, no interleave)
  logic [7:0] aw_len_q[$];
  int unsigned w_beat;
  always @(posedge aclk or negedge aresetn)
    if (!aresetn) begin aw_len_q.delete(); w_beat <= 0; end
    else begin
      if (awvalid && awready) aw_len_q.push_back(awlen);
      if (wvalid && wready) begin
        if (aw_len_q.size() > 0) begin
          a_wlast_pos: assert (wlast == (w_beat == aw_len_q[0]))
            else $error("WLAST on beat %0d, expected beat %0d", w_beat + 1, aw_len_q[0] + 1);
        end
        if (wlast) begin w_beat <= 0; if (aw_len_q.size() > 0) void'(aw_len_q.pop_front()); end
        else w_beat <= w_beat + 1;
      end
    end

  // 6. No B before the write burst completed (counts: last-W handshakes vs B handshakes)
  int unsigned wlast_cnt, b_cnt;
  always @(posedge aclk or negedge aresetn)
    if (!aresetn) begin wlast_cnt <= 0; b_cnt <= 0; end
    else begin
      wlast_cnt <= wlast_cnt + (wvalid && wready && wlast);
      b_cnt     <= b_cnt + (bvalid && bready);
    end
  a_b_after_w: assert property (bvalid |-> b_cnt < wlast_cnt)
    else $error("BVALID with no completed write burst outstanding");

  // 7. Reset values
  a_rst_valids: assert property (@(posedge aclk) disable iff (1'b0) !aresetn |-> !awvalid && !wvalid && !arvalid && !bvalid && !rvalid);

  // 8. Liveness hint for formal or long sims: a waiting READY eventually comes
  a_aw_live: assert property (awvalid |-> s_eventually awready);

  // Cover what matters, so we know the checks were really exercised
  c_aw_backpressure: cover property (awvalid && !awready ##1 awvalid && awready);
  c_w_before_aw    : cover property (wvalid && wready && !awvalid);
  c_r_interleave   : cover property (rvalid && rready && !rlast ##1 rvalid && rready && $changed(rid));
endmodule

Two notes. First, rule 6 is written with counters instead of a long temporal sequence, because counting is easier to debug and kinder to simulators. Second, the liveness property is only meaningful in formal or with a bounded check; in simulation, use a watchdog timeout instead. Check one bug at a time: break the RTL on purpose and make sure each assertion fires.

Functional coverage for AXI

Coverage answers one question: did the stimulus reach the cases the plan cares about? For AXI, the plan almost always includes the items below. The covergroup in the implementation section implements the first five. For the general rules, see functional coverage guidelines and types of coverage metrics.

Coverage itemWhy it mattersBins to include
Burst type x lengthMost address bugs depend on bothFIXED, INCR, WRAP crossed with 1, 2 to 16, 17 to 255, 256 beats
Transfer sizeNarrow transfers break lane logicEvery size up to bus width, narrow and full
Response typeError paths are rarely testedOKAY, EXOKAY, SLVERR, DECERR on both B and R
Outstanding depthOrdering and credit bugs need traffic1, 2 to 4, 5 to max, and max exactly
ID reuseSame-ID ordering only matters with reuseSame ID back to back, different IDs interleaved
BackpressureStability bugs hide under stallsREADY low for 0, 1, 2 to 8 and 9+ cycles while VALID high
W before AWCommon DUT assumption that is wrongW first, AW first, same cycle
Address cornersBoundary mathUnaligned start, ending exactly at 4KB, WRAP start at every offset
Exclusive accessAtomicityPass, fail due to another write, exclusive to non-exclusive region

Handshake timing is easier to cover with SVA cover properties than with a class covergroup, because it is about cycles, not transactions. The checker above already has three. Add a few cover sequences for READY low for N cycles.

// Backpressure length on AW, added inside the checker module
int unsigned aw_stall_len;              // cycles AWVALID has waited for AWREADY
always @(posedge aclk)
  aw_stall_len <= (awvalid && !awready) ? aw_stall_len + 1 : 0;

covergroup cg_aw_stall @(posedge aclk);
  option.per_instance = 1;
  cp_stall: coverpoint aw_stall_len iff (awvalid && awready) {
    bins zero = {0}; bins one = {1}; bins short_s = {[2:8]}; bins long_s = {[9:$]};
  }
endgroup
cg_aw_stall u_cg_aw_stall = new();

Checker, monitor and scoreboard strategy

Three checkers, three jobs. Keep them separate and each one stays simple.

LayerChecksDoes not check
SVA protocol checkerHandshake stability, legal encodings, 4KB, WLAST position, B after W, reset valuesData values, end-to-end routing
MonitorRebuilds transactions, matches B and R to the oldest pending request by ID, flags orphans and wrong RLASTWhether the data is right
ScoreboardData at byte level, response codes, per-Manager routing in a fabric, exclusive pass and failCycle-level timing

Scoreboard design choices

  • Memory model, not transaction queue. For memory-like Subordinates, store bytes in an associative array keyed by address. Strobes and narrow transfers then just work.
  • Commit on B, not on AW. A write is only visible once acknowledged. Reads that overlap an in-flight write to the same bytes are ambiguous: either flag them as “don’t care” or keep both old and new values as legal.
  • Per-ID ordering. For a fabric, keep one expected queue per Manager and per ID. Different IDs may complete out of order; same IDs may not.
  • Errors are expected results. A DECERR to an unmapped address is a pass if your address map says the hole is there. Model the map, do not just ignore errors.
  • Exclusive monitor model. Track the address and ID of each exclusive read, clear it on any other write to that region, and predict EXOKAY or OKAY for the exclusive write.

Monitor rules that save days

  • Sample through a clocking block with #1step input skew, so the monitor and the RTL agree on what happened at each edge.
  • Handle W before AW. Keep W beats in a queue until the matching AW arrives.
  • Reset everything on reset: pending queues, counters, partial bursts. Half-finished transactions after a mid-test reset cause the most confusing scoreboard errors.
  • Publish complete transactions only. Partial ones belong in debug messages, not in the scoreboard.

Debugging AXI failures: a triage flow

AXI failures look scary because five channels move at once. A fixed order of questions makes them routine. For the general method, see the practical verification debug guide.

  • Which checker fired first? An assertion beats a scoreboard error every time: fix the first protocol violation and many data errors disappear.
  • Which channel and which ID? Put AxID, xID and a running transaction number in every message. “Mismatch at 0x8000_1040, ID 3, read #417” is debuggable; “mismatch” is not.
  • Was there backpressure? Most stability bugs only appear when READY drops for a cycle. Look at the cycle before the handshake.
  • Is it ordering? If the data is correct but belongs to another request with the same ID, it is an ordering bug, not a data path bug.
  • Is it a 4KB, WRAP or narrow corner? Print the beat address list from the transaction’s own beat_addr function and compare with the waveform.
  • Is it the testbench? Check read-after-write without waiting for B, wrong AxLEN off-by-one, or a monitor that did not reset.
SymptomLikely causeFirst thing to look at
Simulation hangs, no errorVALID waits for READY, or credit leak in driverWhich VALID is high with READY low at the end of time
Data right, wrong orderSame-ID reorder in the DUT or interconnectRID sequence for one ID across the failing window
Data right except some bytesWSTRB or lane logic on narrow or unaligned beatsWSTRB per beat versus lane_mask
B arrives with unknown IDID width or remap bug in the interconnectBID versus AWID at the Manager port
Mismatch only after resetMonitor or scoreboard not clearedPending queue sizes at reset release
Mismatch on WRAP onlyWrap boundary mathBeat address list for the failing burst

AXI protocol-aware waveform viewers in commercial debuggers group signals into transactions, which helps a lot. If you use AI debug tools, feed them the first failing message and the transaction list, not the whole log.

How AI helps you master AXI protocol verification

AI tools are useful for AXI work, mostly as a fast first draft and a patient tutor. They are not a protocol authority. Treat every AI answer as a hypothesis to check against the Arm specification, a simulator and, for assertions, a formal tool. The wider method is in AI in verification: methodology.

Where AI earns its keep

  • Learning. Ask an assistant to explain one rule at a time, for example why write data has no ID in AXI4, then check the answer against the specification chapter on IDs and ordering.
  • First-draft code. Generating the boilerplate of an agent, a covergroup with sensible bins, or the 20 stability assertions for five channels takes minutes instead of an hour.
  • Review. Paste your own driver or monitor (non-confidential code only) and ask what happens when W comes before AW, or when READY drops for one cycle. Good assistants spot missing cases quickly.
  • Log triage. Give it the first 50 lines around the first error and ask for a timeline per ID. It is good at turning a wall of messages into a story.
  • Coverage holes. Paste the uncovered bins and the constraints, and ask why the solver never reaches them. It often spots the constraint that blocks them.

Vendor AI tools worth knowing in 2026

  • Siemens Questa One Agentic Toolkit (announced February 2026): agents for RTL code, lint, CDC, verification planning and debug. The Debug Agent correlates waveforms, assertions, coverage and logs to suggest root causes.
  • Cadence Verisium apps: AutoTriage groups regression failures by likely root cause, WaveMiner points to the signals most tied to a failure, PinDown predicts which check-in broke the build, and SemanticDiff ranks risky code changes.
  • Synopsys VSO.ai: aimed at coverage closure. Synopsys reported in April 2025 reaching the same 61% functional coverage on a PCIe Gen6 PHY in 226 runs instead of 710, and described using it on its own AMBA CHI VIP.

These numbers come from the vendors’ own material, so read them as best cases. They are still a useful hint of where AI helps most: regression triage and coverage closure, both of which are big costs in AXI-heavy SoCs.

Copy-paste prompts for AXI work

1) Tutor
"Explain the AXI4 rule that same-ID transactions must complete in order, using one
example with two reads on ID 3 and one read on ID 5. Then list three DUT bugs that
would break this rule and the check that would catch each one."

2) First-draft assertions
"Write SystemVerilog assertions for an AXI4 write address channel: VALID must stay high
and AWADDR, AWLEN, AWSIZE, AWBURST, AWID stable until AWREADY; WRAP length must be
2, 4, 8 or 16 beats; INCR must not cross 4KB. Use a default clocking and
disable iff (!aresetn). Add one cover property per assertion."

3) Covergroup design
"Here is my axi_txn class [paste]. Propose a covergroup for burst type, length class,
size, response and outstanding depth. Mark illegal crosses with ignore_bins and
explain each one in a comment."

4) Code review
"Review this UVM AXI monitor [paste, no confidential code]. What happens if W beats
arrive before AW, if two reads with the same ID are outstanding, or if reset
asserts mid-burst? List concrete bugs with line references."

5) Log triage
"Here are the first 60 lines around the first UVM_ERROR [paste]. Build a timeline
per AXI ID of AR, R beats and RLAST, and tell me whether this looks like an ordering
bug, a data path bug or a testbench bug."

6) Coverage hole
"These bins are never hit: x_burst_len WRAP x short_b, cp_resp DECERR [paste report].
Here are my constraints [paste]. Why can the solver not reach them, and what
sequence would?"
TaskGood for AIMust check by hand
Learning the rulesPlain explanations, worked examples, quizzesEvery rule against the Arm specification issue you build to
Agent boilerplateClass skeletons, factory macros, config objectsHandshake timing, reset handling, clocking skew
SVA draftsStability and encoding properties, cover propertiesProve in formal or break the RTL on purpose; check disable iff and edge cases
CovergroupsBin ideas, ignore_bins for illegal crossesBins match your plan and the spec limits (WRAP lengths, 256 beats)
Log triageTimelines, grouping by IDThe root cause in the waveform
Coverage holesSpotting blocking constraintsThat the new stimulus is legal AXI

Guardrails

  • Never trust an AI-written assertion until it has failed on a broken design and passed on a good one. NVIDIA’s FVEval (October 2024) found the best model was functionally correct only about 46% of the time on human-written SVA tasks.
  • Run the result: simulate, or prove in formal. A clean compile proves nothing about the protocol.
  • Do not paste confidential RTL, specifications under NDA or customer logs into public AI tools. Use your company’s approved tools and read its policy first.
  • Pin the specification issue in your prompt (“AXI4, Issue K rules”), because models mix AXI3, AXI4 and AXI5 freely.
  • Keep a human owner for every check that guards a tape-out.

Common AXI verification mistakes and limitations

  • Making VALID depend on READY in a driver or a Subordinate model. It hides deadlocks in the DUT and can create new ones in the testbench.
  • Testing one transaction at a time. Outstanding, ID reuse and out-of-order bugs never appear with depth 1.
  • Always-high READY. Without random backpressure, stability bugs stay hidden.
  • AxLEN off by one. AWLEN of 4 is five beats, not four.
  • Assuming one B per beat. Writes get one B per burst; only reads respond per beat.
  • Reading WSTRB or WDATA when WVALID is low. The values mean nothing then.
  • Mixing up SLVERR and DECERR. SLVERR is a real Subordinate saying no; DECERR is the decoder saying nobody lives there.
  • Assuming read-after-write order. AXI gives no ordering between the read and write channels, even with the same ID.
  • No error injection. Error responses and exclusive failures are part of the spec and must be covered.
  • Hard-coding one AXI version. Without a configuration object, AXI5 options like parity or atomics either break the agent or go unchecked.

Limitations to keep in mind: a home-grown agent rarely covers every optional AXI5 feature, and formal proof of full AXI ports is hard because of deep FIFOs and long bursts. Use formal for the checker on small ports and bridges, simulation with VIP for the rest. See where to use formal verification.

Regression and performance for AXI environments

AXI traffic is heavy. A 256-beat burst on a 512-bit bus is 16KB per transaction, and a subsystem test may push millions of beats. Speed matters.

  • Sample, do not poll. Use clocking blocks and wake only on edges. Avoid @(any signal) loops in monitors.
  • Keep transactions light. Avoid field automation macros on large data arrays in hot paths; implement do_copy and do_compare by hand if profiling says so.
  • Tune messages. UVM_HIGH per beat messages can double run time. Keep per-transaction messages at UVM_MEDIUM and per-beat at UVM_DEBUG.
  • Layer the regression. A smoke set of 20 directed tests per commit, a nightly random set of a few thousand seeds, and a weekly stress set with long bursts and maximum outstanding.
  • Track coverage per test. Rank tests by unique coverage and drop seeds that add nothing. This is exactly the job AI ranking tools target.
  • Measure performance too. Count bandwidth and latency per Manager in the monitor. A protocol-correct port that only reaches 40% of expected bandwidth is still a bug.

For performance checks, a simple latency histogram per ID in the monitor (AR handshake to RLAST) catches arbitration starvation that no protocol checker will ever see. Pair it with stress verification runs.

Best practices for AXI protocol verification

  1. Write the verification plan from the Arm specification issue you build to, chapter by chapter, and map each rule to an assertion, a scoreboard check or a coverage item.
  2. Use one reusable agent with a configuration object for widths, ID width, max outstanding and AXI5 features.
  3. Bind the SVA checker to every AXI port in IP, subsystem and SoC, and run it in formal on small ports.
  4. Drive random backpressure on every READY, with bias toward long stalls and back-to-back transfers.
  5. Stress outstanding transactions and ID reuse on purpose: few IDs, deep queues.
  6. Put address math in one place, the transaction class, and reuse it in driver, monitor and scoreboard.
  7. Build the scoreboard as a byte memory model that commits on B.
  8. Cover error responses, exclusive pass and fail, and 4KB, WRAP and narrow corners explicitly.
  9. Reset mid-traffic in at least one test, and check that every component recovers cleanly.
  10. Use commercial VIP for AXI5 features you cannot afford to model yourself, and know what your own agent does not check.
  11. Use AI for drafts and triage, never as the final word on a protocol rule.

Project example: IP-level AXI verification

Design: an AXI4 Subordinate SRAM controller, 64-bit data, 4-bit ID, 64KB of SRAM, up to 8 outstanding reads and 4 outstanding writes, with read responses allowed out of order across IDs.

Environment: one active Manager agent, the SVA checker bound to the port, a byte memory scoreboard and the covergroups above. The plan had 46 items: 18 assertions, 9 scoreboard checks and 19 coverage items.

Key tests: random mix, 4KB edge, WRAP at every start offset, narrow writes with sparse strobes, maximum outstanding with two IDs, and out-of-range address for SLVERR.

// 4KB edge sequence: INCR bursts that end exactly on the boundary
class axi_4k_edge_seq extends uvm_sequence #(axi_txn);
  `uvm_object_utils(axi_4k_edge_seq)
  function new(string name = "axi_4k_edge_seq"); super.new(name); endfunction
  task body();
    axi_txn t;
    repeat (50) begin
      t = axi_txn::type_id::create("t");
      start_item(t);
      if (!t.randomize() with {
            burst == AXI_INCR;
            size  == 3;                                   // full 8-byte beats
            (addr[11:0] + ((len + 1) << size)) == 4096;   // last byte at 0x...FFF
          }) `uvm_fatal("RAND", "4KB edge randomize failed")
      finish_item(t);
    end
  endtask
endclass

What it found: two kinds of bug are typical at this level. The read return path dropping a beat when RREADY falls on the same cycle as an internal FIFO-full, and the address counter wrapping at 0x1000 instead of continuing when a long burst ended exactly on the boundary. Both show up only with random backpressure and the edge sequence above.

Exit criteria: 100% of planned coverage, zero assertion failures over 5,000 random seeds, and every assertion proven or bounded-proven in formal on the port.

Project example: subsystem-level AXI verification

Design: a DMA subsystem with 3 Managers (two DMA channels and a control CPU port) and 4 Subordinates (SRAM, DDR controller model, a register block on an AXI-to-APB bridge, and an unmapped hole) through an AXI4 interconnect.

Environment: three Manager agents (two active for the DMA ports in standalone mode, passive when the real DMA drives), four passive monitors on the Subordinate side, and one scoreboard that tracks each transaction from Manager port to Subordinate port and back. A virtual sequence coordinates traffic. Register programming uses UVM RAL.

CheckHowBug class
Address decodeScoreboard predicts the target Subordinate for every addressWrong routing, overlapping regions
ID remapInterconnect widens IDs with Manager bits; check the response returns to the right Manager with the original IDResponses to the wrong Manager
DECERRAccesses to the hole must return DECERR with the right number of R beatsDefault Subordinate missing or returns one beat
BridgeAXI bursts into the APB bridge become single APB transfers; responses map PSLVERR to SLVERRLost beats, wrong error mapping
FairnessLatency histogram per Manager under full loadStarvation of the CPU port

A useful rule at this level: every response the interconnect produces must be explainable by the scoreboard. If a DECERR read of 4 beats comes back as 1 beat, the R channel protocol is broken even though the error code is right.

Project example: SoC-level AXI verification

Design: a mobile-class SoC with a CPU cluster on a CHI coherent mesh, an I/O coherent GPU and DMA on ACE-Lite, a DDR controller on AXI, and dozens of peripherals on AXI-to-APB bridges.

Strategy: at SoC level you do not re-verify AXI rules from scratch. You bind protocol checkers on every AXI and ACE-Lite port, keep passive monitors on the key ones, and run software-driven and portable stimulus scenarios that move real data through the system.

  • Coherency: the DMA writes a buffer through ACE-Lite while the CPU holds a stale copy. The test checks the CPU reads the new data, which proves snoops reached its cache.
  • Ordering across bridges: traffic from AXI into CHI and back must keep same-ID order. Monitors on both sides of the bridge cross-check.
  • Security attributes: AxPROT and secure-world accesses to protected regions must return errors from the firewall.
  • Performance: the DDR port must reach its bandwidth target with all Managers active, measured from the passive monitor.
  • Power: traffic must drain before a power domain is gated, then resume after wake-up without lost transactions.

At this level commercial VIP is usually worth the money for CHI and AXI5 features. Your own agent is still the right tool for fast, simple traffic generators and passive checks. The key areas in SoC verification post has a wider checklist.

A real project story: the read that came back early

This is a composite story built from patterns seen across many projects, not one specific chip.

A team was integrating a new cache in front of the DDR path. All IP-level tests passed, including random traffic with 8 outstanding reads. At subsystem level, after about 3,000 seeds, one nightly test failed with a scoreboard mismatch on a DMA read.

The data was not corrupt. It was correct data for a different read. Two reads with the same ID were in flight: the first missed in the cache and went to DDR, the second hit and came back immediately. The cache returned the hit first. For different IDs that is legal. For the same ID it is not.

Why did IP-level tests miss it? The IP sequences picked IDs from all 16 values, so two same-ID reads were rarely outstanding at once, and the cache model in the IP bench had a fixed miss latency. The bug needed same-ID reuse, a miss followed by a hit, and both in flight.

The fix in RTL was a small per-ID ordering table. The fix in verification was bigger: an outstanding sequence restricted to two IDs, a coverage cross of ID reuse with hit and miss, and a monitor rule that attaches each R beat to the oldest pending read of that ID. The same bug class has been seen elsewhere since, and the two-ID sequence now finds it in under 50 seeds.

The quiet takeaway: random is only as good as what it is allowed to reach. Narrow the ID space on purpose, and the ordering bugs come out.

AXI interview questions and answers

What are the five AXI channels?

Write address (AW), write data (W), write response (B), read address (AR) and read data (R). Each is one-way with its own VALID and READY.

Can VALID wait for READY?

No. The source must assert VALID without waiting for READY, or the bus can deadlock. READY may wait for VALID.

Why does a write have a separate response channel but a read does not?

Read data already flows back to the Manager, so each R beat carries RRESP. Write data flows away, so the B channel is needed to report completion, once per burst.

What is AxLEN of 15 in beats?

16 beats. AxLEN is beats minus one. AXI4 INCR allows up to 256 beats; FIXED and WRAP allow up to 16.

Why can a burst not cross 4KB?

4KB is the smallest region an address map assigns to one Subordinate, so a burst crossing it could need two Subordinates. The Manager must split it.

What are the legal WRAP lengths?

2, 4, 8 or 16 beats, and the start address must be aligned to the transfer size.

How does ordering work with IDs?

Same-ID transactions complete in issue order. Different IDs may complete in any order. Reads and writes have no ordering between them, even with the same ID.

What changed from AXI3 to AXI4?

AXI4 extended INCR bursts to 256 beats, removed WID and write interleaving, removed locked transactions, and added QoS, REGION and USER signals, plus AXI4-Lite and AXI4-Stream.

What does EXOKAY mean?

An exclusive write succeeded because nobody wrote the location since the exclusive read. A failed exclusive write returns OKAY and does not update memory.

What is the difference between SLVERR and DECERR?

SLVERR comes from a real Subordinate reporting an error. DECERR comes from the interconnect when no Subordinate exists at that address.

How would you verify outstanding transactions?

Drive many requests before any response, with few IDs to force reuse, add random backpressure, match responses to the oldest pending request per ID in the monitor, and cover outstanding depth.

What is ACE-Lite?

A subset of ACE for Managers with no cache, like an I/O coherent DMA. It issues coherent reads and writes but has no snoop channels.

What is new in AXI Issue L?

Released 27 August 2025, it adds optional credited transport next to VALID/READY, Arm Compression Technology support and PAS signalling, among other features.

Where would you use formal on AXI?

On protocol checkers and small ports and bridges, to prove handshake, encoding and response rules exhaustively. Full-depth data paths are usually left to simulation.

For more practice, see UVM interview questions and SystemVerilog interview questions.

FAQ: people also ask about AXI protocol verification

What is AXI protocol verification?

AXI protocol verification checks that an AXI interface follows the AMBA rules for handshakes, bursts, IDs, ordering and responses, and that data arrives correctly. Engineers use a UVM agent, SVA checkers, a scoreboard and functional coverage, and often commercial VIP for AXI5 features.

How do you verify the AXI protocol in UVM?

Build an AXI agent with a sequencer, a driver that supports outstanding transactions and backpressure, and a monitor that rebuilds bursts. Connect it to a scoreboard and coverage, and bind SVA protocol checks to the port. Then run constrained-random and directed corner tests.

What is the difference between AXI4 and AXI5?

AXI5 is the AMBA 5 version. It keeps the AXI4 channels and adds optional features such as atomic transactions, cache stashing, data poison, interface parity, MPAM and MTE support, and in Issue L, credited transport. Each feature is enabled per interface.

Why are AXI outstanding transactions hard to verify?

Bugs only appear when several requests are in flight, IDs are reused and responses return in a different order. Depth-1 tests miss them. You need deliberate ID reuse, random backpressure, per-ID ordering checks and coverage of outstanding depth.

What is the AXI 4KB boundary rule?

An AXI burst must not cross a 4KB address boundary, because 4KB is the smallest block mapped to one Subordinate. A Manager that needs to cross it must split the access into two bursts. A simple SVA can check this on every AW and AR handshake.

Is AXI cache coherent?

Plain AXI is not coherent. ACE adds snoop channels and coherent transactions on top of AXI, and ACE-Lite gives cacheless Managers coherent access. Large designs use CHI for the coherent fabric and AXI or ACE-Lite at the edges.

Can AI write AXI assertions?

AI can draft AXI assertions quickly, but they must be proven. NVIDIA’s FVEval study found the best model wrote functionally correct SVA about 46% of the time on human-written tasks. Run every AI-written assertion in formal or simulation, against a good and a broken design.

Should I build my own AXI VIP or buy one?

For AXI4 ports with common features, a well-written in-house agent is fine and fast. For AXI5 options, ACE, CHI and Issue L credited transport, commercial VIP is usually cheaper than building and maintaining your own models.

Summary

AXI protocol verification is about five simple channels that combine into hard corners. The handshake is easy. The bugs live in outstanding transactions, ID reuse, backpressure, 4KB and WRAP math, narrow transfers, error responses and exclusives.

Build one reusable agent, put address math in the transaction, bind a checker everywhere, model memory by byte, and cover the corners on purpose. Track the spec: Issue L in 2025 added credited transport, so make checks configurable. Use AI to go faster, and use proof to stay honest.

Quick revision notes

  • Five channels: AW, W, B (writes), AR, R (reads).
  • Transfer when VALID and READY are both high on a rising edge. VALID never waits for READY.
  • Payload stable while VALID high and READY low.
  • AxLEN is beats minus one. INCR up to 256 beats in AXI4; FIXED and WRAP up to 16; WRAP is 2, 4, 8 or 16.
  • No burst crosses 4KB.
  • One B per write burst; one RRESP per read beat.
  • Same ID: in order. Different IDs: any order. Reads and writes: no ordering.
  • AXI4 has no WID; W follows AW order.
  • OKAY, EXOKAY, SLVERR, DECERR.
  • ACE adds AC, CR, CD snoop channels; ACE-Lite has none. CHI is packet based (latest public issue G, 2024).
  • AXI Issue L (Aug 2025) adds optional credited transport.

Printable AXI verification checklist

  • [ ] Verification plan maps every rule of the target AXI issue to an assertion, check or coverage item
  • [ ] Agent configurable for widths, ID width, outstanding limit and AXI5 features
  • [ ] SVA checker bound to every AXI port
  • [ ] Stability checks on all five channels
  • [ ] Burst encoding, WRAP length and alignment, 4KB checks on AW and AR
  • [ ] WLAST and RLAST position checks
  • [ ] B only after AW and last W
  • [ ] Random backpressure on every READY
  • [ ] Outstanding stress with deliberate ID reuse
  • [ ] W before AW tested and covered
  • [ ] Narrow, unaligned and sparse-strobe writes covered
  • [ ] SLVERR, DECERR and exclusive pass and fail covered
  • [ ] Scoreboard is byte-accurate and commits on B
  • [ ] Mid-traffic reset test passes
  • [ ] Bandwidth and latency measured per Manager
  • [ ] AI-written checks proven on good and broken RTL

Related reading on The Art of Verification

Learning path: AXI verification from beginner to advanced

  1. Get comfortable with SystemVerilog classes, interfaces and virtual interfaces.
  2. Learn the UVM agent pattern from the UVM testbench architecture post and the build a UVM environment series.
  3. Read the AXI specification chapters on transport, transactions, and IDs and ordering. Work the WRAP, 4KB and narrow examples above by hand.
  4. Build the agent on this page and run it on EDA Playground or your simulator.
  5. Add the SVA checker, then break the Subordinate on purpose and watch each assertion fire. See assertions with examples.
  6. Add coverage and close it. Use coverage guidelines.
  7. Stress outstanding traffic with a reordering Subordinate model and fix what breaks.
  8. Move to an interconnect: multiple Managers, ID remap, DECERR, bridges.
  9. Learn ACE-Lite and CHI basics, then use VIP for coherent ports.
  10. Bring in formal for checkers and bridges, and AI tools for triage and coverage, with the guardrails in AI in verification.

Sources and further reading

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *