Domain
. The code for each Domain
interacts with the Ptolemy kernel. This overview describes the general structure of the various classes that are used by a Domain
in its interaction with the kernel. The Ptolemy User's Manual has a more complete overview of this information.A functional block, such as an adder or an FFT, is called a
Star
in Ptolemy terminology, (see
"Writing Stars for Simulation" on page 2-1 for more information). A collection of connected Star
s form a Galaxy
(see Chapter 2 of the User's Manual for more information). Ptolemy supports graphical hierarchy so that an entire Galaxy
can be formed and used as a single function block icon. The Galaxy
can then be connected to other Star
s or Galaxies
to create another Galaxy
. Usually, all the Star
s of a Galaxy
are from the same Domain
but it is possible to connect Star
s of one domain to a Galaxy
of another domain using a WormHole
.
A
Universe
is a complete executable system. A Universe
can be either a single Galaxy
or a collection of disconnected Galaxies. To run a Universe
, each Galaxy
also needs a Target
. In simulation domains, a Target
is essentially a collection of methods to compute a schedule and run the various Star
s of a Galaxy
. Some Domain
s have more than one possible scheduling algorithm available and the Target
is used to select the desired scheduler. In code generation domains, a Target
also computes a schedule and runs the individual Star
s, but each Star
only generates code to be executed later. Code generation Targets
also handle compiling, loading, and running the generated code on the target architecture.Block
s. A Block
is a Star
or Galaxy
. Each Block
has a number of input and output terminals which are attached to a Block
through its PortHole
s. A special PortHole
, called a MultiPortHole
, is used to make multiple connections but with only one terminal. Two Block
s are not directly connected through their PortHole
s. Rather, their PortHole
s are connected to an intermediary object called a Geodesic
. In simulation domains, data is passed between PortHole
s (through the Geodesic
) using container objects called Particle
s. Ptolemy uses a system where Particle
s are used and recycled instead of created and deleted when needed. Particle
s are obtained from a production and storage class called a Plasma
, which creates new Particle
s if there are no old ones to reuse. Particle
s that have completed their task are returned to the Plasma
, which may reissue them at a later request. Graphically, the Star
to Star
connection is depicted below:Scheduler
to compute the order of execution of the Star
s in the Galaxy
.Star
s, PortHole
s, WormHoles
, Targets
, and Schedulers
.Target
or Scheduler
rather than an entire domain.