DescriptionQ414
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 interpretationInput
N=4, next_priority=0; request vector ports {1,3}; evaluate twice, then evaluate no requestsOutput
grants=1 then 3; next_priority becomes 0; idle returns -1 and leaves priority at 0Explanation
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.
