Day 14

Fixed Priority Arbitrer

Day 14

Design and verify a parameterized fixed priority arbiter

Interface Definition

  • Output should be produced in a single cycle
  • Output must be one-hot
  • The module should have the following interface:
module day14 #(
  parameter NUM_PORTS = 4
)(
    input       wire[NUM_PORTS-1:0] req_i,
    output      wire[NUM_PORTS-1:0] gnt_o   // One-hot grant signal
);

Coding Exercise

You're expected to code both the RTL and testbench for the problem. Your testbench should include the stimulus and checkers.

NOTE

The testcase will show PASSED as long as the RTL and testbench compile, but it doesn't imply that the implemented logic is correct.

If you're interested in learning more about RTL Design and don't want to worry about implementing the checks or the testbench code then I'd recommend the Hands-on RTL Design course. The course contains 25 RTL Design problems to help improve your design skills and comes with a 2-part video solution for every problem.

Practical Application

Try solving this problem which uses this design to implement Least Recently Used (LRU) replacement policy for an N-way associative cache.

PS: Get a sweet 10% off on using my referral code: QS-RF-CFUNHYOW

Related concepts

Loading the interactive workspace...