Extend routing gauge to support non-routing layers at the bottom.
* New: In CRL::RoutingLayerGauge, two new types of gauge are supported: - Unusable : just do nothing with it, but the layer is stacked. - BottomPowersupply : can be used for supply routing only, and is *below* the normal routing layers (instead of on top as usual). Both new types must be *below* the real routing layers. * New: In CRL::RoutingGauge, add a new attribute "firstRoutingLayer" to give the index (depth) of the first layer usable for routing. (not Unusable and not BottomPowerSupply) * New: In Anabatic::Session & Anabatic::NetBuilder, in order to build the initial wiring, provides (Session) and use (NetBuilder) the new functions: - getBuildRoutingLayer(depth) - getBuildContactLayer(depth) Thoses functions takes into account (offset) the unusable layers so depth 0 is the first usable routing layer, and so on.
This commit is contained in:
parent
2501688dd1
commit
d2b40d568b
|
@ -514,6 +514,13 @@ namespace Anabatic {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (rpDepth >= Session::getRoutingGauge()->getFirstRoutingLayer())
|
||||
rpDepth -= Session::getRoutingGauge()->getFirstRoutingLayer();
|
||||
else
|
||||
cerr << Error( "Terminal layer \"%s\" of %s is below first usable routing layer."
|
||||
, getString(layer->getName()).c_str()
|
||||
, getString(anchor).c_str() )
|
||||
<< endl;
|
||||
if ((rpDepth > 0) and not isPin
|
||||
and not Session::getRoutingGauge()->isSuperPitched()) {
|
||||
_flags |= ToUpperRouting;
|
||||
|
@ -1297,11 +1304,12 @@ namespace Anabatic {
|
|||
vector<RoutingPad*> rpM1s;
|
||||
Component* rpM2 = NULL;
|
||||
|
||||
forEach ( RoutingPad*, irp, net->getRoutingPads() ) {
|
||||
if (Session::getRoutingGauge()->getLayerDepth(irp->getLayer()) == 1)
|
||||
rpM2 = *irp;
|
||||
for ( RoutingPad* rp : net->getRoutingPads() ) {
|
||||
if ( Session::getRoutingGauge()->getLayerDepth(rp->getLayer())
|
||||
== 1 + Session::getRoutingGauge()->getFirstRoutingLayer())
|
||||
rpM2 = rp;
|
||||
else
|
||||
rpM1s.push_back( *irp );
|
||||
rpM1s.push_back( rp );
|
||||
}
|
||||
|
||||
if ((rpM1s.size() < 2) and not rpM2) {
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace Anabatic {
|
|||
GCell* targetGCell = Session::getAnabatic()->getGCellUnder( targetPosition );
|
||||
|
||||
if (rpDepth == 0) {
|
||||
rpLayer = Session::getContactLayer(0);
|
||||
rpLayer = Session::getBuildContactLayer(0);
|
||||
direction = Flags::Horizontal;
|
||||
viaSide = Session::getViaWidth( rpDepth );
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ namespace Anabatic {
|
|||
if ( ((flags & VSmall) and not ((flags & UseNonPref))) or (flags & Punctual) ) {
|
||||
cdebug_log(145,0) << "case: VSmall and *not* UseNonPref" << endl;
|
||||
|
||||
AutoContact* subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, subContact1, Flags::Horizontal );
|
||||
rpSourceContact = subContact1;
|
||||
|
||||
|
@ -278,7 +278,7 @@ namespace Anabatic {
|
|||
if (flags & (VSmall|UseNonPref)) {
|
||||
cdebug_log(145,0) << "case: UseNonPref" << endl;
|
||||
|
||||
AutoContact* subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(rpDepth+1) );
|
||||
AutoContact* subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) );
|
||||
AutoSegment::create( rpSourceContact, subContact1, Flags::Vertical|useNonPref );
|
||||
rpSourceContact = subContact1;
|
||||
}
|
||||
|
@ -287,18 +287,18 @@ namespace Anabatic {
|
|||
cdebug_log(145,0) << "case: HSmall" << endl;
|
||||
|
||||
AutoContact* subContact1 = rpSourceContact;
|
||||
AutoContact* subContact2 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(rpDepth+1) );
|
||||
AutoContact* subContact2 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) );
|
||||
AutoSegment::create( subContact1, subContact2, Flags::Horizontal );
|
||||
rpSourceContact = subContact2;
|
||||
|
||||
if (flags & Punctual) {
|
||||
cdebug_log(145,0) << "case: HSmall + Punctual" << endl;
|
||||
subContact1 = subContact2;
|
||||
subContact2 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(rpDepth+1) );
|
||||
subContact2 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) );
|
||||
AutoSegment::create( subContact1, subContact2, Flags::Vertical, rpDepth+2 );
|
||||
|
||||
subContact1 = subContact2;
|
||||
subContact2 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(rpDepth+1) );
|
||||
subContact2 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) );
|
||||
AutoSegment::create( subContact1, subContact2, Flags::Horizontal, rpDepth+1 );
|
||||
|
||||
rpSourceContact = subContact2;
|
||||
|
@ -313,9 +313,9 @@ namespace Anabatic {
|
|||
cdebug_log(145,0) << "HAccess" << endl;
|
||||
if (flags & HAccessEW) {
|
||||
cdebug_log(145,0) << "HAccessEW" << endl;
|
||||
subContact1 = AutoContactHTee::create( gcell, rp->getNet(), Session::getContactLayer(rpDepth+1) );
|
||||
subContact1 = AutoContactHTee::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) );
|
||||
} else
|
||||
subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(rpDepth+1) );
|
||||
subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) );
|
||||
|
||||
AutoSegment::create( rpSourceContact, subContact1, Flags::Vertical, rpDepth+1 );
|
||||
} else {
|
||||
|
@ -329,14 +329,14 @@ namespace Anabatic {
|
|||
bool offGrid = (trackAxis != rp->getY());
|
||||
if (offGrid) {
|
||||
cdebug_log(145,0) << "Off grid, Misaligned M2 RoutingPad, add vertical strap" << endl;
|
||||
subContact1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
subContact1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, subContact1, Flags::Vertical );
|
||||
rpSourceContact = subContact1;
|
||||
}
|
||||
#endif
|
||||
if (Session::getRoutingGauge()->isSuperPitched()) {
|
||||
cdebug_log(145,0) << "Vertical access & super-pitched" << endl;
|
||||
subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getContactLayer(1) );
|
||||
subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, subContact1, Flags::Horizontal );
|
||||
} else {
|
||||
cdebug_log(145,0) << "Vertical access" << endl;
|
||||
|
@ -366,13 +366,13 @@ namespace Anabatic {
|
|||
Pin* pin = dynamic_cast<Pin*>( rp->getOccurrence().getEntity() );
|
||||
Pin::AccessDirection pinDir = pin->getAccessDirection();
|
||||
if (pinDir == Pin::AccessDirection::NORTH) {
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getRoutingLayer(1) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildRoutingLayer(1) );
|
||||
AutoSegment* segment = AutoSegment::create( rpSourceContact, turn, Flags::Vertical );
|
||||
segment->setAxis( rp->getX(), Flags::Force );
|
||||
segment->setFlags( AutoSegment::SegFixed|AutoSegment::SegFixedAxis );
|
||||
rpSourceContact = turn;
|
||||
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildContactLayer(1) );
|
||||
segment = AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
rpSourceContact = turn;
|
||||
|
||||
|
@ -405,12 +405,12 @@ namespace Anabatic {
|
|||
|
||||
doRp_AutoContacts( gcell, rp, rpSourceContact, rpContactTarget, NoProtect );
|
||||
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildContactLayer(1) );
|
||||
segment = AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
segment->setAxis( pin->getCenter().getY(), Flags::Force );
|
||||
|
||||
rpSourceContact = turn;
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildContactLayer(1) );
|
||||
segment = AutoSegment::create( rpSourceContact, turn, Flags::Vertical );
|
||||
|
||||
DbU::Unit axis = 0;
|
||||
|
@ -481,7 +481,7 @@ namespace Anabatic {
|
|||
|
||||
if (north() or south()) {
|
||||
AutoContact* turn = globalContact;
|
||||
globalContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
globalContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( globalContact, turn, Flags::Horizontal );
|
||||
}
|
||||
|
||||
|
@ -504,7 +504,7 @@ namespace Anabatic {
|
|||
vDepth += 2;
|
||||
cDepth += 2;
|
||||
}
|
||||
const Layer* viaLayer = Session::getContactLayer( cDepth );
|
||||
const Layer* viaLayer = Session::getBuildContactLayer( cDepth );
|
||||
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
setBothCornerContacts( AutoContactTurn::create( getGCell(), getNet(), viaLayer ) );
|
||||
|
@ -546,7 +546,7 @@ namespace Anabatic {
|
|||
vDepth += 2;
|
||||
cDepth += 2;
|
||||
}
|
||||
const Layer* viaLayer = Session::getContactLayer( cDepth );
|
||||
const Layer* viaLayer = Session::getBuildContactLayer( cDepth );
|
||||
|
||||
if (east() and west()) {
|
||||
setSouthWestContact( AutoContactTurn::create( getGCell(), getNet(), viaLayer ) );
|
||||
|
@ -602,7 +602,7 @@ namespace Anabatic {
|
|||
|
||||
// source = AutoContactTerminal::create ( gcell
|
||||
// , getRoutingPads()[0]
|
||||
// , Session::getContactLayer(3)
|
||||
// , Session::getBuildContactLayer(3)
|
||||
// , position
|
||||
// , Session::getViaWidth(3), Session::getViaWidth(3)
|
||||
// );
|
||||
|
@ -618,16 +618,16 @@ namespace Anabatic {
|
|||
if (getConnexity().fields.globals == 1) {
|
||||
if ( (westPad and (east() != NULL))
|
||||
or (eastPad and (west() != NULL)) ) {
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
setBothCornerContacts( AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) ) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
setBothCornerContacts( AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) ) );
|
||||
AutoSegment::create( source, turn, Flags::Horizontal );
|
||||
AutoSegment::create( turn, getNorthEastContact(), Flags::Vertical );
|
||||
cdebug_tabw(145,-1);
|
||||
return true;
|
||||
} else if ( (southPad and (north() != NULL))
|
||||
or (northPad and (south() != NULL)) ) {
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
setBothCornerContacts( AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) ) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
setBothCornerContacts( AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) ) );
|
||||
AutoSegment::create( source, turn, Flags::Vertical );
|
||||
AutoSegment::create( turn, getNorthEastContact(), Flags::Horizontal );
|
||||
cdebug_tabw(145,-1);
|
||||
|
@ -677,11 +677,11 @@ namespace Anabatic {
|
|||
|
||||
doRp_AutoContacts( getGCell(), getRoutingPads()[0], rpSourceContact, rpContactTarget, NoFlags );
|
||||
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Horizontal );
|
||||
|
||||
if (east() or west()) {
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, turn2, Flags::Vertical );
|
||||
turn1 = turn2;
|
||||
}
|
||||
|
@ -706,11 +706,11 @@ namespace Anabatic {
|
|||
Pin::AccessDirection pinDir = pin->getAccessDirection();
|
||||
if ( (pinDir == Pin::AccessDirection::NORTH)
|
||||
or (pinDir == Pin::AccessDirection::SOUTH) ) {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getRoutingLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildRoutingLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn, Flags::Vertical|Flags::UseNonPref );
|
||||
rpSourceContact = turn;
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment* horizontal = AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
rpSourceContact = turn;
|
||||
|
||||
|
@ -723,25 +723,25 @@ namespace Anabatic {
|
|||
horizontal->setFlags( AutoSegment::SegFixed|AutoSegment::SegFixedAxis );
|
||||
cdebug_log(145,0) << horizontal << endl;
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getRoutingLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildRoutingLayer(1) );
|
||||
AutoSegment* vertical = AutoSegment::create( rpSourceContact, turn, Flags::Vertical );
|
||||
rpSourceContact = turn;
|
||||
vertical->setAxis( pin->getX(), Flags::Force );
|
||||
vertical->setFlags( AutoSegment::SegFixed|AutoSegment::SegFixedAxis );
|
||||
cdebug_log(145,0) << vertical << endl;
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
horizontal = AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
horizontal->setAxis( axis, Flags::Force );
|
||||
rpSourceContact = turn;
|
||||
} else {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
rpSourceContact = turn;
|
||||
}
|
||||
|
||||
if (east() or west()) {
|
||||
rpSourceContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
rpSourceContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment* vertical = AutoSegment::create( turn, rpSourceContact, Flags::Vertical );
|
||||
|
||||
DbU::Unit axis = getGCell()->getXMax() - Session::getDVerticalPitch();
|
||||
|
@ -776,11 +776,11 @@ namespace Anabatic {
|
|||
Pin::AccessDirection pinDir = pin->getAccessDirection();
|
||||
if ( (pinDir == Pin::AccessDirection::NORTH)
|
||||
or (pinDir == Pin::AccessDirection::SOUTH) ) {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getRoutingLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildRoutingLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn, Flags::Vertical|Flags::UseNonPref );
|
||||
rpSourceContact = turn;
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment* horizontal = AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
rpSourceContact = turn;
|
||||
|
||||
|
@ -790,12 +790,12 @@ namespace Anabatic {
|
|||
horizontal->setAxis( axis, Flags::Force );
|
||||
horizontal->setFlags( AutoSegment::SegFixed );
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getRoutingLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildRoutingLayer(1) );
|
||||
AutoSegment* vertical = AutoSegment::create( rpSourceContact, turn, Flags::Vertical );
|
||||
rpSourceContact = turn;
|
||||
vertical->setFlags( AutoSegment::SegFixed );
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
horizontal = AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
horizontal->setAxis( axis, Flags::Force );
|
||||
rpSourceContact = turn;
|
||||
|
@ -804,21 +804,21 @@ namespace Anabatic {
|
|||
|
||||
if (east() and west()) {
|
||||
// Pin must be North or South.
|
||||
tee = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
tee = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, tee, Flags::Vertical );
|
||||
} else if (north() and south()) {
|
||||
// Pin must be East or West.
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, tee, Flags::Horizontal );
|
||||
} else {
|
||||
if ( (pinDir == Pin::AccessDirection::EAST)
|
||||
or (pinDir == Pin::AccessDirection::WEST) ) {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
rpSourceContact = turn;
|
||||
}
|
||||
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment* vertical = AutoSegment::create( rpSourceContact, tee, Flags::Vertical );
|
||||
|
||||
if ( (pinDir == Pin::AccessDirection::EAST)
|
||||
|
@ -854,11 +854,11 @@ namespace Anabatic {
|
|||
Pin::AccessDirection pinDir = pin->getAccessDirection();
|
||||
if ( (pinDir == Pin::AccessDirection::EAST)
|
||||
or (pinDir == Pin::AccessDirection::WEST) ) {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn, Flags::Horizontal );
|
||||
rpSourceContact = turn;
|
||||
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment* vertical = AutoSegment::create( rpSourceContact, turn, Flags::Vertical );
|
||||
rpSourceContact = turn;
|
||||
|
||||
|
@ -881,51 +881,51 @@ namespace Anabatic {
|
|||
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
if (west() and south()) {
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Horizontal );
|
||||
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, vtee1, Flags::Vertical );
|
||||
|
||||
setBothCornerContacts( vtee1 );
|
||||
} else if (west() and north()) {
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, vtee1, Flags::Horizontal );
|
||||
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( vtee1, turn1, Flags::Vertical );
|
||||
|
||||
setSouthWestContact( turn1 );
|
||||
setNorthEastContact( vtee1 );
|
||||
} else if (south() and north()) {
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, vtee1, Flags::Horizontal );
|
||||
|
||||
setBothCornerContacts( vtee1 );
|
||||
} else if (east() and north()) {
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, htee1, Flags::Horizontal );
|
||||
|
||||
setBothCornerContacts( htee1 );
|
||||
} else if (east() and south()) {
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, htee1, Flags::Horizontal );
|
||||
|
||||
setBothCornerContacts( htee1 );
|
||||
} else if (east() and west()) {
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Horizontal );
|
||||
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, htee1, Flags::Vertical );
|
||||
|
||||
setBothCornerContacts( htee1 );
|
||||
}
|
||||
} else {
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, htee1, Flags::Horizontal );
|
||||
|
||||
AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( htee1, htee2, Flags::Horizontal );
|
||||
|
||||
if (pinDir == Pin::AccessDirection::EAST)
|
||||
|
@ -948,11 +948,11 @@ namespace Anabatic {
|
|||
|
||||
rpSourceContact = doRp_AccessNorthSouthPin( getGCell(), getRoutingPads()[0] );
|
||||
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Vertical );
|
||||
|
||||
if (north() or south()) {
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, turn2, Flags::Horizontal );
|
||||
turn1 = turn2;
|
||||
}
|
||||
|
@ -974,60 +974,60 @@ namespace Anabatic {
|
|||
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
if (west() and south()) {
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Vertical );
|
||||
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, htee1, Flags::Horizontal );
|
||||
|
||||
setBothCornerContacts( htee1 );
|
||||
} else if (west() and north()) {
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, htee1, Flags::Vertical );
|
||||
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, htee1, Flags::Horizontal );
|
||||
|
||||
setSouthWestContact( htee1 );
|
||||
setNorthEastContact( turn1 );
|
||||
} else if (east() and north()) {
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, vtee1, Flags::Vertical );
|
||||
|
||||
setBothCornerContacts( vtee1 );
|
||||
} else if (east() and south()) {
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, htee1, Flags::Vertical );
|
||||
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( htee1, turn1, Flags::Horizontal );
|
||||
|
||||
setSouthWestContact( turn1 );
|
||||
setNorthEastContact( htee1 );
|
||||
} else if (north() and south()) {
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Vertical );
|
||||
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn1, vtee1, Flags::Horizontal );
|
||||
|
||||
setBothCornerContacts( vtee1 );
|
||||
} else { // Remaining case is East & West.
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, htee1, Flags::Vertical );
|
||||
|
||||
setBothCornerContacts( htee1 );
|
||||
}
|
||||
} else {
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn1, Flags::Vertical );
|
||||
AutoSegment::create( turn1, turn2, Flags::Horizontal );
|
||||
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( turn2, vtee1, Flags::Vertical );
|
||||
|
||||
AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( vtee1, vtee2, Flags::Vertical );
|
||||
|
||||
setSouthWestContact( vtee1 );
|
||||
|
@ -1065,11 +1065,11 @@ namespace Anabatic {
|
|||
|
||||
AutoContact* m1contact = doRp_Access( getGCell(), rpsM1.back(), HAccess );
|
||||
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( m1contact , vtee1, Flags::Horizontal );
|
||||
AutoSegment::create( pinContact, vtee1, Flags::Vertical );
|
||||
|
||||
AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( vtee1, vtee2, Flags::Vertical );
|
||||
|
||||
setBothCornerContacts( vtee2 );
|
||||
|
@ -1105,13 +1105,13 @@ namespace Anabatic {
|
|||
|
||||
AutoContact* m1contact = doRp_Access( getGCell(), rpsM1.back(), HAccess );
|
||||
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( m1contact , vtee1, Flags::Horizontal );
|
||||
|
||||
AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( vtee1, vtee2, Flags::Vertical );
|
||||
|
||||
AutoContact* vtee3 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee3 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( vtee2, vtee3, Flags::Vertical );
|
||||
|
||||
if (not south() or not north()) {
|
||||
|
@ -1168,8 +1168,8 @@ namespace Anabatic {
|
|||
rpM1Contact = doRp_Access( getGCell(), rpsM1[0], (north() or south()) ? HAccess : NoFlags );
|
||||
|
||||
if (north() or south()) {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
|
||||
AutoSegment::create( rpM1Contact , tee , Flags::Horizontal );
|
||||
AutoSegment::create( pinM2Contact, turn, Flags::Horizontal );
|
||||
|
@ -1177,8 +1177,8 @@ namespace Anabatic {
|
|||
|
||||
setBothCornerContacts( tee );
|
||||
} else {
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
|
||||
AutoSegment::create( rpM1Contact , tee , Flags::Vertical );
|
||||
AutoSegment::create( pinM2Contact, tee , Flags::Horizontal );
|
||||
|
@ -1212,8 +1212,8 @@ namespace Anabatic {
|
|||
|
||||
if (north() and south()) {
|
||||
cdebug_log(145,0) << "Case north & south." << endl;
|
||||
AutoContact* htee = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoContact* vtee = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
|
||||
AutoSegment::create( pinM2Contact, htee, Flags::Horizontal );
|
||||
AutoSegment::create( rpM1Contact , htee, Flags::Vertical );
|
||||
|
@ -1221,9 +1221,9 @@ namespace Anabatic {
|
|||
setBothCornerContacts( vtee );
|
||||
} else if (east() and west()) {
|
||||
cdebug_log(145,0) << "Case east & west." << endl;
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee1 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
|
||||
AutoSegment::create( pinM2Contact, htee1, Flags::Horizontal );
|
||||
AutoSegment::create( rpM1Contact , htee1, Flags::Vertical );
|
||||
|
@ -1232,9 +1232,9 @@ namespace Anabatic {
|
|||
setBothCornerContacts( htee2 );
|
||||
} else {
|
||||
cdebug_log(145,0) << "Case bend." << endl;
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
|
||||
AutoSegment::create( pinM2Contact, vtee1, Flags::Horizontal );
|
||||
AutoSegment::create( rpM1Contact , vtee1, Flags::Vertical );
|
||||
|
@ -1266,13 +1266,13 @@ namespace Anabatic {
|
|||
if (dynamic_cast<Pin*>(rpM1->getOccurrence().getEntity())) std::swap( rpM1, pinM3 );
|
||||
|
||||
AutoContact* contact1 = doRp_Access( getGCell(), rpM1, HAccess );
|
||||
AutoContact* htee = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* htee = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( contact1, htee, Flags::Horizontal );
|
||||
|
||||
rpSourceContact = doRp_AccessNorthSouthPin( getGCell(), pinM3 );
|
||||
|
||||
if (north() or south()) {
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(1) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( rpSourceContact, turn, Flags::Vertical );
|
||||
AutoSegment::create( turn , htee, Flags::Horizontal );
|
||||
} else {
|
||||
|
@ -1304,7 +1304,7 @@ namespace Anabatic {
|
|||
cdebug_log(145,0) << "east: " << east () << endl;
|
||||
cdebug_log(145,0) << "west: " << west () << endl;
|
||||
|
||||
const Layer* viaLayer1 = Session::getContactLayer(1);
|
||||
const Layer* viaLayer1 = Session::getBuildContactLayer(1);
|
||||
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
if (north() and south()) {
|
||||
|
@ -1390,7 +1390,7 @@ namespace Anabatic {
|
|||
|
||||
Component* rpL1;
|
||||
Component* rpL2;
|
||||
if (getRoutingPads()[0]->getLayer() == Session::getRoutingLayer(0)) {
|
||||
if (getRoutingPads()[0]->getLayer() == Session::getBuildRoutingLayer(0)) {
|
||||
rpL1 = getRoutingPads()[0];
|
||||
rpL2 = getRoutingPads()[1];
|
||||
} else {
|
||||
|
@ -1408,8 +1408,8 @@ namespace Anabatic {
|
|||
doRp_AutoContacts( getGCell(), rpL1, rpL1ContactSource, rpL1ContactTarget, NoFlags );
|
||||
doRp_AutoContacts( getGCell(), rpL2, rpL2ContactSource, rpL2ContactTarget, NoFlags );
|
||||
|
||||
const Layer* viaLayer1 = Session::getContactLayer(1);
|
||||
const Layer* viaLayer2 = Session::getContactLayer(2);
|
||||
const Layer* viaLayer1 = Session::getBuildContactLayer(1);
|
||||
const Layer* viaLayer2 = Session::getBuildContactLayer(2);
|
||||
|
||||
AutoContact* subContact = AutoContactTurn::create( getGCell(), getNet(), viaLayer1 );
|
||||
AutoSegment::create( rpL1ContactSource, subContact, Flags::Horizontal );
|
||||
|
@ -1463,7 +1463,7 @@ namespace Anabatic {
|
|||
cdebug_log(145,0) << "west: " << west() << endl;
|
||||
|
||||
Component* rpM3 = NULL;
|
||||
if (getRoutingPads()[0]->getLayer() == Session::getRoutingLayer(2))
|
||||
if (getRoutingPads()[0]->getLayer() == Session::getBuildRoutingLayer(2))
|
||||
rpM3 = getRoutingPads()[0];
|
||||
|
||||
sortRpByX( getRoutingPads(), NoFlags ); // increasing X.
|
||||
|
@ -1472,11 +1472,11 @@ namespace Anabatic {
|
|||
AutoContact* rightContact = doRp_Access( getGCell(), getRoutingPads()[i ], HAccess );
|
||||
AutoSegment::create( leftContact, rightContact, Flags::Horizontal );
|
||||
|
||||
if (not rpM3 and (getRoutingPads()[i]->getLayer() == Session::getRoutingLayer(2)))
|
||||
if (not rpM3 and (getRoutingPads()[i]->getLayer() == Session::getBuildRoutingLayer(2)))
|
||||
rpM3 = getRoutingPads()[i];
|
||||
}
|
||||
|
||||
const Layer* viaLayer1 = Session::getContactLayer(1);
|
||||
const Layer* viaLayer1 = Session::getBuildContactLayer(1);
|
||||
AutoContact* subContact1 = NULL;
|
||||
|
||||
if (rpM3) {
|
||||
|
@ -1592,7 +1592,7 @@ namespace Anabatic {
|
|||
|
||||
doRp_AutoContacts( getGCell(), rpL2, rpL2ContactSource, rpL2ContactTarget, DoSourceContact|DoTargetContact );
|
||||
|
||||
const Layer* viaLayer2 = Session::getContactLayer(2);
|
||||
const Layer* viaLayer2 = Session::getBuildContactLayer(2);
|
||||
|
||||
setSouthWestContact( AutoContactHTee::create( getGCell(), getNet(), viaLayer2 ) );
|
||||
setNorthEastContact( AutoContactHTee::create( getGCell(), getNet(), viaLayer2 ) );
|
||||
|
@ -1618,7 +1618,7 @@ namespace Anabatic {
|
|||
biggestRp = getRoutingPads()[i];
|
||||
}
|
||||
|
||||
const Layer* viaLayer1 = Session::getContactLayer(1);
|
||||
const Layer* viaLayer1 = Session::getBuildContactLayer(1);
|
||||
|
||||
if (east() and west() and not south() and not north()) {
|
||||
AutoContact* rpContact = doRp_Access( getGCell(), biggestRp, HBothAccess );
|
||||
|
@ -1676,13 +1676,13 @@ namespace Anabatic {
|
|||
cdebug_log(145,0) << "_northEast: " << getNorthEastContact() << endl;
|
||||
|
||||
if (not (east() or west())) {
|
||||
AutoContact* subContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer((rpDepth)) );
|
||||
AutoContact* subContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer((rpDepth)) );
|
||||
AutoSegment::create( getSouthWestContact(), subContact, Flags::Horizontal, rpDepth+1 );
|
||||
setBothCornerContacts( subContact );
|
||||
}
|
||||
|
||||
#if THIS_IS_DISABLED
|
||||
const Layer* viaLayer1 = Session::getContactLayer(1);
|
||||
const Layer* viaLayer1 = Session::getBuildContactLayer(1);
|
||||
|
||||
Box cellAb = getAnabatic()->getCell()->getAbutmentBox();
|
||||
RoutingLayerGauge* lgM3 = Session::getLayerGauge( 2 );
|
||||
|
@ -1738,9 +1738,9 @@ namespace Anabatic {
|
|||
size_t rpDepth = Session::getLayerDepth( getRoutingPads()[0]->getLayer() );
|
||||
size_t vDepth = rpDepth + 2;
|
||||
size_t hDepth = rpDepth + 1;
|
||||
const Layer* viaLayer = Session::getContactLayer( rpDepth );
|
||||
const Layer* viaLayer = Session::getBuildContactLayer( rpDepth );
|
||||
if (Session::getRoutingGauge()->isSuperPitched()) {
|
||||
viaLayer = Session::getContactLayer( 1 );
|
||||
viaLayer = Session::getBuildContactLayer( 1 );
|
||||
vDepth = 2;
|
||||
hDepth = 1;
|
||||
}
|
||||
|
@ -1832,7 +1832,7 @@ namespace Anabatic {
|
|||
|
||||
if ((int)getConnexity().fields.M3 != 1) return false;
|
||||
|
||||
const Layer* viaLayer2 = Session::getContactLayer(rpDepth);
|
||||
const Layer* viaLayer2 = Session::getBuildContactLayer(rpDepth);
|
||||
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
if (north() and south()) {
|
||||
|
@ -1915,7 +1915,7 @@ namespace Anabatic {
|
|||
size_t gdepth = Session::getGHorizontalDepth();
|
||||
if (dynamic_cast<Vertical*>(baseSegment))
|
||||
gdepth = Session::getGVerticalDepth();
|
||||
baseSegment->setLayer( Session::getRoutingLayer( gdepth+2 ));
|
||||
baseSegment->setLayer( Session::getBuildRoutingLayer( gdepth+2 ));
|
||||
baseSegment->setWidth( Session::getWireWidth( gdepth+2 ));
|
||||
}
|
||||
|
||||
|
@ -1964,7 +1964,8 @@ namespace Anabatic {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (Session::getRoutingGauge()->getLayerDepth(rp->getLayer()) == 1)
|
||||
if ( Session::getRoutingGauge()->getLayerDepth(rp->getLayer())
|
||||
== 1 + Session::getRoutingGauge()->getFirstRoutingLayer())
|
||||
rpM2 = rp;
|
||||
else
|
||||
rpM1s.push_back( rp );
|
||||
|
@ -2047,7 +2048,7 @@ namespace Anabatic {
|
|||
if (rpM2) {
|
||||
doRp_AutoContacts( gcell1, rpM1s[0], source, turn1, DoSourceContact );
|
||||
doRp_AutoContacts( gcell1, rpM2 , target, turn1, DoSourceContact );
|
||||
turn1 = AutoContactTurn::create( gcell1, rpM2->getNet(), Session::getContactLayer(1) );
|
||||
turn1 = AutoContactTurn::create( gcell1, rpM2->getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( source, turn1 , Flags::Horizontal );
|
||||
AutoSegment::create( turn1 , target, Flags::Vertical );
|
||||
}
|
||||
|
@ -2060,7 +2061,7 @@ namespace Anabatic {
|
|||
or (pinDir == Pin::AccessDirection::SOUTH) ) {
|
||||
doRp_AutoContacts( gcell1, rpM1s[0], source, turn1, DoSourceContact );
|
||||
target = doRp_AccessNorthSouthPin( gcell1, rpPin );
|
||||
turn1 = AutoContactTurn::create( gcell1, rpPin->getNet(), Session::getContactLayer(1) );
|
||||
turn1 = AutoContactTurn::create( gcell1, rpPin->getNet(), Session::getBuildContactLayer(1) );
|
||||
AutoSegment::create( source, turn1 , Flags::Horizontal );
|
||||
AutoSegment::create( turn1 , target, Flags::Vertical );
|
||||
} else {
|
||||
|
|
|
@ -107,13 +107,13 @@ namespace Anabatic {
|
|||
Pin* pin = dynamic_cast<Pin*>( rp->getOccurrence().getEntity() );
|
||||
Pin::AccessDirection pinDir = pin->getAccessDirection();
|
||||
if (pinDir == Pin::AccessDirection::NORTH) {
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getRoutingLayer(0) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildRoutingLayer(0) );
|
||||
AutoSegment* segment = AutoSegment::create( rpContact, turn, Flags::Vertical );
|
||||
segment->setAxis( rp->getX(), Flags::Force );
|
||||
segment->setFlags( AutoSegment::SegFixed|AutoSegment::SegFixedAxis );
|
||||
rpContact = turn;
|
||||
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getContactLayer(0) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildContactLayer(0) );
|
||||
segment = AutoSegment::create( rpContact, turn, Flags::Horizontal );
|
||||
rpContact = turn;
|
||||
|
||||
|
@ -143,12 +143,12 @@ namespace Anabatic {
|
|||
AutoContact* turn = NULL;
|
||||
AutoSegment* segment = NULL;
|
||||
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getContactLayer(0) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildContactLayer(0) );
|
||||
segment = AutoSegment::create( rpContact, turn, Flags::Horizontal );
|
||||
segment->setAxis( pin->getCenter().getY(), Flags::Force );
|
||||
|
||||
rpContact = turn;
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getContactLayer(0) );
|
||||
turn = AutoContactTurn::create( gcell, net, Session::getBuildContactLayer(0) );
|
||||
segment = AutoSegment::create( rpContact, turn, Flags::Vertical );
|
||||
|
||||
DbU::Unit axis = 0;
|
||||
|
@ -171,11 +171,11 @@ namespace Anabatic {
|
|||
if (west() or south()) {
|
||||
AutoContact* termContact = doRp_Access( getGCell(), rp, NoFlags );
|
||||
if (west() and south()) {
|
||||
swContact = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
swContact = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( termContact, swContact, Flags::Vertical );
|
||||
} else {
|
||||
if (west()) {
|
||||
swContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
swContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( termContact, swContact, Flags::Vertical );
|
||||
} else
|
||||
swContact = termContact;
|
||||
|
@ -187,11 +187,11 @@ namespace Anabatic {
|
|||
if (east() or north()) {
|
||||
AutoContact* termContact = doRp_Access( getGCell(), rp, NoFlags );
|
||||
if (east() and north()) {
|
||||
neContact = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
neContact = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( termContact, neContact, Flags::Vertical );
|
||||
} else {
|
||||
if (east()) {
|
||||
neContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
neContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( termContact, neContact, Flags::Vertical );
|
||||
} else
|
||||
neContact = termContact;
|
||||
|
@ -240,12 +240,12 @@ namespace Anabatic {
|
|||
if (i == 0) {
|
||||
if (west() or south()) {
|
||||
AutoContact* swContact = nullptr;
|
||||
currContact = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
currContact = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
if (west() and south()) {
|
||||
swContact = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
swContact = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
} else {
|
||||
if (west())
|
||||
swContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
swContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
else
|
||||
swContact = currContact;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ namespace Anabatic {
|
|||
AutoSegment::create( currContact, swContact, Flags::Vertical );
|
||||
setSouthWestContact( swContact );
|
||||
} else {
|
||||
currContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
currContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
}
|
||||
AutoSegment::create( currTerm, currContact, Flags::Vertical );
|
||||
continue;
|
||||
|
@ -262,12 +262,12 @@ namespace Anabatic {
|
|||
if (i+1 == rps.size()) {
|
||||
if (east() or north()) {
|
||||
AutoContact* neContact = nullptr;
|
||||
currContact = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
currContact = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
if (east() and north()) {
|
||||
neContact = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
neContact = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
} else {
|
||||
if (east())
|
||||
neContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
neContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
else
|
||||
neContact = currContact;
|
||||
}
|
||||
|
@ -275,10 +275,10 @@ namespace Anabatic {
|
|||
AutoSegment::create( currContact, neContact, Flags::Vertical );
|
||||
setNorthEastContact( neContact );
|
||||
} else {
|
||||
currContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
currContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
}
|
||||
} else {
|
||||
currContact = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
currContact = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
}
|
||||
AutoSegment::create( currTerm , currContact, Flags::Vertical );
|
||||
AutoSegment::create( prevContact, currContact, Flags::Horizontal );
|
||||
|
@ -319,7 +319,7 @@ namespace Anabatic {
|
|||
{
|
||||
cdebug_log(145,1) << getTypeName() << "::_do_xG()" << endl;
|
||||
|
||||
const Layer* viaLayer = Session::getContactLayer( 0 );
|
||||
const Layer* viaLayer = Session::getBuildContactLayer( 0 );
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
setBothCornerContacts( AutoContactTurn::create( getGCell(), getNet(), viaLayer ) );
|
||||
} else if (getConnexity().fields.globals == 3) {
|
||||
|
@ -355,11 +355,11 @@ namespace Anabatic {
|
|||
|
||||
AutoContact* rpContact = doRp_AccessNorthSouthPin( getGCell(), getRoutingPads()[0] );
|
||||
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( rpContact, turn1, Flags::Vertical );
|
||||
|
||||
if (north() or south()) {
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( turn1, turn2, Flags::Horizontal );
|
||||
turn1 = turn2;
|
||||
}
|
||||
|
@ -378,9 +378,9 @@ namespace Anabatic {
|
|||
AutoContact* tee = nullptr;
|
||||
|
||||
if (east() and west()) {
|
||||
tee = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
tee = AutoContactHTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
} else {
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
tee = AutoContactVTee::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
}
|
||||
AutoSegment::create( rpContact, tee, Flags::Vertical );
|
||||
setBothCornerContacts( tee );
|
||||
|
@ -409,8 +409,8 @@ namespace Anabatic {
|
|||
|
||||
AutoContact* rpContact = doRp_AccessNorthSouthPin( getGCell(), rpM2 );
|
||||
AutoContact* rpM1Contact = doRp_Access( getGCell(), rpsM1.front(), NoFlags );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( rpM1Contact, turn1, Flags::Vertical );
|
||||
AutoSegment::create( rpContact , turn2, Flags::Vertical );
|
||||
AutoSegment::create( turn1 , turn2, Flags::Horizontal );
|
||||
|
@ -425,11 +425,11 @@ namespace Anabatic {
|
|||
cdebug_log(145,1) << getTypeName() << "::doRp_1G_1PinM2() [Managed Configuration - Optimized] " << getTopology() << endl;
|
||||
|
||||
AutoContact* rpContact = doRp_AccessEastWestPin( getGCell(), rp );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn1 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( rpContact, turn1, Flags::Horizontal );
|
||||
|
||||
if (east() or west()) {
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn2 = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( turn1, turn2, Flags::Vertical );
|
||||
turn1 = turn2;
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ namespace Anabatic {
|
|||
AutoContact* neContact = nullptr;
|
||||
AutoContact* swContact = nullptr;
|
||||
|
||||
const Layer* viaLayer = Session::getContactLayer( 0 );
|
||||
const Layer* viaLayer = Session::getBuildContactLayer( 0 );
|
||||
if (getConnexity().fields.globals == 2) {
|
||||
if (north() and south())
|
||||
neContact = AutoContactVTee::create( getGCell(), getNet(), viaLayer );
|
||||
|
@ -510,7 +510,7 @@ namespace Anabatic {
|
|||
rpM1Contact = doRp_Access( getGCell(), rpsM1.back(), NoFlags );
|
||||
else
|
||||
rpM1Contact = doRp_Access( getGCell(), rpsM1.front(), NoFlags );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( rpM1Contact, turn, Flags::Vertical );
|
||||
AutoSegment::create( rpContact , turn, Flags::Horizontal );
|
||||
|
||||
|
@ -543,9 +543,9 @@ namespace Anabatic {
|
|||
|
||||
AutoContact* sourceContact = getSourceContact();
|
||||
if (segmentBound & (NorthBound|SouthBound)) {
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
AutoContact* turn = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( sourceContact, turn, Flags::Vertical );
|
||||
sourceContact = AutoContactTurn::create( getGCell(), getNet(), Session::getContactLayer(0) );
|
||||
sourceContact = AutoContactTurn::create( getGCell(), getNet(), Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( sourceContact, turn, Flags::Horizontal );
|
||||
}
|
||||
Segment* baseSegment = static_cast<Segment*>( getFromHook()->getComponent() );
|
||||
|
@ -618,15 +618,15 @@ namespace Anabatic {
|
|||
AutoContact* currTerm = doRp_Access( gcell1, rps[i], NoFlags );
|
||||
|
||||
if (i == 0) {
|
||||
currContact = AutoContactTurn::create( gcell1, net, Session::getContactLayer(0) );
|
||||
currContact = AutoContactTurn::create( gcell1, net, Session::getBuildContactLayer(0) );
|
||||
AutoSegment::create( currTerm, currContact, Flags::Vertical );
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i+1 == rps.size()) {
|
||||
currContact = AutoContactTurn::create( gcell1, net, Session::getContactLayer(0) );
|
||||
currContact = AutoContactTurn::create( gcell1, net, Session::getBuildContactLayer(0) );
|
||||
} else {
|
||||
currContact = AutoContactHTee::create( gcell1, net, Session::getContactLayer(0) );
|
||||
currContact = AutoContactHTee::create( gcell1, net, Session::getBuildContactLayer(0) );
|
||||
}
|
||||
AutoSegment::create( currTerm , currContact, Flags::Vertical );
|
||||
AutoSegment::create( prevContact, currContact, Flags::Horizontal );
|
||||
|
|
|
@ -122,6 +122,8 @@ namespace Anabatic {
|
|||
static inline size_t getLayerDepth ( const Layer* layer );
|
||||
static inline const Layer* getRoutingLayer ( size_t );
|
||||
static inline const Layer* getContactLayer ( size_t );
|
||||
static inline const Layer* getBuildRoutingLayer ( size_t );
|
||||
static inline const Layer* getBuildContactLayer ( size_t );
|
||||
static Flags getDirection ( size_t depth );
|
||||
static inline DbU::Unit getPitch ( size_t depth, Flags flags );
|
||||
static inline DbU::Unit getOffset ( size_t depth );
|
||||
|
@ -269,6 +271,8 @@ namespace Anabatic {
|
|||
inline size_t Session::getLayerDepth ( const Layer* layer ) { return getRoutingGauge()->getLayerDepth(layer); }
|
||||
inline const Layer* Session::getRoutingLayer ( size_t depth ) { return getRoutingGauge()->getRoutingLayer(depth); }
|
||||
inline const Layer* Session::getContactLayer ( size_t depth ) { return getRoutingGauge()->getContactLayer(depth); }
|
||||
inline const Layer* Session::getBuildRoutingLayer ( size_t depth ) { return getRoutingGauge()->getRoutingLayer(depth+getRoutingGauge()->getFirstRoutingLayer()); }
|
||||
inline const Layer* Session::getBuildContactLayer ( size_t depth ) { return getRoutingGauge()->getContactLayer(depth+getRoutingGauge()->getFirstRoutingLayer()); }
|
||||
inline DbU::Unit Session::getPitch ( size_t depth, Flags flags=Flags::NoFlags ) { return get("getPitch(depth,flags)")->_getPitch( depth, flags ); }
|
||||
inline DbU::Unit Session::getOffset ( size_t depth ) { return getRoutingGauge()->getLayerOffset(depth); }
|
||||
inline DbU::Unit Session::getWireWidth ( size_t depth ) { return getRoutingGauge()->getLayerWireWidth(depth); }
|
||||
|
|
|
@ -56,24 +56,26 @@ namespace CRL {
|
|||
|
||||
|
||||
RoutingGauge::RoutingGauge ( const char* name )
|
||||
: _name (name)
|
||||
, _layerGauges ()
|
||||
, _viaLayers ()
|
||||
, _technology (DataBase::getDB()->getTechnology())
|
||||
, _isSymbolic (true)
|
||||
, _isSuperPitched(true)
|
||||
, _usableLayers (0)
|
||||
: _name (name)
|
||||
, _layerGauges ()
|
||||
, _viaLayers ()
|
||||
, _technology (DataBase::getDB()->getTechnology())
|
||||
, _isSymbolic (true)
|
||||
, _isSuperPitched (true)
|
||||
, _firstRoutingLayer(0)
|
||||
, _usableLayers (0)
|
||||
{ }
|
||||
|
||||
|
||||
RoutingGauge::RoutingGauge ( const RoutingGauge& gauge )
|
||||
: _name (gauge._name)
|
||||
, _layerGauges ()
|
||||
, _viaLayers ()
|
||||
, _technology (gauge._technology)
|
||||
, _isSymbolic (gauge._isSymbolic)
|
||||
, _isSuperPitched(gauge._isSuperPitched)
|
||||
, _usableLayers (0)
|
||||
: _name (gauge._name)
|
||||
, _layerGauges ()
|
||||
, _viaLayers ()
|
||||
, _technology (gauge._technology)
|
||||
, _isSymbolic (gauge._isSymbolic)
|
||||
, _isSuperPitched (gauge._isSuperPitched)
|
||||
, _firstRoutingLayer(0)
|
||||
, _usableLayers (0)
|
||||
{
|
||||
// Make a deep copy of the map.
|
||||
for ( size_t i=0 ; i<gauge._layerGauges.size() ; i++ ) {
|
||||
|
@ -146,8 +148,7 @@ namespace CRL {
|
|||
RoutingLayerGauge* RoutingGauge::getFirstRoutingGauge () const
|
||||
{
|
||||
for ( RoutingLayerGauge* rlg : _layerGauges ) {
|
||||
if ( (rlg->getType() != Constant::LayerGaugeType::PinOnly)
|
||||
and (rlg->getType() != Constant::PowerSupply) )
|
||||
if (rlg->getType() == Constant::LayerGaugeType::Default)
|
||||
return rlg;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -157,7 +158,8 @@ namespace CRL {
|
|||
RoutingLayerGauge* RoutingGauge::getHorizontalGauge () const
|
||||
{
|
||||
RoutingLayerGauge* pinOnly = NULL;
|
||||
for ( RoutingLayerGauge* gauge : _layerGauges ) {
|
||||
for ( size_t i=_firstRoutingLayer ; i<_layerGauges.size() ; ++i ) {
|
||||
RoutingLayerGauge* gauge = _layerGauges[i];
|
||||
if (gauge->isHorizontal()) {
|
||||
if (gauge->getType() != Constant::LayerGaugeType::PinOnly)
|
||||
return gauge;
|
||||
|
@ -172,7 +174,8 @@ namespace CRL {
|
|||
RoutingLayerGauge* RoutingGauge::getVerticalGauge () const
|
||||
{
|
||||
RoutingLayerGauge* pinOnly = NULL;
|
||||
for ( RoutingLayerGauge* gauge : _layerGauges ) {
|
||||
for ( size_t i=_firstRoutingLayer ; i<_layerGauges.size() ; ++i ) {
|
||||
RoutingLayerGauge* gauge = _layerGauges[i];
|
||||
if (gauge->isVertical()) {
|
||||
if (gauge->getType() != Constant::LayerGaugeType::PinOnly)
|
||||
return gauge;
|
||||
|
@ -182,6 +185,13 @@ namespace CRL {
|
|||
}
|
||||
return pinOnly;
|
||||
}
|
||||
|
||||
|
||||
RoutingLayerGauge* RoutingGauge::getLayerGauge ( size_t depth ) const
|
||||
{
|
||||
if ( depth >= _layerGauges.size() ) return NULL;
|
||||
return _layerGauges[depth];
|
||||
}
|
||||
|
||||
|
||||
RoutingLayerGauge* RoutingGauge::getLayerGauge ( const Layer* layer ) const
|
||||
|
@ -194,6 +204,20 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
const Layer* RoutingGauge::getRoutingLayer ( size_t depth ) const
|
||||
{
|
||||
if ( depth >= _layerGauges.size() ) return NULL;
|
||||
return _layerGauges[depth]->getLayer();
|
||||
}
|
||||
|
||||
|
||||
Layer* RoutingGauge::getContactLayer ( size_t depth ) const
|
||||
{
|
||||
if ( depth >= _viaLayers.size() ) return NULL;
|
||||
return _viaLayers[depth];
|
||||
}
|
||||
|
||||
|
||||
unsigned int RoutingGauge::getLayerType ( const Layer* layer ) const
|
||||
{
|
||||
RoutingLayerGauge* layerGauge = getLayerGauge(layer);
|
||||
|
@ -220,8 +244,9 @@ namespace CRL {
|
|||
if (viaLayer) bottomLayer = viaLayer->getBottom();
|
||||
|
||||
for ( size_t i=0 ; i < _layerGauges.size() ; i++ ) {
|
||||
if (_layerGauges[i]->getLayer()->getMask() == bottomLayer->getMask())
|
||||
if (_layerGauges[i]->getLayer()->getMask() == bottomLayer->getMask()) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return nlayerdepth;
|
||||
}
|
||||
|
@ -230,8 +255,9 @@ namespace CRL {
|
|||
size_t RoutingGauge::getLayerDepth ( const Layer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i < _layerGauges.size() ; i++ ) {
|
||||
if (_layerGauges[i]->getLayer()->getMask() == layer->getMask())
|
||||
if (_layerGauges[i]->getLayer()->getMask() == layer->getMask()) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return nlayerdepth;
|
||||
}
|
||||
|
@ -272,27 +298,6 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
RoutingLayerGauge* RoutingGauge::getLayerGauge ( size_t depth ) const
|
||||
{
|
||||
if ( depth >= _layerGauges.size() ) return NULL;
|
||||
return _layerGauges[depth];
|
||||
}
|
||||
|
||||
|
||||
const Layer* RoutingGauge::getRoutingLayer ( size_t depth ) const
|
||||
{
|
||||
if ( depth >= _layerGauges.size() ) return NULL;
|
||||
return _layerGauges[depth]->getLayer();
|
||||
}
|
||||
|
||||
|
||||
Layer* RoutingGauge::getContactLayer ( size_t depth ) const
|
||||
{
|
||||
if ( depth >= _viaLayers.size() ) return NULL;
|
||||
return _viaLayers[depth];
|
||||
}
|
||||
|
||||
|
||||
const vector<RoutingLayerGauge*>& RoutingGauge::getLayerGauges () const
|
||||
{
|
||||
return _layerGauges;
|
||||
|
@ -306,6 +311,7 @@ namespace CRL {
|
|||
, getString(_name).c_str() );
|
||||
|
||||
_layerGauges.push_back( layerGauge );
|
||||
layerGauge->setRoutingGauge( this );
|
||||
|
||||
size_t gaugeSize = _layerGauges.size();
|
||||
if (gaugeSize > 1) {
|
||||
|
@ -313,7 +319,7 @@ namespace CRL {
|
|||
, _layerGauges[gaugeSize-1]->getLayer()
|
||||
, _layerGauges[gaugeSize-1]->getLayer()->isSymbolic() );
|
||||
if (not viaLayer) {
|
||||
cerr << Error( "Can't find a VIA between Gauge layers %s and %s."
|
||||
cerr << Error( "RoutingGauge::addLayerGauge(): Can't find a VIA between Gauge layers %s and %s."
|
||||
, getString(_layerGauges[gaugeSize-2]).c_str()
|
||||
, getString(_layerGauges[gaugeSize-1]).c_str() ) << endl;
|
||||
}
|
||||
|
@ -326,7 +332,18 @@ namespace CRL {
|
|||
_isSuperPitched = false;
|
||||
}
|
||||
|
||||
if (layerGauge->getType() == Constant::LayerGaugeType::Default) ++_usableLayers;
|
||||
if ( (layerGauge->getType() == Constant::LayerGaugeType::BottomPowerSupply)
|
||||
or (layerGauge->getType() == Constant::LayerGaugeType::Unusable)) {
|
||||
if (_usableLayers) {
|
||||
cerr << Error( "RoutingGauge::addLayerGauge(): BottomPowerSupply & Unusable must be at the bottom {}."
|
||||
, getString(layerGauge).c_str() ) << endl;
|
||||
} else {
|
||||
++_firstRoutingLayer;
|
||||
}
|
||||
} else {
|
||||
if (layerGauge->getType() == Constant::LayerGaugeType::Default)
|
||||
++_usableLayers;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,9 +378,10 @@ namespace CRL {
|
|||
string RoutingGauge::_getString () const
|
||||
{
|
||||
ostringstream os;
|
||||
os << "<" << "RoutingGauge " << _name << ">";
|
||||
|
||||
return ( os.str() );
|
||||
os << "<" << "RoutingGauge " << _name
|
||||
<< " firstRL=" << _firstRoutingLayer
|
||||
<< " usables=" << _usableLayers << ">";
|
||||
return os.str();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -109,18 +109,19 @@ namespace CRL {
|
|||
, DbU::Unit pwireWidth
|
||||
, DbU::Unit viaWidth
|
||||
, DbU::Unit obsDw )
|
||||
: _layer (layer)
|
||||
, _blockageLayer(layer->getBlockageLayer())
|
||||
, _direction (direction)
|
||||
, _type (type)
|
||||
, _depth (depth)
|
||||
, _density (density)
|
||||
, _offset (offset)
|
||||
, _pitch (pitch)
|
||||
, _wireWidth (wireWidth)
|
||||
, _pwireWidth (pwireWidth)
|
||||
, _viaWidth (viaWidth)
|
||||
, _obstacleDw (obsDw)
|
||||
: _routingGauge (nullptr)
|
||||
, _layer (layer)
|
||||
, _blockageLayer(layer->getBlockageLayer())
|
||||
, _direction (direction)
|
||||
, _type (type)
|
||||
, _depth (depth)
|
||||
, _density (density)
|
||||
, _offset (offset)
|
||||
, _pitch (pitch)
|
||||
, _wireWidth (wireWidth)
|
||||
, _pwireWidth (pwireWidth)
|
||||
, _viaWidth (viaWidth)
|
||||
, _obstacleDw (obsDw)
|
||||
{ }
|
||||
|
||||
|
||||
|
@ -304,11 +305,12 @@ namespace CRL {
|
|||
{
|
||||
Record* record = new Record ( getString(this) );
|
||||
|
||||
record->add ( getSlot ( "_layer" , _layer ) );
|
||||
record->add ( getSlot ( "_direction", _direction ) );
|
||||
record->add ( getSlot ( "_type" , _type ) );
|
||||
record->add ( getSlot ( "_depth" , _depth ) );
|
||||
record->add ( getSlot ( "_density" , _density ) );
|
||||
record->add ( getSlot ( "_routingGauge", _routingGauge ) );
|
||||
record->add ( getSlot ( "_layer" , _layer ) );
|
||||
record->add ( getSlot ( "_direction" , _direction ) );
|
||||
record->add ( getSlot ( "_type" , _type ) );
|
||||
record->add ( getSlot ( "_depth" , _depth ) );
|
||||
record->add ( getSlot ( "_density" , _density ) );
|
||||
|
||||
record->add ( DbU::getValueSlot ( "_offset" , &_offset ) );
|
||||
record->add ( DbU::getValueSlot ( "_pitch" , &_pitch ) );
|
||||
|
|
|
@ -49,59 +49,61 @@ namespace CRL {
|
|||
// Constants.
|
||||
static const size_t nlayerdepth;
|
||||
// Constructors & Destructors.
|
||||
static RoutingGauge* create ( const char* name );
|
||||
virtual void destroy ();
|
||||
// Predicates.
|
||||
inline bool isSymbolic () const;
|
||||
inline bool isTwoMetals () const;
|
||||
inline bool isSuperPitched () const;
|
||||
inline bool isHV () const;
|
||||
inline bool isVH () const;
|
||||
inline bool hasPowerSupply () const;
|
||||
bool hasLayer ( const Layer* ) const;
|
||||
// Accessors.
|
||||
RoutingGauge* getClone () const;
|
||||
inline const Name getName () const;
|
||||
inline Technology* getTechnology () const;
|
||||
inline size_t getDepth () const;
|
||||
inline size_t getUsableLayers () const;
|
||||
inline DbU::Unit getHorizontalPitch () const;
|
||||
inline DbU::Unit getVerticalPitch () const;
|
||||
RoutingLayerGauge* getFirstRoutingGauge () const;
|
||||
RoutingLayerGauge* getHorizontalGauge () const;
|
||||
RoutingLayerGauge* getVerticalGauge () const;
|
||||
RoutingLayerGauge* getPowerSupplyGauge () const;
|
||||
RoutingLayerGauge* getLayerGauge ( const Layer* ) const;
|
||||
size_t getViaDepth ( const Layer* ) const;
|
||||
size_t getLayerDepth ( const Layer* ) const;
|
||||
unsigned int getLayerType ( const Layer* ) const;
|
||||
unsigned int getLayerDirection ( const Layer* ) const;
|
||||
DbU::Unit getPitch ( const Layer* ) const;
|
||||
DbU::Unit getOffset ( const Layer* ) const;
|
||||
DbU::Unit getWireWidth ( const Layer* ) const;
|
||||
DbU::Unit getPWireWidth ( const Layer* ) const;
|
||||
DbU::Unit getViaWidth ( const Layer* ) const;
|
||||
RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||
inline unsigned int getLayerDirection ( size_t depth ) const;
|
||||
inline unsigned int getLayerType ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerPitch ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerOffset ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerPWireWidth ( size_t depth ) const;
|
||||
inline DbU::Unit getViaWidth ( size_t depth ) const;
|
||||
const Layer* getRoutingLayer ( size_t depth ) const;
|
||||
Layer* getContactLayer ( size_t depth ) const;
|
||||
const vector<RoutingLayerGauge*>&
|
||||
getLayerGauges () const;
|
||||
// Methods.
|
||||
void addLayerGauge ( RoutingLayerGauge* layerGauge );
|
||||
void checkConnexity () const;
|
||||
inline void setSymbolic ( bool );
|
||||
// Hurricane Managment.
|
||||
void toJson ( JsonWriter* ) const;
|
||||
virtual Record* _getRecord ( Record* record=NULL ) const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
static RoutingGauge* create ( const char* name );
|
||||
virtual void destroy ();
|
||||
// Predicates.
|
||||
inline bool isSymbolic () const;
|
||||
inline bool isTwoMetals () const;
|
||||
inline bool isSuperPitched () const;
|
||||
inline bool isHV () const;
|
||||
inline bool isVH () const;
|
||||
inline bool hasPowerSupply () const;
|
||||
bool hasLayer ( const Layer* ) const;
|
||||
// Accessors.
|
||||
RoutingGauge* getClone () const;
|
||||
inline const Name getName () const;
|
||||
inline Technology* getTechnology () const;
|
||||
inline size_t getDepth () const;
|
||||
inline size_t getUsableLayers () const;
|
||||
inline size_t getFirstRoutingLayer () const;
|
||||
inline size_t toRoutingDepth ( size_t depth ) const;
|
||||
inline DbU::Unit getHorizontalPitch () const;
|
||||
inline DbU::Unit getVerticalPitch () const;
|
||||
RoutingLayerGauge* getFirstRoutingGauge () const;
|
||||
RoutingLayerGauge* getHorizontalGauge () const;
|
||||
RoutingLayerGauge* getVerticalGauge () const;
|
||||
RoutingLayerGauge* getPowerSupplyGauge () const;
|
||||
RoutingLayerGauge* getLayerGauge ( const Layer* ) const;
|
||||
size_t getViaDepth ( const Layer* ) const;
|
||||
size_t getLayerDepth ( const Layer* ) const;
|
||||
unsigned int getLayerType ( const Layer* ) const;
|
||||
unsigned int getLayerDirection ( const Layer* ) const;
|
||||
DbU::Unit getPitch ( const Layer* ) const;
|
||||
DbU::Unit getOffset ( const Layer* ) const;
|
||||
DbU::Unit getWireWidth ( const Layer* ) const;
|
||||
DbU::Unit getPWireWidth ( const Layer* ) const;
|
||||
DbU::Unit getViaWidth ( const Layer* ) const;
|
||||
RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||
const Layer* getRoutingLayer ( size_t depth ) const;
|
||||
Layer* getContactLayer ( size_t depth ) const;
|
||||
inline unsigned int getLayerDirection ( size_t depth ) const;
|
||||
inline unsigned int getLayerType ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerPitch ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerOffset ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
|
||||
inline DbU::Unit getLayerPWireWidth ( size_t depth ) const;
|
||||
inline DbU::Unit getViaWidth ( size_t depth ) const;
|
||||
const vector<RoutingLayerGauge*>&
|
||||
getLayerGauges () const;
|
||||
// Methods.
|
||||
void addLayerGauge ( RoutingLayerGauge* layerGauge );
|
||||
void checkConnexity () const;
|
||||
inline void setSymbolic ( bool );
|
||||
// Hurricane Managment.
|
||||
void toJson ( JsonWriter* ) const;
|
||||
virtual Record* _getRecord ( Record* record=NULL ) const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
|
||||
protected:
|
||||
// Internal - Attributes.
|
||||
|
@ -111,6 +113,7 @@ namespace CRL {
|
|||
Technology* _technology;
|
||||
bool _isSymbolic;
|
||||
bool _isSuperPitched;
|
||||
size_t _firstRoutingLayer;
|
||||
size_t _usableLayers;
|
||||
|
||||
// Internal - Constructors & Destructors.
|
||||
|
@ -122,26 +125,28 @@ namespace CRL {
|
|||
};
|
||||
|
||||
|
||||
inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
|
||||
inline bool RoutingGauge::isSuperPitched () const { return _isSuperPitched; }
|
||||
inline bool RoutingGauge::isTwoMetals () const { return (_usableLayers < 3); }
|
||||
inline bool RoutingGauge::isHV () const { return getFirstRoutingGauge()->isHorizontal(); }
|
||||
inline bool RoutingGauge::isVH () const { return getFirstRoutingGauge()->isVertical(); }
|
||||
inline bool RoutingGauge::hasPowerSupply () const { return (getPowerSupplyGauge() != NULL); }
|
||||
inline const Name RoutingGauge::getName () const { return _name; }
|
||||
inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
|
||||
inline Technology* RoutingGauge::getTechnology () const { return _technology; }
|
||||
inline size_t RoutingGauge::getUsableLayers () const { return _usableLayers; }
|
||||
inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
|
||||
inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
|
||||
inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
|
||||
inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerPWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getPWireWidth(); }
|
||||
inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
|
||||
inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
|
||||
inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
|
||||
inline bool RoutingGauge::isSuperPitched () const { return _isSuperPitched; }
|
||||
inline bool RoutingGauge::isTwoMetals () const { return (_usableLayers < 3); }
|
||||
inline bool RoutingGauge::isHV () const { return getFirstRoutingGauge()->isHorizontal(); }
|
||||
inline bool RoutingGauge::isVH () const { return getFirstRoutingGauge()->isVertical(); }
|
||||
inline bool RoutingGauge::hasPowerSupply () const { return (getPowerSupplyGauge() != NULL); }
|
||||
inline const Name RoutingGauge::getName () const { return _name; }
|
||||
inline Technology* RoutingGauge::getTechnology () const { return _technology; }
|
||||
inline size_t RoutingGauge::getFirstRoutingLayer () const { return _firstRoutingLayer; }
|
||||
inline size_t RoutingGauge::getUsableLayers () const { return _usableLayers; }
|
||||
inline size_t RoutingGauge::toRoutingDepth ( size_t depth ) const { return _firstRoutingLayer+depth; }
|
||||
inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
|
||||
inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
|
||||
inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
|
||||
inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
|
||||
inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
|
||||
inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
|
||||
inline DbU::Unit RoutingGauge::getLayerPWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getPWireWidth(); }
|
||||
inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
|
|
@ -30,19 +30,22 @@ namespace Hurricane {
|
|||
|
||||
namespace Constant {
|
||||
|
||||
enum Direction { Horizontal = (1<<0)
|
||||
, Vertical = (1<<1)
|
||||
enum Direction { Horizontal = (1 << 0)
|
||||
, Vertical = (1 << 1)
|
||||
};
|
||||
|
||||
enum LayerGaugeType { Default = (1<<0)
|
||||
, PinOnly = (1<<1)
|
||||
, PowerSupply = (1<<2)
|
||||
enum LayerGaugeType { Bottom = (1 << 3)
|
||||
, Unusable = (1 << 4)
|
||||
, PowerSupply = (1 << 5)
|
||||
, PinOnly = (1 << 6)
|
||||
, Default = (1 << 7)
|
||||
, BottomPowerSupply = (1 << 8)
|
||||
};
|
||||
|
||||
enum Round { Superior = (1<<2)
|
||||
, Inferior = (1<<3)
|
||||
, Nearest = (1<<4)
|
||||
, Exact = (1<<5)
|
||||
enum Round { Superior = (1 << 10)
|
||||
, Inferior = (1 << 11)
|
||||
, Nearest = (1 << 12)
|
||||
, Exact = (1 << 13)
|
||||
};
|
||||
|
||||
Direction perpandicular ( unsigned int );
|
||||
|
@ -93,7 +96,7 @@ namespace CRL {
|
|||
inline bool isVertical () const;
|
||||
inline const Layer* getLayer () const;
|
||||
inline const Layer* getBlockageLayer () const;
|
||||
inline unsigned int getDepth () const;
|
||||
unsigned int getDepth () const;
|
||||
inline Constant::Direction getDirection () const;
|
||||
inline Constant::LayerGaugeType getType () const;
|
||||
inline double getDensity () const;
|
||||
|
@ -111,6 +114,7 @@ namespace CRL {
|
|||
long getTrackIndex ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
|
||||
inline DbU::Unit getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
|
||||
DbU::Unit getTrackPosition ( DbU::Unit start, long index ) const;
|
||||
inline void setRoutingGauge ( RoutingGauge* );
|
||||
inline void setPWireWidth ( DbU::Unit );
|
||||
inline void setType ( uint32_t );
|
||||
// Hurricane Managment.
|
||||
|
@ -119,8 +123,9 @@ namespace CRL {
|
|||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
||||
protected:
|
||||
private:
|
||||
// Internal - Attributes.
|
||||
RoutingGauge* _routingGauge;
|
||||
const Layer* _layer;
|
||||
const Layer* _blockageLayer;
|
||||
Constant::Direction _direction;
|
||||
|
@ -174,10 +179,10 @@ namespace CRL {
|
|||
inline bool RoutingLayerGauge::isHorizontal () const { return (_direction == Constant::Direction::Horizontal); }
|
||||
inline bool RoutingLayerGauge::isVertical () const { return (_direction == Constant::Direction::Vertical); }
|
||||
inline const Layer* RoutingLayerGauge::getLayer () const { return _layer; }
|
||||
inline unsigned int RoutingLayerGauge::getDepth () const { return _depth; }
|
||||
inline const Layer* RoutingLayerGauge::getBlockageLayer () const { return _blockageLayer; }
|
||||
inline Constant::Direction RoutingLayerGauge::getDirection () const { return _direction; }
|
||||
inline Constant::LayerGaugeType RoutingLayerGauge::getType () const { return _type; }
|
||||
inline unsigned int RoutingLayerGauge::getDepth () const { return _depth; }
|
||||
inline double RoutingLayerGauge::getDensity () const { return _density; }
|
||||
inline DbU::Unit RoutingLayerGauge::getOffset () const { return _offset; }
|
||||
inline DbU::Unit RoutingLayerGauge::getPitch () const { return _pitch; }
|
||||
|
@ -192,6 +197,7 @@ namespace CRL {
|
|||
{ return getTrackPosition( start, getTrackIndex(start,stop,position,mode) ); }
|
||||
inline void RoutingLayerGauge::setPWireWidth ( DbU::Unit pwidth ) { _pwireWidth = pwidth; }
|
||||
inline void RoutingLayerGauge::setType ( uint32_t type ) { _type = (Constant::LayerGaugeType)type; }
|
||||
inline void RoutingLayerGauge::setRoutingGauge ( RoutingGauge* rg ) { _routingGauge = rg; }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -262,7 +268,10 @@ IOSTREAM_POINTER_SUPPORT(Constant::Direction);
|
|||
|
||||
inline void from ( Constant::LayerGaugeType& type, const std::string& s )
|
||||
{
|
||||
if (s == "PinOnly") type = Constant::PinOnly;
|
||||
if (s == "Unusable" ) type = Constant::Unusable;
|
||||
else if (s == "PinOnly" ) type = Constant::PinOnly;
|
||||
else if (s == "PowerSupply" ) type = Constant::PowerSupply;
|
||||
else if (s == "PowerSupply|Bottom") type = Constant::BottomPowerSupply;
|
||||
else {
|
||||
if (s != "Default")
|
||||
std::cerr << Hurricane::Error( "::from(LayerGaugeType&,string&): Unknown value \"%s\"."
|
||||
|
@ -277,9 +286,12 @@ inline std::string getString<const Constant::LayerGaugeType*>
|
|||
( const Constant::LayerGaugeType* layerGaugeType )
|
||||
{
|
||||
switch ( *layerGaugeType ) {
|
||||
case Constant::Default: return "Default";
|
||||
case Constant::PinOnly: return "PinOnly";
|
||||
case Constant::PowerSupply: return "PowerSupply";
|
||||
case Constant::Bottom: return "Bottom (error)";
|
||||
case Constant::Unusable: return "Unusable";
|
||||
case Constant::PinOnly: return "PinOnly";
|
||||
case Constant::Default: return "Default";
|
||||
case Constant::PowerSupply: return "PowerSupply";
|
||||
case Constant::BottomPowerSupply: return "PowerSupply|Bottom";
|
||||
}
|
||||
return "Unknown Constant::LayerGaugeType";
|
||||
}
|
||||
|
@ -296,9 +308,12 @@ inline std::string getString<const Constant::LayerGaugeType>
|
|||
( const Constant::LayerGaugeType layerGaugeType )
|
||||
{
|
||||
switch ( layerGaugeType ) {
|
||||
case Constant::Default: return "Default";
|
||||
case Constant::PinOnly: return "PinOnly";
|
||||
case Constant::PowerSupply: return "PowerSupply";
|
||||
case Constant::Bottom: return "Bottom (error)";
|
||||
case Constant::Unusable: return "Unusable";
|
||||
case Constant::PinOnly: return "PinOnly";
|
||||
case Constant::Default: return "Default";
|
||||
case Constant::PowerSupply: return "PowerSupply";
|
||||
case Constant::BottomPowerSupply: return "PowerSupply|Bottom";
|
||||
}
|
||||
return "Unknown Constant::LayerGaugeType";
|
||||
}
|
||||
|
|
|
@ -113,14 +113,11 @@ extern "C" {
|
|||
static PyObject* PyRoutingGauge_getDepth ( PyRoutingGauge* self )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_getDepth()" << endl;
|
||||
|
||||
size_t depth = 0;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getDepth()")
|
||||
depth = rg->getDepth();
|
||||
METHOD_HEAD("RoutingGauge.getDepth()")
|
||||
depth = rg->getDepth();
|
||||
HCATCH
|
||||
|
||||
return Py_BuildValue("I",depth);
|
||||
}
|
||||
|
||||
|
@ -305,66 +302,118 @@ extern "C" {
|
|||
cdebug_log(30,0) << "PyRoutingGauge_getLayerGauge()" << endl;
|
||||
|
||||
RoutingLayerGauge* rlg = NULL;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getLayerGauge()")
|
||||
|
||||
PyObject* arg0 = NULL;
|
||||
|
||||
__cs.init ("RoutingGauge.getLayerGauge");
|
||||
if (PyArg_ParseTuple( args, "O&:RoutingGauge.getLayerGauge", Converter, &arg0)) {
|
||||
string layerName;
|
||||
if (__cs.getObjectIds() == ":layer") {
|
||||
rlg = rg->getLayerGauge( PYLAYER_O(arg0) );
|
||||
layerName = "\"" + getString(PYLAYER_O(arg0)) + "\"";
|
||||
} else if (__cs.getObjectIds() == ":int") {
|
||||
rlg = rg->getLayerGauge( (size_t)PyAny_AsLong(arg0) );
|
||||
layerName = "depth=" + getString(PyAny_AsLong(arg0));
|
||||
METHOD_HEAD("RoutingGauge.getLayerGauge()")
|
||||
PyObject* arg0 = NULL;
|
||||
|
||||
__cs.init ("RoutingGauge.getLayerGauge");
|
||||
if (PyArg_ParseTuple( args, "O&:RoutingGauge.getLayerGauge", Converter, &arg0)) {
|
||||
string layerName;
|
||||
if (__cs.getObjectIds() == ":layer") {
|
||||
rlg = rg->getLayerGauge( PYLAYER_O(arg0) );
|
||||
layerName = "\"" + getString(PYLAYER_O(arg0)) + "\"";
|
||||
} else if (__cs.getObjectIds() == ":int") {
|
||||
rlg = rg->getLayerGauge( (size_t)PyAny_AsLong(arg0) );
|
||||
layerName = "depth=" + getString(PyAny_AsLong(arg0));
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "invalid parameter type for RoutingGauge.getLayerGauge()." );
|
||||
return NULL;
|
||||
}
|
||||
if ( rlg == NULL ) {
|
||||
string message = "RoutingGauge.getLayerDepth(), requested Layer "
|
||||
+ layerName + " has no RoutingLayerGauge.";
|
||||
PyErr_SetString ( ConstructorError, message.c_str() );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "invalid parameter type for RoutingGauge.getLayerGauge()." );
|
||||
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to RoutingGauge.getLayerDepth()." );
|
||||
return NULL;
|
||||
}
|
||||
if ( rlg == NULL ) {
|
||||
string message = "RoutingGauge.getLayerDepth(), requested Layer "
|
||||
+ layerName + " has no RoutingLayerGauge.";
|
||||
PyErr_SetString ( ConstructorError, message.c_str() );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to RoutingGauge.getLayerDepth()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyRoutingLayerGauge_Link(rlg);
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyRoutingGauge_getRoutingLayer ( PyRoutingGauge* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_getRoutingLayer()" << endl;
|
||||
|
||||
Layer* layer = NULL;
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getRoutingLayer()")
|
||||
unsigned int depth = 0;
|
||||
|
||||
if (PyArg_ParseTuple( args, "I:RoutingGauge.getRoutingLayer", &depth)) {
|
||||
layer = const_cast<Layer*>(rg->getRoutingLayer( (size_t)depth ));
|
||||
if ( layer == NULL ) {
|
||||
string message
|
||||
= "RoutingGauge.getRoutingLayer(): No layer at the requested depth " + getString(depth)
|
||||
+ " (must be < " + getString(rg->getDepth()) + ").";
|
||||
PyErr_SetString ( ConstructorError, message.c_str() );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Bad parameters given to RoutingGauge.getRoutingLayer()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyLayer_LinkDerived(layer);
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyRoutingGauge_getContactLayer ( PyRoutingGauge* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_getContactLayer()" << endl;
|
||||
|
||||
Layer* layer = NULL;
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getContactLayer()")
|
||||
unsigned int depth = 0;
|
||||
|
||||
if (PyArg_ParseTuple( args, "I:RoutingGauge.getContactLayer", &depth)) {
|
||||
layer = rg->getContactLayer( (size_t)depth );
|
||||
if ( layer == NULL ) {
|
||||
string message
|
||||
= "RoutingGauge.getContactLayer(): No layer at the requested depth " + getString(depth)
|
||||
+ " (must be < " + getString(rg->getDepth()-1) + ").";
|
||||
PyErr_SetString ( ConstructorError, message.c_str() );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Bad parameters given to RoutingGauge.getContactLayer()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyLayer_LinkDerived(layer);
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyRoutingGauge_getLayerDirection ( PyRoutingGauge* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_getLayerDirection()" << endl;
|
||||
|
||||
unsigned int direction = 0;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getLayerDirection()")
|
||||
|
||||
PyObject* arg0 = NULL;
|
||||
|
||||
__cs.init ("RoutingGauge.getLayerDirection");
|
||||
if (PyArg_ParseTuple( args, "O&:RoutingGauge.getLayerDirection", Converter, &arg0)) {
|
||||
if ( __cs.getObjectIds() == ":layer" )
|
||||
direction = rg->getLayerDirection( PYLAYER_O(arg0) );
|
||||
else if ( __cs.getObjectIds() == ":int" )
|
||||
direction = rg->getLayerDirection( (size_t)PyAny_AsLong(arg0) );
|
||||
else {
|
||||
PyErr_SetString ( ConstructorError, "invalid parameter type for RoutingGauge.getLayerDirection()." );
|
||||
METHOD_HEAD("RoutingGauge.getLayerDirection()")
|
||||
PyObject* arg0 = NULL;
|
||||
|
||||
__cs.init ("RoutingGauge.getLayerDirection");
|
||||
if (PyArg_ParseTuple( args, "O&:RoutingGauge.getLayerDirection", Converter, &arg0)) {
|
||||
if ( __cs.getObjectIds() == ":layer" )
|
||||
direction = rg->getLayerDirection( PYLAYER_O(arg0) );
|
||||
else if ( __cs.getObjectIds() == ":int" )
|
||||
direction = rg->getLayerDirection( (size_t)PyAny_AsLong(arg0) );
|
||||
else {
|
||||
PyErr_SetString ( ConstructorError, "invalid parameter type for RoutingGauge.getLayerDirection()." );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to RoutingGauge.getLayerDirection()." );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to RoutingGauge.getLayerDirection()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return Py_BuildValue("I",direction);
|
||||
|
@ -376,26 +425,24 @@ extern "C" {
|
|||
cdebug_log(30,0) << "PyRoutingGauge_getLayerPitch()" << endl;
|
||||
|
||||
DbU::Unit pitch = 0;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getLayerPitch()")
|
||||
|
||||
PyObject* arg0 = NULL;
|
||||
|
||||
__cs.init ("RoutingGauge.getLayerPitch");
|
||||
if (PyArg_ParseTuple( args, "O&:RoutingGauge.getLayerPitch", Converter, &arg0)) {
|
||||
if ( __cs.getObjectIds() == ":layer" ) {
|
||||
//pitch = rg->getLayerPitch( PYLAYER_O(arg0) );
|
||||
} else if ( __cs.getObjectIds() == ":int" )
|
||||
pitch = rg->getLayerPitch( (size_t)PyAny_AsLong(arg0) );
|
||||
else {
|
||||
PyErr_SetString ( ConstructorError, "invalid parameter type for RoutingGauge.getLayerPitch()." );
|
||||
METHOD_HEAD("RoutingGauge.getLayerPitch()")
|
||||
PyObject* arg0 = NULL;
|
||||
|
||||
__cs.init ("RoutingGauge.getLayerPitch");
|
||||
if (PyArg_ParseTuple( args, "O&:RoutingGauge.getLayerPitch", Converter, &arg0)) {
|
||||
if ( __cs.getObjectIds() == ":layer" ) {
|
||||
//pitch = rg->getLayerPitch( PYLAYER_O(arg0) );
|
||||
} else if ( __cs.getObjectIds() == ":int" )
|
||||
pitch = rg->getLayerPitch( (size_t)PyAny_AsLong(arg0) );
|
||||
else {
|
||||
PyErr_SetString ( ConstructorError, "invalid parameter type for RoutingGauge.getLayerPitch()." );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to RoutingGauge.getLayerPitch()." );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to RoutingGauge.getLayerPitch()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return Py_BuildValue("I",pitch);
|
||||
|
@ -415,66 +462,6 @@ extern "C" {
|
|||
}
|
||||
|
||||
|
||||
static PyObject* PyRoutingGauge_getRoutingLayer ( PyRoutingGauge* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_getRoutingLayer()" << endl;
|
||||
|
||||
Layer* layer = NULL;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getRoutingLayer()")
|
||||
|
||||
unsigned int depth = 0;
|
||||
|
||||
if (PyArg_ParseTuple( args, "I:RoutingGauge.getRoutingLayer", &depth)) {
|
||||
layer = const_cast<Layer*>(rg->getRoutingLayer( (size_t)depth ));
|
||||
if ( layer == NULL ) {
|
||||
string message
|
||||
= "RoutingGauge.getRoutingLayer(): No layer at the requested depth " + getString(depth)
|
||||
+ " (must be < " + getString(rg->getDepth()) + ").";
|
||||
PyErr_SetString ( ConstructorError, message.c_str() );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Bad parameters given to RoutingGauge.getRoutingLayer()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyLayer_LinkDerived(layer);
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyRoutingGauge_getContactLayer ( PyRoutingGauge* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_getContactLayer()" << endl;
|
||||
|
||||
Layer* layer = NULL;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("RoutingGauge.getContactLayer()")
|
||||
|
||||
unsigned int depth = 0;
|
||||
|
||||
if (PyArg_ParseTuple( args, "I:RoutingGauge.getContactLayer", &depth)) {
|
||||
layer = rg->getContactLayer( (size_t)depth );
|
||||
if ( layer == NULL ) {
|
||||
string message
|
||||
= "RoutingGauge.getContactLayer(): No layer at the requested depth " + getString(depth)
|
||||
+ " (must be < " + getString(rg->getDepth()-1) + ").";
|
||||
PyErr_SetString ( ConstructorError, message.c_str() );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Bad parameters given to RoutingGauge.getContactLayer()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyLayer_LinkDerived(layer);
|
||||
}
|
||||
|
||||
|
||||
PyObject* PyRoutingGauge_addLayerGauge ( PyRoutingGauge* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(30,0) << "PyRoutingGauge_addLayerGauge()" << endl;
|
||||
|
@ -552,15 +539,15 @@ extern "C" {
|
|||
, { "getPowerSupplyGauge" , (PyCFunction)PyRoutingGauge_getPowerSupplyGauge, METH_NOARGS
|
||||
, "Return the power supply gauge (None if there isn't)." }
|
||||
, { "getLayerGauge" , (PyCFunction)PyRoutingGauge_getLayerGauge , METH_VARARGS
|
||||
, "Return the RoutingLayerGauge of the given layer/depth." }
|
||||
, { "getLayerDirection" , (PyCFunction)PyRoutingGauge_getLayerDirection , METH_VARARGS
|
||||
, "Return the direction of the given layer/depth." }
|
||||
, { "getLayerPitch" , (PyCFunction)PyRoutingGauge_getLayerPitch , METH_VARARGS
|
||||
, "Return the pitch of the given layer/depth." }
|
||||
, "Return the RoutingLayerGauge of the given layer/routing depth." }
|
||||
, { "getRoutingLayer" , (PyCFunction)PyRoutingGauge_getRoutingLayer , METH_VARARGS
|
||||
, "Return the routing layer used for the requested depth." }
|
||||
, "Return the routing layer used for the requested routing depth." }
|
||||
, { "getContactLayer" , (PyCFunction)PyRoutingGauge_getContactLayer , METH_VARARGS
|
||||
, "Return the contact layer used for the requested depth." }
|
||||
, "Return the contact layer used for the requested routing depth." }
|
||||
, { "getLayerDirection" , (PyCFunction)PyRoutingGauge_getLayerDirection , METH_VARARGS
|
||||
, "Return the direction of the given layer/routing depth." }
|
||||
, { "getLayerPitch" , (PyCFunction)PyRoutingGauge_getLayerPitch , METH_VARARGS
|
||||
, "Return the pitch of the given layer/routing depth." }
|
||||
, { "getLayerGauges" , (PyCFunction)PyRoutingGauge_getLayerGauges , METH_NOARGS
|
||||
, "Return the list of RoutingLayerGauge." }
|
||||
, { "addLayerGauge" , (PyCFunction)PyRoutingGauge_addLayerGauge , METH_VARARGS
|
||||
|
|
|
@ -107,9 +107,11 @@ extern "C" {
|
|||
return NULL;
|
||||
}
|
||||
switch( type ) {
|
||||
case Constant::Default:
|
||||
case Constant::Unusable:
|
||||
case Constant::BottomPowerSupply:
|
||||
case Constant::PowerSupply:
|
||||
case Constant::PinOnly:
|
||||
case Constant::PowerSupply: break;
|
||||
case Constant::Default: break;
|
||||
default:
|
||||
PyErr_SetString ( ConstructorError, "Bad value for type argument of RoutingLayerGauge.create()." );
|
||||
return NULL;
|
||||
|
@ -351,15 +353,17 @@ extern "C" {
|
|||
{
|
||||
PyObject* constant;
|
||||
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Horizontal ,"Horizontal" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Vertical ,"Vertical" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Default ,"Default" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::PinOnly ,"PinOnly" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::PowerSupply,"PowerSupply" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Superior ,"Superior" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Inferior ,"Inferior" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Nearest ,"Nearest" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Exact ,"Exact" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Horizontal ,"Horizontal" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Vertical ,"Vertical" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Unusable ,"Unusable" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::PinOnly ,"PinOnly" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::PowerSupply ,"PowerSupply" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::BottomPowerSupply,"BottomPowerSupply" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Default ,"Default" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Superior ,"Superior" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Inferior ,"Inferior" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Nearest ,"Nearest" );
|
||||
LoadObjectConstant(PyTypeRoutingLayerGauge.tp_dict,Constant::Exact ,"Exact" );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue