byucc.jhdl.synth
Class DataFlowGraph

java.lang.Object
  extended bybyucc.jhdl.synth.graph.NamedObject
      extended bybyucc.jhdl.synth.graph.Graph
          extended bybyucc.jhdl.synth.graph.DAG
              extended bybyucc.jhdl.synth.DataFlowGraph
All Implemented Interfaces:
Nameable

public class DataFlowGraph
extends DAG

A graph representing the dataflow of various signals and constants. DataFlowGraph consists of DFVertex and DFEdge objects. Each DFVertex can be either a constant, a signal, or an operator.

See Also:
DFVertex, DFEdge

Field Summary
static java.lang.String DECISION_VERTEX_NAME
          The name to be used for the signal that controls the exit path from a basic block.
static java.lang.String STACK_LEFTOVER_NAME
          A name that will be used whenever a basic block completes execution with some vertices still on the stack.
protected  java.util.Hashtable vertexClash
           
static java.lang.String WIRE_INPUT_SUFFIX
          Suffixes that will be used to distinguish Wire input signals (gets) from Wire output signals (puts).
static java.lang.String WIRE_OUTPUT_SUFFIX
           
 
Fields inherited from class byucc.jhdl.synth.graph.DAG
sorted
 
Fields inherited from class byucc.jhdl.synth.graph.Graph
printNum, vertexVector
 
Fields inherited from class byucc.jhdl.synth.graph.NamedObject
name
 
Constructor Summary
DataFlowGraph()
          Create a new unnamed DataFlowGraph.
DataFlowGraph(java.lang.String name)
          Create a new DataFlowGraph with the given name.
 
Method Summary
 DFSubGraph createSubGraph(java.lang.String name)
          Create and return a new subGraph with the given name.
 DFSubGraph[] getSubGraphs()
          Get an array of the subgraphs that make up this graph.
 java.lang.String getUniqueName(java.lang.String name)
          Provide a unique name based on the given name.
protected  Edge newEdge(Vertex tail, Vertex head)
          Overrides newEdge in Graph so that all edges in a DataFlowGraph will be of type DFEdge.
protected  Vertex newVertex(java.lang.String name)
          Overrides newVertex in Graph so that all vertices in a DataFlowGraph will be of type DFVertex.
 boolean removeSubGraph(DFSubGraph subGraph)
          Remove a subGraph from this DataFlowGraph.
 void removeVertex(Vertex vertex)
          Overrides removeVertex in Graph so that when a Vertex is removed from the graph it will also be cleared from the hashes of any subGraph which may contain the vertex.
 
Methods inherited from class byucc.jhdl.synth.graph.DAG
addEdge, isSorted, localVisit, topologicalSort, topologicalSort
 
Methods inherited from class byucc.jhdl.synth.graph.Graph
addEdge, addVertex, addVertex, getEdge, getEdges, getPrintWriter, getVertices, hasEdge, hasEdge, hasVertex, mergeVertices, printGraph, printGraph, printGraph, printGraph, removeEdge, removeEdge, resetVisited, setEdgeProperty, setVertexProperty, toDot, toDot, toString
 
Methods inherited from class byucc.jhdl.synth.graph.NamedObject
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vertexClash

protected java.util.Hashtable vertexClash

DECISION_VERTEX_NAME

public static final java.lang.String DECISION_VERTEX_NAME
The name to be used for the signal that controls the exit path from a basic block. The asterisks guarantee that this name will never clash with a user-level signal name.

See Also:
Constant Field Values

STACK_LEFTOVER_NAME

public static final java.lang.String STACK_LEFTOVER_NAME
A name that will be used whenever a basic block completes execution with some vertices still on the stack. The asterisk guarantees that this signal name will never conflict with a user-level identifier.

See Also:
Constant Field Values

WIRE_INPUT_SUFFIX

public static final java.lang.String WIRE_INPUT_SUFFIX
Suffixes that will be used to distinguish Wire input signals (gets) from Wire output signals (puts). Again, the asterisk prevents clashes with user-level identifiers.

See Also:
Constant Field Values

WIRE_OUTPUT_SUFFIX

public static final java.lang.String WIRE_OUTPUT_SUFFIX
See Also:
Constant Field Values
Constructor Detail

DataFlowGraph

public DataFlowGraph()
Create a new unnamed DataFlowGraph.


DataFlowGraph

public DataFlowGraph(java.lang.String name)
Create a new DataFlowGraph with the given name.

Parameters:
name - the name for the new graph.
Method Detail

getSubGraphs

public DFSubGraph[] getSubGraphs()
Get an array of the subgraphs that make up this graph.

Returns:
an array of all subgraphs created in this graph.

createSubGraph

public DFSubGraph createSubGraph(java.lang.String name)
Create and return a new subGraph with the given name.

Returns:
a new DFSubGraph created in this graph.

removeSubGraph

public boolean removeSubGraph(DFSubGraph subGraph)
Remove a subGraph from this DataFlowGraph. This method simply removes the pointer from this graphs list of DataFlowGraphs. It will not remove any vertices or edges belonging to the given subGraph.

Parameters:
subGraph - a subGraph to be removed from this DataFlowGraph.

getUniqueName

public java.lang.String getUniqueName(java.lang.String name)
Provide a unique name based on the given name.

Parameters:
name - The desired name.
Returns:
A name that is unique within this graph based on the given name. The unique name will be either name or name_X where * X is an integer representing how many times getUniqueName has * been called with this name.

newVertex

protected Vertex newVertex(java.lang.String name)
Overrides newVertex in Graph so that all vertices in a DataFlowGraph will be of type DFVertex.

Overrides:
newVertex in class Graph
Parameters:
name - the name for the new vertex.
Returns:
a new DFVertex created in this DataFlowGraph.

newEdge

protected Edge newEdge(Vertex tail,
                       Vertex head)
Overrides newEdge in Graph so that all edges in a DataFlowGraph will be of type DFEdge.

Overrides:
newEdge in class Graph
Parameters:
tail - the tail for the new edge.
head - the head for the new edge.
Returns:
A new DFEdge in this graph pointing from tail to head.

removeVertex

public void removeVertex(Vertex vertex)
Overrides removeVertex in Graph so that when a Vertex is removed from the graph it will also be cleared from the hashes of any subGraph which may contain the vertex.

Overrides:
removeVertex in class Graph
Parameters:
vertex - The Vertex to remove from the graph.


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.