SDFstateSpaceStaticPeriodicScheduler::TransitionSystem Class Reference
Classes | |
class | State |
Public Types | |
typedef list< State > | States |
typedef States::iterator | StatesIter |
Public Member Functions | |
TransitionSystem (TimedSDFgraph *gr) | |
~TransitionSystem () | |
CFraction | execSDFgraphSelfTimed () |
CFraction | execSDFgraphComputeSchedule (vector< vector< long long int > > &startTime, const long long int period, const long long int periodicity) |
CFraction | execSDFgraphStaticPeriodic (const vector< vector< long long int > > &startTime, const long long int period) |
Private Member Functions | |
bool | storeState (State &s, StatesIter &pos) |
void | clearStoredStates () |
CFraction | computeThroughput (const StatesIter cycleIter) |
bool | actorReadyToFire (SDFactor *a) |
void | startActorFiring (TimedSDFactor *a) |
bool | actorReadyToEnd (SDFactor *a) |
void | endActorFiring (SDFactor *a) |
SDFtime | clockStep (SDFtime step=UINT_MAX) |
void | initOutputActor () |
Private Attributes | |
TimedSDFgraph * | g |
CId | outputActor |
TCnt | outputActorRepCnt |
State | currentState |
States | storedStates |
Member Typedef Documentation
typedef States::iterator SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::StatesIter |
Constructor & Destructor Documentation
SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::TransitionSystem | ( | TimedSDFgraph * | gr | ) | [inline] |
SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::~TransitionSystem | ( | ) | [inline] |
Member Function Documentation
bool SDFstateSpaceStaticPeriodicScheduler::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 SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::actClk, currentState, and SDFcomponent::getId().
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
bool SDFstateSpaceStaticPeriodicScheduler::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 c, CH_TOKENS, SDFport::getChannel(), SDFcomponent::getId(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
void SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::clearStoredStates | ( | ) | [inline, private] |
References storedStates.
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
SDFtime SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::clockStep | ( | SDFtime | step = UINT_MAX |
) | [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, SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::actClk, currentState, g, SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::glbClk, and SDFgraph::nrActors().
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
CFraction SDFstateSpaceStaticPeriodicScheduler::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 SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::glbClk, and storedStates.
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
void SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::endActorFiring | ( | SDFactor * | a | ) | [private] |
endActorFiring () Produce tokens on all output channels and remove the actor firing from the list of active firings.
References SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::actClk, c, currentState, SDFport::getChannel(), SDFcomponent::getId(), SDFcomponent::getName(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), SDFactor::portsEnd(), and PRODUCE.
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
CFraction SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::execSDFgraphComputeSchedule | ( | vector< vector< long long int > > & | startTime, | |
const long long int | period, | |||
const long long int | periodicity | |||
) |
execSDFgraphComputeSchedule() Execute the SDF graph and compute a static-periodic schedule. The function returns the throughput of the SDF graph.
References a, actorReadyToEnd(), actorReadyToFire(), SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), c, CH, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), FSMSADF::computeRepetitionVector(), computeThroughput(), currentState, endActorFiring(), g, SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::glbClk, SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::init(), SDFgraph::nrActors(), SDFgraph::nrChannels(), outputActor, outputActorRepCnt, printState(), startActorFiring(), and storeState().
Referenced by SDFstateSpaceStaticPeriodicScheduler::schedule().
CFraction SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::execSDFgraphSelfTimed | ( | ) |
execSDFgraphSelfTimed() Execute the SDF graph till a deadlock is found or a recurrent state. The throughput is returned.
References a, actorReadyToEnd(), actorReadyToFire(), SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), c, CH, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), computeThroughput(), currentState, endActorFiring(), g, SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::glbClk, SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::init(), SDFgraph::nrActors(), SDFgraph::nrChannels(), outputActor, outputActorRepCnt, printState(), startActorFiring(), and storeState().
Referenced by SDFstateSpaceStaticPeriodicScheduler::schedule().
CFraction SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::execSDFgraphStaticPeriodic | ( | const vector< vector< long long int > > & | startTime, | |
const long long int | period | |||
) |
execSDFgraphStaticPeriodic() Execute the SDF graph following the supplied schedule. The function returns the throughput of the graph under the given schedule or zero when the schedule cannot be met.
References a, actorReadyToEnd(), actorReadyToFire(), SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), c, CH, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), computeThroughput(), currentState, endActorFiring(), g, SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::glbClk, SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::init(), SDFgraph::nrActors(), SDFgraph::nrChannels(), outputActor, outputActorRepCnt, printState(), startActorFiring(), and storeState().
Referenced by SDFstateSpaceStaticPeriodicScheduler::schedule().
void SDFstateSpaceStaticPeriodicScheduler::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(), FSMSADF::computeRepetitionVector(), g, SDFcomponent::getId(), outputActor, and outputActorRepCnt.
Referenced by TransitionSystem().
void SDFstateSpaceStaticPeriodicScheduler::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 SDFstateSpaceStaticPeriodicScheduler::TransitionSystem::State::actClk, c, CONSUME, currentState, SDFport::getChannel(), TimedSDFactor::getExecutionTime(), SDFcomponent::getId(), SDFcomponent::getName(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
bool SDFstateSpaceStaticPeriodicScheduler::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 execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), and execSDFgraphStaticPeriodic().
Member Data Documentation
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), execSDFgraphStaticPeriodic(), and initOutputActor().
Referenced by execSDFgraphComputeSchedule(), execSDFgraphSelfTimed(), execSDFgraphStaticPeriodic(), and initOutputActor().
Referenced by clearStoredStates(), computeThroughput(), and storeState().
The documentation for this class was generated from the following files: