RTL Studio Open IDE

Arbiters

Fixed-Priority Arbiter with Grant Mask

A 4-input fixed-priority arbiter with a grant mask to disable specific requests dynamically.

About this block

Simulate it in the Verilog IDE

Easyverilogsimsyn

Fixed-Priority Arbiter with Grant Mask is a Verilog reference block in the Arbiters catalog. Round-robin, fixed-priority, and grant-based resource arbiters. Marked Easy: a small block you can read, simulate, and synthesize in one sitting.

This IP implements a 4-input fixed-priority arbiter with a dynamic grant mask.

It selects the highest-priority active request that is not masked.

Priority order is strictly req[3] > req[2] > req[1] > req[0].

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Fixed-Priority Arbiter with Grant Mask.
  2. Read the Verilog module in the editor. The catalog line for this block: A 4-input fixed-priority arbiter with a grant mask to disable specific requests dynamically.
  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

The module uses the following ports:

PortDirectionWidthDescription
reqInput4Request signals from four masters. 1 = active request.
maskInput4Mask signals. 0 disables the corresponding request (ignores it). 1 enables it.
grantOutput4Grant signal. One-hot encoding of the winning request.

Architecture

The design uses a simple combinational priority encoder structure. It checks requests from highest priority (bit 3) to lowest (bit 0). Each request is logically ANDed with its corresponding mask bit. The first unmasked active request receives the grant. All other grant bits remain zero.

Verification

The testbench covers eight specific scenarios to ensure correctness. All tests passed successfully during simulation.

Test CaseDescriptionExpected GrantResult
TC1No requests active0000PASS
TC2Single request req[0]0001PASS
TC3All requests active1000PASS
TC4Mask req[3], req[2] active0100PASS
TC5Mask req[3:1], req[0] active0001PASS
TC6All requests masked0000PASS
TC7Mask req[1], req[3] and req[0] active1000PASS
TC8Mask req[3] and req[1], req[0] active0001PASS

More in Arbiters

All Arbiters blocks