CSDFstateSpaceThroughputAnalysis::TransitionSystem Class Reference
Classes | |
class | State |
Public Types | |
typedef list< State > | States |
typedef States::iterator | StatesIter |
Public Member Functions | |
TransitionSystem (TimedCSDFgraph *gr) | |
~TransitionSystem () | |
TDtime | execCSDFgraph () |
Private Member Functions | |
bool | storeState (State &s, StatesIter &pos) |
void | clearStoredStates () |
TDtime | computeThroughput (const StatesIter cycleIter) |
bool | actorReadyToFire (CSDFactor *a) |
void | startActorFiring (TimedCSDFactor *a) |
bool | actorReadyToEnd (CSDFactor *a) |
void | endActorFiring (CSDFactor *a) |
CSDFtime | clockStep () |
void | initOutputActor () |
Private Attributes | |
TimedCSDFgraph * | g |
CId | outputActor |
TCnt | outputActorRepCnt |
State | currentState |
State | previousState |
States | storedStates |
Member Typedef Documentation
typedef States::iterator CSDFstateSpaceThroughputAnalysis::TransitionSystem::StatesIter |
Constructor & Destructor Documentation
CSDFstateSpaceThroughputAnalysis::TransitionSystem::TransitionSystem | ( | TimedCSDFgraph * | gr | ) | [inline] |
CSDFstateSpaceThroughputAnalysis::TransitionSystem::~TransitionSystem | ( | ) | [inline] |
Member Function Documentation
bool CSDFstateSpaceThroughputAnalysis::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 CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::actClk, currentState, and CSDFcomponent::getId().
Referenced by execCSDFgraph().
bool CSDFstateSpaceThroughputAnalysis::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_TOKENS, CSDFport::getChannel(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFport::getType(), CSDFactor::portsBegin(), and CSDFactor::portsEnd().
Referenced by execCSDFgraph().
void CSDFstateSpaceThroughputAnalysis::TransitionSystem::clearStoredStates | ( | ) | [inline, private] |
References storedStates.
Referenced by execCSDFgraph().
CSDFtime CSDFstateSpaceThroughputAnalysis::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, CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::actClk, currentState, g, CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::glbClk, and CSDFgraph::nrActors().
Referenced by execCSDFgraph().
TDtime CSDFstateSpaceThroughputAnalysis::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 CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::glbClk, and storedStates.
Referenced by execCSDFgraph().
void CSDFstateSpaceThroughputAnalysis::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, CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::actClk, c, currentState, CSDFport::getChannel(), CSDFcomponent::getId(), CSDFcomponent::getName(), CSDFport::getRate(), CSDFport::getType(), CSDFactor::portsBegin(), CSDFactor::portsEnd(), and PRODUCE.
Referenced by execCSDFgraph().
TDtime CSDFstateSpaceThroughputAnalysis::TransitionSystem::execCSDFgraph | ( | ) |
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(), c, CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::ch, CH, CSDFgraph::channelsBegin(), CSDFgraph::channelsEnd(), CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), computeThroughput(), currentState, endActorFiring(), g, CSDFcomponent::getId(), CSDFchannel::getInitialTokens(), CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::glbClk, CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::init(), CSDFgraph::nrActors(), CSDFgraph::nrChannels(), outputActor, outputActorRepCnt, previousState, printState(), startActorFiring(), and storeState().
Referenced by CSDFstateSpaceThroughputAnalysis::analyze().
void CSDFstateSpaceThroughputAnalysis::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 CSDFstateSpaceThroughputAnalysis::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, CSDFstateSpaceThroughputAnalysis::TransitionSystem::State::actClk, c, CONSUME, currentState, CSDFport::getChannel(), TimedCSDFactor::getExecutionTime(), CSDFcomponent::getId(), CSDFcomponent::getName(), CSDFport::getRate(), CSDFport::getType(), CSDFactor::portsBegin(), CSDFactor::portsEnd(), and CSDFactor::sequenceLength().
Referenced by execCSDFgraph().
bool CSDFstateSpaceThroughputAnalysis::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(), clockStep(), endActorFiring(), execCSDFgraph(), and startActorFiring().
Referenced by clockStep(), execCSDFgraph(), initOutputActor(), and TransitionSystem().
Referenced by execCSDFgraph(), and initOutputActor().
Referenced by execCSDFgraph(), and initOutputActor().
Referenced by execCSDFgraph().
Referenced by clearStoredStates(), computeThroughput(), and storeState().
The documentation for this class was generated from the following files: