Looking for a way to change Simulink parameters at or after compile time with HDL coder
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
Sylvain R.
2018년 10월 31일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 HDL Coder에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!