Also called: Priority Encoder.
FunctionSelects the most significant one bit on the input and encodes this as a binary number on the output. Notation"BIN_OF_MSB" = binary value of input's most significant bit that has a value of one. CommentsAll zeros on the input of the encoder is an ambiguous condition since the output is the same as the input with a single bit in the least significant position. The "Valid" output can be used to flag this condition. |
Name |
Description |
WIDTH |
Width of the Y and Q ports. |
Name |
Variants |
Registered |
No, Yes |
Valid |
UnUsed, Used |
Enable |
UnUsed, Used |
Name |
Width |
Condition |
Description |
D |
2**WIDTH |
None |
Input bits to be encoded. |
Enable |
|
Registered = No |
if (Enable) Y = BIN_OF_MSB; else Y=0; |
ClockEn |
|
Registered = Yes |
if (ClockEn) Q = BIN_OF_MSB |
Name |
Width |
Condition |
Description |
Y |
WIDTH |
Registered = No |
BIN_OF_MSB |
Q |
WIDTH |
Registered = Yes |
BIN_OF_MSB |
Valid |
|
Valid = Used |
if (D == 0) Valid = 0; else Valid = 1; |