Bit swapping is the swapping of the bits
within a byte. The MCS file format is always bit-swapped unless the write_cfgmem
-interface SPIx1|SPIx2|SPIx4|SPIx8 option is used. The HEX file format can be
bit-swapped or not bit-swapped, depending on user options. The bitstream files (BIT, RBT, BIN) are never bit-swapped.
The HEX file format contains only
configuration data. The other memory file formats include address and checksum information
that should not be sent to the FPGA. The address and checksum information is used by some
third-party device programmers, but is not programmed into the memory device.
The following figure shows how two
bytes of data (0xABCD) are bit-swapped.
The MSB of each byte goes to the D0 pin regardless of the orientation of the data:
- In the bit-swapped version of the data, the bit that goes to D0 is the right-most bit.
- In the non bit-swapped data, the bit that goes to D0 is the left-most bit.
Whether or not data must be bit swapped is entirely application dependent. Bit swapping is applicable for serial, SelectMAP, or BPI files, and for the ICAPE3 interface.