CSDFstateSpaceBufferAnalysis::TransitionSystem Class Reference
Member Typedef Documentation
typedef list<State> CSDFstateSpaceBufferAnalysis::TransitionSystem::States |
typedef States::iterator CSDFstateSpaceBufferAnalysis::TransitionSystem::StatesIter |
Constructor & Destructor Documentation
CSDFstateSpaceBufferAnalysis::TransitionSystem::TransitionSystem | ( | TimedCSDFgraph * | gr | ) | [inline] |
CSDFstateSpaceBufferAnalysis::TransitionSystem::~TransitionSystem | ( | ) | [inline] |
Member Function Documentation
bool CSDFstateSpaceBufferAnalysis::TransitionSystem::actorReadyToEnd | ( | CSDFactor * | a | ) | [private] |
actorReadyToEnd () The function returns true when the actor is ready to end its firing. Else the function returns false.
References CSDFstateSpaceBufferAnalysis::TransitionSystem::State::actClk, currentState, and CSDFcomponent::getId().
Referenced by analyzePeriodicPhase(), and execCSDFgraph().
bool CSDFstateSpaceBufferAnalysis::TransitionSystem::actorReadyToFire | ( | CSDFactor * | a | ) | [private] |
actorReadyToFire () The function returns true when the actor is ready to fire in state s. Else it returns false.
References ACT_SEQ_POS, c, CH_SPACE, CH_TOKENS, CSDFport::getChannel(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFport::getType(), CSDFactor::portsBegin(), and CSDFactor::portsEnd().
Referenced by analyzePeriodicPhase(), and execCSDFgraph().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::analyzeDeadlock | ( | const TBufSize * | sp, | |
bool * | dep | |||
) | [private] |
analyzeDeadlock () Analyze the deadlock in the schedule.
References ACT_SEQ_POS, c, CH_SPACE, CH_TOKENS, CSDFgraph::channelsBegin(), CSDFgraph::channelsEnd(), findStorageDependencies(), g, CSDFchannel::getDstActor(), CSDFchannel::getDstPort(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFchannel::getSrcActor(), CSDFchannel::getSrcPort(), and CSDFgraph::nrActors().
Referenced by execCSDFgraph().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::analyzePeriodicPhase | ( | const TBufSize * | sp, | |
bool * | dep | |||
) | [private] |
analyzePeriodicPhase () Analyze the periodic phase of the schedule to find all blocked channels. This is done using the abstract dependency graph.
References a, actorReadyToEnd(), actorReadyToFire(), CSDFgraph::actorsBegin(), CSDFgraph::actorsEnd(), CSDFstateSpaceBufferAnalysis::TransitionSystem::State::ch, clockStep(), currentState, endActorFiring(), findCausalDependencies(), findStorageDependencies(), g, CSDFcomponent::getId(), CSDFstateSpaceBufferAnalysis::TransitionSystem::State::glbClk, CSDFgraph::nrActors(), CSDFgraph::nrChannels(), outputActor, outputActorRepCnt, previousState, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::sp, and startActorFiring().
Referenced by execCSDFgraph().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::clearStoredStates | ( | ) | [inline, private] |
References storedStates.
Referenced by execCSDFgraph().
CSDFtime CSDFstateSpaceBufferAnalysis::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, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::actClk, currentState, g, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::glbClk, and CSDFgraph::nrActors().
Referenced by analyzePeriodicPhase(), and execCSDFgraph().
TDtime CSDFstateSpaceBufferAnalysis::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 CSDFstateSpaceBufferAnalysis::TransitionSystem::State::glbClk, and storedStates.
Referenced by execCSDFgraph().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::dfsVisitDependencies | ( | uint | a, | |
int * | color, | |||
int * | pi, | |||
bool ** | abstractDepGraph, | |||
bool * | dep | |||
) | [private] |
dfsVisitDependencies () The function performs a DFS on the abstract dependency graph from a node a to find all cycles of which a is part. Channels on a cycle are when needed marked to have a storage dependency.
References c, CSDFgraph::channelsBegin(), CSDFgraph::channelsEnd(), g, CSDFchannel::getDstActor(), CSDFcomponent::getId(), CSDFchannel::getSrcActor(), and CSDFgraph::nrActors().
Referenced by findStorageDependencies().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::endActorFiring | ( | CSDFactor * | a | ) | [private] |
endActorFiring () Produce tokens on all output channels and remove the actor firing from the list of active firings.
References ACT_SEQ_POS, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::actClk, c, currentState, CSDFport::getChannel(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFport::getType(), CSDFactor::portsBegin(), CSDFactor::portsEnd(), PRODUCE, and PRODUCE_SP.
Referenced by analyzePeriodicPhase(), and execCSDFgraph().
TDtime CSDFstateSpaceBufferAnalysis::TransitionSystem::execCSDFgraph | ( | const TBufSize * | sp, | |
bool * | dep | |||
) |
execCSDFgraph() Execute the CSDF graph till a deadlock is found or a recurrent state. The throughput is returned.
References a, actorReadyToEnd(), actorReadyToFire(), CSDFgraph::actorsBegin(), CSDFgraph::actorsEnd(), analyzeDeadlock(), analyzePeriodicPhase(), c, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::ch, CH, CSDFgraph::channelsBegin(), CSDFgraph::channelsEnd(), CSDFstateSpaceBufferAnalysis::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), computeThroughput(), currentState, endActorFiring(), g, CSDFcomponent::getId(), CSDFchannel::getInitialTokens(), CSDFstateSpaceBufferAnalysis::TransitionSystem::State::glbClk, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::init(), CSDFgraph::nrActors(), CSDFgraph::nrChannels(), outputActor, outputActorRepCnt, previousState, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::sp, SP, startActorFiring(), and storeState().
Referenced by CSDFstateSpaceBufferAnalysis::execStorageDistribution().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::findCausalDependencies | ( | CSDFactor * | a, | |
bool ** | abstractDepGraph | |||
) | [private] |
findCausalDependencies () The function tracks all causal dependencies in the actor firing of actor a. Any causal dependency that is found is added to the abstract dependency graph.
References ACT_SEQ_POS, c, CH_SPACE_PREV, CH_TOKENS_PREV, CSDFport::getChannel(), CSDFchannel::getDstActor(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFchannel::getSrcActor(), CSDFport::getType(), CSDFactor::portsBegin(), and CSDFactor::portsEnd().
Referenced by analyzePeriodicPhase().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::findStorageDependencies | ( | bool ** | abstractDepGraph, | |
bool * | dep | |||
) | [private] |
findStorageDependencies () The function find all cycles in the abstract dependency graph. Any channel modeling storage space which is part of a cycle is marked to have a storage dependency.
References c, color, dfsVisitDependencies(), g, CSDFgraph::nrActors(), CSDFgraph::nrChannels(), and pi.
Referenced by analyzeDeadlock(), and analyzePeriodicPhase().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::initOutputActor | ( | ) | [private] |
initOutputActor () The function selects an actor to be used as output actor in the state transition system.
References a, CSDFgraph::actorsBegin(), CSDFgraph::actorsEnd(), g, CSDFcomponent::getId(), CSDFgraph::getRepetitionVector(), outputActor, and outputActorRepCnt.
Referenced by TransitionSystem().
void CSDFstateSpaceBufferAnalysis::TransitionSystem::startActorFiring | ( | TimedCSDFactor * | 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 ACT_SEQ_POS, CSDFstateSpaceBufferAnalysis::TransitionSystem::State::actClk, c, CONSUME, CONSUME_SP, currentState, CSDFport::getChannel(), TimedCSDFactor::getExecutionTime(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFport::getType(), CSDFactor::portsBegin(), CSDFactor::portsEnd(), and CSDFactor::sequenceLength().
Referenced by analyzePeriodicPhase(), and execCSDFgraph().
bool CSDFstateSpaceBufferAnalysis::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 execCSDFgraph().
Member Data Documentation
Referenced by actorReadyToEnd(), analyzePeriodicPhase(), clockStep(), endActorFiring(), execCSDFgraph(), and startActorFiring().
Referenced by analyzePeriodicPhase(), execCSDFgraph(), and initOutputActor().
Referenced by analyzePeriodicPhase(), execCSDFgraph(), and initOutputActor().
Referenced by analyzePeriodicPhase(), and execCSDFgraph().
Referenced by clearStoredStates(), computeThroughput(), and storeState().
The documentation for this class was generated from the following files: