How to update template on multiple Simulink models (programmatically)?

조회 수: 1 (최근 30일)
Dara Parsavand
Dara Parsavand 2017년 3월 17일
답변: Kiran Kintali 2021년 5월 24일
As I'm learning more about HDL coder, I'm slowly iterating on a common template I want to use for all my Simulink models in a given directory. I'd like to run a Matlab script that can take every single .slx file in a directory (and subdirectories) and swap in the new template. Currently I'm doing this manually (make a copy of template, copy contents, delete old file, rename new file) which is pretty tedious for more than a few files. Is there a command that lets you update a template to a given file? I've searched and I haven't found one yet. If it isn't possible, perhaps it is a good candidate for a new feature wishlist.
  댓글 수: 1
Kiran Kintali
Kiran Kintali 2017년 3월 17일
Please suggest this as an enhancement request to Simulink model templates team.
Please share your best practices template and one or two models that are not following that template and how you want the models to updated with your template.
Thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Kiran Kintali
Kiran Kintali 2021년 5월 24일
Use Simulink Templates for HDL Code Generation
HDL Coder™ model templates in Simulink® provide you with design patterns and best practices for models intended for HDL code generation. Models you create from one of the HDL Coder model templates have their configuration parameters and solver settings set up for HDL code generation. To configure an existing model for HDL code generation, use hdlsetup.

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by