Chargement…
Chargement…
Combinational barrel shifter: shifts i_data left by the number of positions selected by i_shift (0 to 3). Vacant bits on the right are filled with '0'.
Behaviour (truth table):
i_shift | o_data |
|---|---|
"00" | i_data |
"01" | i_data(2 downto 0) & '0' |
"10" | i_data(1 downto 0) & "00" |
"11" | i_data(0) & "000" |
*No clock, no reset: 100% combinational.*
| Signal | Direction | Width | Description |
|---|---|---|---|
i_data | Input | 4 bits | Input data |
i_shift | Input | 2 bits | Shift amount (0-3) |
o_data | Output | 4 bits | Shifted data |