Arbiters
Grant-Hold Arbiter (4 req) — L2 Upgrade
4-request Grant-Hold Arbiter with maskable hold and fixed priority fallback.
About this block
Simulate it in the Verilog IDE
Grant-Hold Arbiter (4 req) — L2 Upgrade 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 module implements a 4-request Grant-Hold Arbiter with fixed priority fallback. It supports maskable requests to ignore specific lines and a hold signal to freeze the current grant output. Priority is fixed, with request 0 having the highest precedence.
This IP provides a robust solution for 4-way arbitration with masking and hold capabilities.
It is suitable for L2 interconnects requiring simple priority-based access control.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Grant-Hold Arbiter (4 req) — L2 Upgrade.
- Read the Verilog module in the editor. The catalog line for this block: 4-request Grant-Hold Arbiter with maskable hold and fixed priority fallback.
- 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.
Architecture
The arbiter uses a synchronous state machine. It evaluates masked requests in priority order. If the hold signal is active, the grant remains unchanged. Otherwise, the highest priority active request is granted.
Ports
| Port Name | Direction | Width | Description |
|---|---|---|---|
clk | Input | 1 | Clock input |
rst_n | Input | 1 | Active-low reset input |
req | Input | 4 | Request signals [3:0] |
mask | Input | 4 | Mask signals [3:0] (1=enabled, 0=disabled) |
hold | Input | 1 | Hold signal to freeze grant |
grant | Output | 4 | Granted request [3:0] |
Verification
The testbench covers seven key scenarios. Basic priority selection is verified first. Masking logic is tested to ensure ignored requests are skipped. Fixed priority fallback is confirmed when high-priority requests are inactive. Hold functionality is validated by checking state retention. Hold release behavior is tested with new requests. Edge cases like no requests and all masked requests are covered.
| Test Case | Description | Expected Result |
|---|---|---|
| TC1 | Basic Priority | Grant 0 when req[0] and req[1] active |
| TC2 | Masked Request | Grant 1 when req[0] is masked |
| TC3 | Fixed Priority Fallback | Grant 2 when req[0] and req[1] inactive |
| TC4a | Pre-Hold Grant | Grant 1 before hold assertion |
| TC4b | Hold Maintains Grant | Grant 1 remains during hold |
| TC5 | Hold Release | Grant 0 after hold release |
| TC6 | No Requests | Grant 0 when no requests active |
| TC7 | All Masked | Grant 0 when all requests masked |
More in Arbiters
- 2-Request Lock-Until-Idle Arbiter
- 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
- 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