We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Observer kg1
Registered: ‎04-03-2016

64 bit Microblaze : u64 variable assigned wrong values


I am having some very unusual behaviour from the 64-bit Microblaze implementation when assigning a 64bit value to a u64 variable. 

In Vivado 2019.1 I created a simple Microblaze design with the Microblaze configured in 64-bit. In SDK 2019.1 I then perform the following assignments as a test, with the corresponding results in the 'Variables' window.

uint64_t Data_64;

Data_64 = 0xFFFF_FFFF_FFFF_FFFF; ('Variables' result : 0xFFFF_FFFF_FFFF_FFFF) - Correct

Data_64 = 0xFFFF_FFFF_FFFF_0000; ('Variables' result : 0xFFFF_FFFF_FFFF_0000) - Correct

Data_64 = 0xFFFF_FFFF_0000_FFFF; ('Variables' result : 0x0000_0000_0000_FFFF) - Error

Data_64 = 0xFFFF_0000_FFFF_FFFF; ('Variables' result : 0xFFFE_0000_FFFF_FFFF) - Error

Data_64 = 0x0000_FFFF_FFFF_FFFF; ('Variables' result : 0x0000_FFFE_FFFF_FFFF) - Error

Data_64 = 0x0000_0000_0000_0000; ('Variables' result : 0x0000_0000_0000_0000) - Correct

Data_64 = 0x0123_4567_89AB_CDEF; ('Variables' result : 0x0123_4566_89AB_CDEF) - Error

Data_64 = 0x0000_0004_0000_0000; ('Variables' result : 0x0000_0000_0000_0000) - Error

Clearly certain values are not being assigned correctly to the variable. If I use the same code for addressing I end up addressing sections of the program itself and obviously the program freezes. Especially for "0x0000_0004_0000_0000" which is the base address for my DDR4 memory interface.

Can anybody indicate what is the problem here and how I can resolve it?

0 Kudos