RTL Studio Open IDE

Arbiters

Weighted Priority Arbiter (4 req) — L2 Upgrade

Weighted Priority Arbiter with Mask, Park, and Hold Lock for 4 requests.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

Weighted Priority Arbiter (4 req) — 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 provides a flexible 4-way weighted priority arbiter with dynamic masking, park mode, and hold lock capabilities.

It is implemented in Verilog and targets L2 complexity.

The design ensures deterministic arbitration based on a strict priority hierarchy: Hold Lock > Park Mode > Weighted Priority.

  • Dynamic Masking: Specific requests can be disabled via the mask input. Note: mask[i]=1 enables request i, mask[i]=0 disables it.
  • Weighted Priority: When multiple requests are active, priority is determined by the weight input. Higher weight wins. If weights are equal, the higher ID wins.
  • Park Mode: Forces the grant to a specific ID (park_id) when park_en is asserted, provided the parked ID is requesting.
  • Hold Lock: Preserves the current grant during high-priority events or when hold_lock is asserted.
  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Weighted Priority Arbiter (4 req) — L2 Upgrade.
  2. Read the Verilog module in the editor. The catalog line for this block: Weighted Priority Arbiter with Mask, Park, and Hold Lock for 4 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.

Ports

PortDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low reset
reqInput[3:0]Request signals
maskInput[3:0]Mask to disable requests (1=enabled, 0=disabled)
weightInput[3:0]Weight for priority resolution (higher value = higher priority)
park_enInput1Enable park mode
park_idInput[1:0]Park target ID (0-3)
hold_lockInput1Hold current grant
gntOutput[3:0]Grant signal (one-hot)
busyOutput1Busy indicator (1 if any request is pending/granted)

Verification

The testbench covers basic requests, masking, weight priority, park mode, hold lock, and reset. All test cases passed successfully.

Test CaseDescriptionResult
TC1Basic Single RequestPASS
TC2MaskingPASS
TC3Weight PriorityPASS
TC4Park ModePASS
TC5Hold LockPASS
TC6Complex Weight/MaskPASS
TC7Reset BehaviorPASS

To run the simulation:

  1. Ensure Icarus Verilog is installed.
  2. Run make sim in the project root.
  3. Check the log for INFO: PASS.

More in Arbiters

All Arbiters blocks