C Language Reference; Stand-Alone Simulation; Compiling On Various Supported Platforms - National Instruments AutoCode NI MATRIX Reference

National instruments ni matrixx reference manual
Table of Contents

Advertisement

C Language Reference

Stand-Alone Simulation

Compiling on Various Supported Platforms

Note
This example assumes the stand-alone library was compiled into separate object
files into the current working directory and that the stand-alone header files also exist in
the current working directory.
© National Instruments Corporation
This chapter discusses files used to interface AutoCode and the generated
C code to your specific platform and target processor. This chapter also
describes target-specific utilities needed for simulation and testing.
The template provided for C code generation produces code that, when
compiled and linked with stand-alone files, forms a stand-alone simulation.
This simulation can be executed with MATRIXx-style data as input, and
produces results that can be loaded back into Xmath for analysis. You must
compile the generated code along with the stand-alone library to produce
the simulation executable.
Chapter 2, Using AutoCode, of the AutoCode User Guide describes how to
compile the code and stand-alone library, generate sample input data, and
load the data into Xmath for analysis.
The generated code usually includes platform-specific code. Most of this
code is not generated by AutoCode; rather, that code exists in the template.
Also, the stand-alone library has platform-specific code to deal with file I/O
and floating-point numerics. You must compile the generated code and the
stand-alone library with a defined preprocessor symbol appropriate for
your platform (refer to Table 2-1). For example, on the Solaris platform,
the compile statement is similar to:
% acc -DSOLARIS -o simulation simmodel.c sa_*.o -lm
2-1
2
AutoCode Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Autocode ni matrixx

Table of Contents