|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.codegen.kernel.CodeGeneratorHelper
ptolemy.codegen.actor.Director
ptolemy.codegen.c.actor.sched.StaticSchedulingDirector
ptolemy.codegen.c.domains.sdf.kernel.SDFDirector
ptolemy.codegen.c.domains.hdf.kernel.HDFDirector
public class HDFDirector
Code generator helper class associated with the HDFDirector class.
HDFDirector,
Serialized Form
| Red (zgang) |
| Yellow (cxh) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.codegen.kernel.CodeGeneratorHelper |
|---|
CodeGeneratorHelper.Channel, CodeGeneratorHelper.VariableScope |
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Field Summary | |
|---|---|
private int[] |
_divisors
An array of integers helping to establish the relationship between the configuration number of the container actor and the configuration numbers of contained actors. |
private Schedule[] |
_schedules
An array of schedules, each element corresponding to one configuration. |
| Fields inherited from class ptolemy.codegen.actor.Director |
|---|
_director, _eol, _INDENT1, _INDENT2, _INDENT3, _INDENT4 |
| Fields inherited from class ptolemy.codegen.kernel.CodeGeneratorHelper |
|---|
_codeGenerator, _codeStream, _parseTreeCodeGenerator, _portConversions, _referencedParameters |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
|---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
|---|---|
HDFDirector(HDFDirector director)
Construct the code generator helper associated with the given HDFDirector. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
_createOffsetVariablesIfNeeded()
Create read and write offset variables if needed for any output port of the container actor and any input port of contained actors. |
protected java.lang.String |
_createOffsetVariablesIfNeeded(IOPort port)
Check to see if variables are needed to represent read and write offsets for the given port. |
protected void |
_updateConfigurationNumber(java.lang.StringBuffer code)
Generate code for updating configuration number of the container actor as a function of the configuration numbers of contained actors. |
java.lang.String |
createOffsetVariablesIfNeeded()
Generate code for declaring read and write offset variables if needed. |
java.lang.String |
generateFireCode()
Generate the code for the firing of actors according to the HDF schedules. |
java.lang.String |
generateInitializeCode()
Generate the initialize code for the associated HDF director. |
void |
generateModeTransitionCode(java.lang.StringBuffer code)
Generate mode transition code. |
java.lang.String |
generatePreinitializeCode()
Generate the preinitialize code for this director. |
void |
generateTransferInputsCode(IOPort inputPort,
java.lang.StringBuffer code)
Generate code for transferring enough tokens to complete an internal iteration. |
void |
generateTransferOutputsCode(IOPort outputPort,
java.lang.StringBuffer code)
Generate code for transferring enough tokens to fulfill the output production rate. |
| Methods inherited from class ptolemy.codegen.c.domains.sdf.kernel.SDFDirector |
|---|
_createDynamicOffsetVariables, _createOffsetVariablesIfNeeded, _updatePortBufferSize, getBufferSize |
| Methods inherited from class ptolemy.codegen.c.actor.sched.StaticSchedulingDirector |
|---|
generateMainLoop, generateVariableDeclaration |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int[] _divisors
private Schedule[] _schedules
| Constructor Detail |
|---|
public HDFDirector(HDFDirector director)
director - The associated ptolemy.domains.hdf.kernel.HDFDirector| Method Detail |
|---|
public java.lang.String createOffsetVariablesIfNeeded()
throws IllegalActionException
createOffsetVariablesIfNeeded in interface ActorCodeGeneratorcreateOffsetVariablesIfNeeded in class SDFDirectorIllegalActionException - If thrown while creating
offset variables.
public java.lang.String generateFireCode()
throws IllegalActionException
generateFireCode in interface ActorCodeGeneratorgenerateFireCode in class StaticSchedulingDirectorIllegalActionException - If the actor to be fired cannot
find its associated helper or fire code generation fails.
public java.lang.String generateInitializeCode()
throws IllegalActionException
generateInitializeCode in interface ComponentCodeGeneratorgenerateInitializeCode in class SDFDirectorIllegalActionException - If thrown while calling the same
method in its super class or updating the configuration number.
public void generateModeTransitionCode(java.lang.StringBuffer code)
throws IllegalActionException
generateModeTransitionCode in interface ActorCodeGeneratorgenerateModeTransitionCode in class Directorcode - The string buffer that the generated code is appended to.
IllegalActionException - If getting helper fails, processing
code fails, or updating configuration number fails.
public java.lang.String generatePreinitializeCode()
throws IllegalActionException
generatePreinitializeCode in interface ActorCodeGeneratorgeneratePreinitializeCode in class SDFDirectorIllegalActionException - If getting the helper fails,
or if generating the preinitialize code for a helper fails,
or if there is a problem getting the buffer size of a port.
public void generateTransferInputsCode(IOPort inputPort,
java.lang.StringBuffer code)
throws IllegalActionException
generateTransferInputsCode in class SDFDirectorinputPort - The port to transfer tokens.code - The string buffer that the generated code is appended to.
IllegalActionException - If thrown while transferring tokens.
public void generateTransferOutputsCode(IOPort outputPort,
java.lang.StringBuffer code)
throws IllegalActionException
generateTransferOutputsCode in class SDFDirectoroutputPort - The port to transfer tokens.code - The string buffer that the generated code is appended to.
IllegalActionException - If thrown while transferring tokens.
protected java.lang.String _createOffsetVariablesIfNeeded()
throws IllegalActionException
_createOffsetVariablesIfNeeded in class SDFDirectorIllegalActionException - If thrown while creating
offset variables.
protected java.lang.String _createOffsetVariablesIfNeeded(IOPort port)
throws IllegalActionException
port - The given port.
IllegalActionException - If thrown while creating
offset variables.
protected void _updateConfigurationNumber(java.lang.StringBuffer code)
throws IllegalActionException
code - The string buffer that the generated code is appended to.
IllegalActionException - If thrown while getting helper or
processing code.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||