Class SDF

  • All Implemented Interfaces:
    Executable, Initializable, DDI

    public class SDF
    extends DataflowWithRates
    A plugin for the SDF domain. In SDF, a CAL actor is valid if:

    1. The rates of each action are statically computable, and these rates are the same for each action.
    2. There is at least one unguarded action.
    This plugin also adds attributes containing rate information to the ports of the actor.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Christopher Chang, Steve Neuendorffer
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • SDF

        public SDF​(TypedAtomicActor ptActor,
                   caltrop.interpreter.ast.Actor actor,
                   caltrop.interpreter.Context context,
                   caltrop.interpreter.environment.Environment env)
        Create an new SDF DDI.
        Parameters:
        ptActor - The instance of ptolemy.actor.Actor that the plugin will be associated with.
        actor - The abstract syntax tree of the CAL source.
        context - The context that the plugin will use.
        env - The environment that the plugin will use.
    • Method Detail

      • isLegalActor

        public boolean isLegalActor()
        In SDF, an actor is legal if:
        1. The rates of each action are statically computable, and these rates are the same for each action.
        2. There is at least one unguarded action.
        3. The rates and guards of the initializers are statically computable.
        Specified by:
        isLegalActor in interface DDI
        Overrides:
        isLegalActor in class Dataflow
        Returns:
        True if the actor associated with this DDI is a legal SDF actor.
      • getName

        public java.lang.String getName()
        Get the name of this DDI.
        Specified by:
        getName in interface DDI
        Overrides:
        getName in class Dataflow
        Returns:
        "SDF".
      • setupActor

        public void setupActor()
        Setup the actor associated with this DDI. Assumes that isLegalActor() is called first.

        Setup involves attaching attributes with token consumption/production rates to the input and output ports of the actor associated with this DDI.

        Specified by:
        setupActor in interface DDI
        Overrides:
        setupActor in class Dataflow