03-23-2018 05:48 PM
In an interface, I specified one of the parameters to be PACKED. I seem to have tracked down an error to whether the size of the structure is > 1024 bits. The error appears in the CoSimulation and is reported a "'X' appearing on that structure, possibly due to an un-initialized C variable".
I know there is 1024 bit limit on arbitrary precision integers. Does this or some similar limit apply on PACKED structures?
03-28-2018 03:19 AM
Are you using the DATA_PACK directive with the structure?
Can you try once after removing it?
We suggest that structure should not be a target of DATA_PACK pragma.
03-28-2018 09:45 AM
Yes, I am using the DATA_PACK pragma on the 3 sub members of a monitoring structure
Only the monitoring of the read fails, even though, structurally it looks just like the other two (each is an array of 32-bit counters). The difference is that the read has more counters. When I decrease the size of this structure to below 1024 bits, the CoSimulation seems happy, not reporting any problems with possible uninitialized variables. I can also say that when it does fail, a test pattern that I have put in the upper bits of all the counters fails to appear in the test bench output from the CoSimulation (using XSIM). Said test pattern does correctly appear in the C-Simulation testing phase.
I have removed the DATA_PACK pragma and it does pass the CoSimulation. However (and this may be a different problem, the verdict is still out) , testing of the actual firmware (with the DATA_PACK pragma removed) failed. This structure was part of the top-level interface and reading the memory mapped locations given by the #defines in Vivado HLS generated x*.hw file does not yield the expected vales. If I reduce the number of variables below the seemingly magic 1024-bit value and use the DATA_PACK, the firmware works as expected.
Given that you suggest not using the DATA_PACK pragma. is this a general suggestion, or just in particular circumstances?