mcm.cc File Reference

#include "mcm.h"
#include "../../base/hsdf/check.h"
#include "../../base/algo/components.h"
#include "../../base/algo/cycle.h"
#include "../../base/algo/graph.h"
Include dependency graph for mcm.cc:

Functions

CFraction maximumCycleMeanCycle (TimedSDFgraph *g, SDFgraphCycle &cycle)
static v_uint mcmGetAdjacentActors (uint a, v_uint &nodeId, v_uint &actorId, vector< v_uint > &graph, uint nrNodes)
static void mcmSimpleCycleVisit (uint a, TimedSDFgraph *g, v_uint &nodeId, v_uint &actorId, vector< v_uint > &graph, uint size, v_int &color, v_uint &pi, CFraction &mcmCycles)
static CFraction mcmSimpleCycles (TimedSDFgraph *g, bool transpose)
CFraction maximumCycleMeanCycles (TimedSDFgraph *g)

Function Documentation

CFraction maximumCycleMeanCycle ( TimedSDFgraph g,
SDFgraphCycle cycle 
)

maximumCycleMeanCycle () The function computes the maximum cycle mean of a cycle.

References SDFport::getChannel(), SDFchannel::getDstActor(), TimedSDFactor::getExecutionTime(), SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFport::getType(), MIN, SDFactor::portsBegin(), SDFactor::portsEnd(), and v.

Referenced by mcmSimpleCycles(), and mcmSimpleCycleVisit().

Here is the call graph for this function:

CFraction maximumCycleMeanCycles ( TimedSDFgraph g  ) 

maximumCycleMeanCycles () The function computes the maximum cycle mean of a HSDF graph using the cycle-based definition of the MCM.

References isHSDFgraph(), and mcmSimpleCycles().

Referenced by analyzeSDFG(), and createCapacityConstrainedModel().

Here is the call graph for this function:

static v_uint mcmGetAdjacentActors ( uint  a,
v_uint nodeId,
v_uint actorId,
vector< v_uint > &  graph,
uint  nrNodes 
) [static]

mcmGetAdjacentActors () The function returns a list with actors directly reachable from actor a.

References v.

Referenced by mcmSimpleCycles(), and mcmSimpleCycleVisit().

static CFraction mcmSimpleCycles ( TimedSDFgraph g,
bool  transpose 
) [static]

mcmSimpleCycles () The function performs a depth first search on the graph to discover all simple cycles in the graph. The cycle mean of each cycle is computed and the maximum cycle mean is returned.

References a, color, component, SDFgraph::getActor(), MAX, maximumCycleMeanCycle(), mcmGetAdjacentActors(), mcmSimpleCycleVisit(), SDFgraph::nrActors(), pi, sdfComponentToGraph(), and stronglyConnectedComponents().

Referenced by maximumCycleMeanCycles().

Here is the call graph for this function:

static void mcmSimpleCycleVisit ( uint  a,
TimedSDFgraph g,
v_uint nodeId,
v_uint actorId,
vector< v_uint > &  graph,
uint  size,
v_int color,
v_uint pi,
CFraction mcmCycles 
) [static]

mcmSimpleCycleVisit () The visitor function of the DFS based algorithm used for detecting simple cycles and computing the MCM of them.

References SDFgraph::getActor(), MAX, maximumCycleMeanCycle(), and mcmGetAdjacentActors().

Referenced by mcmSimpleCycles().

Here is the call graph for this function: