RTL Studio Open IDE

Arbiters

2-Request Static Priority Grant

A combinational static priority arbiter for two request lines where req0 has higher priority than req1.

About this block

Simulate it in the Verilog IDE

Easyverilogsimsyn

2-Request Static Priority Grant 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 static priority arbiter for two request lines. It is a simple, low-latency combinational logic module suitable for systems requiring deterministic arbitration between two masters.

This IP provides a simple, low-latency static priority arbiter.

  • Priority: Request 0 (req0) holds the highest priority.
  • Behavior: If both requests are active, req0 wins the grant.
  • Output: The valid output indicates if any request is asserted.
  • Logic: Pure combinational logic with no clock dependency.
  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 2-Request Static Priority Grant.
  2. Read the Verilog module in the editor. The catalog line for this block: A combinational static priority arbiter for two request lines where req0 has higher priority than req1.
  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
req0Input1Request 0 (Highest Priority)
req1Input1Request 1 (Lowest Priority)
grantOutput2Grant vector [1:0]. 2'b01 for req0, 2'b10 for req1, 2'b00 for idle.
validOutput1Valid indicator (1 if any request is active)

Architecture

The design uses combinational logic to resolve priority. The logic is defined as follows:

  • grant[0] = req0 (req0 always wins if active)
  • grant[1] = req1 & ~req0 (req1 wins only if req0 is inactive)
  • valid = req0 | req1 (Active if either request is high)

Verification

The testbench (tb/tb_static_grant_2.v) covers all four input combinations.

Test Casereq0req1Expected GrantExpected ValidResult
TC1 Idle002'b000PASS
TC2 req0102'b011PASS
TC3 req1012'b101PASS
TC4 Both112'b011PASS

### Running Simulation

  1. Run the simulation.
  2. Check the Log panel for the following output:
  3. Use the RtlStudio Waveform tab with sim/dump.vcd to inspect signals.

More in Arbiters

All Arbiters blocks