필터 지우기
필터 지우기

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