User's Guide to the Ptolemy Retargeting Editor

This class provides a graphical editor that can be used to retarget Ptolemy universes. To use this editor, you must be running a binary that has Ptolemy built in. To start Tycho with Ptolemy, see Executing Tycho with Ptolemy in the Tycho under Unix guide.

Ptolemy is a software environment that provides simulation an code generation capabilities. http://ptolemy.eecs.berkeley.edu describes the Ptolemy project in detail, but briefly, a Ptolemy program is called a Universe which consists of multiple functional blocks, (such as adders etc.) named Stars. Different models of computation are called Ptolemy Domains. This editor is used to retarget Universes between different domains. For example, there is the CG56 domain that generates code for the Motorola 56k processor and there is a domain for the Texas Instruments C50 domain. This editor can be used to retarget a universe that was written in the CG56 domain to the C50 domain. The retargeting editor can also be used to compare the stars in two different domains.

Ptolemy Retargeting editor tutorial

The Retargeting editor can be started up from a ptcl editor. The Special menu button in the ptcl editor contains the Retarget menu choice which brings up the retargeting editor.

Retargeting Buttons

  • Compare Domains - This button compares the stars in the two current domains and displays the different categories of conflict.
  • Change Domain A Domain - This button brings up a ListBrowser that allow the user to change the domain. Usually Domain A is the domain we are retargeting from. If the retargeting editor was started from a Ptcl editor, then Domain A defaults to the domain of the Universe. Only the domains that are present in the currently running binary are listed.
  • Change Domain B Domain - This button brings up a ListBrowser that allows the user to change the domain. Usually Domain B is the domain we are retargeting to.
  • Check Universe - This button asks the ptcl editor for a list of all the stars in it and then checks the stars against the different types of conflicts.
  • The bottom of the retargeting window contains a serious of counters that display the number of stars in the different categories. If you move the mouse over these counters, then the status window should provide a brief description of the counter.

    A short example

    1. Start up tycho -pigi. The -pigi option means that tycho uses a binary that knows about the Ptolemy stars.
    2. Open the file $PTOLEMY/tycho/typt/lib/PtolemyFacets.fst. PtolemyFacets.fst contains a forest that describes all the different universes in the Ptolemy tree. A graphical window that displays the forest should come up.
    3. Scroll the forest window until the $PTOLEMY/src/domains/cgc/demo/sound node is visible and then double click on the node. A graphical editor that lists the stars in the sound universe will come up.
    4. Under the Specialmenu button of the sound Palette, select Show Ptcl. A ptcl editor window should come up that contains a textual description of the sound universe.
    5. Under the Special menu button in the ptcl editor, select the Retarget choice and the retarget editor should come up.
    6. In the Retargeting editor, hit the Change Domain B button and change the domain to C50. We are going to attempt to retarget the domain from CGC to the Texas Instruments C50 domain.
    7. In the Retargeting editor, mouse on the Check Universe button. After a brief wait, the Retargeting editor will display the names of the stars in sound demo, and the conflicts between the CGC and the C50 domain. You can double click on a star name which will bring up a window that compares the two stars in the different domains.
    8. To compare all the stars in the CGC and C50 domains, mouse on the Compare Domains button.

    Ptolemy Retargeting editor bugs

  • Currently, while the tool is comparing domains, no status messages come up until after the compare is done. Perhaps we need an update or a flush here.
  • If the user is attempting to retarget a multi domain universe, then things could get a little confusing. Currently, the tool throws away the domain information of the stars in the ptcl file and just compares star names.
  • There is no easy way to call the Retargeting editor from within Ptolemy. The problem is that if Ptolemy is present, and you open a facet from within Tycho, then the facet is passed to vem. What we need is some easy way to convert a facet to ptcl.
  • Tycho Home Page


    Copyright © 1996-1998, The Regents of the University of California. All rights reserved.
    Last updated: 05/19/98, comments to: cxh@eecs.berkeley.edu