Data Types and Endianness - 2024.2 English

MicroBlaze Processor Reference Guide (UG984)

Document ID
UG984
Release Date
2024-11-27
Version
2024.2 English

The MicroBlaze processor uses Big-Endian or Little-Endian format to represent data, depending on the selected endianness. The parameter C_ENDIANNESS is set to 1 (little-endian) by default.

The hardware supported data types for 32-bit MicroBlaze are word, half word, and byte. With 64-bit MicroBlaze the data types long and double are also available in hardware.

When using the reversed load and store instructions LHUR, LWR, LLR, SHR, SWR, and SLR, the bytes in the data are reversed, as indicated by the byte-reversed order.

The following tables show the bit and byte organization for each type.

Table 1. Long Data Type (only 64-bit MicroBlaze)
Big-Endian Byte Address n n+1 n+2 n+3 n+4 n+5 n+6 n+7
Big-Endian Byte Significance MSByte LSByte
Big-Endian Byte Order n n+1 n+2 n+3 n+4 n+5 n+6 n+7
Big-Endian Byte-Reversed Order n+7 n+6 n+5 n+4 n+3 n+2 n+1 n
Little-Endian Byte Address n+7 n+6 n+5 n+4 n+3 n+2 n+1 n
Little-Endian Byte Significance MSByte LSByte
Little-Endian Byte Order n+7 n+6 n+5 n+4 n+3 n+2 n+1 n
Little-Endian Byte-Reversed Order n n+1 n+2 n+3 n+4 n+5 n+6 n+7
Bit Label 0 63
Bit Significance MSBit LSBit
Table 2. Word Data Type
Big-Endian Byte Address n n+1 n+2 n+3
Big-Endian Byte Significance MSByte LSByte
Big-Endian Byte Order n n+1 n+2 n+3
Big-Endian Byte-Reversed Order n+3 n+2 n+1 n
Little-Endian Byte Address n+3 n+2 n+1 n
Little-Endian Byte Significance MSByte LSByte
Little-Endian Byte Order n+3 n+2 n+1 n
Little-Endian Byte-Reversed Order n n+1 n+2 n+3
Bit Label 0 31
Bit Significance MSBit LSBit
Table 3. Half Word Data Type
Big-Endian Byte Address n n+1
Big-Endian Byte Significance MSByte LSByte
Big-Endian Byte Order n n+1
Big-Endian Byte-Reversed Order n+1 n
Little-Endian Byte Address n+1 n
Little-Endian Byte Significance MSByte LSByte
Little-Endian Byte Order n+1 n
Little-Endian Byte-Reversed Order n n+1
Bit Label 0 15
Bit Significance MSBit LSBit
Table 4. Byte Data Type
Byte Address n
Bit Label 0 7
Bit Significance MSBit LSBit