More aggressive detection of supply pin in LefImport.
* Change: In LefImport::_pinCbk(), if a pin has "USE POWER" or "USE GROUND" make it a global signal (previously flagged only "!" appended to name). * Change: In LefImport::_pinStdPostProcess() do not try to find "on grid" components for supply nets, just make all their components externals.
This commit is contained in:
parent
d0f0cdc47d
commit
bf5d4e881d
|
@ -615,8 +615,6 @@ namespace {
|
||||||
Net* net = Net::create( parser->getCell(), pin->name() );
|
Net* net = Net::create( parser->getCell(), pin->name() );
|
||||||
net->setExternal( true );
|
net->setExternal( true );
|
||||||
|
|
||||||
if (pin->name()[ strlen(pin->name())-1 ] == '!') net->setGlobal( true );
|
|
||||||
|
|
||||||
if (pin->hasDirection()) {
|
if (pin->hasDirection()) {
|
||||||
string lefDir = pin->direction();
|
string lefDir = pin->direction();
|
||||||
boost::to_upper( lefDir );
|
boost::to_upper( lefDir );
|
||||||
|
@ -637,6 +635,8 @@ namespace {
|
||||||
if (lefUse == "POWER" ) net->setType( Net::Type::POWER );
|
if (lefUse == "POWER" ) net->setType( Net::Type::POWER );
|
||||||
if (lefUse == "GROUND") net->setType( Net::Type::GROUND );
|
if (lefUse == "GROUND") net->setType( Net::Type::GROUND );
|
||||||
}
|
}
|
||||||
|
if (net->isSupply()) net->setGlobal( true );
|
||||||
|
if (pin->name()[ strlen(pin->name())-1 ] == '!') net->setGlobal( true );
|
||||||
|
|
||||||
for ( int iport=0 ; iport < pin->numPorts() ; ++iport ) {
|
for ( int iport=0 ; iport < pin->numPorts() ; ++iport ) {
|
||||||
Layer* layer = NULL;
|
Layer* layer = NULL;
|
||||||
|
@ -727,27 +727,30 @@ namespace {
|
||||||
const RoutingLayerGauge* gaugeMetal2 = _routingGauge->getLayerGauge( 1 );
|
const RoutingLayerGauge* gaugeMetal2 = _routingGauge->getLayerGauge( 1 );
|
||||||
Box ab = _cell->getAbutmentBox();
|
Box ab = _cell->getAbutmentBox();
|
||||||
|
|
||||||
cerr << " @ _pinStdPostProcess" << endl;
|
//cerr << " @ _pinStdPostProcess" << endl;
|
||||||
|
|
||||||
for ( auto element : _pinComponents ) {
|
for ( auto element : _pinComponents ) {
|
||||||
string pinName = element.first;
|
string pinName = element.first;
|
||||||
vector<Component*>& components = element.second;
|
vector<Component*>& components = element.second;
|
||||||
vector<Segment*> ongrids;
|
vector<Segment*> ongrids;
|
||||||
|
bool isSupply = false;
|
||||||
|
|
||||||
for ( Component* component : components ) {
|
for ( Component* component : components ) {
|
||||||
|
if (component->getNet()->isSupply()) {
|
||||||
|
isSupply = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
Segment* segment = dynamic_cast<Segment*>( component );
|
Segment* segment = dynamic_cast<Segment*>( component );
|
||||||
if (segment) {
|
if (segment) {
|
||||||
if (component->getNet()->isSupply()) continue;
|
|
||||||
bool isWide = (segment->getWidth() >= getMinTerminalWidth());
|
bool isWide = (segment->getWidth() >= getMinTerminalWidth());
|
||||||
|
|
||||||
cerr << " > " << segment << endl;
|
// cerr << " > " << segment << endl;
|
||||||
if (not isVH())
|
// if (not isVH()) cerr << "X NOT isVH()" << endl;
|
||||||
cerr << "NOT isVH()" << endl;
|
// else cerr << "X isVH()" << endl;
|
||||||
else
|
|
||||||
cerr << "isVH()" << endl;
|
|
||||||
|
|
||||||
if (isVH() and (segment->getLayer()->getMask() == metal1->getMask())) {
|
if (isVH() and (segment->getLayer()->getMask() == metal1->getMask())) {
|
||||||
cerr << "isVH()" << endl;
|
// cerr << "isVH()" << endl;
|
||||||
Vertical* v = dynamic_cast<Vertical*>( segment );
|
Vertical* v = dynamic_cast<Vertical*>( segment );
|
||||||
if (v) {
|
if (v) {
|
||||||
DbU::Unit nearestX = gaugeMetal2->getTrackPosition( ab.getXMin()
|
DbU::Unit nearestX = gaugeMetal2->getTrackPosition( ab.getXMin()
|
||||||
|
@ -775,7 +778,7 @@ namespace {
|
||||||
, v->getDyTarget()
|
, v->getDyTarget()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
//cerr << " | " << ongrids[ongrids.size()-1] << endl;
|
cerr << " | " << ongrids[ongrids.size()-1] << endl;
|
||||||
} else {
|
} else {
|
||||||
// Unpitched and not wide enough to be under a metal2 track, ignore.
|
// Unpitched and not wide enough to be under a metal2 track, ignore.
|
||||||
}
|
}
|
||||||
|
@ -788,11 +791,11 @@ namespace {
|
||||||
if (isWide) ongrids.push_back( segment );
|
if (isWide) ongrids.push_back( segment );
|
||||||
}
|
}
|
||||||
Rectilinear* rectilinear = dynamic_cast<Rectilinear*>( component );
|
Rectilinear* rectilinear = dynamic_cast<Rectilinear*>( component );
|
||||||
if (not (rectilinear->getLayer()->getMask() == metal1->getMask()))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (rectilinear) {
|
if (rectilinear) {
|
||||||
cerr << " > " << rectilinear << endl;
|
cerr << " > " << rectilinear << endl;
|
||||||
|
if (rectilinear->getLayer()->getMask() != metal1->getMask())
|
||||||
|
continue;
|
||||||
|
|
||||||
vector<Box> boxes;
|
vector<Box> boxes;
|
||||||
rectilinear->getAsRectangles( boxes );
|
rectilinear->getAsRectangles( boxes );
|
||||||
|
|
||||||
|
@ -841,6 +844,7 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ongrids.empty()) {
|
if (ongrids.empty()) {
|
||||||
|
if (not isSupply)
|
||||||
cerr << Warning( "LefParser::_pinStdPostProcess(): Pin \"%s\" has no terminal ongrid."
|
cerr << Warning( "LefParser::_pinStdPostProcess(): Pin \"%s\" has no terminal ongrid."
|
||||||
, pinName.c_str() ) << endl;
|
, pinName.c_str() ) << endl;
|
||||||
for ( Component* component : components ) {
|
for ( Component* component : components ) {
|
||||||
|
@ -1008,7 +1012,7 @@ namespace {
|
||||||
if (parser->getCoreSiteY() != parser->getCellGauge()->getSliceHeight())
|
if (parser->getCoreSiteY() != parser->getCellGauge()->getSliceHeight())
|
||||||
cerr << Warning( "LefParser::parse(): CRL slice height discrepency %s while LEF is %s."
|
cerr << Warning( "LefParser::parse(): CRL slice height discrepency %s while LEF is %s."
|
||||||
, DbU::getValueString(parser->getCellGauge()->getSliceHeight()).c_str()
|
, DbU::getValueString(parser->getCellGauge()->getSliceHeight()).c_str()
|
||||||
, DbU::getValueString(parser->getCoreSiteX()).c_str() ) << endl;
|
, DbU::getValueString(parser->getCoreSiteY()).c_str() ) << endl;
|
||||||
|
|
||||||
if (parser->getCoreSiteX() != parser->getCellGauge()->getSliceStep())
|
if (parser->getCoreSiteX() != parser->getCellGauge()->getSliceStep())
|
||||||
cerr << Warning( "LefParser::parse(): CRL slice step discrepency %s while LEF is %s."
|
cerr << Warning( "LefParser::parse(): CRL slice step discrepency %s while LEF is %s."
|
||||||
|
|
Loading…
Reference in New Issue