Package ptolemy.caltrop.ddi
Class SDF
- java.lang.Object
-
- ptolemy.caltrop.ddi.AbstractDDI
-
- ptolemy.caltrop.ddi.Dataflow
-
- ptolemy.caltrop.ddi.DataflowWithRates
-
- ptolemy.caltrop.ddi.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:- The rates of each action are statically computable, and these rates are the same for each action.
- There is at least one unguarded action.
- Since:
- Ptolemy II 4.0
- Version:
- $Id$
- Author:
- Christopher Chang, Steve Neuendorffer
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.caltrop.ddi.DataflowWithRates
DataflowWithRates.ActionRateSignature
-
-
Field Summary
-
Fields inherited from class ptolemy.caltrop.ddi.Dataflow
_actions, _actor, _actorInterpreter, _context, _currentStateSet, _currentTransitions, _env, _inputPorts, _lastFiredAction, _outputPorts, _ptActor
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description SDF(TypedAtomicActor ptActor, caltrop.interpreter.ast.Actor actor, caltrop.interpreter.Context context, caltrop.interpreter.environment.Environment env)
Create an new SDF DDI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Get the name of this DDI.boolean
isLegalActor()
In SDF, an actor is legal if: The rates of each action are statically computable, and these rates are the same for each action.void
setupActor()
Setup the actor associated with this DDI.-
Methods inherited from class ptolemy.caltrop.ddi.DataflowWithRates
_allEqual, _annotatePortsWithRates, _atLeastOneUnguardedAction, _checkInitializerGuards, _computeActionRates, _computeActionRates, _isBoundByPortVar
-
Methods inherited from class ptolemy.caltrop.ddi.Dataflow
_selectAction, _selectInitializer, fire, initialize, postfire, prefire, preinitialize
-
Methods inherited from class ptolemy.caltrop.ddi.AbstractDDI
addInitializable, isFireFunctional, isStrict, iterate, removeInitializable, stop, stopFire, terminate, wrapup
-
-
-
-
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 ofptolemy.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:- The rates of each action are statically computable, and these rates are the same for each action.
- There is at least one unguarded action.
- The rates and guards of the initializers are statically computable.
- Specified by:
isLegalActor
in interfaceDDI
- Overrides:
isLegalActor
in classDataflow
- 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.
-
setupActor
public void setupActor()
Setup the actor associated with this DDI. Assumes thatisLegalActor()
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 interfaceDDI
- Overrides:
setupActor
in classDataflow
-
-