在IUS9.2的svOpenArrayHandle
目前只支援到32bits
所以在作傳值時
資料寬度必須在32bits以內
否則會傳送有錯誤的值
此處要參考下文
VPI 64-Bit Applications
The simulator enables you to run VPI applications written for a 64-bit execution environment. The 64-bit version of the simulator operates in the LP64 data model on UNIX platforms, which means that long and pointer are 64-bit data types and integers are 32 bits in size.
Some of your application code might assume that integers, long, and pointers are the same size. For this reason, if you need to run your existing 32-bit applications with the 64-bit simulator, you must revise your code in order to make it compliant with the 64-bit version of the simulator. In general, you should identify the code based on the assumption that integer and long types are equivalent and correspond to 32-bit quantities. As there is also a difference in pointer size between the two versions, make sure to modify any integer type that contains a pointer so it specifies the long internal type.
If your functions accept or return pointers, you must explicitly prototype them using the proper types for parameters and return values. If your C functions use implicit references regarding their type signatures, you must fix them to make your code 64-bit portable. In particular, ensure that all functions have a correct prototype declaration in scope. If you reference system functions, you should include the correct header file to bring the required types and prototypes into scope.
You can determine at compile time whether long is 32 or 64 bits in size by testing the value of sizeof(long).
沒有留言:
張貼留言