In reply to robert.liu:
I think you are getting into an XY problem where you are describing problems with your solution to a problem, and not describing the original problem. Without a bigger picture of your situation, I can only throw out a few suggestions:
- Use the VPI to get a handle to the array and use VPI routines to access the array.
- Keep the array allocated on one side of the language barrier and create access routines to interact with the array.
- If you have larger blocks of memory that you need to interact with, create access routines with larger fixed size array blocks to do memcpy.