▲
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
TargetLink Data Types Application Note September 2004
■
▼
2
■■■■■■■■■■■■■■■▼
■ Production code is generated according to specified types and
scaling parameters and run on the selected target.
Thus, fixed-point effects are investigated using blocks and the
Simulink simulation engine.
Comparison of Simulink and TargetLink
The two approaches sometimes conflict and cause problems with
models that were converted to TargetLink (see below). Some of these
problems have been solved, for example, by introducing the
Cast
output signal to TargetLink type
feature. Others cannot currently
be solved.
Simulink-to-TargetLink Conversion
During Simulink-to-TargetLink conversion, Simulink blocks are
replaced by corresponding TargetLink blocks. In the replacement
process, block parameters are read from the blocks being replaced and
written to the replacing blocks. For example, when a Simulink Gain
block is replaced, the Gain parameter is written to the TargetLink Gain
block.
The rule is that after conversion, the converted subsystem with
TargetLink blocks shows the same simulation behavior as the original
subsystem. However, due to TargetLink’s approach to data types, this
rule does not hold if non-double data types are involved. Simulink data
types are read from the blocks being replaced and written to the
TargetLink blocks. For TargetLink, data types are only tagged to the
blocks to be evaluated for production code generation. Unlike
Simulink data types, TargetLink data types have no impact on the
simulation bevaviour of the blocks.
Commenti su questo manuale