SPRUJB6B November 2024 – May 2025 AM2612
Endian Control
[0] - swap byte in half-word
[1] - swap half word
Input data width is 4 byte hence the configuration only affect the 4 byte word. With these bits following configurations are possible. Lets assume input word is {B3,B2,B1,B0}.
| Swap Byte | Swap Byte | ||
|---|---|---|---|
| 0 | 1 | ||
| Swap Word | 0 | B3,B2,B1,B0 | B2,B3,B0,B1 |
| Swap Word | 1 | B1,B0,B3,B2 | B0,B1,B2,B3 |
Bit reversal is supported by configuration BR bit in CTRL register. Bit reversal operation
works in tandem with endian control. For example the above table with BR option set would look like this:
BR (Bit Reverse)| Swap Byte | Swap Byte | ||
|---|---|---|---|
| 0 | 1 | ||
| Swap Word | 0 | B3[24:31],B2[16:23],B1[8:15],B0[0:7] | B2[16:23],B3[24:31],B0[0:7],B1[8:15] |
| Swap Word | 1 | B1[8:15],B0[0:7],B3[24:31],B2[16:23] | B0[0:7],B1[8:15],B2[16:23],B3[24:31] |