Chapter 5 Generated Code Architecture
AutoCode Reference 5-44 ni.com
Distributed Memory ArchitectureAutoCode 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 Example5-19 except that it has callouts.
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 CalloutsThe following are the four sets of the callouts (that is, macros) that must be
implemented if you generate code with the -smco option. The variations of
the callouts are to support combinations of float, integer, and Boolean data
types.
Callout Naming ConventionThe 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 UPDATE (write) and GET
(read). Destination and source are MBUFF (shared memory) and LOC (local
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)