Structure Definition for HLS Code Generation
To generate efficient standalone High-Level Synthesis (HLS) code for structures, you must define and use structures differently than you normally would when running your code in the MATLAB® environment:
What's Different | More Information |
---|---|
Use a restricted set of operations. | Structure Operations Allowed for Code Generation |
Observe restrictions on properties and values of scalar structures. | Define Scalar Structures for Code Generation |
Make structures uniform in arrays. | Define Arrays of Structures for Code Generation |
Reference structure fields individually during indexing. | Index Substructures and Fields |
Avoid type mismatch when assigning values to structures and fields. | Assign Values to Structures and Fields |
Limitations
MATLAB to HLS code generation does not support:
Define primary function inputs or outputs as an array of structures.
Use of character arrays and strings in structures.
Structures with cell arrays in fixed-point conversion.
Variable-sized structure fields.
Variable-sized array of structures.
Structures defined in external files.