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# 22810

8.1i EDK - Delay inferred in the C code is optimized away

描述

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
日期 12/15/2012
状态 Active
Type 综合文章
的页面