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

1 vue (au cours des 30 derniers jours)
Dara Parsavand
Dara Parsavand le 17 Mar 2017
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 commentaire
Kiran Kintali
Kiran Kintali le 17 Mar 2017
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

Connectez-vous pour commenter.

Réponses (1)

Kiran Kintali
Kiran Kintali le 24 Mai 2021
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.

Catégories

En savoir plus sur Code Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by