RTL Studio Open IDE

3.6 · AXI CLASS

AXI4 slave memory controller: BRAM wrapper bridge

Map AXI4 write strobes to BRAM byte enables and verify burst write/readback.

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

What you practice

AXI4 slave memory controller: BRAM wrapper bridge (3.6). Map AXI4 write strobes to BRAM byte enables and verify burst write/readback. It is in AXI4 Slave Memory Controller — Part 3 · AXI4 Full RTL Design of the AXI Masterclass. Burst, outstanding, and a BRAM memory bridge.

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

Today you will implement the bridge between full AXI4 write traffic and a simple BRAM-style memory port by correctly mapping the AXI write strobe (wstrb) signals to byte-level write enables on the BRAM array.

Learning objectives

  • Understand how AXI4 write strobes (wstrb) control byte-level writes in memory.
  • Map 4-bit wstrb to 4 byte lanes of a 32-bit BRAM word.
  • Verify burst write and readback correctness through testbench logs.
  • Practice address decoding for BRAM indexing using bram_index().

Theory

AXI4 write strobes (wstrb[3:0]) indicate which byte lanes are valid during a write transfer. In a 32-bit data path, each bit corresponds to one byte:

wstrb bitByte laneBRAM slice
wstrb[0]LSBdata[7:0]
wstrb[1]data[15:8]
wstrb[2]data[23:16]
wstrb[3]MSBdata[31:24]

The BRAM is modeled as an array of 32-bit words: logic [31:0] bram [0:MEM_WORDS-1]. To write selectively, assign each byte slice conditionally based on wstrb bits.

Practice

  1. Open RtlStudio and select Lesson 3.6.

Confirm student/rtl/axi_full_mem.sv and student/tb/tb_top.sv appear in Explore.

  1. In student/rtl/axi_full_mem.sv, locate the if (|bus.wstrb) block inside the write data handling section.
  2. Replace each __TODO__ comment with a BRAM assignment that writes the corresponding byte lane from bus.wdata to bram[idx] when the strobe bit is set.
  3. Run Simulation and check the Log panel for INFO: messages.
  4. Verify the final INFO: PASS line appears after readback comparison.

Summary

You implemented an AXI4 slave memory controller that bridges full AXI4 traffic to a simple BRAM interface. You mapped write strobes (WSTRB) to BRAM byte write enables and handled address decoding for burst reads and writes. Through simulation, you verified correct burst write and readback behavior, confirming the controller’s ability to manage out-of-order transactions. The key takeaway is that AXI4’s full feature set—including bursts and byte-level write strobes—can be reliably translated to basic memory primitives with careful signal mapping.

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 AXI4 slave memory controller: BRAM wrapper bridge. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.