Arbiters
2-Request Lock-Until-Idle Arbiter
A synchronous arbiter that locks the grant to the winning request until that request deasserts, with a fixed tie-break preference for request 0.
About this block
Simulate it in the Verilog IDE
2-Request Lock-Until-Idle Arbiter 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.
A synchronous, lock-until-idle arbitration IP for two request lines. This module ensures exclusive access to a shared resource by holding the grant signal until the winning request deasserts.
This arbiter provides simple, deterministic locking for two requests. It is suitable for low-latency shared resource access where fairness is not required, but exclusive access is critical. The tie-break preference is fixed to req[0].
- Choose Open in IDE. RTL Studio loads the packaged workspace for 2-Request Lock-Until-Idle Arbiter.
- Read the Verilog module in the editor. The catalog line for this block: A synchronous arbiter that locks the grant to the winning request until that request deasserts, with a fixed tie-break preference for request 0.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- 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
- Lock-Until-Idle: The grant remains asserted until the winning request deasserts.
- Two Inputs: Supports two independent request lines (
req[0],req[1]). - Tie-Breaking: If both requests are active simultaneously,
req[0]takes priority. - Synchronous Operation: Operates on the positive edge of
clkwith asynchronous active-low reset. - Valid Indicator: Outputs a
validsignal when any request is active.
Ports
| Port | Direction | Width | Description |
|---|---|---|---|
clk | Input | 1 | Clock input |
rst_n | Input | 1 | Active-low asynchronous reset |
req | Input | 2 | Request vector [1:0] |
grant | Output | 2 | Grant vector [1:0] |
valid | Output | 1 | Valid indicator (high if any request is active) |
Verification
The provided testbench (tb_lock_until_idle_2.v) covers ten specific scenarios to verify functionality:
- Idle Check: Verifies
validis low when no requests are active. - Single Request Grants: Validates grants for
req[0]andreq[1]individually. - Lock Hold: Confirms the lock is held while the request remains active.
- Release: Verifies the lock is released when the request deasserts.
- Tie-Breaking: Tests simultaneous requests to ensure
req[0]wins. - Stability: Ensures correct behavior when one request drops while the other is locked.
### Running Simulation
To run the simulation, ensure you have Icarus Verilog installed (or adjust for your simulator):
Expected Output:
More in Arbiters
- 2-Request Static Priority Grant
- 4-Channel Oldest-First (FIFO) Arbiter — L2 Upgrade
- 4-Channel Round-Robin Arbiter with Priority Rotation
- 4-Input Sliding Window Arbiter — L2 Upgrade
- 4-Request Masked Priority Grant
- Fair-Share Arbiter 2-Request — L2 Upgrade
- Fixed-Priority 4-Request Arbiter — L1 Upgrade — L2 Upgrade
- Fixed-Priority Arbiter with Grant Mask
- Grant-Hold Arbiter (4 req) — L2 Upgrade
- Least Recently Used (LRU) Arbiter — L2 Upgrade
- Lock-Free N-Input Arbiter with Backpressure
- Matrix Arbiter 4-Port
- Sticky RR Hold Arbiter 4
- Token-Ring Arbiter 4
- Weighted Priority Arbiter (4 req) — L2 Upgrade
- Weighted Round-Robin Arbiter 4 — L2 Upgrade