4:2 Priority Encoder with Valid Output
Interrupt controllers and bus arbiters must resolve simultaneous requests by granting access to the highest-priority agent. The priority encoder translates multiple request lines into a binary index representing the most critical active request.
Input I3 has the highest priority, followed by I2, I1, and I0. The 2-bit output vector A1 and A0 encodes the index of the highest active input. The valid signal V asserts high if at least one input is active. Without V, an output of 00 is ambiguous between I0 being active and no inputs being active.
| I3 | I2 | I1 | I0 | V | A1 | A0 | |------|------|------|------|-----|------|------| | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 0 | 0 | 1 | x | 1 | 0 | 1 | | 0 | 1 | x | x | 1 | 1 | 0 | | 1 | x | x | x | 1 | 1 | 1 |
Constraints
- Combinational logic only.
- Implement all three outputs:
A1,A0, andV. - Default
A1andA0to0when no inputs are active.
Topics
Solve this problem
Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.
This problem is part of Codiode Pro. The statement above is free to read.
The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.