Chargement…
Chargement…
8-bit population count (popcount): counts the '1' bits in i_data and encodes the result as a 4-bit binary number (0 to 8).
Behaviour (pure combinational):
o_count = i_data(0) + i_data(1) + ... + i_data(7) (arithmetic sum of the 8 bits).popcount(8 bits) ≤ 8 fits in 4 bits.*No clock, no reset: pure combinational logic.*
| Signal | Direction | Width | Description |
|---|---|---|---|
i_data | Input | 8 bits | Input data |
o_count | Output | 4 bits | Number of '1's (0 to 8) |