Why do I receive a data type warning when building my model using Embedded Target for TI C2000 DSP 1.0 (R13SP1+)?

조회 수: 6(최근 30일)
When I try to build a simple model that uses the fixed point library with Embedded Target for TI C2000 DSP 1.0 (R13SP1+), I receive the following warning in the MATLAB Command Window:
Warning: The data type "int8" uses a word size that is not available on the intended target.
Signals using this data type will be put inside a larger word. When used,
extra software will be generated to force this larger word to emulate a smaller
word. This emulation is helpful when your prototype target and your final
production target are not the same. If the smaller word size does NOT exist
on the final production target, then consider increasing the word size to
one that is supported.
Warning: The data type "uint8" uses a word size that is not available on the intended target.
.
Warning: The data type "boolean" uses a word size that is not available on the intended target.
Although I do use fixed-point data types in the model, I only use the "sfix" data type. The problem is that there is no way to specify these sizes for the hardware implementation. For example, if I right click on model and bring up the "Simulation Parameters" dialog box and then select the "Advanced" tab, there is a section for selecting the target bit size for various data types. Unfortunately, this is only implemented for "char", "short", "int", "long" at this point.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
This is a bug in Embedded Target for TI C2000 DSP 1.0 (R13SP1+) in the way that the compiler handles data type warnings.
Currently, to work around this issue, you can modify the file "fixptlib.tlc", which is located in the following directory:
$MATLAB\rtw\c\tlc\fixpt
where $MATLAB is your root MATLAB directory
The warning message gets displayed in lines 810 - 828. If you would like to prevent this warning message from being displayed, you can comment out those lines of code by adding two percentage signs (%%) at the beginning of each line.
Note that by making this change, a warning message will not get displayed in the future when using a word size that is not available on the target. It is recommended that you make a copy of this file first before modifying it and save the copy as "fixptlib.tlc.old."

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by