Always check that coreAb fit into coronaAb while building a chip.

This commit is contained in:
Jean-Paul Chaput 2023-09-20 20:15:24 +02:00
parent 6fb0215742
commit c8d98a304e
2 changed files with 16 additions and 0 deletions

View File

@ -484,6 +484,19 @@ class Block ( object ):
trace( 550, '\tCORE AB is {}\n'.format(self.conf.cell.getAbutmentBox()) ) trace( 550, '\tCORE AB is {}\n'.format(self.conf.cell.getAbutmentBox()) )
if self.conf.isCoreBlock: if self.conf.isCoreBlock:
self.conf.setupICore() self.conf.setupICore()
minHCorona = self.conf.minHCorona
minVCorona = self.conf.minVCorona
innerBb = Box( self.conf.coreAb )
innerBb.inflate( minHCorona, minVCorona )
coronaAb = self.conf.corona.getAbutmentBox()
if innerBb.getWidth() > coronaAb.getWidth():
raise ErrorMessage( 1, 'Core is too wide to fit into the corona, needs {} but only has {}.' \
.format( DbU.getValueString(innerBb .getWidth())
, DbU.getValueString(coronaAb.getWidth()) ) )
if innerBb.getHeight() > coronaAb.getHeight():
raise ErrorMessage( 1, 'Core is too tall to fit into the corona, needs {} but only has {}.' \
.format( DbU.getValueString(innerBb .getHeight())
, DbU.getValueString(coronaAb.getHeight()) ) )
self.conf.setRoutingBb( self.conf.cellPnR.getAbutmentBox() ) self.conf.setRoutingBb( self.conf.cellPnR.getAbutmentBox() )
def flattenNets ( self ): def flattenNets ( self ):

View File

@ -99,11 +99,14 @@ class Chip ( Block ):
trace( 550, '\tminHCorona={}\n'.format(DbU.getValueString( minHCorona ))) trace( 550, '\tminHCorona={}\n'.format(DbU.getValueString( minHCorona )))
trace( 550, '\tminVCorona={}\n'.format(DbU.getValueString( minVCorona ))) trace( 550, '\tminVCorona={}\n'.format(DbU.getValueString( minVCorona )))
else: else:
print( ' - Using harness.' )
self.padsCorona = harnessPads.Corona( self ) self.padsCorona = harnessPads.Corona( self )
self.padsCorona.doLayout() self.padsCorona.doLayout()
innerBb = Box( self.conf.coreAb ) innerBb = Box( self.conf.coreAb )
innerBb.inflate( minHCorona, minVCorona ) innerBb.inflate( minHCorona, minVCorona )
coronaAb = self.conf.corona.getAbutmentBox() coronaAb = self.conf.corona.getAbutmentBox()
trace( 550, '\tinnerBb:{}\n'.format(innerBb) )
trace( 550, '\tcoronaAb:{}\n'.format(coronaAb) )
if innerBb.getWidth() > coronaAb.getWidth(): if innerBb.getWidth() > coronaAb.getWidth():
raise ErrorMessage( 1, 'Core is too wide to fit into the corona, needs {} but only has {}.' \ raise ErrorMessage( 1, 'Core is too wide to fit into the corona, needs {} but only has {}.' \
.format( DbU.getValueString(innerBb .getWidth()) .format( DbU.getValueString(innerBb .getWidth())