RTL Studio Open IDE

Arbiters

4-Channel Oldest-First (FIFO) Arbiter — L2 Upgrade

4-Channel Oldest-First (FIFO) Arbiter with almost-full flag and flush support.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

4-Channel Oldest-First (FIFO) Arbiter — L2 Upgrade is a Verilog reference block in the Arbiters catalog. Round-robin, fixed-priority, and grant-based resource arbiters. Marked Medium: more state or a wider datapath, still one workspace in the IDE.

This IP implements a 4-channel oldest-first arbiter with an "almost-full" flag and flush support.

It prioritizes the lowest index among valid requests to ensure FIFO-like ordering.

The grant signal is registered and cleared when backpressure is applied.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 4-Channel Oldest-First (FIFO) Arbiter — L2 Upgrade.
  2. Read the Verilog module in the editor. The catalog line for this block: 4-Channel Oldest-First (FIFO) Arbiter with almost-full flag and flush support.
  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.

Interface

SignalDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low asynchronous reset
validInput4Valid request signals per channel
readyInput4Ready acknowledgment signals per channel
grantOutput4Granted channel signal (one-hot)
almost_fullOutput1Asserted when >= 3 channels are valid
flush_ackOutput1Flush acknowledgment status (currently 0)

Architecture

The arbiter uses combinational logic to determine the oldest request based on channel index (0 is highest priority). The grant register updates only when backpressure is not applied (i.e., at least one channel is ready). If all channels are busy (backpressure), the grant is cleared.

The almost-full logic checks all combinations of three valid channels. If any combination of three or more channels is valid, the flag asserts.

Verification

The testbench verifies reset state, single request, oldest-first priority, almost-full flags, and backpressure handling. All seven test cases passed successfully in the simulation log. The simulation was run using Icarus Verilog with VCD dump for waveform analysis.

Test CaseDescriptionResult
TC1Reset state checkPASS
TC2Single request (Channel 0)PASS
TC3Multiple requests (Oldest-First)PASS
TC4Almost-full check (3 channels)PASS
TC5Almost-full check (2 channels)PASS
TC6Backpressure handlingPASS
TC7Flush-ack zero checkPASS

More in Arbiters

All Arbiters blocks