Enable the display of GCells as a density map (and not boundaries).
* Bug: In Anabatic::RawGCellsUnder, *again*, the north and east borders of the whole area *are* includeds (shut up disgraceful warning). * New: In Anabatic::GCell, add a display mode to select between boundary display (for analogic) and density display (for numeric). * Bug: In KatanaEngine::runGlobalRouter(), do not check if an Edge cannot be desatured when the vector or overloaded Edges is empty. (one less disgraceful warning) * New: In GraphicKatanaEngine::drawGCell(), support for drawing the GCells in density mode. Use the fire scale and the MaxDensity mode. Setup the GCell drawing mode in GraphicKatanaEngine::initGCell(). * Change: In GraphicKatanaEngine::drawEdge(), adjust the various thresholds for showing the Edge and its label. * New: In CRL Core, adds "anabatic.gcell.displayMode" to the set of Anabatic parameters. Adjust the showing threshold for GCells in "display.conf" so when the zoom level is low, we still can see the density map.
This commit is contained in:
parent
d8fc626678
commit
ce00b37cbf
|
@ -79,8 +79,8 @@ namespace Anabatic {
|
||||||
Point sourcePosition = segment->getSourcePosition();
|
Point sourcePosition = segment->getSourcePosition();
|
||||||
Point targetPosition = segment->getTargetPosition();
|
Point targetPosition = segment->getTargetPosition();
|
||||||
|
|
||||||
if ( (sourcePosition.getX() >= gcellsArea.getXMax())
|
if ( (sourcePosition.getX() > gcellsArea.getXMax())
|
||||||
or (sourcePosition.getY() >= gcellsArea.getYMax())
|
or (sourcePosition.getY() > gcellsArea.getYMax())
|
||||||
or (targetPosition.getX() <= gcellsArea.getXMin())
|
or (targetPosition.getX() <= gcellsArea.getXMin())
|
||||||
or (targetPosition.getY() <= gcellsArea.getYMin()) ) {
|
or (targetPosition.getY() <= gcellsArea.getYMin()) ) {
|
||||||
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s is completly outside the GCells area (ignored)."
|
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s is completly outside the GCells area (ignored)."
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "crlcore/RoutingLayerGauge.h"
|
#include "crlcore/RoutingLayerGauge.h"
|
||||||
#include "crlcore/AllianceFramework.h"
|
#include "crlcore/AllianceFramework.h"
|
||||||
#include "anabatic/Configuration.h"
|
#include "anabatic/Configuration.h"
|
||||||
|
#include "anabatic/GCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,6 +72,8 @@ namespace Anabatic {
|
||||||
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK",-10.0)->asDouble())
|
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK",-10.0)->asDouble())
|
||||||
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
||||||
{
|
{
|
||||||
|
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
||||||
|
|
||||||
if (cg == NULL) cg = AllianceFramework::get()->getCellGauge();
|
if (cg == NULL) cg = AllianceFramework::get()->getCellGauge();
|
||||||
if (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
if (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
||||||
_cg = cg->getClone();
|
_cg = cg->getClone();
|
||||||
|
@ -122,6 +125,8 @@ namespace Anabatic {
|
||||||
, _edgeCostK (other._edgeCostK)
|
, _edgeCostK (other._edgeCostK)
|
||||||
, _edgeHInc (other._edgeHInc)
|
, _edgeHInc (other._edgeHInc)
|
||||||
{
|
{
|
||||||
|
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
||||||
|
|
||||||
if (other._cg) _cg = other._cg->getClone();
|
if (other._cg) _cg = other._cg->getClone();
|
||||||
if (other._rg) _rg = other._rg->getClone();
|
if (other._rg) _rg = other._rg->getClone();
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,8 +315,12 @@ namespace Anabatic {
|
||||||
|
|
||||||
string Edge::_getString () const
|
string Edge::_getString () const
|
||||||
{
|
{
|
||||||
|
Point center ( getSource()->getCenter() );
|
||||||
|
|
||||||
string s = Super::_getString();
|
string s = Super::_getString();
|
||||||
s.insert( s.size()-1, " "+DbU::getValueString(_axis) );
|
s.insert( s.size()-1, " S:["+DbU::getValueString(center.getX()) );
|
||||||
|
s.insert( s.size()-1, " " +DbU::getValueString(center.getY()) );
|
||||||
|
s.insert( s.size()-1, "] " +DbU::getValueString(_axis) );
|
||||||
s.insert( s.size()-1, " " +getString(_realOccupancy) );
|
s.insert( s.size()-1, " " +getString(_realOccupancy) );
|
||||||
s.insert( s.size()-1, "/" +getString(_capacity) );
|
s.insert( s.size()-1, "/" +getString(_capacity) );
|
||||||
s.insert( s.size()-1, " h:" +getString(_historicCost) );
|
s.insert( s.size()-1, " h:" +getString(_historicCost) );
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "hurricane/Bug.h"
|
#include "hurricane/Bug.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
|
#include "hurricane/Breakpoint.h"
|
||||||
#include "hurricane/Contact.h"
|
#include "hurricane/Contact.h"
|
||||||
#include "hurricane/RoutingPad.h"
|
#include "hurricane/RoutingPad.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
#include "hurricane/UpdateSession.h"
|
||||||
|
@ -271,6 +272,11 @@ namespace Anabatic {
|
||||||
// Class : "Anabatic::GCell".
|
// Class : "Anabatic::GCell".
|
||||||
|
|
||||||
Name GCell::_extensionName = "Anabatic::GCell";
|
Name GCell::_extensionName = "Anabatic::GCell";
|
||||||
|
unsigned int GCell::_displayMode = GCell::Boundary;
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int GCell::getDisplayMode () { return _displayMode; }
|
||||||
|
void GCell::setDisplayMode ( unsigned int mode ) { _displayMode = mode; }
|
||||||
|
|
||||||
|
|
||||||
GCell::GCell ( AnabaticEngine* anabatic, DbU::Unit xmin, DbU::Unit ymin )
|
GCell::GCell ( AnabaticEngine* anabatic, DbU::Unit xmin, DbU::Unit ymin )
|
||||||
|
@ -720,10 +726,7 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
getAnabatic()->openSession();
|
getAnabatic()->openSession();
|
||||||
|
|
||||||
//const vector<GCell*>& gcells = getAnabatic()->getGCells();
|
|
||||||
//size_t ibegin = gcells.size();
|
|
||||||
DbU::Unit side = Session::getSliceHeight();
|
DbU::Unit side = Session::getSliceHeight();
|
||||||
|
|
||||||
Interval hspan = getSide( Flags::Horizontal );
|
Interval hspan = getSide( Flags::Horizontal );
|
||||||
Interval vspan = getSide( Flags::Vertical );
|
Interval vspan = getSide( Flags::Vertical );
|
||||||
|
|
||||||
|
|
|
@ -2222,7 +2222,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
void AnabaticEngine::_loadGrByNet ()
|
void AnabaticEngine::_loadGrByNet ()
|
||||||
{
|
{
|
||||||
cmess1 << " o Loading Nets global routing from Knik." << endl;
|
cmess1 << " o Building detailed routing from global." << endl;
|
||||||
//cmess1 << Dots::asDouble(" - Saturation",getMeasure<double>(getCell(),"Sat.")->getData()) << endl;
|
//cmess1 << Dots::asDouble(" - Saturation",getMeasure<double>(getCell(),"Sat.")->getData()) << endl;
|
||||||
|
|
||||||
startMeasures();
|
startMeasures();
|
||||||
|
|
|
@ -75,6 +75,9 @@ namespace Anabatic {
|
||||||
typedef std::set< GCell*, Entity::CompareById > Set;
|
typedef std::set< GCell*, Entity::CompareById > Set;
|
||||||
typedef std::vector<GCell*> Vector;
|
typedef std::vector<GCell*> Vector;
|
||||||
public:
|
public:
|
||||||
|
enum DisplayMode { Boundary = 1
|
||||||
|
, Density = 2
|
||||||
|
};
|
||||||
enum DensityMode { AverageHVDensity = 1 // Average between all densities.
|
enum DensityMode { AverageHVDensity = 1 // Average between all densities.
|
||||||
, AverageHDensity = 2 // Average between all H densities.
|
, AverageHDensity = 2 // Average between all H densities.
|
||||||
, AverageVDensity = 3 // Average between all V densities.
|
, AverageVDensity = 3 // Average between all V densities.
|
||||||
|
@ -120,6 +123,8 @@ namespace Anabatic {
|
||||||
float _density;
|
float _density;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
static unsigned int getDisplayMode ();
|
||||||
|
static void setDisplayMode ( unsigned int );
|
||||||
static Box getBorder ( const GCell*, const GCell* );
|
static Box getBorder ( const GCell*, const GCell* );
|
||||||
public:
|
public:
|
||||||
static GCell* create ( AnabaticEngine* );
|
static GCell* create ( AnabaticEngine* );
|
||||||
|
@ -266,6 +271,7 @@ namespace Anabatic {
|
||||||
GCell& operator= ( const GCell& );
|
GCell& operator= ( const GCell& );
|
||||||
private:
|
private:
|
||||||
static Name _extensionName;
|
static Name _extensionName;
|
||||||
|
static unsigned int _displayMode;
|
||||||
Observable _observable;
|
Observable _observable;
|
||||||
AnabaticEngine* _anabatic;
|
AnabaticEngine* _anabatic;
|
||||||
Flags _flags;
|
Flags _flags;
|
||||||
|
|
|
@ -25,6 +25,10 @@ parametersTable = \
|
||||||
, ("anabatic.edgeWidth" ,TypeInt ,4 )
|
, ("anabatic.edgeWidth" ,TypeInt ,4 )
|
||||||
, ("anabatic.edgeCostH" ,TypeDouble ,9.0 )
|
, ("anabatic.edgeCostH" ,TypeDouble ,9.0 )
|
||||||
, ("anabatic.edgeCostK" ,TypeDouble ,-10.0 )
|
, ("anabatic.edgeCostK" ,TypeDouble ,-10.0 )
|
||||||
|
, ("anabatic.gcell.displayMode" ,TypeEnumerate ,1
|
||||||
|
, { 'values':( ("Boundary" , 1)
|
||||||
|
, ("Density" , 2) ) }
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ stylesTable = \
|
||||||
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
||||||
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
||||||
, (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 })
|
, (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 })
|
||||||
, (Drawing, 'Anabatic::GCell', { 'color':'255,0,0' , 'pattern':'0000000000000000', 'threshold':0.80*scale, 'border':4 })
|
, (Drawing, 'Anabatic::GCell', { 'color':'255,0,0' , 'pattern':'0000000000000000', 'threshold':0.10*scale, 'border':4 })
|
||||||
)
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
@ -192,7 +192,7 @@ stylesTable = \
|
||||||
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
||||||
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
||||||
, (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4, 'threshold':0.02*scale })
|
, (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'Anabatic::GCell', { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4, 'threshold':0.80*scale })
|
, (Drawing, 'Anabatic::GCell', { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4, 'threshold':0.10*scale })
|
||||||
)
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
|
@ -8,6 +8,7 @@ layoutTable = \
|
||||||
, (TypeOption , "katabatic.saturateRp" , "Saturate RoutingPad" , 0, 1 )
|
, (TypeOption , "katabatic.saturateRp" , "Saturate RoutingPad" , 0, 1 )
|
||||||
, (TypeOption , "katabatic.globalLengthThreshold", "Global Length Threshold", 0, 1 )
|
, (TypeOption , "katabatic.globalLengthThreshold", "Global Length Threshold", 0, 1 )
|
||||||
, (TypeOption , "katabatic.topRoutingLayer" , "Top Routing Layer" , 0, 1 )
|
, (TypeOption , "katabatic.topRoutingLayer" , "Top Routing Layer" , 0, 1 )
|
||||||
|
, (TypeOption , "anabatic.gcell.displayMode" , "GCell Display Mode" , 1, 1 )
|
||||||
, (TypeRule ,)
|
, (TypeRule ,)
|
||||||
, (TypeTitle , "Kite - Detailed Router" )
|
, (TypeTitle , "Kite - Detailed Router" )
|
||||||
, (TypeOption , "kite.hTracksReservedLocal", "Vert. Locally Reserved Tracks", 0 )
|
, (TypeOption , "kite.hTracksReservedLocal", "Vert. Locally Reserved Tracks", 0 )
|
||||||
|
|
|
@ -172,10 +172,10 @@ namespace Katana {
|
||||||
dijkstra->run();
|
dijkstra->run();
|
||||||
++netCount;
|
++netCount;
|
||||||
}
|
}
|
||||||
cmess2 << left << setw(6) << netCount << right;
|
cmess2 << left << setw(6) << netCount;
|
||||||
|
|
||||||
const vector<Edge*>& ovEdges = getOvEdges();
|
const vector<Edge*>& ovEdges = getOvEdges();
|
||||||
cmess2 << " ovEdges:" << ovEdges.size();
|
cmess2 << " ovEdges:" << setw(4) << ovEdges.size();
|
||||||
|
|
||||||
for ( Edge* edge : ovEdges ) computeNextHCost( edge, edgeHInc );
|
for ( Edge* edge : ovEdges ) computeNextHCost( edge, edgeHInc );
|
||||||
|
|
||||||
|
@ -185,6 +185,7 @@ namespace Katana {
|
||||||
Edge* edge = ovEdges[iEdge];
|
Edge* edge = ovEdges[iEdge];
|
||||||
netCount += edge->ripup();
|
netCount += edge->ripup();
|
||||||
|
|
||||||
|
if (ovEdges.empty()) break;
|
||||||
if (ovEdges[iEdge] == edge) {
|
if (ovEdges[iEdge] == edge) {
|
||||||
cerr << Error( "AnabaticEngine::globalRoute(): Unable to ripup enough segments of edge:\n"
|
cerr << Error( "AnabaticEngine::globalRoute(): Unable to ripup enough segments of edge:\n"
|
||||||
" %s"
|
" %s"
|
||||||
|
@ -196,7 +197,7 @@ namespace Katana {
|
||||||
|
|
||||||
dijkstra->setSearchAreaHalo( Session::getSliceHeight()*3 );
|
dijkstra->setSearchAreaHalo( Session::getSliceHeight()*3 );
|
||||||
|
|
||||||
cmess2 << " ripup:" << netCount;
|
cmess2 << " ripup:" << setw(4) << netCount << right;
|
||||||
stopMeasures();
|
stopMeasures();
|
||||||
cmess2 << " " << setw(10) << Timer::getStringTime (getTimer().getCombTime())
|
cmess2 << " " << setw(10) << Timer::getStringTime (getTimer().getCombTime())
|
||||||
<< " " << setw( 6) << Timer::getStringMemory(getTimer().getIncrease()) << endl;
|
<< " " << setw( 6) << Timer::getStringMemory(getTimer().getIncrease()) << endl;
|
||||||
|
|
|
@ -66,6 +66,8 @@ namespace Katana {
|
||||||
void GraphicKatanaEngine::initGCell ( CellWidget* widget )
|
void GraphicKatanaEngine::initGCell ( CellWidget* widget )
|
||||||
{
|
{
|
||||||
widget->getDrawingPlanes().setPen( Qt::NoPen );
|
widget->getDrawingPlanes().setPen( Qt::NoPen );
|
||||||
|
KatanaEngine* katana = KatanaEngine::get( widget->getCell() );
|
||||||
|
if (katana) katana->setDensityMode( GCell::MaxDensity );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,13 +85,21 @@ namespace Katana {
|
||||||
Box bb = gcell->getBoundingBox();
|
Box bb = gcell->getBoundingBox();
|
||||||
QRect pixelBb = widget->dbuToScreenRect(bb);
|
QRect pixelBb = widget->dbuToScreenRect(bb);
|
||||||
|
|
||||||
|
if (gcell->isFlat()) return;
|
||||||
|
|
||||||
|
if (GCell::getDisplayMode() == GCell::Density) {
|
||||||
|
unsigned int density = (unsigned int)( 255.0 * gcell->getDensity() );
|
||||||
|
if (density > 255) density = 255;
|
||||||
|
|
||||||
|
painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) );
|
||||||
|
painter.drawRect( pixelBb );
|
||||||
|
} else {
|
||||||
|
if (pixelBb.width() > 150) {
|
||||||
painter.setPen ( pen );
|
painter.setPen ( pen );
|
||||||
painter.setBrush( Graphics::getBrush("Anabatic::GCell",widget->getDarkening()) );
|
painter.setBrush( Graphics::getBrush("Anabatic::GCell",widget->getDarkening()) );
|
||||||
painter.drawRect( pixelBb );
|
painter.drawRect( pixelBb );
|
||||||
|
|
||||||
if (gcell->isFlat()) return;
|
if (pixelBb.width() > 300) {
|
||||||
|
|
||||||
if (pixelBb.width() > 150) {
|
|
||||||
QString text = QString("id:%1").arg(gcell->getId());
|
QString text = QString("id:%1").arg(gcell->getId());
|
||||||
QFont font = Graphics::getFixedFont( QFont::Bold );
|
QFont font = Graphics::getFixedFont( QFont::Bold );
|
||||||
painter.setFont(font);
|
painter.setFont(font);
|
||||||
|
@ -107,6 +117,8 @@ namespace Katana {
|
||||||
painter.restore ();
|
painter.restore ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GraphicKatanaEngine::initEdge ( CellWidget* widget )
|
void GraphicKatanaEngine::initEdge ( CellWidget* widget )
|
||||||
|
@ -341,7 +353,7 @@ namespace Katana {
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.globalRoute"
|
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.globalRoute"
|
||||||
, "Katana - &Global Route"
|
, "Katana - &Global Route"
|
||||||
, "Run the <b>Knik</b> global router"
|
, "Run the <b>Katana</b> global router"
|
||||||
, std::bind(&GraphicKatanaEngine::_globalRoute,this)
|
, std::bind(&GraphicKatanaEngine::_globalRoute,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.detailedRoute"
|
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.detailedRoute"
|
||||||
|
|
|
@ -331,7 +331,7 @@ namespace Katana {
|
||||||
// size_t vTracksReservedLocal = getVTracksReservedLocal();
|
// size_t vTracksReservedLocal = getVTracksReservedLocal();
|
||||||
|
|
||||||
// if (cparanoid.enabled()) {
|
// if (cparanoid.enabled()) {
|
||||||
// cparanoid << " o Post-checking Knik capacity overload h:" << hTracksReservedLocal
|
// cparanoid << " o Post-checking Katana capacity overload h:" << hTracksReservedLocal
|
||||||
// << " v:." << vTracksReservedLocal << endl;
|
// << " v:." << vTracksReservedLocal << endl;
|
||||||
// getGCellGrid()->checkEdgeOverflow( hTracksReservedLocal, vTracksReservedLocal );
|
// getGCellGrid()->checkEdgeOverflow( hTracksReservedLocal, vTracksReservedLocal );
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -312,7 +312,7 @@ extern "C" {
|
||||||
, { "getToolSuccess" , (PyCFunction)PyKatanaEngine_getToolSuccess , METH_NOARGS
|
, { "getToolSuccess" , (PyCFunction)PyKatanaEngine_getToolSuccess , METH_NOARGS
|
||||||
, "Returns True if the detailed routing has been successful." }
|
, "Returns True if the detailed routing has been successful." }
|
||||||
, { "runGlobalRouter" , (PyCFunction)PyKatanaEngine_runGlobalRouter , METH_VARARGS
|
, { "runGlobalRouter" , (PyCFunction)PyKatanaEngine_runGlobalRouter , METH_VARARGS
|
||||||
, "Run the global router (Knik)." }
|
, "Run the global router (Katana)." }
|
||||||
, { "loadGlobalRouting" , (PyCFunction)PyKatanaEngine_loadGlobalRouting , METH_VARARGS
|
, { "loadGlobalRouting" , (PyCFunction)PyKatanaEngine_loadGlobalRouting , METH_VARARGS
|
||||||
, "Load global routing into the detailed router." }
|
, "Load global routing into the detailed router." }
|
||||||
, { "layerAssign" , (PyCFunction)PyKatanaEngine_layerAssign , METH_VARARGS
|
, { "layerAssign" , (PyCFunction)PyKatanaEngine_layerAssign , METH_VARARGS
|
||||||
|
|
Loading…
Reference in New Issue