10.1.32.1 Barrel Shifter Functionality
The Barrel Shifter can be generated for a fixed shift or range of shift, with feedbit shift or rotation in left, right or both directions. The non-pipelined Barrel Shifter is designed to shift any number of positions at one time. For the pipelined version, it takes log2(MAXSHIFT) clock cycles for the shifted data to appear at the output.
The architecture is based on 2:1 multiplexors.
| Data | Enable | Clock | Q |
|---|---|---|---|
| M | 1 | ƒ | Qn |
| M | 0 | ƒ | Mshifted |
Note: Assume Aclr is active low, Enable is active high, Clock is rising.
| Data | Aclr | Enable | Clock | Q |
|---|---|---|---|---|
| X | 0 | X | X | 0's |
| X | 1 | 0 | X | Qn = Mshifted - log2(MAXSHIFT) |
| m | 1 | 1 | | Qn+1 = Mshifted - log2(MAXSHIFT) + 1 |
Note: Assume Aclr is active low, Enable is active high, Clock is rising.
