Part 6 · Agents & Protocol IP · Intermediate

AXI Agent Pattern: Multi-Channel Concurrency and Ordering

Designing AXI-class agents with decoupled channels, outstanding transaction tracking, response matching, and monitor correlation across parallel flows.

AXI complexity profile

AXI-like protocols are fundamentally concurrent and channelized. Agent architecture must manage independent handshakes, transaction IDs, and out-of-order completions.

A robust AXI pattern separates channel-level mechanics from transaction-level correlation logic.

diagram
[VIP][AXI] channel model

write address: AW
write data:    W
write response: B
read address:  AR
read data:     R

channels handshake independently via valid/ready
diagram
[AGT] architectural implications

driver:
  coordinate multiple channel threads
  enforce protocol ordering constraints

monitor:
  capture each channel stream
  correlate by ID and sequencing rules

scoreboard/checkers:
  reason about outstanding transactions
  • Design with channel decoupling as first principle.

  • Track outstanding state explicitly by ID/channel.

  • Separate low-level handshakes from transaction assembly logic.


AXI transaction model and driver skeleton

AXI item schemas must represent burst metadata and IDs. Driver often uses parallel tasks or micro-schedulers for channel emission while honoring constraints.

systemverilog
class axi_item extends uvm_sequence_item;
  `uvm_object_utils(axi_item)
  rand bit        is_write;
  rand bit [3:0]  id;
  rand bit [31:0] addr;
  rand bit [7:0]  len;
  rand bit [2:0]  size;
  rand bit [1:0]  burst;
  rand bit [63:0] data_q[$];
  bit [1:0]       resp;

  function new(string name = "axi_item");
    super.new(name);
  endfunction
endclass
systemverilog
task run_phase(uvm_phase phase);
  axi_item req;
  forever begin
    seq_item_port.get_next_item(req);
    if (req.is_write) begin
      fork
        drive_aw(req);
        drive_w(req);
        collect_b(req);
      join
    end
    else begin
      fork
        drive_ar(req);
        collect_r(req);
      join
    end
    seq_item_port.item_done();
  end
endtask
diagram
[DRV][AXI] channel responsibilities

drive_aw:
  issue address + burst metadata

drive_w:
  send beat stream with last indication

collect_b:
  wait response and map to request id

drive_ar/collect_r:
  analogous read path with beat assembly
  • Parallelize channel tasks carefully to mirror protocol concurrency.

  • Preserve transaction-ID linkage through response collection.

  • Keep sequence handshake stable despite internal channel threads.


AXI monitor correlation pattern

AXI monitor design often uses per-channel collectors plus a correlator that emits fully assembled transaction objects when sufficient evidence is available.

diagram
[MON][AXI] monitor architecture

channel samplers:
  AW sampler -> aw_fifo
  W sampler  -> w_fifo
  B sampler  -> b_fifo
  AR sampler -> ar_fifo
  R sampler  -> r_fifo

correlator:
  match AW/W/B for writes by id/order policy
  match AR/R for reads by id/order policy
  emit assembled axi_item via ap.write
systemverilog
typedef struct {
  bit [3:0] id;
  bit [31:0] addr;
  bit [7:0] len;
  bit [2:0] size;
  bit [1:0] burst;
} aw_meta_t;

aw_meta_t aw_by_id[int];
bit [63:0] w_data_by_id[int][$];

// Pseudocode: on AW capture metadata
// on W capture beat stream
// on B finalize write transaction and publish
diagram
[AXI] correlation pitfalls to avoid

pitfall: assume in-order completion globally
  fix: apply protocol-specific per-id ordering rules

pitfall: merge beats from different IDs
  fix: track streams by channel + id

pitfall: emit partial items
  fix: publish only on completed semantic transaction
  • Use explicit correlation state keyed by IDs and channel context.

  • Document ordering assumptions used by monitor/checkers.

  • Publish completed semantic transactions, not raw beats.


AXI debug strategy

AXI failures can emerge at channel, correlation, or ordering-policy layers. Isolate by tracing one transaction ID end-to-end through all channels.

diagram
[DEBUG][AXI] ID-centric trace

select one id = K
trace:
  AW(K) issue/accept
  W(K) beats + last
  B(K) response
or
  AR(K) issue/accept
  R(K) beats + last + resp

compare driver intent vs monitor reconstruction
diagram
[AXI] common failure signatures

symptom                                 likely zone
--------------------------------------------------------------
response with unknown id                outstanding table bug
missing final beat                      W/R channel collection bug
false ordering error                    checker rule mismatch
hung transaction                        handshake/backpressure deadlock
diagram
[VIP][AGT] AXI hardening checklist

1) bounded outstanding tracking with clear overflow handling
2) timeout diagnostics per channel
3) correlation state dump utility
4) active/passive behavior parity in monitor output
5) stress tests with high concurrency

Key takeaways

  • AXI agent design must embrace channel concurrency and ID-based correlation.

  • Separate channel mechanics from transaction assembly for maintainability.

  • ID-centric tracing is the fastest path to root-cause in AXI debug.

  • Qualification should stress outstanding and ordering edge cases.

Common pitfalls

  • Modeling AXI as a single serialized flow like APB.

  • Relying on implicit ordering rather than explicit policy.

  • Publishing partial channel observations as completed transactions.

  • Omitting channel timeouts and making hangs hard to diagnose.