RTL Studio Open IDE

Memory & FIFOs

32-Bit Asynchronous FIFO with Gray Pointer Encoding

A configurable 32-bit asynchronous FIFO using AXI4-Stream interfaces and Gray code pointers for safe cross-clock-domain data transfer.

About this block

Simulate it in the Verilog IDE

Hardsystemverilogsimsyn

32-Bit Asynchronous FIFO with Gray Pointer Encoding is a SystemVerilog reference block in the Memory & FIFOs catalog. SRAM models, FIFOs, register files, and memory-style storage. Marked Hard: a larger reference. Simulate the packaged testbench before you change the RTL.

This OpenIP provides a Gray-code pointer asynchronous FIFO with AXI4-Stream style handshaking on source and destination clock domains.

The memory array is written in s_clk and read in m_clk, with synchronized pointers preventing metastable full/empty decisions.

The default configuration targets 32-bit tdata with standard tvalid/tready flow control.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 32-Bit Asynchronous FIFO with Gray Pointer Encoding.
  2. Read the SystemVerilog module in the editor. The catalog line for this block: A configurable 32-bit asynchronous FIFO using AXI4-Stream interfaces and Gray code pointers for safe cross-clock-domain data transfer.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Ports

PortDirectionWidthDescription
s_clkinput1Source write clock
s_rstinput1Source reset (active high)
s_axis_tdatainputDATA_WIDTHWrite data
s_axis_tvalidinput1Write data valid
s_axis_treadyoutput1Write ready
m_clkinput1Destination read clock
m_rstinput1Destination reset (active high)
m_axis_tdataoutputDATA_WIDTHRead data
m_axis_tvalidoutput1Read data valid
m_axis_treadyinput1Read ready

Verification

Test CaseDescriptionExpected Behavior
TC1Basic write/readSequential data 0..3 matches on read side

Run make sim from the variant directory.

Integration

Hold both resets until their respective clocks are stable, then release s_rst and m_rst in domain order required by your SoC. Size the FIFO depth parameter to cover worst-case producer/consumer rate mismatch. Tie unused AXI sideband inputs to constants when optional tkeep/tid/tdest are disabled.

More in Memory & FIFOs

All Memory & FIFOs blocks