diff --git a/cumulus/src/plugins/ClockTreePlugin.py b/cumulus/src/plugins/ClockTreePlugin.py index 356a0d9f..54bef8b6 100755 --- a/cumulus/src/plugins/ClockTreePlugin.py +++ b/cumulus/src/plugins/ClockTreePlugin.py @@ -60,7 +60,7 @@ def unicornHook ( **kw ): def ScriptMain ( **kw ): try: helpers.staticInitialization( quiet=True ) - helpers.setTraceLevel( 550 ) + #helpers.setTraceLevel( 550 ) errorCode = 0 diff --git a/cumulus/src/plugins/chip/BlockPower.py b/cumulus/src/plugins/chip/BlockPower.py index 28e52cb0..db8492db 100644 --- a/cumulus/src/plugins/chip/BlockPower.py +++ b/cumulus/src/plugins/chip/BlockPower.py @@ -231,21 +231,31 @@ class Block ( chip.Configuration.ChipConfWrapper ): % (self.path.getTailInstance().getName(),self.ck.getName()) ) return - plugs = [] + htPlugs = [] + ffPlugs = [] for plug in blockCk.getPlugs(): if plug.getInstance().getName() == 'ck_htree': - plugs.append( plug ) + htPlugs.append( plug ) + else: + if plug.getInstance().getMasterCell().isTerminal(): + ffPlugs.append( plug ) - if len(plugs) != 1: + if len(ffPlugs) > 0: + message = 'Clock <%s> of block <%s> is not organized as a H-Tree.' \ + % (blockCk.getName(),self.path.getTailInstance().getName()) + print ErrorMessage( 1, message ) + return + + if len(htPlugs) > 1: message = 'Block <%s> has not exactly one H-Tree connecteds to the clock <%s>:' \ % (self.path.getTailInstance().getName(),blockCk.getName()) - for plug in plugs: + for plug in htPlugs: message += '\n - %s' % plug print ErrorMessage( 1, message ) return UpdateSession.open() - bufferRp = self.rpAccessByOccurrence( Occurrence(plugs[0], self.path), self.cko ) + bufferRp = self.rpAccessByOccurrence( Occurrence(htPlugs[0], self.path), self.cko ) blockAb = self.block.getAbutmentBox() self.path.getTransformation().applyOn( blockAb ) layerGauge = self.routingGauge.getLayerGauge(self.verticalDepth) diff --git a/cumulus/src/plugins/chip/Configuration.py b/cumulus/src/plugins/chip/Configuration.py index f2c61f0c..2f7879b8 100644 --- a/cumulus/src/plugins/chip/Configuration.py +++ b/cumulus/src/plugins/chip/Configuration.py @@ -62,23 +62,12 @@ def getPlugByNet ( instance, net ): def getRpBb ( instance, netName ): - print 'getRpBb()' - sys.stdout.flush() bb = Box() for net in instance.getMasterCell().getNets(): - print net - sys.stdout.flush() if net.isExternal() and net.getName() == netName: - print 'all components' - for component in net.getComponents(): - print component - print 'external components' for component in net.getExternalComponents(): - print component - sys.stdout.flush() if isinstance(component,Vertical): bb = component.getBoundingBox() - print 'End of loop' instance.getTransformation().applyOn( bb ) return bb diff --git a/cumulus/src/plugins/clocktree/ClockTree.py b/cumulus/src/plugins/clocktree/ClockTree.py index a86c3c4a..cbfabdfd 100755 --- a/cumulus/src/plugins/clocktree/ClockTree.py +++ b/cumulus/src/plugins/clocktree/ClockTree.py @@ -130,7 +130,7 @@ class HTree ( GaugeConfWrapper ): def _getBufferIo ( self ): self.bufferCell = self.framework.getCell( Cfg.getParamString('clockTree.buffer').asString() - , CRL.Catalog.State.Logical ) + , CRL.Catalog.State.Views ) for net in self.bufferCell.getNets(): if not net.isExternal(): continue if net.isGlobal(): continue diff --git a/hurricane/src/hurricane/NetExternalComponents.cpp b/hurricane/src/hurricane/NetExternalComponents.cpp index a6bb8e03..d327dcf9 100644 --- a/hurricane/src/hurricane/NetExternalComponents.cpp +++ b/hurricane/src/hurricane/NetExternalComponents.cpp @@ -52,14 +52,12 @@ namespace Hurricane { StandardRelation* NetExternalComponents::getRelation ( const Net* net ) { Property* property = net->getProperty(_name); - if (!property) { - return NULL; - } else { - StandardRelation* relation = dynamic_cast(property); - if (!relation) - throw Error("Bad Property type: Must be a Standard Relation"); - return relation; - } + if (not property) return NULL; + + StandardRelation* relation = dynamic_cast(property); + if (not relation) + throw Error("Bad Property type: Must be a Standard Relation"); + return relation; } diff --git a/hurricane/src/isobar/PyNet.cpp b/hurricane/src/isobar/PyNet.cpp index 8fce246a..653c7089 100644 --- a/hurricane/src/isobar/PyNet.cpp +++ b/hurricane/src/isobar/PyNet.cpp @@ -284,9 +284,7 @@ extern "C" { Components* components = new Components(NetExternalComponents::get(net)); pyComponentCollection = PyObject_NEW(PyComponentCollection, &PyTypeComponentCollection); - if (pyComponentCollection == NULL) { - return NULL; - } + if (pyComponentCollection == NULL) return NULL; pyComponentCollection->_object = components; HCATCH diff --git a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h index 350f48c8..1cc3648f 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h +++ b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h @@ -727,7 +727,7 @@ extern "C" { { \ Locator* locator = pyLocator->_object; \ HTRY \ - if (locator->isValid()) { \ + if (locator and locator->isValid()) { \ TYPE* object = locator->getElement(); \ locator->progress(); \ return Py##TYPE##_Link(object); \ @@ -741,7 +741,7 @@ extern "C" { { \ Locator* locator = pyLocator->_object; \ HTRY \ - if (locator->isValid()) { \ + if (locator and locator->isValid()) { \ Py##TYPE* pyObject = PyObject_NEW( Py##TYPE, &PyType##TYPE ); \ if (pyObject == NULL) return NULL; \ pyObject->_object = locator->getElement(); \ @@ -757,7 +757,7 @@ extern "C" { static PyObject* Py##TYPE##LocatorNext(Py##TYPE##CollectionLocator* pyLocator) { \ Locator* locator = pyLocator->_object; \ HTRY \ - if (locator->isValid()) { \ + if (locator and locator->isValid()) { \ TYPE* object = locator->getElement(); \ locator->progress(); \ return PyEntity_NEW(object); \