Chapter 5
Generated Code Architecture
Distributed Memory Architecture
Example 5-20
Example with Just the Callouts
subsys_1_in.throttle = ss5_outr->throttle;
GET_LOCF_FROM_MBUFF(&subsys_1_in.Brake, &mbuf->sys_extin.Brake);
GET_LOCF_FROM_MBUFF(&subsys_1_in.PDown, &mbuf->sys_extin.PDown);
Shared Memory Callouts
AutoCode Reference
AutoCode also supports a multiprocessor architecture that uses distributed
memory instead of shared memory. AutoCode does this by generating
callouts (that is, macros) instead of the explicit code, and passes all of the
necessary data to the callout. Unfortunately, there are potentially a large
number of callouts to support various combinations of functionality and
data type of the arguments. Use the -smco option to generate those
callouts.
Example 5-20 is the same as Example 5-19 except that it has callouts.
The following are the four sets of the callouts (that is, macros) that must be
implemented if you generate code with the
the callouts are to support combinations of float, integer, and Boolean data
types.
Callout Naming Convention
The callouts follow a simple naming convention. The convention is a
concatenation of operation type, destination, destination data type, source,
and source data type. Operation type includes
(read). Destination and source are
data). Data types are F (float), I (integer), and B (Boolean).
1.
Copy data into shared data:
UPDATE_MBUFF_WITH_LOCF(dest,src)
UPDATE_MBUFB_WITH_LOCB(dest,src)
UPDATE_MBUFI_WITH_LOCI(dest,src)
UPDATE_MBUFF_WITH_LOCI(dest,src)
2.
Copy between two shared data elements:
UPDATE_MBUFF_WITH_MBUFF(dest,src)
UPDATE_MBUFB_WITH_MBUFB(dest,src)
UPDATE_MBUFI_WITH_MBUFI(dest,src)
UPDATE_MBUFF_WITH_MBUFI(dest,src)
-smco
(shared memory) and
MBUFF
5-44
option. The variations of
(write) and
UPDATE
GET
LOC
(local
ni.com
Need help?
Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?