From cfcd4b7115a828d104926796170b60fa6b6fed09 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 23 Mar 2021 17:05:18 +0100 Subject: [PATCH] Do not for materialization in RoutingPad::setExternalComponent(). * Bug: In RoutingPad::setExternalComponent(), we where always forcing the materialization of the RoutingPad (QuadTree insertion). Now respect the Go::enableAutoMaterialization() state. Forcing the materialization is equivalent to having an UpdateSession. So when creating large amount of RoutingPads it did result in huge slow down, like in HFNS algorithms. With this modification we go down from 6h+ to 4m for the ls180. --- hurricane/src/hurricane/RoutingPad.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/hurricane/src/hurricane/RoutingPad.cpp b/hurricane/src/hurricane/RoutingPad.cpp index 1c161313..d86865ca 100644 --- a/hurricane/src/hurricane/RoutingPad.cpp +++ b/hurricane/src/hurricane/RoutingPad.cpp @@ -295,19 +295,25 @@ namespace Hurricane { void RoutingPad::setExternalComponent ( Component* component ) { - if ( isMaterialized() ) invalidate(false); + if (isMaterialized()) invalidate( false ); Occurrence plugOccurrence = getPlugOccurrence(); - Plug* plug = static_cast(plugOccurrence.getEntity()); - if ( plug->getMasterNet() != component->getNet() ) - throw Error("Cannot Set External Component to Routing Pad : Inconsistant Net"); + Plug* plug = static_cast( plugOccurrence.getEntity() ); + if (plug->getMasterNet() != component->getNet()) + throw Error( "RoutingPad::setExternalComponent(): Cannot set external Component of RoutingPadn, inconsistant net.\n" + " * RoutingPad:%s\n" + " * Component:%s" + , getString(getNet()).c_str() + , getString(component).c_str() + ); - _occurrence.getMasterCell()->_removeSlaveEntity(_occurrence.getEntity(),this); - _occurrence = Occurrence(component,Path(plugOccurrence.getPath(),plug->getInstance())); + _occurrence.getMasterCell()->_removeSlaveEntity( _occurrence.getEntity(), this ); + _occurrence = Occurrence( component, Path(plugOccurrence.getPath(),plug->getInstance()) ); + _occurrence.getMasterCell()->_addSlaveEntity( _occurrence.getEntity(), this ); - _occurrence.getMasterCell()->_addSlaveEntity(_occurrence.getEntity(),this); - - if (!isMaterialized()) materialize(); + if (not isMaterialized() and not Go::autoMaterializationIsDisabled()) + //if (not isMaterialized()) + materialize(); }