Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ414
Page ↗
Q414DVASIC interview problem

Model a round-robin arbiter

TechniquesPythonArbitrationRound robinFairness
DifficultyMedium
TopicReference Models
LanguagePython
Requirements4 checkpoints
01

Problem

Implement a parameterized round-robin reference model. Given a Boolean request vector, return the next granted index and rotate priority after a grant.

Example input and output

Use this case to check your interpretation
Input
N=4, next_priority=0; request vector ports {1,3}; evaluate twice, then evaluate no requests
Output
grants=1 then 3; next_priority becomes 0; idle returns -1 and leaves priority at 0
Explanation

The circular scan resumes after each winner and an idle cycle does not rotate priority.

02

Requirements (4)

  • Search at most one complete wrap around the requester vector.
  • Return -1 and preserve the priority pointer when no requester is active.
  • After granting index i, begin the next search at i + 1 modulo N.
  • Validate the request-vector width.