parent
c86e720066
commit
8c5fdd12d5
|
@ -88,13 +88,13 @@ void Edge::increaseCapacity ( int capacity )
|
||||||
else
|
else
|
||||||
_capacity += capacity;
|
_capacity += capacity;
|
||||||
|
|
||||||
if ( _capacity < 2 ) _capacity = 0;
|
//if ( _capacity < 2 ) _capacity = 0;
|
||||||
|
|
||||||
|
// cerr << "Increase Edge Capacity " << _from->getPosition()
|
||||||
|
// << " to " << _to->getPosition() << ":" << _capacity << endl;
|
||||||
|
|
||||||
if ( _capacity == 0 )
|
if ( _capacity == 0 )
|
||||||
cinfo << Warning("%s has reached NULL capacity.",getString(this).c_str()) << endl;
|
ltrace(300) << Warning("%s has reached NULL capacity.",getString(this).c_str()) << endl;
|
||||||
|
|
||||||
//cerr << "Edge " << _from->getPosition()
|
|
||||||
// << " to " << _to->getPosition() << ":" << _capacity << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edge::incOccupancy ()
|
void Edge::incOccupancy ()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
#include "hurricane/Name.h"
|
#include "hurricane/Name.h"
|
||||||
|
@ -1505,14 +1506,14 @@ void Graph::Monotonic()
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FTree Graph::createFluteTree()
|
FTree* Graph::createFluteTree()
|
||||||
// ***************************
|
// ****************************
|
||||||
{
|
{
|
||||||
int accuracy = 3; // accuracy for flute (by default 3)
|
int accuracy = 3; // accuracy for flute (by default 3)
|
||||||
int d = _vertexes_to_route.size(); // degre du net, ie nombre de routingPads
|
int d = _vertexes_to_route.size(); // degre du net, ie nombre de routingPads
|
||||||
int *x = new int [d]; // x coordinates of the vertexes
|
int *x = new int [d]; // x coordinates of the vertexes
|
||||||
int *y = new int [d]; // y coordinates of the vertexes
|
int *y = new int [d]; // y coordinates of the vertexes
|
||||||
FTree flutetree; // the flute Steiner Tree
|
FTree* flutetree = new FTree; // the flute Steiner Tree
|
||||||
|
|
||||||
//cout << "Net : " << _working_net << endl;
|
//cout << "Net : " << _working_net << endl;
|
||||||
// scans _working_net to find x,y coordinates and fill x, y and d
|
// scans _working_net to find x,y coordinates and fill x, y and d
|
||||||
|
@ -1529,7 +1530,7 @@ FTree Graph::createFluteTree()
|
||||||
|
|
||||||
assert ( d == cpt );
|
assert ( d == cpt );
|
||||||
|
|
||||||
flutetree = flute ( d, x, y, accuracy );
|
*flutetree = flute ( d, x, y, accuracy );
|
||||||
//printtree ( flutetree );
|
//printtree ( flutetree );
|
||||||
//plottree ( flutetree );
|
//plottree ( flutetree );
|
||||||
//cout << endl;
|
//cout << endl;
|
||||||
|
@ -1548,16 +1549,16 @@ void Graph::UpdateEstimateCongestion ( bool create )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//cerr << "Running FLUTE for net : " << _working_net << endl;
|
//cerr << "Running FLUTE for net : " << _working_net << endl;
|
||||||
FTree flutetree = createFluteTree();
|
auto_ptr<FTree> flutetree ( createFluteTree() );
|
||||||
|
|
||||||
//parcours des branches du FTree pour créer la congestion estimée
|
//parcours des branches du FTree pour créer la congestion estimée
|
||||||
for ( int i = 0 ; i < 2*flutetree.deg-2 ; i++ ) {
|
for ( int i = 0 ; i < 2*flutetree->deg-2 ; i++ ) {
|
||||||
// int sourceX = flutetree.branch[i].x;
|
// int sourceX = flutetree->branch[i].x;
|
||||||
// int sourceY = flutetree.branch[i].y;
|
// int sourceY = flutetree->branch[i].y;
|
||||||
// int targetX = flutetree.branch[flutetree.branch[i].n].x;
|
// int targetX = flutetree->branch[flutetree->branch[i].n].x;
|
||||||
// int targetY = flutetree.branch[flutetree.branch[i].n].y;
|
// int targetY = flutetree->branch[flutetree->branch[i].n].y;
|
||||||
Vertex* source = getVertex ( flutetree.branch[i].x , flutetree.branch[i].y );
|
Vertex* source = getVertex ( flutetree->branch[i].x , flutetree->branch[i].y );
|
||||||
Vertex* target = getVertex ( flutetree.branch[flutetree.branch[i].n].x, flutetree.branch[flutetree.branch[i].n].y );
|
Vertex* target = getVertex ( flutetree->branch[flutetree->branch[i].n].x, flutetree->branch[flutetree->branch[i].n].y );
|
||||||
assert ( source );
|
assert ( source );
|
||||||
assert ( target );
|
assert ( target );
|
||||||
//Si source et target alignée -> ajoute 1 a toutes les edges sur le chemin
|
//Si source et target alignée -> ajoute 1 a toutes les edges sur le chemin
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
#include "knik/RoutingGrid.h"
|
#include "knik/RoutingGrid.h"
|
||||||
#include "knik/NetExtension.h"
|
#include "knik/NetExtension.h"
|
||||||
#include "knik/KnikEngine.h"
|
#include "knik/KnikEngine.h"
|
||||||
|
#include "knik/flute.h"
|
||||||
|
|
||||||
#define MAX_RUNTIME 86400
|
#define MAX_RUNTIME 86400
|
||||||
#define MAX_ITERATION UINT_MAX
|
#define MAX_ITERATION UINT_MAX
|
||||||
|
@ -207,7 +208,7 @@ void KnikEngine::initGlobalRouting()
|
||||||
if ( !_routingGraph ) {
|
if ( !_routingGraph ) {
|
||||||
_timer.resetIncrease();
|
_timer.resetIncrease();
|
||||||
_timer.start();
|
_timer.start();
|
||||||
cmess2 << " o create routing graph" << endl;
|
cmess2 << " o Create routing graph." << endl;
|
||||||
Cell* cell = getCell();
|
Cell* cell = getCell();
|
||||||
_routingGraph = Graph::create ( cell, _routingGrid, _benchMode, _useSegments );
|
_routingGraph = Graph::create ( cell, _routingGrid, _benchMode, _useSegments );
|
||||||
cmess2 << " - Graph size: " << _routingGraph->getXSize()
|
cmess2 << " - Graph size: " << _routingGraph->getXSize()
|
||||||
|
@ -216,7 +217,7 @@ void KnikEngine::initGlobalRouting()
|
||||||
printTime();
|
printTime();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cmess2 << "routingGraph already exists !" << endl;
|
cmess2 << " - Reusing pre-existing graph." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 20/02/09 tout ce qui suit dans la fonction etait inclu dans le if(!_routingGraph) on le sépare pour pouvoir
|
// 20/02/09 tout ce qui suit dans la fonction etait inclu dans le if(!_routingGraph) on le sépare pour pouvoir
|
||||||
|
|
|
@ -17,6 +17,11 @@ using CRL::AllianceFramework;
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "knik/flute.h"
|
#include "knik/flute.h"
|
||||||
|
|
||||||
|
#define max(x,y) ((x)>(y)?(x):(y))
|
||||||
|
#define min(x,y) ((x)<(y)?(x):(y))
|
||||||
|
#define abs(x) ((x)<0?(-x):(x))
|
||||||
|
#define ADIFF(x,y) ((x)>(y)?(x-y):(y-x)) // Absolute difference
|
||||||
|
|
||||||
#if D<=7
|
#if D<=7
|
||||||
#define MGROUP 5040/4 // Max. # of groups, 7! = 5040
|
#define MGROUP 5040/4 // Max. # of groups, 7! = 5040
|
||||||
#define MPOWV 15 // Max. # of POWVs per group
|
#define MPOWV 15 // Max. # of POWVs per group
|
||||||
|
|
|
@ -20,12 +20,12 @@ typedef struct
|
||||||
int n; // index of neighbor
|
int n; // index of neighbor
|
||||||
} Branch;
|
} Branch;
|
||||||
|
|
||||||
typedef struct
|
struct FTree
|
||||||
{
|
{
|
||||||
int deg; // degree
|
int deg; // degree
|
||||||
DTYPE length; // total wirelength
|
DTYPE length; // total wirelength
|
||||||
Branch *branch; // array of tree branches
|
Branch *branch; // array of tree branches
|
||||||
} FTree;
|
};
|
||||||
|
|
||||||
// Major functions
|
// Major functions
|
||||||
extern void readLUT();
|
extern void readLUT();
|
||||||
|
@ -63,9 +63,4 @@ extern FTree flutes_RDP(int d, DTYPE xs[], DTYPE ys[], int s[], int acc);
|
||||||
#define flutes_LMD(d, xs, ys, s, acc) \
|
#define flutes_LMD(d, xs, ys, s, acc) \
|
||||||
(d<=D ? flutes_LD(d, xs, ys, s) : flutes_MD(d, xs, ys, s, acc))
|
(d<=D ? flutes_LD(d, xs, ys, s) : flutes_MD(d, xs, ys, s, acc))
|
||||||
|
|
||||||
#define max(x,y) ((x)>(y)?(x):(y))
|
|
||||||
#define min(x,y) ((x)<(y)?(x):(y))
|
|
||||||
#define abs(x) ((x)<0?(-x):(x))
|
|
||||||
#define ADIFF(x,y) ((x)>(y)?(x-y):(y-x)) // Absolute difference
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
#include "knik/SlicingTree.h"
|
#include "knik/SlicingTree.h"
|
||||||
#include "knik/RoutingGrid.h"
|
#include "knik/RoutingGrid.h"
|
||||||
|
|
||||||
#include "knik/flute.h"
|
//#include "knik/flute.h"
|
||||||
|
struct FTree;
|
||||||
|
|
||||||
namespace Knik {
|
namespace Knik {
|
||||||
|
|
||||||
|
@ -137,7 +138,7 @@ namespace Knik {
|
||||||
int initRouting ( Net* net );
|
int initRouting ( Net* net );
|
||||||
void Dijkstra ();
|
void Dijkstra ();
|
||||||
void Monotonic ();
|
void Monotonic ();
|
||||||
FTree createFluteTree ();
|
FTree* createFluteTree ();
|
||||||
void CleanRoutingState ();
|
void CleanRoutingState ();
|
||||||
void UpdateEstimateCongestion ( bool create = false );
|
void UpdateEstimateCongestion ( bool create = false );
|
||||||
void UpdateMaxEstimateCongestion ();
|
void UpdateMaxEstimateCongestion ();
|
||||||
|
@ -208,8 +209,6 @@ namespace Knik {
|
||||||
|
|
||||||
} // namespace Knik
|
} // namespace Knik
|
||||||
|
|
||||||
|
INSPECTOR_P_SUPPORT(Knik::Graph);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -187,6 +187,7 @@ typedef vector<NetRecord> NetVector;
|
||||||
// for ispd07 reload
|
// for ispd07 reload
|
||||||
void createRoutingGraph();
|
void createRoutingGraph();
|
||||||
void addRoutingPadToGraph ( Hurricane::RoutingPad* routingPad );
|
void addRoutingPadToGraph ( Hurricane::RoutingPad* routingPad );
|
||||||
|
inline Graph* getRoutingGraph() { return _routingGraph; }
|
||||||
Vertex* getVertex ( Point );
|
Vertex* getVertex ( Point );
|
||||||
Vertex* getVertex ( DbU::Unit x, DbU::Unit y );
|
Vertex* getVertex ( DbU::Unit x, DbU::Unit y );
|
||||||
Edge* getEdge ( unsigned col1, unsigned row1, unsigned col2, unsigned row2 );
|
Edge* getEdge ( unsigned col1, unsigned row1, unsigned col2, unsigned row2 );
|
||||||
|
|
Loading…
Reference in New Issue