Effacer les filtres
Effacer les filtres

hdlset_param question

8 vues (au cours des 30 derniers jours)
GLW
GLW le 25 Juil 2024
Modifié(e) : Umar le 2 Août 2024
As part of an automated HDL coder script, I need to check for all Reference Models used within the design that the 'ReferenceModelPrefix' which is accessed as 'HDL Block Properties' is clear. The script sets 'ReferenceModelPrefix' using the following:-
hdlset_param(refModelsFullPath{i}, 'ReferenceModelPrefix', '')
refModelsFullPath{i} is an array that I use to generate the absolute hierarchy path for each Reference Model in my design.
This works perfectly for a hierarchical path such as the following:-
SubSystem_Top/SubSystel_level1/RefModel_a
If I have a Reference model embedded inside RefModel_a giving me the following hierarchy:-
SubSystem_Top/SubSystel_level1/RefModel_a/RefModel_b
Then the hdlset_param command fails with an error:-
In this case ' mss_rx_ss' is equivalent to my 'RefModel_a'
I'm assuming that I can't use an absolute path that contains multiple hierarchical levels of Model Reference, is there an equvalent command or alternative that I could use to set the 'ReferenceModelPrefix' parameter this way?
Many thanks in advance.
  6 commentaires
GLW
GLW le 2 Août 2024
Hi @Umar,
many thanks for your time helping me out with this issue.
I was putting together a test case to demonstrate what my issue was here, when I realised the problem was that the:-
hdlset_param(refModelsFullPath{i}, 'ReferenceModelPrefix', '')
will only work if all the Referenced Models are loaded. In my case they weren't, that's what was causing the issue of the 'Invalid Simulink object name'.
All sorted now.
thanks again.
GLW
Umar
Umar le 2 Août 2024
Modifié(e) : Umar le 2 Août 2024
@GLW,
Glad your problem is resolved. Also, don’t hesitate to ask for help or any questions you still have.

Connectez-vous pour commenter.

Réponses (0)

Catégories

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

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by