SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem Class Reference
Classes | |
class | State |
Public Types | |
typedef list< State > | States |
typedef States::iterator | StatesIter |
Public Member Functions | |
TransitionSystem (TimedSDFgraph *gr) | |
~TransitionSystem () | |
TDtime | execSDFgraph (bool startFromInitialState=true) |
SDFtime | execSDFgraphUsingDemandList (vector< uint > &demandList) |
void | computeDemandList (const SDFchannel *ch, vector< uint > &demandList) |
State & | getCurrentState () |
void | setCurrentState (State &s) |
State & | getPreviousState () |
void | setPreviousState (State &s) |
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 () |
Private Attributes | |
TimedSDFgraph * | g |
CId | outputActor |
TCnt | outputActorRepCnt |
State | currentState |
State | previousState |
States | storedStates |
Member Typedef Documentation
typedef States::iterator SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::StatesIter |
Constructor & Destructor Documentation
SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::TransitionSystem | ( | TimedSDFgraph * | gr | ) | [inline] |
SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::~TransitionSystem | ( | ) | [inline] |
Member Function Documentation
bool SDFstateSpaceMinimalLatencyAnalysis::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 SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::actClk, currentState, and SDFcomponent::getId().
Referenced by execSDFgraph(), and execSDFgraphUsingDemandList().
bool SDFstateSpaceMinimalLatencyAnalysis::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 execSDFgraph(), and execSDFgraphUsingDemandList().
void SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::clearStoredStates | ( | ) | [inline, private] |
References storedStates.
Referenced by execSDFgraph().
SDFtime SDFstateSpaceMinimalLatencyAnalysis::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, SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::actClk, currentState, g, SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::glbClk, and SDFgraph::nrActors().
Referenced by execSDFgraph(), and execSDFgraphUsingDemandList().
void SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::computeDemandList | ( | const SDFchannel * | ch, | |
vector< uint > & | demandList | |||
) |
computeDemandList () The function computes the minimal number of firings required of each actor to enable the required number of firings of the destination actor connected to the channel ch.
References c, CH, SDFport::getChannel(), SDFchannel::getDstActor(), SDFchannel::getDstPort(), SDFcomponent::getId(), SDFport::getRate(), SDFchannel::getSrcActor(), SDFchannel::getSrcPort(), SDFport::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by SDFstateSpaceMinimalLatencyAnalysis::analyze(), and SDFstateSpaceMinimalLatencyAnalysis::analyzeSingleProc().
TDtime SDFstateSpaceMinimalLatencyAnalysis::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 SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::glbClk, and storedStates.
void SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::endActorFiring | ( | SDFactor * | a | ) | [private] |
endActorFiring () Produce tokens on all output channels and remove the actor firing from the list of active firings.
References SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::actClk, c, currentState, SDFport::getChannel(), SDFcomponent::getId(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), SDFactor::portsEnd(), and PRODUCE.
Referenced by execSDFgraph(), and execSDFgraphUsingDemandList().
TDtime SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::execSDFgraph | ( | bool | startFromInitialState = true |
) |
execSDFgraph() Execute the SDF graph till a deadlock is found. The total elapsed time till the deadlock occurs is returned.
References a, actorReadyToEnd(), actorReadyToFire(), SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), c, SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::ch, CH, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::clear(), clearStoredStates(), clockStep(), currentState, endActorFiring(), g, SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::init(), SDFgraph::nrActors(), SDFgraph::nrChannels(), previousState, and startActorFiring().
Referenced by SDFstateSpaceMinimalLatencyAnalysis::analyze(), and SDFstateSpaceMinimalLatencyAnalysis::analyzeSingleProc().
SDFtime SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::execSDFgraphUsingDemandList | ( | vector< uint > & | demandList | ) |
execSDFgraphUsingDemandList () Execute the SDF graph in a self-timed manner. Only actors in the demand list may be executed (upto the number of times specified). The function returns the amount of time needed to execute all actors from the demand list. It starts from the current state.
References a, actorReadyToEnd(), actorReadyToFire(), SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::ch, clockStep(), currentState, endActorFiring(), g, SDFcomponent::getId(), SDFgraph::nrChannels(), previousState, and startActorFiring().
Referenced by SDFstateSpaceMinimalLatencyAnalysis::analyze().
State& SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::getCurrentState | ( | ) | [inline] |
References currentState.
Referenced by SDFstateSpaceMinimalLatencyAnalysis::analyze().
State& SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::getPreviousState | ( | ) | [inline] |
References previousState.
void SDFstateSpaceMinimalLatencyAnalysis::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 SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::setCurrentState | ( | State & | s | ) | [inline] |
References currentState.
void SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::setPreviousState | ( | State & | s | ) | [inline] |
References previousState.
void SDFstateSpaceMinimalLatencyAnalysis::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 SDFstateSpaceMinimalLatencyAnalysis::TransitionSystem::State::actClk, c, CONSUME, currentState, SDFport::getChannel(), TimedSDFactor::getExecutionTime(), SDFcomponent::getId(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by execSDFgraph(), and execSDFgraphUsingDemandList().
bool SDFstateSpaceMinimalLatencyAnalysis::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.
Member Data Documentation
Referenced by clockStep(), execSDFgraph(), execSDFgraphUsingDemandList(), initOutputActor(), and TransitionSystem().
Referenced by initOutputActor().
Referenced by initOutputActor().
Referenced by execSDFgraph(), execSDFgraphUsingDemandList(), getPreviousState(), and setPreviousState().
Referenced by clearStoredStates(), computeThroughput(), and storeState().
The documentation for this class was generated from the following files: