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

Vivado HLS - Why does an "array" not keep the stored data in C simulation?

Description


There are arrays inside of my function.

I expect the arrays to keep their values between function calls.

However, the values are not kept.

Solution

If you need the array to maintain the written data between function calls, it should be "static".

Static types in a function hold their value between function calls.
 
The equivalent behavior in a hardware design is a registered variable (a flip-flop or memory).

The value must be maintained across invocations of the function and design.

AR# 61355
Date Created 07/02/2014
Last Updated 03/11/2015
Status Active
Type General Article
Tools
  • Vivado Design Suite - 2014.2