Chapter 5
Generated Code Architecture
©
National Instruments Corporation
5-47
UPDATE_MBUFF_WITH_MBUFUSHORT(x, y,
convert_macro_name)
UPDATE_MBUFSLONG_WITH_MBUFF(x, y,
convert_macro_name)
UPDATE_MBUFF_WITH_MBUFSLONG(x, y,
convert_macro_name)
UPDATE_MBUFULONG_WITH_MBUFF(x, y,
convert_macro_name)
UPDATE_MBUFF_WITH_MBUFULONG(x, y,
convert_macro_name)
The third argument,
convert_macro_name
, is the name of the fixed-point
conversion macro that is used for conversion between fixed-point and
floating-point numbers.
Reading Shared Memory
These callouts assign the values of the shared variable
y
to the local
variable
x
.
GET_LOCSBYTE_FROM_MBUFSBYTE(x, y)
GET_LOCUBYTE_FROM_MBUFUBYTE(x, y)
GET_LOCSSHORT_FROM_MBUFSSHORT(x, y)
GET_LOCUSHORT_FROM_MBUFUSHORT(x, y)
GET_LOCSLONG_FROM_MBUFSLONG(x, y)
GET_LOCULONG_FROM_MBUFULONG(x, y)
Shared-Memory Fixed-Point Callouts for AutoCode/Ada
The shared memory callouts for fixed-point data types are not supported in
this release. However, shared memory fixed-point is supported for Ada
code generation as long as the
-smco
option is not used.
Shared Variable Block Support
AutoCode supports shared variable blocks, that is, the same variable block
used on more than one processor. AutoCode generates an indirect reference
to a shared variable block variable through a pointer. Refer to
Example 5-21. This pointer is referenced from an array of pointers.
AutoCode always uses the 0th element of the shared variable block pointer
array (
isi_varblk
). This is to provide indirection into the shared memory
region of the target hardware. The pointer is a pointer to a data structure
containing the declarations of the shared variable blocks. An instance of
that structure should be declared in the shared memory region of the target
hardware and the pointer in
isi_varblk[0]
set to that instance.
Caution
It is your responsibility to create the pointers, data structures, and shared memory
region for the multiprocessor target hardware. Also, use the variable block callouts to
ensure coherency of the shared data.