Correct loading of clock buffer in ClockTree plugin.
* Bug: In ClockTree plugin, only the logical view of the clock buffer was loaded, so no external components where found on the I/O nets. The external components are loaded only when the *physical* view is loaded. Didn't show on sxlib because the buffer was fulled loaded *before* running the ClockTree. * Bug: In PyHurricane, in the various LocatorNextMethod() macros, sometimes an empty collection can be returned by Hurricane (GenericCollection()), which has a NULL locator. So check if the locator is *not* NULL before trying to access it... * Change: In Chip, more accurate error messages related to the clock detecttion.
This commit is contained in:
parent
ae4d938553
commit
e6c809a12a
|
@ -60,7 +60,7 @@ def unicornHook ( **kw ):
|
||||||
def ScriptMain ( **kw ):
|
def ScriptMain ( **kw ):
|
||||||
try:
|
try:
|
||||||
helpers.staticInitialization( quiet=True )
|
helpers.staticInitialization( quiet=True )
|
||||||
helpers.setTraceLevel( 550 )
|
#helpers.setTraceLevel( 550 )
|
||||||
|
|
||||||
errorCode = 0
|
errorCode = 0
|
||||||
|
|
||||||
|
|
|
@ -231,21 +231,31 @@ class Block ( chip.Configuration.ChipConfWrapper ):
|
||||||
% (self.path.getTailInstance().getName(),self.ck.getName()) )
|
% (self.path.getTailInstance().getName(),self.ck.getName()) )
|
||||||
return
|
return
|
||||||
|
|
||||||
plugs = []
|
htPlugs = []
|
||||||
|
ffPlugs = []
|
||||||
for plug in blockCk.getPlugs():
|
for plug in blockCk.getPlugs():
|
||||||
if plug.getInstance().getName() == 'ck_htree':
|
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>:' \
|
message = 'Block <%s> has not exactly one H-Tree connecteds to the clock <%s>:' \
|
||||||
% (self.path.getTailInstance().getName(),blockCk.getName())
|
% (self.path.getTailInstance().getName(),blockCk.getName())
|
||||||
for plug in plugs:
|
for plug in htPlugs:
|
||||||
message += '\n - %s' % plug
|
message += '\n - %s' % plug
|
||||||
print ErrorMessage( 1, message )
|
print ErrorMessage( 1, message )
|
||||||
return
|
return
|
||||||
|
|
||||||
UpdateSession.open()
|
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()
|
blockAb = self.block.getAbutmentBox()
|
||||||
self.path.getTransformation().applyOn( blockAb )
|
self.path.getTransformation().applyOn( blockAb )
|
||||||
layerGauge = self.routingGauge.getLayerGauge(self.verticalDepth)
|
layerGauge = self.routingGauge.getLayerGauge(self.verticalDepth)
|
||||||
|
|
|
@ -62,23 +62,12 @@ def getPlugByNet ( instance, net ):
|
||||||
|
|
||||||
|
|
||||||
def getRpBb ( instance, netName ):
|
def getRpBb ( instance, netName ):
|
||||||
print 'getRpBb()'
|
|
||||||
sys.stdout.flush()
|
|
||||||
bb = Box()
|
bb = Box()
|
||||||
for net in instance.getMasterCell().getNets():
|
for net in instance.getMasterCell().getNets():
|
||||||
print net
|
|
||||||
sys.stdout.flush()
|
|
||||||
if net.isExternal() and net.getName() == netName:
|
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():
|
for component in net.getExternalComponents():
|
||||||
print component
|
|
||||||
sys.stdout.flush()
|
|
||||||
if isinstance(component,Vertical):
|
if isinstance(component,Vertical):
|
||||||
bb = component.getBoundingBox()
|
bb = component.getBoundingBox()
|
||||||
print 'End of loop'
|
|
||||||
instance.getTransformation().applyOn( bb )
|
instance.getTransformation().applyOn( bb )
|
||||||
return bb
|
return bb
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ class HTree ( GaugeConfWrapper ):
|
||||||
|
|
||||||
def _getBufferIo ( self ):
|
def _getBufferIo ( self ):
|
||||||
self.bufferCell = self.framework.getCell( Cfg.getParamString('clockTree.buffer').asString()
|
self.bufferCell = self.framework.getCell( Cfg.getParamString('clockTree.buffer').asString()
|
||||||
, CRL.Catalog.State.Logical )
|
, CRL.Catalog.State.Views )
|
||||||
for net in self.bufferCell.getNets():
|
for net in self.bufferCell.getNets():
|
||||||
if not net.isExternal(): continue
|
if not net.isExternal(): continue
|
||||||
if net.isGlobal(): continue
|
if net.isGlobal(): continue
|
||||||
|
|
|
@ -52,14 +52,12 @@ namespace Hurricane {
|
||||||
StandardRelation* NetExternalComponents::getRelation ( const Net* net )
|
StandardRelation* NetExternalComponents::getRelation ( const Net* net )
|
||||||
{
|
{
|
||||||
Property* property = net->getProperty(_name);
|
Property* property = net->getProperty(_name);
|
||||||
if (!property) {
|
if (not property) return NULL;
|
||||||
return NULL;
|
|
||||||
} else {
|
StandardRelation* relation = dynamic_cast<StandardRelation*>(property);
|
||||||
StandardRelation* relation = dynamic_cast<StandardRelation*>(property);
|
if (not relation)
|
||||||
if (!relation)
|
throw Error("Bad Property type: Must be a Standard Relation");
|
||||||
throw Error("Bad Property type: Must be a Standard Relation");
|
return relation;
|
||||||
return relation;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -284,9 +284,7 @@ extern "C" {
|
||||||
Components* components = new Components(NetExternalComponents::get(net));
|
Components* components = new Components(NetExternalComponents::get(net));
|
||||||
|
|
||||||
pyComponentCollection = PyObject_NEW(PyComponentCollection, &PyTypeComponentCollection);
|
pyComponentCollection = PyObject_NEW(PyComponentCollection, &PyTypeComponentCollection);
|
||||||
if (pyComponentCollection == NULL) {
|
if (pyComponentCollection == NULL) return NULL;
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
pyComponentCollection->_object = components;
|
pyComponentCollection->_object = components;
|
||||||
HCATCH
|
HCATCH
|
||||||
|
|
|
@ -727,7 +727,7 @@ extern "C" {
|
||||||
{ \
|
{ \
|
||||||
Locator<TYPE*>* locator = pyLocator->_object; \
|
Locator<TYPE*>* locator = pyLocator->_object; \
|
||||||
HTRY \
|
HTRY \
|
||||||
if (locator->isValid()) { \
|
if (locator and locator->isValid()) { \
|
||||||
TYPE* object = locator->getElement(); \
|
TYPE* object = locator->getElement(); \
|
||||||
locator->progress(); \
|
locator->progress(); \
|
||||||
return Py##TYPE##_Link(object); \
|
return Py##TYPE##_Link(object); \
|
||||||
|
@ -741,7 +741,7 @@ extern "C" {
|
||||||
{ \
|
{ \
|
||||||
Locator<TYPE*>* locator = pyLocator->_object; \
|
Locator<TYPE*>* locator = pyLocator->_object; \
|
||||||
HTRY \
|
HTRY \
|
||||||
if (locator->isValid()) { \
|
if (locator and locator->isValid()) { \
|
||||||
Py##TYPE* pyObject = PyObject_NEW( Py##TYPE, &PyType##TYPE ); \
|
Py##TYPE* pyObject = PyObject_NEW( Py##TYPE, &PyType##TYPE ); \
|
||||||
if (pyObject == NULL) return NULL; \
|
if (pyObject == NULL) return NULL; \
|
||||||
pyObject->_object = locator->getElement(); \
|
pyObject->_object = locator->getElement(); \
|
||||||
|
@ -757,7 +757,7 @@ extern "C" {
|
||||||
static PyObject* Py##TYPE##LocatorNext(Py##TYPE##CollectionLocator* pyLocator) { \
|
static PyObject* Py##TYPE##LocatorNext(Py##TYPE##CollectionLocator* pyLocator) { \
|
||||||
Locator<TYPE*>* locator = pyLocator->_object; \
|
Locator<TYPE*>* locator = pyLocator->_object; \
|
||||||
HTRY \
|
HTRY \
|
||||||
if (locator->isValid()) { \
|
if (locator and locator->isValid()) { \
|
||||||
TYPE* object = locator->getElement(); \
|
TYPE* object = locator->getElement(); \
|
||||||
locator->progress(); \
|
locator->progress(); \
|
||||||
return PyEntity_NEW(object); \
|
return PyEntity_NEW(object); \
|
||||||
|
|
Loading…
Reference in New Issue