* ./knik:

- Change: Restore Inspector support.
This commit is contained in:
Jean-Paul Chaput 2010-12-04 15:24:43 +00:00
parent c86e720066
commit 8c5fdd12d5
7 changed files with 34 additions and 32 deletions

View File

@ -88,13 +88,13 @@ void Edge::increaseCapacity ( int capacity )
else
_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 )
cinfo << Warning("%s has reached NULL capacity.",getString(this).c_str()) << endl;
//cerr << "Edge " << _from->getPosition()
// << " to " << _to->getPosition() << ":" << _capacity << endl;
ltrace(300) << Warning("%s has reached NULL capacity.",getString(this).c_str()) << endl;
}
void Edge::incOccupancy ()

View File

@ -1,5 +1,6 @@
#include <algorithm>
#include <memory>
#include "hurricane/Warning.h"
#include "hurricane/Name.h"
@ -1505,14 +1506,14 @@ void Graph::Monotonic()
//#endif
}
FTree Graph::createFluteTree()
// ***************************
FTree* Graph::createFluteTree()
// ****************************
{
int accuracy = 3; // accuracy for flute (by default 3)
int d = _vertexes_to_route.size(); // degre du net, ie nombre de routingPads
int *x = new int [d]; // x 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;
// scans _working_net to find x,y coordinates and fill x, y and d
@ -1529,7 +1530,7 @@ FTree Graph::createFluteTree()
assert ( d == cpt );
flutetree = flute ( d, x, y, accuracy );
*flutetree = flute ( d, x, y, accuracy );
//printtree ( flutetree );
//plottree ( flutetree );
//cout << endl;
@ -1548,16 +1549,16 @@ void Graph::UpdateEstimateCongestion ( bool create )
return;
}
//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
for ( int i = 0 ; i < 2*flutetree.deg-2 ; i++ ) {
// int sourceX = flutetree.branch[i].x;
// int sourceY = flutetree.branch[i].y;
// int targetX = flutetree.branch[flutetree.branch[i].n].x;
// int targetY = flutetree.branch[flutetree.branch[i].n].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 );
for ( int i = 0 ; i < 2*flutetree->deg-2 ; i++ ) {
// int sourceX = flutetree->branch[i].x;
// int sourceY = flutetree->branch[i].y;
// int targetX = flutetree->branch[flutetree->branch[i].n].x;
// int targetY = flutetree->branch[flutetree->branch[i].n].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 );
assert ( source );
assert ( target );
//Si source et target alignée -> ajoute 1 a toutes les edges sur le chemin

View File

@ -74,6 +74,7 @@
#include "knik/RoutingGrid.h"
#include "knik/NetExtension.h"
#include "knik/KnikEngine.h"
#include "knik/flute.h"
#define MAX_RUNTIME 86400
#define MAX_ITERATION UINT_MAX
@ -207,7 +208,7 @@ void KnikEngine::initGlobalRouting()
if ( !_routingGraph ) {
_timer.resetIncrease();
_timer.start();
cmess2 << " o create routing graph" << endl;
cmess2 << " o Create routing graph." << endl;
Cell* cell = getCell();
_routingGraph = Graph::create ( cell, _routingGrid, _benchMode, _useSegments );
cmess2 << " - Graph size: " << _routingGraph->getXSize()
@ -216,7 +217,7 @@ void KnikEngine::initGlobalRouting()
printTime();
}
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

View File

@ -17,6 +17,11 @@ using CRL::AllianceFramework;
#include <math.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
#define MGROUP 5040/4 // Max. # of groups, 7! = 5040
#define MPOWV 15 // Max. # of POWVs per group

View File

@ -20,12 +20,12 @@ typedef struct
int n; // index of neighbor
} Branch;
typedef struct
struct FTree
{
int deg; // degree
DTYPE length; // total wirelength
Branch *branch; // array of tree branches
} FTree;
};
// Major functions
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) \
(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

View File

@ -16,7 +16,8 @@
#include "knik/SlicingTree.h"
#include "knik/RoutingGrid.h"
#include "knik/flute.h"
//#include "knik/flute.h"
struct FTree;
namespace Knik {
@ -137,7 +138,7 @@ namespace Knik {
int initRouting ( Net* net );
void Dijkstra ();
void Monotonic ();
FTree createFluteTree ();
FTree* createFluteTree ();
void CleanRoutingState ();
void UpdateEstimateCongestion ( bool create = false );
void UpdateMaxEstimateCongestion ();
@ -208,8 +209,6 @@ namespace Knik {
} // namespace Knik
INSPECTOR_P_SUPPORT(Knik::Graph);
#endif

View File

@ -187,6 +187,7 @@ typedef vector<NetRecord> NetVector;
// for ispd07 reload
void createRoutingGraph();
void addRoutingPadToGraph ( Hurricane::RoutingPad* routingPad );
inline Graph* getRoutingGraph() { return _routingGraph; }
Vertex* getVertex ( Point );
Vertex* getVertex ( DbU::Unit x, DbU::Unit y );
Edge* getEdge ( unsigned col1, unsigned row1, unsigned col2, unsigned row2 );