RTL Studio Open IDE

Arbiters

Fair-Share Arbiter 2-Request — L2 Upgrade

Fair-share arbiter with grant-lock and credit-based backpressure for two requests.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

Fair-Share Arbiter 2-Request — 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 fair-share arbiter for two request lines, designed for high-performance systems requiring balanced resource allocation.

It supports configurable weighted priority and round-robin alternation for equal weights.

Key features include a grant-lock mechanism for stable transaction handling and credit-based backpressure to prevent resource overuse and manage flow control.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Fair-Share Arbiter 2-Request — L2 Upgrade.
  2. Read the Verilog module in the editor. The catalog line for this block: Fair-share arbiter with grant-lock and credit-based backpressure for two requests.
  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.

Features

  • Dual Request Support: Handles two concurrent request inputs.
  • Configurable Arbitration: Supports weighted priority and round-robin fairness.
  • Grant Locking: Holds the current grant state to ensure transaction stability.
  • Credit-Based Flow Control: Manages backpressure and stall conditions using a credit system.
  • Status Indicators: Provides almost_full and stall signals for system monitoring.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low reset
reqInput2Request signals for two channels (req[0], req[1])
weightInput2Priority weights for each channel. Higher weight wins. Equal weights trigger round-robin.
lockInput1Assert high to lock the current grant
credit_enInput1Enable credit-based backpressure logic
grantOutput2Granted channel mask (2'b01 for ch0, 2'b10 for ch1)
validOutput1High when a valid grant is issued
almost_fullOutput1High when credits are low (≤ 2)
stallOutput1High when backpressure is active (credits exhausted)

Verification

The testbench (tb_fair_share_arbiter_2_grant_lock_credit.v) covers the following scenarios:

Test CaseDescriptionResult
TC1Basic single request grantPASS
TC2Weight priorityPASS
TC3Stall when credits exhaustedPASS
TC4Fair share alternationPASS
TC5Lock functionalityPASS

Running Tests: After running the simulation, the log should display:

  • TC1 PASS
  • TC2 PASS
  • TC3 PASS (Stall not asserted when credits likely available)
  • TC4 PASS
  • TC5 PASS
  • Simulation ends with INFO: PASS.

More in Arbiters

All Arbiters blocks