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

2 次查看(过去 30 天)
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