필터 지우기
필터 지우기

SIL testing with user defined function.

조회 수: 4 (최근 30일)
Rahul
Rahul 2023년 4월 24일
댓글: Rahul 2023년 4월 26일
So, I'm trying to do SIL testing for my simulink model. Right now I'm only trying to test one subsystem. This subsystem consists of some user defined code. When I try to perform SIL I get the following errors.
  1. error: use of undeclared identifier 'tmp'
tmp = _mm_loadu_pd(&b_A[(int32_T)(kAcol - 1)]);
2. error: call to undeclared function '_mm_loadu_pd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
tmp = _mm_loadu_pd(&b_A[(int32_T)(kAcol - 1)]);
Many similar errors of this 'tmp' type. At the end I get this error
  • Error(s) encountered while building "rtwshared"
I tried to change the C code to standards available which isnt the ISO 99, like the ANSI standard. However, the error persists.
On another note, if i try to generate code using Embedded Coder on simulink. I am able to generate code.
Is the code being built to perform SIL and this embedded code the same?

답변 (1개)

Mark McBroom
Mark McBroom 2023년 4월 26일
You need to add the function prototype for _mm_loadu_pd to your user defined C file ( or a #include to a header file that defines the function prototype).
Thanks.
Mark.
  댓글 수: 1
Rahul
Rahul 2023년 4월 26일
I'm not exactly sure what this means. Not very comfortable in C.
Is there some change I could make to my matlab user defined function? or to the configuration parameters?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by