Top Up Prev Next Bottom Contents Index Search

3.8 Targets

Ptolemy uses a structure called a target to control the execution of a simulation, or, in code generation, to control code generation, compilation, and execution. There is always a target; by default (if you issue no target commands), your target will have the name default-XXX, where XXX is replaced by the name of the current domain. Alternative targets for simulation can be used to specify different behavior (for example, to use a different scheduler or to analyze a schematic rather than running a simulation). For code generation, the target contains information about the target of compilation, and has methods for downloading code and starting execution.

3.8.1 What targets are available?

The command

returns the list of targets available for the current domain. The command

targets domain
returns the list of targets available for domain.

3.8.2 Changing the target

The command

displays the target for the current universe or current galaxy, together with its parameters. Specifying an argument, e.g.

target new-target-name
changes the target to new-target-name.

3.8.3 Changing target parameters

Target parameters may be queried or changed with the targetparam command. The syntax is

targetparam param-name ?new-value?

3.8.4 Pragmas

Ptolemy can use target pragmas as a generalization of the attribute mechanism to inform the target of the user's wishes. The Dynamic Dataflow (DDF) domain uses pragmas to specify the number of firings of a star required in one iteration. The C Code Generation (CGC) domain uses pragmas to identify any parameters that the user would like to change on the command line. See "Setting Parameters Using Command-line Arguments" on page 14-4.

pragma b1 b2 name value
Set pragma name to value for block b2 in parent b1.

pragmaDefaults target
Print the default values of the pragmas for the target.

Top Up Prev Next Bottom Contents Index Search

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