RTL Studio Open IDE

4.1 · AXI CLASS

Dynamic array payload: runtime-sized burst data in the sequence item

Allocate dynamic data/wstrb arrays in sequence items for variable-length bursts.

Video coming soon. This lesson page stays at the same URL when the lecture publishes.

What you practice

Dynamic array payload: runtime-sized burst data in the sequence item (4.1). Allocate dynamic data/wstrb arrays in sequence items for variable-length bursts. It is in Dynamic Array Payload — Part 4 · AXI4 Full UVM Verification of the AXI Masterclass. Five-channel parallel UVM for AXI Full timing.

AXI only counts when the handshake simulates. RTL Studio is the Verilog and SystemVerilog IDE where you edit the RTL and prove each beat on a VCD.

What you will learn

You will learn how to allocate dynamic arrays in UVM sequence items at runtime based on burst length, enabling variable-length AXI4 data transfers.

Learning objectives

  • Understand why dynamic arrays are needed for variable-length AXI bursts.
  • Use new[] in post_randomize() to size data[] and wstrb[] arrays.
  • Align array allocation with burst length (awlen+1 or arlen+1).
  • Verify dynamic payload allocation via testbench INFO logs.

Theory

AXI4 supports variable-length bursts (up to 16 beats), so payload arrays must be sized *after* randomization when awlen/arlen are known. Static arrays cannot adapt to runtime burst lengths. UVM sequence items use dynamic arrays (bit [31:0] data[]) and allocate them with new[beats] in post_randomize(). This ensures memory is allocated only when needed and sized precisely for the burst.

OperatorPurposeWhen Used
new[]Allocate dynamic arrayAfter randomization, once constraints are resolved
post_randomize()Hook to size arrays post-constraint solvingRequired for runtime burst-length dependent arrays

Practice

  1. Open RtlStudio and select this chapter.

Confirm student/tb/env/axi_seq_item.sv and student/tb/tb_top.sv appear in Explore.

  1. Open student/tb/env/axi_seq_item.sv and locate the new() and post_randomize() functions.
  2. In new(), pass the default name argument to super.new().
  3. In post_randomize(), replace the __TODO__ placeholders with beats to allocate data and wstrb arrays for write transfers.
  4. Run Simulation and verify the Log panel shows INFO: === AXI4 dynamic array payload === and INFO: PASS.

Summary

Students extended the axi_seq_item class with dynamic data and wstrb arrays to support variable-length AXI4 bursts. They used post_randomize to allocate these arrays based on the randomized awlen value, enabling runtime-sized payload generation. The key takeaway is that dynamic arrays in UVM sequence items allow flexible, burst-length-dependent data patterns essential for realistic AXI4 verification.

Run it in the Verilog IDE

  1. Open the lesson in the IDE and find the valid/ready or AXI channel ports in the editor.
  2. Simulate with Verilator. Confirm the beat on the VCD, not only in the transcript.
  3. Check that data moves only on the beats this lesson describes, and that backpressure holds the transfer.
  4. Synthesize the RTL master, slave, or buffer with Yosys. Leave the UVM bench out of synthesis.

The lesson is done when the simulation matches Dynamic array payload: runtime-sized burst data in the sequence item. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.