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!
When I port an existing design from EDK 6.3 to EDK 8.1i and recompile the C Code, the inferred delay in the C Code is optimized away and the system does not behave properly anymore.
When the delay is inferred using a simple for() Loop, during the compilation of the C Code and after some Loop Collapsing Algorithm applied by the Compiler, the While Loop is optimized.
Using the C Keyword "Volatile" on the integer being incremented in the for() Loop should fix the problem:
Before:
"
int i;
for (i=0; i<100000; i++);
"
To fix it:
"
volatile int i;
for (i=0; i<100000; i++);
"
AR# 22810 | |
---|---|
Date | 12/15/2012 |
Status | Active |
Type | General Article |