|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.opencores.mapping.FlowMap
Performs unit-delay optimal mapping for LUTs - FlowMap algorithm.
| Inner Class Summary | |
(package private) class |
FlowMap.Variable
Internal class used for building larger LUTs, representing directed acyclic subgraph input. |
| Field Summary | |
static boolean |
OPTIMIZE_SIZE
Whether FlowMap should optimize space |
private int |
tempCnt
current temp flag |
| Constructor Summary | |
FlowMap()
|
|
| Method Summary | |
private NodeLUT |
buildLUT(NodeLUT child,
java.util.Vector GPI)
Collapses DAG of same nodes with temp==tempCnt-1 into child,
using shortest-first joining. |
private void |
buildSame(NodeLUT child,
int label,
java.util.Vector LUTs)
adds all childs predecessors with same label into LUTs Vector |
private boolean |
flow(java.util.Vector PI,
Node t,
int label)
Calculates flow from source s to sink t or to node with label 'label'. |
private boolean |
flowR(Node sink,
boolean top,
int label)
Tries to find flow from source s to sink t. |
private NodeLUT |
joinLUTs(NodeLUT child)
Collapses tree of same labeled nodes into s, using shortest-first joining. |
private int |
label(Node t)
Calculates label of node t. |
void |
labeling(Graph g)
first step of algorithm - labeling |
Graph |
mapping(Graph g)
Second step of the algorithm - mapping. |
private void |
mark(Node t,
java.util.Vector PI,
int mil)
Mark predecessor nodes ot t with tempCnt. |
private void |
markAccessible(NodeLUT sink,
boolean top)
Similar to routine A of Ford Fulerson max-flow algorithm, marks visited nodes with .visited flag. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static boolean OPTIMIZE_SIZE
private int tempCnt
| Constructor Detail |
public FlowMap()
| Method Detail |
public void labeling(Graph g)
g - graph to label. Labels are stored in node.yprivate int label(Node t)
n - node to calculate label
private void mark(Node t,
java.util.Vector PI,
int mil)
t - node to mark predecessorsPI - vector to put primary input nets in
private boolean flow(java.util.Vector PI,
Node t,
int label)
s - source nodet - sink nodelabel - minimum label to stopmark
private boolean flowR(Node sink,
boolean top,
int label)
Each node is splitted into two parts - top and bottom. Top can access
bottoms of predecessors, bottom can access successor tops. Top-bottom
link is valid if node .flag == false.
Mark function should be called to set .temp and .flag = false for all predecessors
sink - source nodetop - designates top access to sink nodelabel - minimum label to stopmark,
markAccessible,
Ford, Jr. and D.R. Fulkerson: Maximal Flow Trough a Networkpublic Graph mapping(Graph g)
g - labeled graphlabelingprivate NodeLUT joinLUTs(NodeLUT child)
child - sink node
private void markAccessible(NodeLUT sink,
boolean top)
Each node is splitted into two parts - top and bottom. Top can access
bottoms of predecessors, bottom can access successor tops. Top-bottom
link is valid if node .flag == false.
sink - sink nodetop - designates top access to sink nodeflowR,
private void buildSame(NodeLUT child,
int label,
java.util.Vector LUTs)
private NodeLUT buildLUT(NodeLUT child,
java.util.Vector GPI)
temp==tempCnt-1 into child,
using shortest-first joining. .temp is incremented, to disable looping.child - sink node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||