What you practice
SVA burst and ID checker: AWLEN versus WLAST beat count (5.2). Assert WLAST occurs when the AWLEN-defined beat count completes. It is in SVA Burst and ID Checker — Part 5 · SVA and System Integration of the AXI Masterclass. SVA protocol checkers, multi-master systems, and the capstone.
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 use SystemVerilog Assertions (SVA) to verify that the WLAST signal occurs exactly when the expected number of write beats—defined by AWLEN—has been completed, ensuring correct burst termination in AXI write transfers.
Learning objectives
- Understand the relationship between AWLEN and the number of WLAST occurrences in AXI write bursts.
- Write SVA properties that link AWLEN to WLAST timing using sequential logic counters.
- Implement and validate burst-length assertions in
axi_sva_bind.sv. - Confirm correct behavior using UVM-based stimulus that exercises multi-beat writes.
Theory
In AXI, AWLEN encodes the number of transfers *minus one* in a burst (e.g., AWLEN=3 means 4 beats). The WLAST signal must assert on the final beat of the write data transfer. A mismatch (e.g., WLAST too early or late) indicates a protocol violation.
To verify this, you track:
- When an AW transaction completes (
awvalid && awready), capture AWLEN. - Count write beats while
wvalid && wreadyoccurs. - Assert that when
wlastasserts, the beat count equals AWLEN.
| Signal | Meaning | Constraint |
|---|---|---|
awlen | Burst length minus one | 0..255 |
wlast | Final beat indicator | Must assert on beat awlen |
w_beat_cnt | Current beat counter | Starts at 0, increments per beat |
The key SVA property uses the *imply* operator |-> to connect burst-start and burst-end conditions: This ensures that *whenever* WLAST occurs during an active burst, the counter matches the expected length.
Practice
- Open this chapter in RtlStudio; confirm
student/tb/axi_sva_bind.svandstudent/tb/tb_top.svappear in Explore. - In
student/tb/axi_sva_bind.sv, locate thewlast_matches_awlen_pproperty and its assertion. - Add a new property and assertion to verify that
wdataandwstrbremain stable from the momentwvalid && !wreadyis true until the next cycle (use|=> $stable(...)). - Open
student/tb/tb_top.svand verify the testbench runs a UVM sequence that issues multi-beat write transfers (AWLEN=3 → 4 beats). - Run Simulation and check the Log panel for
INFO:messages. - Open the Waveform tab to inspect
wlast,w_beat_cnt, andlat_awlentiming alignment.
Summary
You practiced writing SVA properties that verify AXI write burst integrity by correlating AWLEN with the number of WLAST assertions. Using local variables and weak implication operators, you implemented a beat-counting mechanism to ensure WLAST occurs exactly after AWLEN+1 data beats. You extended existing stable-data assertions to include burst-aware correctness checks. The simulation confirmed the property passes, validating correct burst termination behavior.
Run it in the Verilog IDE
- Open the lesson in the IDE and find the valid/ready or AXI channel ports in the editor.
- Simulate with Verilator. Confirm the beat on the VCD, not only in the transcript.
- Check that data moves only on the beats this lesson describes, and that backpressure holds the transfer.
- Synthesize the RTL master, slave, or buffer with Yosys. Leave the UVM bench out of synthesis.
The lesson is done when the simulation matches SVA burst and ID checker: AWLEN versus WLAST beat count. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.