Class SDFModularScheduler
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.sched.Scheduler
-
- ptolemy.domains.sdf.kernel.BaseSDFScheduler
-
- ptolemy.domains.sdf.kernel.SDFScheduler
-
- ptolemy.cg.kernel.generic.program.procedural.java.modular.SDFModularScheduler
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
,ValueListener
public class SDFModularScheduler extends SDFScheduler
An SDF scheduler for modular code generation.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Dai Bui
- Pt.AcceptedRating:
- Red (jiazou)
- Pt.ProposedRating:
- Red (jiazou)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.domains.sdf.kernel.SDFScheduler
_externalRates, _firingVector, _rateVariables, constrainBufferSizes
-
Fields inherited from class ptolemy.domains.sdf.kernel.BaseSDFScheduler
VERBOSE
-
Fields inherited from class ptolemy.actor.sched.Scheduler
_DEFAULT_SCHEDULER_NAME
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description SDFModularScheduler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map
_solveBalanceEquations(CompositeActor container, java.util.List actorList, java.util.Map externalRates)
Solve the balance equations for the list of connected Actors.java.util.Map
getFiringVector(CompositeActor container, int vectorizationFactor)
Get the firing vector for a given container.-
Methods inherited from class ptolemy.domains.sdf.kernel.SDFScheduler
_checkDynamicRateVariables, _computeMaximumFirings, _countUnfulfilledInputs, _getFiringCount, _getSchedule, _simulateExternalInputs, _simulateInputConsumption, _vectorizeFirings, clone, declareRateDependency, getExternalRates, getFiringCount, valueChanged
-
Methods inherited from class ptolemy.domains.sdf.kernel.BaseSDFScheduler
_declareDependency, _saveBufferSizes, _saveContainerRates, _saveFiringCounts
-
Methods inherited from class ptolemy.actor.sched.Scheduler
getSchedule, isValid, setContainer, setValid
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Method Detail
-
getFiringVector
public java.util.Map getFiringVector(CompositeActor container, int vectorizationFactor) throws IllegalActionException
Get the firing vector for a given container.- Parameters:
container
- The container that is being scheduled.vectorizationFactor
- The vectorization factor- Returns:
- A map from each actor to its fractional firing.
- Throws:
IllegalActionException
- If thrown while solving the balance equations.
-
_solveBalanceEquations
protected java.util.Map _solveBalanceEquations(CompositeActor container, java.util.List actorList, java.util.Map externalRates) throws NotSchedulableException, IllegalActionException
Solve the balance equations for the list of connected Actors. For each actor, determine the ratio that determines the rate at which it should fire relative to the other actors for the graph to be live and operate within bounded memory. Normalize this ratio into integer, which is the minimum number of firings of the actor to satisfy the balance equations.- Overrides:
_solveBalanceEquations
in classSDFScheduler
- Parameters:
container
- The container that is being scheduled.actorList
- The actors that we are interested in.externalRates
- A map from external ports of container to the fractional rates of that port. This starts out initialized with Fraction.ZERO and will be populated during this method.- Returns:
- A map from each actor to its fractional firing.
- Throws:
NotSchedulableException
- If the graph is not consistent under the synchronous dataflow model, or if the graph is not connected.IllegalActionException
- If any called method throws it.
-
-