Main Content

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 DifferentMore 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
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:

  • Use of character arrays and strings in structures.

  • Structures with cell arrays in fixed-point conversion.

  • Structures with variable field lengths.

  • Array of structures.

  • Structures defined in external files.