SDFstateSpacePriorityListScheduler::TransitionSystem Class Reference
Classes | |
class | State |
Public Types | |
typedef list< State > | States |
typedef States::iterator | StatesIter |
Public Member Functions | |
TransitionSystem (BindingAwareSDFG *bg) | |
~TransitionSystem () | |
TDtime | execSDFgraph () |
Private Member Functions | |
bool | storeState (State &s, StatesIter &pos) |
void | clearStoredStates () |
TDtime | computeThroughput (const StatesIter cycleIter) |
bool | actorReadyToFire (SDFactor *a) |
void | startActorFiring (TimedSDFactor *a) |
bool | actorReadyToEnd (SDFactor *a) |
void | endActorFiring (SDFactor *a) |
SDFtime | clockStep () |
void | initOutputActor () |
void | initStaticOrderSchedules () |
void | findAllDependencies (bool **nodes, const int nrNodes, const int actor, const int b, int *color, int *pi, int *cnt) |
void | initActorPriorities () |
Private Attributes | |
BindingAwareSDFG * | bindingAwareSDFG |
SDFactor * | outputActor |
TCnt | outputActorRepCnt |
State | currentState |
State | previousState |
States | storedStates |
vector< SDFactors > | actorReadyList |
vector< bool > | procIdle |
SDFactors | actorsOnPriority |
Member Typedef Documentation
typedef States::iterator SDFstateSpacePriorityListScheduler::TransitionSystem::StatesIter |
Constructor & Destructor Documentation
SDFstateSpacePriorityListScheduler::TransitionSystem::TransitionSystem | ( | BindingAwareSDFG * | bg | ) | [inline] |
References bindingAwareSDFG, initActorPriorities(), initOutputActor(), and initStaticOrderSchedules().
SDFstateSpacePriorityListScheduler::TransitionSystem::~TransitionSystem | ( | ) | [inline] |
Member Function Documentation
bool SDFstateSpacePriorityListScheduler::TransitionSystem::actorReadyToEnd | ( | SDFactor * | a | ) | [private] |
actorReadyToEnd () The function returns true when the actor is ready to end its firing. Else the function returns false.
References SDFstateSpacePriorityListScheduler::TransitionSystem::State::actClk, currentState, and SDFcomponent::getId().
Referenced by execSDFgraph().
bool SDFstateSpacePriorityListScheduler::TransitionSystem::actorReadyToFire | ( | SDFactor * | a | ) | [private] |
actorReadyToFire () The function returns true when the actor is ready to fire in state s. Else it returns false.
References actorReadyList, bindingAwareSDFG, c, CH_TOKENS, BindingAwareSDFG::getBindingOfActorToTile(), SDFport::getChannel(), SDFcomponent::getId(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), SDFactor::portsEnd(), and procIdle.
Referenced by execSDFgraph().
void SDFstateSpacePriorityListScheduler::TransitionSystem::clearStoredStates | ( | ) | [inline, private] |
References storedStates.
Referenced by execSDFgraph().
SDFtime SDFstateSpacePriorityListScheduler::TransitionSystem::clockStep | ( | ) | [private] |
clockStep () The function progresses time till the first end of firing transition becomes enabled. The time step is returned. In case of deadlock, the time step is equal to UINT_MAX.
References a, SDFstateSpacePriorityListScheduler::TransitionSystem::State::actClk, bindingAwareSDFG, currentState, BindingAwareSDFG::getTDMAsizeOnTile(), SDFstateSpacePriorityListScheduler::TransitionSystem::State::glbClk, SDFgraph::nrActors(), BindingAwareSDFG::nrTilesInPlatformGraph(), and SDFstateSpacePriorityListScheduler::TransitionSystem::State::tdmaPos.
Referenced by execSDFgraph().
TDtime SDFstateSpacePriorityListScheduler::TransitionSystem::computeThroughput | ( | const StatesIter | cycleIter | ) | [private] |
computeThroughput () The function calculates the throughput of the states on the cycle. Its value is equal to the average number of firings of an actor per time unit.
References SDFstateSpacePriorityListScheduler::TransitionSystem::State::glbClk, and storedStates.
Referenced by execSDFgraph().
void SDFstateSpacePriorityListScheduler::TransitionSystem::endActorFiring | ( | SDFactor * | a | ) | [private] |
endActorFiring () Produce tokens on all output channels and remove the actor firing from the list of active firings.
References SDFstateSpacePriorityListScheduler::TransitionSystem::State::actClk, bindingAwareSDFG, c, currentState, BindingAwareSDFG::getBindingOfActorToTile(), SDFport::getChannel(), SDFcomponent::getId(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), SDFactor::portsEnd(), procIdle, and PRODUCE.
Referenced by execSDFgraph().
TDtime SDFstateSpacePriorityListScheduler::TransitionSystem::execSDFgraph | ( | ) |
execSDFgraph() Execute the SDF graph till a deadlock is found or a recurrent state. The throughput is returned.
References a, actorReadyList, actorReadyToEnd(), actorReadyToFire(), SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), actorsOnPriority, bindingAwareSDFG, c, SDFstateSpacePriorityListScheduler::TransitionSystem::State::ch, CH, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFstateSpacePriorityListScheduler::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), computeThroughput(), currentState, endActorFiring(), BindingAwareSDFG::getBindingOfActorToTile(), SDFport::getChannel(), SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFport::getRate(), SDFport::getType(), SDFstateSpacePriorityListScheduler::TransitionSystem::State::glbClk, SDFstateSpacePriorityListScheduler::TransitionSystem::State::init(), SDFgraph::nrActors(), SDFgraph::nrChannels(), BindingAwareSDFG::nrTilesInPlatformGraph(), outputActor, outputActorRepCnt, SDFactor::portsBegin(), SDFactor::portsEnd(), previousState, procIdle, SOS, SOS_POS, startActorFiring(), storeState(), and TDMA_POS.
Referenced by SDFstateSpacePriorityListScheduler::schedule().
void SDFstateSpacePriorityListScheduler::TransitionSystem::findAllDependencies | ( | bool ** | nodes, | |
const int | nrNodes, | |||
const int | actor, | |||
const int | b, | |||
int * | color, | |||
int * | pi, | |||
int * | cnt | |||
) | [private] |
findAllDependencies () The function performs a DFS to find all paths that go from the actor to itself in the previous period (i.e. it looks for a path in the dependency nodes from the last dependency node of the actor in the current period to a dependency node of the same actor in the previous firing). When such a path is found, the list of blocked channels is updated. Requirement is that a channel must be blocked on at least one path.
References a.
Referenced by initActorPriorities().
void SDFstateSpacePriorityListScheduler::TransitionSystem::initActorPriorities | ( | ) | [private] |
initActorPriorities () The function determines the order (priority) in which actors must be checked for their start-of-firing.
References a, actorsOnPriority, ASSERT, bindingAwareSDFG, color, findAllDependencies(), SDFgraph::getActor(), SDFgraph::nrActors(), pi, and stateSpaceAbstractDepGraph().
Referenced by TransitionSystem().
void SDFstateSpacePriorityListScheduler::TransitionSystem::initOutputActor | ( | ) | [private] |
initOutputActor () The function selects an actor to be used as output actor in the state transition system.
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), bindingAwareSDFG, FSMSADF::computeRepetitionVector(), SDFcomponent::getId(), outputActor, and outputActorRepCnt.
Referenced by TransitionSystem().
void SDFstateSpacePriorityListScheduler::TransitionSystem::initStaticOrderSchedules | ( | ) | [private] |
initStaticOrderSchedules () The function assigns empty static-order schedules to the processors.
References bindingAwareSDFG, BindingAwareSDFG::getScheduleOnTile(), and BindingAwareSDFG::nrTilesInPlatformGraph().
Referenced by TransitionSystem().
void SDFstateSpacePriorityListScheduler::TransitionSystem::startActorFiring | ( | TimedSDFactor * | a | ) | [private] |
startActorFiring () Start the actor firing. Remove tokens from all input channels and add the actor firing to the list of active actor firings and advance sequence position.
References SDFstateSpacePriorityListScheduler::TransitionSystem::State::actClk, actorReadyList, StaticOrderSchedule::appendActor(), bindingAwareSDFG, c, CONSUME, currentState, BindingAwareSDFG::getBindingOfActorToTile(), SDFport::getChannel(), TimedSDFactor::getExecutionTime(), SDFcomponent::getId(), SDFport::getRate(), BindingAwareSDFG::getScheduleOnTile(), BindingAwareSDFG::getTDMAsizeOnTile(), BindingAwareSDFG::getTDMAsliceOnTile(), SDFport::getType(), SDFactor::portsBegin(), SDFactor::portsEnd(), procIdle, SOS_POS, and SDFstateSpacePriorityListScheduler::TransitionSystem::State::tdmaPos.
Referenced by execSDFgraph().
bool SDFstateSpacePriorityListScheduler::TransitionSystem::storeState | ( | State & | s, | |
StatesIter & | pos | |||
) | [private] |
storeState () The function stores the state s on whenever s is not already in the list of storedStates. When s is stored, the function returns true. When the state s is already in the list, the state s is not stored. The function returns false. The function always sets the pos variable to the position where the state s is in the list.
References storedStates.
Referenced by execSDFgraph().
Member Data Documentation
vector< SDFactors > SDFstateSpacePriorityListScheduler::TransitionSystem::actorReadyList [private] |
Referenced by actorReadyToFire(), execSDFgraph(), and startActorFiring().
Referenced by execSDFgraph(), and initActorPriorities().
Referenced by actorReadyToEnd(), clockStep(), endActorFiring(), execSDFgraph(), and startActorFiring().
Referenced by execSDFgraph(), and initOutputActor().
Referenced by execSDFgraph(), and initOutputActor().
Referenced by execSDFgraph().
vector< bool > SDFstateSpacePriorityListScheduler::TransitionSystem::procIdle [private] |
Referenced by actorReadyToFire(), endActorFiring(), execSDFgraph(), and startActorFiring().
Referenced by clearStoredStates(), computeThroughput(), and storeState().
The documentation for this class was generated from the following files: