Skip to content
All projects

Design & Verification2026

AXI4-Stream Packet FIFO

Store-and-forward RTL with a UVM environment that predicts every drop exactly

  • SystemVerilog
  • UVM 1.2
  • AXI4-Stream
  • Questa
  • Verilator
  • SVA
  • Functional coverage

A store-and-forward packet FIFO that sits upstream of a network MAC and buffers whole frames so the MAC never underruns when the source stalls mid-packet. The design is built around a three-pointer commit/rewind scheme, and the UVM environment verifies it against a timing-independent contract rather than a cycle-by-cycle occupancy mirror.

Block diagram of the store-and-forward packet FIFO datapath and its three pointers
Datapath and the commit/rewind pointer scheme.
6
UVM tests in the regression
5 / 5
Injected bugs caught
445
Packets in RTL pre-validation
0
Scoreboard discrepancies
  1. 01

    Three-pointer commit and rewind

    wr_ptr advances speculatively on every accepted beat, wr_ptr_commit marks the end of the last whole packet and doubles as the rewind target, and rd_ptr only ever sees committed packets. A dropped frame costs one pointer assignment.

  2. 02

    Drop-on-overflow without deadlock

    A packet is dropped only when the entire buffer holds a single in-progress packet, so anything that fits is never dropped. Once dropping starts the FIFO holds tready high and sinks the rest of the doomed frame to tlast, so the AXI4-Stream master never locks up.

  3. 03

    Exact scoreboarding from a design contract

    Because the drop rule collapses to length > DEPTH always drops and length <= DEPTH never drops, the scoreboard predicts drops deterministically instead of racing the DUT's internal occupancy. That removes the false-failure problem that plagues cycle-accurate monitors.

  4. 04

    Configurable slave-side backpressure VIP

    A new axi4_stream_slave_driver generates tready under four policies — always ready, random, stall, and blocked — layered onto Greg Stitt's parameterized AXI4-Stream agent, which is reused unchanged.

  5. 05

    Mutation-tested checkers

    Five bugs were deliberately injected — overeager drop, commit pointer off-by-one, missing rewind, stall-during-drop, and plain FIFO instead of store-and-forward. All five were caught by the assertions and scoreboard, proving the checkers actually check.

Simulation waveform of a dropped oversize packet and the pointer rewind
Rewind on overflow: tready stays high while the doomed frame is sunk to tlast.
Functional coverage report for the packet FIFO regression
Coverage closure across length bins and backpressure policies.
UVM testbench hierarchy diagram
Testbench topology — reused agent, new slave driver, packet-level scoreboard.