NI MATRIXx Reference Manual

Contents
AutoCode Reference x ni.com
States ............................................................................................................... 5-26
Local Variables and Phases .............................................................. 5-27
Discrete Semantics ........................................................................... 5-27
Continuous Semantics ...................................................................... 5-29
Looping Concepts ........................................................................................... 5-29
Terminology ..................................................................................... 5-29
Loops and Scalar Code ..................................................................... 5-29
Rolling Loops with Scalar Code Generation .................................... 5-30
Vectorized Code ............................................................................... 5-31
Types of Loops ................................................................................. 5-31
Examples of Rolled and Unrolled Loops ......................................... 5-32
Parameters....................................................................................................... 5-33
Using Parameters Instead of States in a Discrete Model.................. 5-33
Optimizations .................................................................................................. 5-35
Constant Propagation/Hard-Coding ................................................. 5-35
Dead Code Elimination .................................................................... 5-35
Implicit Type Conversion................................................................. 5-36
Special Directives ........................................................................................... 5-36
UserCode Block............................................................................................................. 5-37
Phases of the UCB .......................................................................................... 5-37
Indirect Terms ................................................................................................. 5-37
Parameterized UCB Callout............................................................................ 5-38
Software Constructs....................................................................................................... 5-39
IfThenElse Block ............................................................................................ 5-39
WHILE Block ................................................................................................. 5-39
BREAK Block................................................................................................. 5-40
CONTINUE Block.......................................................................................... 5-40
Local Variable Block ...................................................................................... 5-40
Sequencer Block ............................................................................................. 5-41
Difference Between Local and Global Variable Blocks ............................................... 5-41
Scope............................................................................................................... 5-41
Lifetime........................................................................................................... 5-41
Continuous Subsystem .................................................................................................. 5-41
Explicit Phases ................................................................................................ 5-42
Integrator......................................................................................................... 5-42
Limitations ...................................................................................................... 5-42
Multiprocessor Code Generation................................................................................... 5-43
Shared Memory Architecture.......................................................................... 5-43
Distributed Memory Architecture................................................................... 5-44
Shared Memory Callouts ................................................................................ 5-44
Callout Naming Convention ............................................................. 5-44
Mapping Command Options........................................................................... 5-45
Fixed-Point Support for Multiprocessor AutoCode........................................ 5-45