Skip to question
ASIC.FYI
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
ASIC.FYI/Interview questions/Select round-robin winners with rotate and isolate

Q293·Free·SystemVerilog

Select round-robin winners with rotate and isolate

Difficulty
Hard
Topic
Arbiters
Language
SV
Interview prompt

Question

Optimize round-robin winner selection with vector operations rather than a procedural N-entry scan while preserving the predictor's priority semantics.

Starting point

Question code

function int predict_next(bit [N-1:0] reqs);
Reviewed example

Trace one case

Input
N=4,next_priority=2; request vector has ports {0,3} active
Expected output
rotated isolate selects original port3; next_priority becomes0

Rotating port2 to bit zero makes port3 the lowest active offset; one-hot isolation maps it back without a procedural scan.

What to cover

Requirements

  1. Rotate the current next-priority position to bit zero.
  2. Isolate the lowest set bit of the rotated request vector.
  3. Encode that one-hot offset and map it back to the original port domain.
  4. Return -1 before performing one-hot decode when no request is active.
  5. Keep state update behavior identical to the strict round-robin predictor.
Exact question handoffPractice Q293

Solve it in the question bank, keep your progress, and reveal the reviewed solution when your access allows.

Open in question bank →
Solution accessA Free account unlocks the complete reviewed solution.
Continue learning

SystemVerilog

  • Arbiters
  • Barrel rotate
  • One-hot
  • Priority encoder
Interview preparation guide →
Continue practicing

Related questions

Q292 · ArbitersPredict a strict round-robin grant→Q216 · ArbitersPredict weighted round-robin grants→Q182 · ArbitersDetect a starving arbiter requester→
ASIC.FYI · Learn silicon end to end.info@asic.fyi