|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.opencores.placement.RxRPlacement
This algorithm tries to arrange graph nodes similarly to graph drawing algorithms. Nodes may overlap and they are placed in RxR space. Also this class contains some preplacement functions, that are based on RxR placement. After preplacement we have valid placement. Annealing uses two forces - temperature and distancing force. First nets acts like elastics and tries to approach nodes together, on the other hand nodes are distanced by the power of distancing force. Preplacement consist of three steps: - preplacement of SPCs - preplacement of GPCs - preplacement of ports
| Field Summary | |
int |
curStep
Current step number. |
boolean |
done
true if final solution was found. |
private static float |
DONE_FACTOR
process terminates when change is small enough |
float |
energy
Current placement quality. |
private static float |
FINAL_FORCE
force flow definition (linear) |
private static float |
FINAL_TEMP
temperature flow definition (linear) |
float |
force
force, that distances nodes |
private Graph |
g
graph representation we are working on |
private java.util.Vector |
groupList
used internally to store groups |
private static float |
INIT_FORCE
force flow definition (linear) |
private static float |
INIT_TEMP
temperature flow definition (linear) |
private static float |
MIN_DIST
minimum allowed distance between nodes |
int |
nGPC
Number of GPCs detected by preplacement |
int |
nPorts
Number of Ports detected by preplacement |
int |
nSPC
Number of SPCs detected by preplacement |
private static int |
NUM_STEPS
number of annealing steps - temp and force is linearly interpolated |
private int[] |
pos
position array, knowing number of LUTs at that position |
private float |
prevEnergy
Previous (from previous step) placement quality. |
float |
temperature
current annealing temperature |
java.util.Vector |
vna
vector that contains all placed adders |
java.util.Vector |
vnl
vector, that contains all GPCs |
| Constructor Summary | |
RxRPlacement(Graph g)
Initializes RxR placement. |
|
| Method Summary | |
void |
approach(float factor)
approaches all connected nodes |
void |
distance(float factor)
distances nodes, that are close together by factor |
private int |
distribute(NodeSPC n)
Distributes adders by force (no nearby free column available) |
void |
doStep()
does one step of simulated annealing. |
private float |
portDist(float x,
float y,
int pi)
returns manhattan distance between specified position (x,y) and port with index pi. |
void |
prePlacement(SPCMap ma)
Does preplacement. |
void |
prePlacementGPC()
Assigns valid positions for GPCs. |
void |
prePlacementPort()
Assigns valid positions for Ports. |
void |
prePlacementSPC(SPCMap ma)
Place adders (SPCs), based on RxR placement. |
void |
setGraph(Graph g)
Changes working graph. |
void |
zoom()
zooms all nodes to fit onto arhitecture rectangle |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final float MIN_DIST
private static final float INIT_TEMP
private static final float FINAL_TEMP
private static final float INIT_FORCE
private static final float FINAL_FORCE
private static final float DONE_FACTOR
private static final int NUM_STEPS
private Graph g
public float temperature
public float force
public float energy
private float prevEnergy
public int curStep
public boolean done
public int nSPC
public int nGPC
public int nPorts
public java.util.Vector vna
private java.util.Vector groupList
public java.util.Vector vnl
private int[] pos
| Constructor Detail |
public RxRPlacement(Graph g)
g - graph to do placement on.| Method Detail |
public void setGraph(Graph g)
g - graph to work onGraphpublic void approach(float factor)
factor - attraction strengthpublic void distance(float factor)
factor - repulsive strengthpublic void zoom()
public void doStep()
public void prePlacementSPC(SPCMap ma)
ma - mapped adders
NOTE: Netlist must be mapped first. SPCMapprivate int distribute(NodeSPC n)
n - NodeSPC to distributepublic void prePlacementGPC()
public void prePlacementPort()
private float portDist(float x,
float y,
int pi)
{(0..X-1,0),(0..X-1,Y-1),(0,0..Y-1),(X-1,0..Y-1)}x - x positiony - y positionpi - port indexpublic void prePlacement(SPCMap ma)
ma - mapped addersprePlacementGPC,
prePlacementSPC,
NOTE: Netlist must be mapped first.,
org.opencores.mapping.Adders
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||