
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ■
▼
TargetLink Data Types Application Note September 2004
7
▲
■■■■■■■■■■I
▲■
Mapping Rules
The following table shows how Simulink data types and scaling
parameters are mapped to TargetLink scaling parameters. The rules
apply both to compiled and block-specific scaling parameters.
The rules apply to Simulink scaling parameters evaluated during model
compilation as well as on a block-by-block basis.
Typing Parameters
The output of Const blocks and the gain of Gain blocks are
parameters as opposed to block outputs and states. Parameters in this
sense are variables which keep a constant value during simulation. The
value is specified by a MATLAB expression.
Simulink TargetLink Remarks
data types
int8, int16, int32, uint8, uint16,
uint32, single, boolean
Int8, Int16, Int32, UInt8,
UInt16, UInt32,.Float32,
Boolean
For Math blocks, integer types
are only set if supported for
current function
data type double To the currrent default
TargetLink data type
according to the current
data dictionary (Int16 in a
default installation)
For Math blocks, integer types
are only set if supported for
current function
Slope
and
Bias
output.lsb
and
output.offset
If the block is vectorized, all
elements are set to the values
specified in Simulink
sfix, ufix, sint, uint,
float, sfrac, ufrac
To corresponding signed or
unsigned integer or
floating-point type
Integers only if number of
bits is 8, 16, or 32
Types like
ufix(4)
are not
mapped to TargetLink, since 4-
bit integers are not supported in
TargetLink
SaturateOnIntegerOverflow
To
output.checkmin
and
output.checkmax
Only if Simulink type is integer.
Note that Simulink does not
support saturation to one bound
only.
Komentarze do niniejszej Instrukcji