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 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Kiran Kintali
2020-10-7
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hierarchical Designs and Synchronous Hardware Behavior 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!