org.opencores.mapping
Class Roommates
java.lang.Object
|
+--org.opencores.mapping.Roommates
- public class Roommates
- extends java.lang.Object
Joins LUTs together so they fit into same GLCs.
NodeLUT.roomate is used.
Expects mapped graph, partially placed (RxR).
O(|V|^2*|K|)
|
Field Summary |
static int |
numLUTs
number of LUTs in graph last processed |
static int |
numPairs
number of pairs (two LUTs connected) in graph last processed |
static int |
sumLUTInputs
total sum of LUT inputs |
|
Method Summary |
static java.util.Vector[] |
bucketSort(Graph g)
performs bucket sort on LUTs, based on number of inputs. |
static void |
joining(Graph g)
Performs roomate joining, based on greedy algorithm. |
static float |
manhattan(Node a,
Node b)
calculates (manhattan) distance between two nodes,
using .fx, .fy. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
numLUTs
public static int numLUTs
- number of LUTs in graph last processed
numPairs
public static int numPairs
- number of pairs (two LUTs connected) in graph last processed
sumLUTInputs
public static int sumLUTInputs
- total sum of LUT inputs
Roommates
public Roommates()
bucketSort
public static java.util.Vector[] bucketSort(Graph g)
- performs bucket sort on LUTs, based on number of inputs.
- Parameters:
g - graph with LUTs- Returns:
- array of Vectors, containing nodes, with same number of
inputs
joining
public static void joining(Graph g)
- Performs roomate joining, based on greedy algorithm.
- Parameters:
g - graph to work on
manhattan
public static float manhattan(Node a,
Node b)
- calculates (manhattan) distance between two nodes,
using .fx, .fy.
- Parameters:
a - first nodeb - second node- Returns:
- distance >= 0