
8
Variable Class Object Description Memory
GLOBAL
Normal global
variables
RAM
CAL
Global calibratable
parameters
ROM
DISP
Global observable
variables
RAM
MACRO
Global pre-processor
macros
-
CONST
Global constant ROM
FCN_ARG
Function arguments
(non-constant, call-by-
value)
STACK
FCN_PARAM
Function parameters
(constant, call-by-
value)
STACK
FCN_RETURN
Function return value STACK
EXTERN_GLOBAL_ALIAS
Global variables,
which are declared in
a user-written header
file
-
EXTERN_CAL_ALIAS
Calibratable global
variables, which are
declared in a user-
written header file
-
RTOS_ACCESS_FUNCTION
Apply an access
function to read/write
the variable
-
Table 1: Categories of variable classes
3.1.4 Simulation Using the Generated Code
The user can check and test whether the model behaves in the same way when
using the generated code. TargetLink has three options for running the model in
Simulink, Model In the Loop, MIL, Software In the Loop, SIL, and Process In the
Loop, PIL. By choosing MIL, the program runs the model as it is, using floating
point. If the user wants to run the model with the generated code then SIL should
be chosen and the program runs using the generated code. Process In the Loop
mode is used to verify simulation results from the MIL and SIL simulation modes
by executing the code on the actual target hardware. Process In the Loop was not
tested in this work.
By just clicking on the desired option: MIL, SIL or PIL, the user can easily and
without changing the model, control how to run in Simulink and the comparison
is, in that way, easily done between floating point and fixed point results.
Commenti su questo manuale