hdlset_param question

8 次查看(过去 30 天)
GLW
GLW 2024-7-25
编辑: Umar 2024-8-2
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 个评论
GLW
GLW 2024-8-2
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 2024-8-2
编辑:Umar 2024-8-2
@GLW,
Glad your problem is resolved. Also, don’t hesitate to ask for help or any questions you still have.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by