wire / wire-format / priority-encoder

Priority encoder

A priority encoder converts a one-hot (or multi-hot) input to a binary code, giving priority to the highest-numbered active input. Used in interrupt controllers (highest priority interrupt), CAM (highest-priority match), and arbiters. If multiple inputs are active, the highest-numbered (or lowest, depending on design) is encoded.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: Priority encoder

wire format

spec: Digital logic design

A priority encoder converts a one-hot (or multi-hot) input to a binary code, giving priority to the highest-numbered active input. Used in interrupt controllers (highest priority interrupt), CAM (highest-priority match), and arbiters. If multiple inputs are active, the highest-numbered (or lowest, depending on design) is encoded.

fieldsizemeaning
4:2 priority encoder4 inputs, 2 outputsOutputs the binary code of the highest active input. E.g., inputs 1010 -> output 11 (input 3 has highest priority).
8:3 priority encoder8 inputs, 3 outputsOutputs the binary code of the highest active input among 8.
Valid output1 bit1 if any input is active (at least one 1).
Priority schemeconfigHighest number = highest priority (or lowest, depending on design).

example:

00 00

Priority encoder (placeholder)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/priority-encoder or /wire-format/priority-encoder.json