mapss.dif.csdf.sdf
Class SDFGraph

java.lang.Object
  extended by mocgraph.Graph
      extended by mocgraph.DirectedGraph
          extended by mapss.dif.DIFGraph
              extended by mapss.dif.csdf.CSDFGraph
                  extended by mapss.dif.csdf.sdf.SDFGraph
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
SingleRateGraph

public class SDFGraph
extends CSDFGraph

Information associated with an SDF graph. This class caches frequently-used data associated with SDF graphs. It is also useful for intermediate SDF graph representations (between the application model and implementation), and performing graph transformations (e.g. convertion to and manipulation of single-rate graphs). It is intended for use with analysis/synthesis algorithms that operate on generic graph representations of SDF models.

SDFGraph nodes and edges have weights of type SDFNodeWeight and SDFEdgeWeight, respectively.

Version:
$Id: SDFGraph.java 406 2007-05-10 14:27:07Z plishker $
Author:
Ming-Yung Ko, Shuvra S. Bhattacharyya
See Also:
SDFEdgeWeight, SDFNodeWeight

Constructor Summary
SDFGraph()
          Construct an empty SDF graph.
SDFGraph(int nodeCount)
          Construct an empty SDF graph with enough storage allocated for the specified number of nodes.
SDFGraph(int nodeCount, int edgeCount)
          Construct an empty SDF graph with enough storage allocated for the specified number of edges, and number of nodes.
 
Method Summary
 int ABMLB()
          Absolute Buffer Memory Lower Bound of the graph.
 int ABMLB(mocgraph.Edge edge)
          Absolute Buffer Memory Lower Bound of a given edge.
 int BMLB()
          Buffer Memory Lower Bound of the graph.
 int BMLB(mocgraph.Edge edge)
          Buffer Memory Lower Bound of a given edge.
 int BMUB()
          Buffer Memory Upper Bound of the graph.
 int BMUB(mocgraph.Edge edge)
          Buffer Memory Upper Bound of a given edge.
 int clusterRepetitions(java.util.Collection nodeCollection)
          Compute repetitions for a cluster of nodes.
 int maxRate()
          The maximal sample exchanging rate in the graph.
 double rateOneRatio()
          Returns the ratio of sample exchanging rate of 1 of this graph.
 int TNSE(mocgraph.Edge edge)
          "Total Number of Samples Exchanged" of a given edge.
 boolean validEdgeWeight(java.lang.Object weight)
          Verify edge weight for SDF graph.
 boolean validNodeWeight(java.lang.Object weight)
          Verify node weight for SDF graph.
 
Methods inherited from class mapss.dif.csdf.CSDFGraph
_checkPeriods, _getPeriod, _getRepetitionsMap, checkRepetitions, computeRepetitions, getRepetitions, removeNode, setRepetitions
 
Methods inherited from class mapss.dif.DIFGraph
_getAttributeContainer, _registerEdge, _registerNode, _removeAttributeContainer, _removeReferenceFromAttributes, _setAttributeContainer, addEdge, addEdge, equals, getAttribute, getAttribute, getAttributeByContent, getAttributeByContent, getAttributeDescriptions, getAttributeDescriptions, getAttributeNames, getAttributeNames, getAttributes, getAttributes, getAttributesByContent, getAttributesByContent, getEdge, getName, getName, getNode, getObject, getParameter, getParameterNames, getParameters, hashCode, hideEdge, mergeGraph, mirror, mirror, removeAllAttributes, removeAllAttributes, removeAttribute, removeAttribute, removeAttribute, removeAttribute, removeEdge, removeParameter, restoreEdge, setAttribute, setAttribute, setName, setName, setParameter, subgraph, subgraph
 
Methods inherited from class mocgraph.DirectedGraph
_connect, _connectedSubGraph, _disconnect, _initializeAnalyses, backwardReachableNodes, backwardReachableNodes, backwardReachableNodes, backwardReachableNodes, cycleNodeCollection, cycleNodes, edgeExists, edgeExists, inputEdgeCount, inputEdges, isAcyclic, outputEdgeCount, outputEdges, predecessorEdges, predecessors, reachableNodes, reachableNodes, reachableNodes, reachableNodes, sccDecomposition, selfLoopEdgeCount, sinkNodeCount, sinkNodes, sourceNodeCount, sourceNodes, subgraphs, successorEdges, successors, toDirectedAcyclicGraph, topologicalSort, topologicalSort, transitiveClosure
 
Methods inherited from class mocgraph.Graph
_addEdge, _connectEdge, _disconnectEdge, _emptyGraph, _registerChange, addAnalysis, addEdge, addEdge, addEdge, addEdges, addGraph, addNode, addNode, addNodes, addNodeWeight, addNodeWeights, changeCount, clone, cloneAs, connectedComponents, containsEdge, containsEdgeWeight, containsNode, containsNodeWeight, edge, edge, edgeCount, edgeLabel, edgeLabel, edges, edges, edges, edgeWeight, hidden, hiddenEdgeCount, hiddenEdges, incidentEdgeCount, incidentEdges, neighborEdges, neighbors, node, node, nodeCount, nodeLabel, nodeLabel, nodes, nodes, nodes, nodeWeight, selfLoopEdgeCount, selfLoopEdges, selfLoopEdges, toString, validateWeight, validateWeight, validateWeight, validateWeight, weightArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SDFGraph

public SDFGraph()
Construct an empty SDF graph.


SDFGraph

public SDFGraph(int nodeCount)
Construct an empty SDF graph with enough storage allocated for the specified number of nodes.

Parameters:
nodeCount - The number of nodes.

SDFGraph

public SDFGraph(int nodeCount,
                int edgeCount)
Construct an empty SDF graph with enough storage allocated for the specified number of edges, and number of nodes.

Parameters:
nodeCount - The integer specifying the number of nodes
edgeCount - The integer specifying the number of edges
Method Detail

ABMLB

public int ABMLB()
Absolute Buffer Memory Lower Bound of the graph. It is sum of every edge's ABMLB value. See ABMLB(Edge).

Returns:
The absolute buffer lower bound for whole graph.

ABMLB

public int ABMLB(mocgraph.Edge edge)
Absolute Buffer Memory Lower Bound of a given edge.

Parameters:
edge - The given edge.
Returns:
The absolute buffer lower bound.

BMLB

public int BMLB()
Buffer Memory Lower Bound of the graph. It is sum of every edge's BMLB value. See BMLB(Edge). The bound is for single appearance schedules only.

Returns:
The lower bound for whole graph.

BMLB

public int BMLB(mocgraph.Edge edge)
Buffer Memory Lower Bound of a given edge. The bound is for single appearance schedules only.

Parameters:
edge - The given edge.
Returns:
The lower bound.

BMUB

public int BMUB()
Buffer Memory Upper Bound of the graph. It is sum of every edge's BMUB value. See BMUB(Edge). The bound is for single appearance schedules only.

Returns:
The buffer upper bound for whole graph.

BMUB

public int BMUB(mocgraph.Edge edge)
Buffer Memory Upper Bound of a given edge. The bound is for single appearance schedules only.

Parameters:
edge - The given edge.
Returns:
The buffer upper bound.

clusterRepetitions

public int clusterRepetitions(java.util.Collection nodeCollection)
Compute repetitions for a cluster of nodes. It is equal to GCD value of all component nodes' repetitions.

Parameters:
nodeCollection - The node cluster in Collection.
Returns:
The cluster repetitions.

maxRate

public int maxRate()
The maximal sample exchanging rate in the graph.

Returns:
The maximal rate.

rateOneRatio

public double rateOneRatio()
Returns the ratio of sample exchanging rate of 1 of this graph.

Returns:
The ratio.

TNSE

public int TNSE(mocgraph.Edge edge)
"Total Number of Samples Exchanged" of a given edge. The value is equal to product of sink node repetitions and consumption rate, or product of source node repetitions and production rate.

Parameters:
edge - The given edge.
Returns:
The number of samples exchanged.

validEdgeWeight

public boolean validEdgeWeight(java.lang.Object weight)
Verify edge weight for SDF graph.

Overrides:
validEdgeWeight in class CSDFGraph
Parameters:
weight - The edge weight to verify.
Returns:
True if the given edge weight is valid for SDF graph.

validNodeWeight

public boolean validNodeWeight(java.lang.Object weight)
Verify node weight for SDF graph.

Overrides:
validNodeWeight in class CSDFGraph
Parameters:
weight - The node weight to verify.
Returns:
True if the given node weight is valid for SDF graph.