#include "single_processor_random_staticorder.h"
#include "../../base/algo/repetition_vector.h"
#include "../../base/algo/components.h"
Functions | |
static void | fireActor (SDFactor *a) |
static bool | isActorReady (SDFactor *a) |
static void | updateActorReadyList (SDFactors &readyList, SDFactor *a, RepetitionVector &demandList) |
static SDFactor * | getRandomActorFromActorReadyList (SDFactors &readyList) |
static SDFtime | execSDFgraph (TimedSDFgraph *g, SDFactor *srcActor, SDFactor *dstActor) |
SDFtime | latencyAnalysisForRandomStaticOrderSingleProc (TimedSDFgraph *g, SDFactor *srcActor, SDFactor *dstActor, uint nrAttempts) |
Variables | |
static MTRand | mtRand |
Function Documentation
static SDFtime execSDFgraph | ( | TimedSDFgraph * | g, | |
SDFactor * | srcActor, | |||
SDFactor * | dstActor | |||
) | [static] |
execSDFgraph () Fire the actors in the SDF graph. The number of firings is n (or less in case of deadlock).
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), ASSERT, FSMSADF::computeRepetitionVector(), fireActor(), TimedSDFactor::getExecutionTime(), SDFcomponent::getId(), getRandomActorFromActorReadyList(), isActorReady(), and updateActorReadyList().
static void fireActor | ( | SDFactor * | a | ) | [static] |
fireActor () The function removes the number of tokens required for a firing of the actor from all input ports and it produces tokens on all output ports.
References c, SDFport::getChannel(), SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), SDFactor::portsEnd(), and SDFchannel::setInitialTokens().
Referenced by execSDFgraph().
getRandomActorFromActorReadyList () The function returns a random actor from the list.
References MTRand::randInt().
Referenced by execSDFgraph().
static bool isActorReady | ( | SDFactor * | a | ) | [static] |
isActorReady () The function checks wether there are enough tokens on the input ports to fire the actor.
References c, SDFport::getChannel(), SDFchannel::getInitialTokens(), SDFport::getRate(), SDFport::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by execSDFgraph(), and updateActorReadyList().
SDFtime latencyAnalysisForRandomStaticOrderSingleProc | ( | TimedSDFgraph * | g, | |
SDFactor * | srcActor, | |||
SDFactor * | dstActor, | |||
uint | nrAttempts | |||
) |
latencyAnalysisForRandomStaticOrderSingleProc () The function computes the latency for a random static-order schedule on a single processor system. The minimal latency for the specified number of attempts is returned.
References execSDFgraph().
Referenced by analyzeSDFG().
static void updateActorReadyList | ( | SDFactors & | readyList, | |
SDFactor * | a, | |||
RepetitionVector & | demandList | |||
) | [static] |
updateActorReadyList () The function updates the list of ready actors after the firing of actor a.
References SDFport::getChannel(), SDFchannel::getDstActor(), SDFcomponent::getId(), SDFport::getType(), isActorReady(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by execSDFgraph().