Is it possible to generate HDL code (VHDL) of a Simulink variant reference model in a way that the "active variant" is selectable through VHDL generics?
1 view (last 30 days)
Show older comments
In MATLAB documentation for variant subsystem/model it is stated that "HDL Coder generates code for only the active variant". I want to generate HDL code once for all variants of my model, so not only for the active variant but for all of them and select the active variant with a VHDL generic. Is that possible?
Another way to reach my goal would be in instructing HDL Coder to generate a single VHDL entity with two or more VHDL architectures where each architecture is a variant of the model (the selection of the architecture could than be made through filelist or through VHDL-configuration construct). Is that second option possible?
0 Comments
Accepted Answer
Kiran Kintali
on 7 Oct 2020
HDL Coder compiles away all the inactive variants and generates code only for the active variant. Can you share a sample model and expected generated HDL code for the model? We would like to know how you switch between the variants after all variants are generated.
More Answers (0)
See Also
Categories
Find more on Hierarchical Designs and Synchronous Hardware Behavior in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!