Top Up Prev Next Bottom Contents Index Search

13.4 Interfacing Issues


For the 0.6 release, we have developed a framework for interfacing code generation targets with other targets (simulation or code generation). The concepts behind this new infrastructure are detailed in [Pin96]. Currently, only a few of our code generation targets support this new infrastructure including: CGCTarget (CGC Domain), S56XTarget (CG56 Domain), SimVSSTarget (VHDL Domain).

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.1 Interface Synthesis between Code Generation Targets

To interface multiple code generation targets, you must set the target parameter for the top-level galaxy to CompileCGSubsystems. The target parameters for CompileCGSubsystems are identical to those of the FullyConnected target, detailed in section 13.2.3. You must declare each individual target in the childType CompileCGSubsystems target parameter list. The first of these child targets must be a CGC target whose code will be run on the Ptolemy host workstation. The processor mapping of each star is user-specified by setting either the procId star parameter or setting the domain for the current galaxy. The interconnect between the stars to be mapped onto different targets can be totally arbitrary. A demonstration (included in the release) which mixes targets in the VHDL, CG56 and CGC domains is shown in figure 13-1.

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.

If only CGC stars are being used in a code generated subsystem, we have no need for the multiprocessor target CompileCGSubsystems, but rather can use the uniprocessor CGC target CreateSDFStar.



Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.