RTL Studio Open IDE

Arbiters

Sticky RR Hold Arbiter 4

A 4-channel sticky round-robin arbiter that holds the grant until acknowledgment, then advances the pointer.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

Sticky RR Hold Arbiter 4 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 implements a sticky round-robin arbiter for four request lines. It ensures fair access by rotating the grant priority, but uniquely holds the grant signal active until the corresponding master asserts an acknowledge (ack) signal. This prevents grant loss during slow acknowledgment cycles or when masters require multiple cycles to process data.

### Key Characteristics

  • Sticky Grant: The grant remains asserted until ack is received.
  • Round-Robin Rotation: After acknowledgment, the pointer advances to the next requesting master.
  • Fairness: Prevents starvation by ensuring all masters get a turn.
  • Synthesizable: Standard ASIC/FPGA compatible Verilog.
  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Sticky RR Hold Arbiter 4.
  2. Read the Verilog module in the editor. The catalog line for this block: A 4-channel sticky round-robin arbiter that holds the grant until acknowledgment, then advances the pointer.
  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.

Features

  • Supports four independent request inputs (req[3:0]).
  • Provides a single-hot grant output (grant[3:0]).
  • Hold Mechanism: Grant is not de-asserted until the specific ack bit is high.
  • Pointer Advancement: The internal pointer only rotates after a successful handshake (req + ack).
  • Reset Behavior: Clears all state and grants to default position on active-low reset.

Interface

Port NameDirectionWidthDescription
clkInput1System clock
rst_nInput1Active-low asynchronous reset
reqInput4Request signals from masters (active high)
ackInput4Acknowledge signals from masters (active high)
grantOutput4Granted request signals (single-hot, active high)

Architecture

The design uses a 2-bit pointer (ptr) to track the current arbitration priority position.

  1. Combinational Logic: Determines the next grant based on current requests, the current pointer, and the hold status.
  2. State Machine:

- If no grant is active, it grants the master at ptr. - If a grant is active, it holds it until ack[ptr] is asserted. - Upon ack, the pointer rotates to find the next active request.

  1. Sequential Logic: Registers update on the positive edge of clk or upon reset.

### High-Level Flow

Verification

The testbench (tb_sticky_round_robin_hold_4.v) verifies the following scenarios:

Test CaseDescriptionExpected Result
TC1Reset BehaviorGrant and Pointer clear to 0
TC2Single RequestCorrect grant to requesting master
TC3Hold GrantGrant stays active during ack cycle
TC4AdvancePointer advances after ack
TC5PriorityCurrent pointer has priority over others
TC6RotationNext request granted after ack
TC7Wrap-AroundPointer wraps from 3 to 0 correctly

All test cases pass successfully. Run the simulation to view waveforms and log output.

More in Arbiters

All Arbiters blocks