Home › Practice › RTL Design › Who is most urgent?
Who is most urgent?
EasyRTLcombinationalarchitecture
Eight devices can ask a processor for attention at the same time. The processor must pick the most important one.
Concept first. When several requests are active at once (interrupt lines, bus requests), a priority encoder gives the number of the most important one. Here the most important is the highest index. It also needs a valid flag, to tell "request 0 is active" apart from "nothing is active", since both would otherwise show the number 0. Try a few inputs by hand: with requests 2 and 5 active the answer is 5, and a request at 7 beats everything below it.
What to build.
prio8(req):reqis 8 bits.- Outputs:
y[2:0]is the index of the highest bit set inreq;validis 1 when any bit ofreqis set. - When no bit is set,
y = 0andvalid = 0. - No clock.
- Rule: no
+,-,*,<or>. Use logic only.
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.