Platform Specific Tcl Behaviors - 2020.2 English

Vivado Design Suite User Guide: Using Tcl Scripting (UG894)

Document ID
Release Date
2020.2 English

In some rare cases, Tcl can behave differently depending on the platform where it is being used (32-bit or 64-bit). This is not related to Vivado but to Tcl.

For example, if you have a list of large integers that you want to sort, you might use the following command:

 vivado% lsort $list -integer

This command behaves differently when the script is running on a 32-bit machine than on a 64-bit machine. The reason is that integers are coded differently on a 32-bit platform versus 64-bit platform:

win32, win64, lnx32: sizeof(int) is 4bytes
lnx64: sizeof(int) is 8bytes

A workaround for that particular example would be to use the command line option -command of lsort and provide a custom proc to do the sorting.