Detect double routing attempt in Katana.
* Change: In Anabatic::setupPreRouteds(), routed DeepNets can have components both at Occurrence root net devel and at top level. If no nets remains to route, set the tool state to EngineDriving, which prevent any further work (except for finalize).
This commit is contained in:
parent
1887f45135
commit
40b82212e3
|
@ -66,12 +66,14 @@ namespace Anabatic {
|
|||
|
||||
|
||||
|
||||
void AnabaticEngine::setupPreRouteds ()
|
||||
size_t AnabaticEngine::setupPreRouteds ()
|
||||
{
|
||||
cmess1 << " o Looking for fixed or manually global routed nets." << endl;
|
||||
|
||||
openSession();
|
||||
|
||||
size_t toBeRouteds = 0;
|
||||
|
||||
for ( Net* net : getCell()->getNets() ) {
|
||||
if (net == _blockageNet) continue;
|
||||
if (net->getType() == Net::Type::POWER ) continue;
|
||||
|
@ -85,9 +87,52 @@ namespace Anabatic {
|
|||
bool isFixed = false;
|
||||
size_t rpCount = 0;
|
||||
|
||||
if (net->isDeepNet()) {
|
||||
rpCount = 2;
|
||||
for( Component* component : net->getComponents() ) {
|
||||
if (dynamic_cast<Pin*>(component)) continue;
|
||||
|
||||
const RegularLayer* layer = dynamic_cast<const RegularLayer*>(component->getLayer());
|
||||
if (layer and (layer->getBasicLayer()->getMaterial() == BasicLayer::Material::blockage))
|
||||
continue;
|
||||
|
||||
Horizontal* horizontal = dynamic_cast<Horizontal*>(component);
|
||||
if (horizontal) {
|
||||
segments.push_back( horizontal );
|
||||
isPreRouted = true;
|
||||
if (horizontal->getWidth() != Session::getWireWidth(horizontal->getLayer()))
|
||||
isFixed = true;
|
||||
} else {
|
||||
Vertical* vertical = dynamic_cast<Vertical*>(component);
|
||||
if (vertical) {
|
||||
isPreRouted = true;
|
||||
segments.push_back( vertical );
|
||||
if (vertical->getWidth() != Session::getWireWidth(vertical->getLayer()))
|
||||
isFixed = true;
|
||||
} else {
|
||||
Contact* contact = dynamic_cast<Contact*>(component);
|
||||
if (contact) {
|
||||
isPreRouted = true;
|
||||
contacts.push_back( contact );
|
||||
if ( (contact->getWidth () != Session::getViaWidth(contact->getLayer()))
|
||||
or (contact->getHeight() != Session::getViaWidth(contact->getLayer()))
|
||||
or (contact->getLayer () == Session::getContactLayer(0)) )
|
||||
isFixed = true;
|
||||
} else {
|
||||
RoutingPad* rp = dynamic_cast<RoutingPad*>(component);
|
||||
if (rp) {
|
||||
++rpCount;
|
||||
} else {
|
||||
// Plug* plug = dynamic_cast<Plug*>(component);
|
||||
// if (plug) {
|
||||
// cerr << "buildPreRouteds(): " << plug << endl;
|
||||
// ++rpCount;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((not isFixed and not isPreRouted) and net->isDeepNet()) {
|
||||
Net* rootNet = dynamic_cast<Net*>(
|
||||
dynamic_cast<DeepNet*>(net)->getRootNetOccurrence().getEntity() );
|
||||
for( Component* component : rootNet->getComponents() ) {
|
||||
|
@ -95,50 +140,6 @@ namespace Anabatic {
|
|||
if (dynamic_cast<Vertical*> (component)) { isFixed = true; break; }
|
||||
if (dynamic_cast<Contact*> (component)) { isFixed = true; break; }
|
||||
}
|
||||
} else {
|
||||
for( Component* component : net->getComponents() ) {
|
||||
if (dynamic_cast<Pin*>(component)) continue;
|
||||
|
||||
const RegularLayer* layer = dynamic_cast<const RegularLayer*>(component->getLayer());
|
||||
if (layer and (layer->getBasicLayer()->getMaterial() == BasicLayer::Material::blockage))
|
||||
continue;
|
||||
|
||||
Horizontal* horizontal = dynamic_cast<Horizontal*>(component);
|
||||
if (horizontal) {
|
||||
segments.push_back( horizontal );
|
||||
isPreRouted = true;
|
||||
if (horizontal->getWidth() != Session::getWireWidth(horizontal->getLayer()))
|
||||
isFixed = true;
|
||||
} else {
|
||||
Vertical* vertical = dynamic_cast<Vertical*>(component);
|
||||
if (vertical) {
|
||||
isPreRouted = true;
|
||||
segments.push_back( vertical );
|
||||
if (vertical->getWidth() != Session::getWireWidth(vertical->getLayer()))
|
||||
isFixed = true;
|
||||
} else {
|
||||
Contact* contact = dynamic_cast<Contact*>(component);
|
||||
if (contact) {
|
||||
isPreRouted = true;
|
||||
contacts.push_back( contact );
|
||||
if ( (contact->getWidth () != Session::getViaWidth(contact->getLayer()))
|
||||
or (contact->getHeight() != Session::getViaWidth(contact->getLayer())) )
|
||||
isFixed = true;
|
||||
} else {
|
||||
RoutingPad* rp = dynamic_cast<RoutingPad*>(component);
|
||||
if (rp) {
|
||||
++rpCount;
|
||||
} else {
|
||||
// Plug* plug = dynamic_cast<Plug*>(component);
|
||||
// if (plug) {
|
||||
// cerr << "buildPreRouteds(): " << plug << endl;
|
||||
// ++rpCount;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isFixed or isPreRouted or (rpCount < 2)) {
|
||||
|
@ -156,6 +157,8 @@ namespace Anabatic {
|
|||
state->setFlags ( NetRoutingState::Fixed );
|
||||
} else {
|
||||
if (rpCount > 1) {
|
||||
++toBeRouteds;
|
||||
|
||||
cmess2 << " - <" << net->getName() << "> is manually global routed." << endl;
|
||||
for ( auto icontact : contacts ) {
|
||||
AutoContact::createFrom( icontact );
|
||||
|
@ -169,10 +172,14 @@ namespace Anabatic {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
++toBeRouteds;
|
||||
}
|
||||
}
|
||||
|
||||
Session::close();
|
||||
|
||||
return toBeRouteds;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace Anabatic {
|
|||
inline void setBlockageNet ( Net* );
|
||||
void chipPrep ();
|
||||
void setupSpecialNets ();
|
||||
void setupPreRouteds ();
|
||||
size_t setupPreRouteds ();
|
||||
void loadGlobalRouting ( uint32_t method );
|
||||
void computeNetConstraints ( Net* );
|
||||
void toOptimals ( Net* );
|
||||
|
|
|
@ -234,10 +234,14 @@ namespace Katana {
|
|||
setupRoutingPlanes();
|
||||
}
|
||||
setupSpecialNets();
|
||||
setupPreRouteds();
|
||||
if (not isChannelMode()) {
|
||||
setupPowerRails();
|
||||
protectRoutingPads();
|
||||
if (not setupPreRouteds()) {
|
||||
setState( Anabatic::EngineDriving );
|
||||
throw Error( "KatanaEngine::digitalInit(): All nets are already routed, doing nothing." );
|
||||
} else {
|
||||
if (not isChannelMode()) {
|
||||
setupPowerRails();
|
||||
protectRoutingPads();
|
||||
}
|
||||
}
|
||||
_runKatanaInit();
|
||||
|
||||
|
|
Loading…
Reference in New Issue