|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.synth.GraphStack
Constructor Summary | |
GraphStack(Cell cell)
Constructs a new GraphStack that will be used to synthesize the given cell |
Method Summary | |
void |
addBranches(WeightedOpCode[] targets)
Add branches to the CFGraph for the given WeightedOpCodes. |
DFVertex |
addConstant(int width,
int value)
|
CFEdge |
addEdge(CFVertex tail,
CFVertex head)
Add an edge in the control flow graph. |
CFEdge |
addEdge(CFVertex tail,
CFVertex head,
java.lang.String weight)
Add a weighted edge in the control flow graph. |
DFEdge |
addEdge(DFVertex tail,
DFVertex head)
Add an edge in the dataflow graph. |
DFEdge |
addEdge(DFVertex tail,
DFVertex head,
java.lang.String headPort)
Add an edge in the dataflow graph with the given head port name. |
DFEdge |
addEdge(DFVertex tail,
java.lang.String tailPort,
DFVertex head)
Add an edge in the dataflow graph with the given tail port name. |
DFEdge |
addEdge(DFVertex tail,
java.lang.String tailPort,
DFVertex head,
java.lang.String headPort)
Add an edge in the dataflow graph with the given port names. |
DFVertex |
addOperator(java.lang.String name)
|
DFVertex |
addSignal(int width,
java.lang.String name)
|
void |
createCFAndDFGraphs(MethodInfo method)
Create the ControlFlowGraph and the DataFlowGraph corresponding to the given method. |
void |
execute(MethodInfo method)
|
java.lang.Object |
getCellFieldValue(java.lang.String name)
Get the value of a specific field from the current cell being synthesized. |
ControlFlowGraph |
getCFGraph()
|
DFVertex |
getConstant(int width,
int value)
|
MethodInfo |
getCurrentMethod()
|
DataFlowGraph |
getDFGraph()
|
DFVertex |
getExistingSignal(java.lang.String name)
Find a vertex that already exists in the dataflow graph with the given signal name and return it. |
java.lang.Object |
getLocalVariable(int pc,
int i)
|
DFVertex |
getSignal(int width,
java.lang.String name)
If a Vertex already exists in the dataflow graph with the given signal name, return it. |
DFVertex |
getSignal(java.lang.String name,
Wire wire)
If a Vertex already exists in the dataflow graph with the given name and associated with the given Wire, return it. |
void |
jumpAbsolute(int pc)
|
void |
mergeCombinationalBranches()
For all conditional branches, (if and switch), which don't have sequential statements in their blocks, merge the controlFlow blocks of each branch. |
BasicBlock |
newBasicBlock(AttributeCode parent,
int number)
|
java.lang.Object |
peek()
|
java.lang.Object |
pop()
|
java.lang.Object |
push(java.lang.Object o)
|
boolean |
registerWireAssignments()
Should wire assignments be registered or not. |
void |
registerWireAssignments(boolean flag)
Should wire assignments be registered or not. |
void |
setLocalVariable(java.lang.Object o,
int i)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GraphStack(Cell cell)
cell
- A cell object which is being synthesized. This cell
will be used with the reflection interface to fetch
fields whenever getField is called etc. These fields
will be used to determine wire widths, etc.getCellFieldValue
Method Detail |
public ControlFlowGraph getCFGraph()
public DataFlowGraph getDFGraph()
public java.lang.Object getCellFieldValue(java.lang.String name)
name
- The name of the field to be retrieved from the
current cell being synthesized.public CFEdge addEdge(CFVertex tail, CFVertex head)
tail
- the tail vertex of the new edge to create,
(tail should exist within the control flow graph)head
- the head vertex of the new edge to create
(head should exist within the control flow graph)
public CFEdge addEdge(CFVertex tail, CFVertex head, java.lang.String weight)
tail
- the tail vertex of the new edge to create,
(tail should exist within the control flow graph)head
- the head vertex of the new edge to create
(head should exist within the control flow graph)weight
- the weight for the new edge
public DFEdge addEdge(DFVertex tail, DFVertex head)
tail
- the tail vertex of the new edge to create,
(tail should exist within the dataflow graph)head
- the head vertex of the new edge to create
(head should exist within the dataflow graph)
public DFEdge addEdge(DFVertex tail, java.lang.String tailPort, DFVertex head)
tail
- the tail vertex of the new edge to create,
(tail should exist within the dataflow graph)tailPort
- the name for the tail port of this edgehead
- the head vertex of the new edge to create
(head should exist within the dataflow graph)
public DFEdge addEdge(DFVertex tail, DFVertex head, java.lang.String headPort)
tail
- the tail vertex of the new edge to create,
(tail should exist within the dataflow graph)head
- the head vertex of the new edge to create
(head should exist within the dataflow graph)headPort
- the name for the head port of this graph
public DFEdge addEdge(DFVertex tail, java.lang.String tailPort, DFVertex head, java.lang.String headPort)
tail
- the tail vertex of the new edge to create,
(tail should exist within the dataflow graph)tailPort
- the name for the tail port of this edgehead
- the head vertex of the new edge to create
(head should exist within the dataflow graph)headPort
- the name for the head port of this graph
public DFVertex addSignal(int width, java.lang.String name)
public DFVertex addConstant(int width, int value)
public DFVertex addOperator(java.lang.String name)
public void addBranches(WeightedOpCode[] targets)
targets
- an array of WeightedOpCodes specifying the possible
branch paths, each weighted by the value of the
decision signal that would choose that path.public DFVertex getExistingSignal(java.lang.String name)
name
- the name of the desired signal
public DFVertex getSignal(java.lang.String name, Wire wire)
name
- The name for a signal to lookup in the graph.wire
- A wire to be associated with the named signal. If
there is already a signal named name it must be
associated with this Wire; if not an exception will
be thrown. If there is no existing signal then a new
one will be created and will be associated with this
wire.
public DFVertex getSignal(int width, java.lang.String name)
width
- the width of the desired signalname
- the name of the desired signal
public DFVertex getConstant(int width, int value)
public java.lang.Object pop()
pop
in interface VirtualMachine
public java.lang.Object push(java.lang.Object o)
push
in interface VirtualMachine
public java.lang.Object getLocalVariable(int pc, int i)
getLocalVariable
in interface VirtualMachine
public void setLocalVariable(java.lang.Object o, int i)
setLocalVariable
in interface VirtualMachine
public MethodInfo getCurrentMethod()
getCurrentMethod
in interface VirtualMachine
public BasicBlock newBasicBlock(AttributeCode parent, int number)
newBasicBlock
in interface VirtualMachine
public void jumpAbsolute(int pc)
jumpAbsolute
in interface VirtualMachine
public void execute(MethodInfo method)
execute
in interface VirtualMachine
public void createCFAndDFGraphs(MethodInfo method)
method
- The method to be analyzed for controlflow and dataflow.public void mergeCombinationalBranches()
public java.lang.Object peek()
public void registerWireAssignments(boolean flag)
flag
- true if Wire assignments should result in registers,
(ala clock), false if no registers should be
inferred, (ala propagate).public boolean registerWireAssignments()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |