The code generation targets that support this infrastructure can be mixed arbitrarily in an application specification, and can also be embedded within simulation wormholes (i.e. a CG domain galaxy embedded within a simulation-SDF galaxy).
This infrastructure requires that each target provide CGC communication stars that can be targeted to the Ptolemy host workstation. The current implementation does not support specialized communication links between two individual code generation targets, but rather builds the customized links from the communication primitives written in C. To learn how to support a new target in this infrastructure, refer to the Code Generation chapter in the Programmer's Manual.
13.4.2 Interface Synthesis between Code Generation and Simulation Domains
The interfacing of code generation targets with simulation targets is more restricted than interfacing only code generation targets. Unlike the previous case, where the star interconnect could be arbitrary, we require that the simulation targets be used at a higher level in the user-specification than all of the code generation targets. This restriction enables us to create simulation SDF star wrappers for each of the code generation subsystems. This generated star can then be added to the user star palette by creating an icon for it using the pigi make-star command (
See "Editing Icons" on page 2-34.).
The top-level galaxy for each code generation subsystem should have its target set to either CompileCGSubsystems or CreateSDFStar. The CompileCGSubsystems target should be used if more than one code generation target is used. The childType target parameter (described in the previous section) should list the child targets to use. The first child target listed must be the CreateSDFStar target. The CreateSDFStar is actually a CGC target that generates ptlang code for all of the communication between the various targets and Ptolemy.