Structs in the code, for instance internal and global variables, are disaggregated by default. They are decomposed into their member elements. The number and type of elements created are determined by the contents of the struct itself. Arrays of structs are implemented as multiple arrays, with a separate array for each member of the struct.
Structs in C/C++ are padded with extra bytes by the compiler for data
alignment. In order to make kernel code in Vitis HLS
compliant with gcc
, structs in kernel code are padded
with extra bytes.