Error builiding model with buffer block of 20k sample points (C2000) -Assertion failed: inputExpr-​>type()->e​quals(inde​xIntType()​)

조회 수: 3(최근 30일)
Hello guys,
I am facing an issue in building a Simulink model with TI C2000 blocks. My MATLAB version is R2019b and code composer studio version is 9.30. I am using a custom TMS320F28335 board with external 1Mx16 SRAM.
Let me give a brief overview about my model,
Signal from ADC block with single data type is passed into buffer of length 20k sample points. The buffer is connected to a MATLAB function block where further processing is carried out. The code relevant to the issue is shown below. The function argument Vib gets value from buffer and then 18k points from the variable Vib is copied to another variable temp_sig, after which further processing is carried out.
functionFDD_data = fast_function(xx,xx,Vib)
When I build the model, I get the following error,
“'BWWT_2pole_final/Acceleration_buffer/Buffer1' uses a matrix with 40000 elements, which is larger than the maximum value of 'int' for the specified target. For information on workarounds to this error see External Bug Report 704491.”
I cannot understand why the error shows there are 40k elements, although there are only 20k elements in the buffer.
Anyway, I have tried the workaround from MathWorks bug report, which is to avoid using array signals with a size larger than INT_MAX. So, I need to set the following
slfeature('AllowUnsafeOversizedMatrices', 1)
However, after setting this feature, I am getting a different error which is as follows,
CGIR assertion 'In indexIntVCatNode: Assertion failed: inputExpr->type()->equals(indexIntType())' failed in 'b:\matlab\src\eml\dom_eml\eml_mclass_translation_ctx.cpp:448'
Unexpected or internal error encountered in "in CGIR: b:\matlab\src\eml\dom_eml\eml_mclass_translation_ctx.cpp line 448: In indexIntVCatNode: Assertion failed: inputExpr->type()->equals(indexIntType()) ". Please report this to MathWorks if you can cause it to recur
I tried to the best of my abilities, but I could not find any working solution for this error.
I broke the connection between buffer with 20k length and the MATLAB function. Then initialized a dummy variable inside the function as follows
functionFDD_data = fast_function(xx,xx)
In this case the model builds without any error. So, I guess, there is some issue in building my model in Matlab2019b.
Note: This model which I am trying to build in MATLAB 2019b was working perfectly in MATLAB 2011b without any issues. In MATLAB 2011b, I built, deployed in the hardware and verified the functionalities of the code.
I appreciate anybody who can help me to sort out this issue. Thanks in advance.
  댓글 수: 2

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



Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by