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.

Solve in your browser →

No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.

More in this track

← Register busy bitsCount the leading zeros →