UPGRADE YOUR BROWSER

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!

AR# 19587

6.2 EDK - Incorrect MB-GCC calculation

Description

Keywords: EDK, GNU, MB-GCC, Calculation

Urgency: Standard

General Description:
The following application illustrates a limitation with the MicroBlaze compiler:

////////////////////////////////
#include "xbasic_types.h"

main()
{
Xuint32 datain;
Xuint32 temp1,temp2,temp3;
Xuint32 dataout;
int i;

datain = 0x123;
for(i=0;i<2;i++)
{
temp1 = datain | 0xF0FFF000;
temp2 = datain | 0xF1FFF000;
temp3 = datain | 0xFFFFF000;
xil_printf("Temp1 = %x ; Temp2 = %x; Temp3 = %x ; Datain = %x\n\r",temp1,temp2,temp3,datain);
datain = datain+1;
}
}
////////////////////////////////

In the HyperTerminal, the following lines were printed:
Temp1 = F0FFF123 ; Temp2 = F1FFF123; Temp3 = F123 ; Datain = 123
Temp1 = F0FFF124 ; Temp2 = F1FFF124; Temp3 = F124 ; Datain = 124

Therefore, Temp3 receives an incorrect value.

Solution

This problem is fixed in the latest 6.2 EDK Service Pack, available at:
http://www.xilinx.com/ise/embedded/edk.htm.
The first service pack containing the fix is EDK 6.2 Service Pack 2.
AR# 19587
Date Created 06/22/2004
Last Updated 04/28/2006
Status Archive
Type General Article