RTL Studio Open IDE

Memory & FIFOs

Count-Based Sync FIFO with Dual Ready/Valid

Single-clock FIFO that tracks occupancy with an explicit count register, exposes wready/rvalid on both producer and consumer sides, and defaults to depth 64 with 16-bit data.

About this block

Simulate it in the Verilog IDE

Hardsystemverilogsimsyn

Count-Based Sync FIFO with Dual Ready/Valid 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.

Single-clock FIFO that tracks occupancy with an explicit count register instead of comparing wide pointers. Both the producer and consumer expose ready/valid handshake signals (wready/wfull, rvalid/rempty), which makes the block easy to stitch into streaming or AXI-style interfaces.

Default configuration is 16-bit data and depth 64 (parameter DEPTH). Verified with Verilator.

Use this IP when you need a deeper buffer with explicit ready/valid on both sides and a straightforward occupancy counter. The 16-bit width is the default datapath size, not the distinguishing feature.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Count-Based Sync FIFO with Dual Ready/Valid.
  2. Read the SystemVerilog module in the editor. The catalog line for this block: Single-clock FIFO that tracks occupancy with an explicit count register, exposes wready/rvalid on both producer and consumer sides, and defaults to depth 64 with 16-bit data.
  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

NameDirectionTypeDescription
clkinputlogicGlobal clock (positive edge)
rst_ninputlogicActive-low asynchronous reset
wreqinputlogicWrite request (producer)
wdatainputlogic [15:0]Write data (16-bit)
wfulloutputlogicFIFO full (producer stall signal)
wreadyoutputlogicWrite ready (=!wfull)
rreqinputlogicRead request (consumer)
rdataoutputlogic [15:0]Read data (16-bit, combinational)
remptyoutputlogicFIFO empty (consumer stall signal)
rvalidoutputlogicRead valid (=!rempty)

Verification

Test CaseDescriptionStatus
TC1Reset state (empty, not full)✅ PASS
TC2Single write-read cycle✅ PASS
TC3FIFO full after burst write✅ PASS
TC4Rejected write on full FIFO✅ PASS
TC5FIFO empty after burst read✅ PASS
TC6Rejected read on empty FIFO✅ PASS
TC7Backpressure handling (write→read→write)✅ PASS
TC8Alternating pipeline (pipeline throughput test)✅ PASS

More in Memory & FIFOs

All Memory & FIFOs blocks