Looking for a way to change Simulink parameters at or after compile time with HDL coder
Mostra commenti meno recenti
Using Simulink 2013 and the HDL coder, I'm looking for a way to change model parameters at run-time (like ports) or at compile time (like generics). I know parameters aren't exposed as ports (<http://www.mathworks.com/matlabcentral/answers/114813-can-i-export-simulink-block-parameters-to-the-vhdl-entity-port-list#answer_123251)>, but I'm looking for a way to change them. From what I can tell, the parameter is somewhat optimized-out of the VHDL code when Simulink builds it, even though the parameter name is retained as a buried signal. Maybe there's a way to turn off the optimization so a generic parameter calculation is performed? Then I could manually expose the parameter as a port. We could fall-back on creating explicit inports and calculations in lieu of parameters, but I hope there's a better way.
Thank you for any ideas,
Steve K
Risposta accettata
Più risposte (1)
Sylvain R.
il 31 Ott 2018
0 voti
Unburying the topic, sorry for that.
What Steve needs, looks like the "ExportedGlobal" storage class of Simulink.Parameters. When such a parameter is defined in the Workspace and used in an HDL-Coder generated model, HDL Coder creates a input port for this parameter (very much in the fashion Embedded Coder does it).
I can't say if this existed with 2013.
Categorie
Scopri di più su HDL Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!