Target-specific utilities, Table 3-4. target-specific utility routines, Target-specific utilities -6 – National Instruments AutoCode NI MATRIX User Manual

Page 68

Advertising
background image

Chapter 3

Ada Language Reference

AutoCode Reference

3-6

ni.com

Target-Specific Utilities

The target-specific utilities in the

sa_utils.a

or

sa_utils.ada

file

perform hardware-, application-, and Ada-specific tasks that are required
for simulation and testing. They can be modified to support the generated
code on the target computer. As furnished, these routines simulate I/O
operations that would occur in a simulation environment, using import files
created using MATRIXx. These files are to be used unmodified for
comparing your simulations with generated code outputs. However, for
target-system usage on your rapid prototyping or end-user system, these
routines can be modified or rewritten completely and recompiled for the
target system. When you do this, be sure to keep a copy of the unmodified
file and keep separate versions of the files in separate directories. There is
no requirement that the file be named

sa_utils.a

; however, the name

you use must be specified for compilation and linking. Inside the file, the
names of all the external variables, functions, and other references must be
preserved.

As furnished for this release, the routines are written in Ada, but this is not
required. If you rewrite the routines, they should still be written in a
language that offers direct control of the I/O and interrupt hardware of the
target computer and that can be linked to the object form of the generated
Ada program. Normally, these utilities need to be created only once for
each target computer. In general, a given set of target-specific utilities need
only be changed when the target hardware is modified. The routines are
shown in Table 3-4.

Table 3-4. Target-Specific Utility Routines

Routine

Function

Enable( )

Unmask timer interrupt.

Disable( )

Mask timer interrupt.

Background( )

Background polling loop.

Error,fatalerr( )

Error handlers.

Implementation_Initialize( )

Initialize I/O hardware and perform other
implementation-specific initialization tasks.

Implementation_Terminate( )

Perform implementation-specific termination tasks.

External_Input( )

Collect external inputs.

Advertising