From 21c269a8559a969179ebe7742d3684ee0eef5f46 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 1 Feb 2021 17:01:32 +0100 Subject: [PATCH] Improved support for foreign block support in Cumulus. * Change: In cumulus/plugins.block.Block.__init__(), assume that a block is already built only if *all* it's instances are placed. Not some of them. * New: In cumulus/plugins/block/configuration, added support for a placeArea parameter to restrict the placement area further than the abutment box (see Etesian for the new feature). * Change: In cumulus/plugins/CoreToChip, no longer adds I/O pads for core signals that lacks one. Only issue an error message and continue. More useful for debugging block support. --- cumulus/src/plugins/alpha/block/block.py | 20 ++++++++++++--- .../src/plugins/alpha/block/configuration.py | 1 + .../src/plugins/alpha/core2chip/core2chip.py | 25 +++++++++++-------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/cumulus/src/plugins/alpha/block/block.py b/cumulus/src/plugins/alpha/block/block.py index 180787af..0a900bec 100644 --- a/cumulus/src/plugins/alpha/block/block.py +++ b/cumulus/src/plugins/alpha/block/block.py @@ -308,10 +308,20 @@ class Block ( object ): , IoPin.NORTH : Side( self.conf, IoPin.NORTH ) } if not self.conf.cell.getAbutmentBox().isEmpty(): - print( ' o Block "{}" is already done, reusing layout.' \ - .format(self.conf.cell.getName()) ) - self.conf.cell.setTerminalNetlist( True ) - self.conf.isBuilt = True + isBuilt = True + for instance in self.conf.cell.getInstances(): + status = instance.getPlacementStatus() + if status == Instance.PlacementStatus.UNPLACED: + isBuilt = False + break + if isBuilt: + print( ' o Block "{}" is already done, reusing layout.' \ + .format(self.conf.cell.getName()) ) + self.conf.cell.setTerminalNetlist( True ) + else: + print( ' o Block "{}" is partially placed, reusing layout.' \ + .format(self.conf.cell.getName()) ) + self.conf.isBuilt = isBuilt else: print( ' o Block "{}" will be generated.' \ .format(self.conf.cell.getName()) ) @@ -534,6 +544,8 @@ class Block ( object ): Breakpoint.stop( 100, 'Block.place(), corona loaded.') else: self.etesian = Etesian.EtesianEngine.create( self.conf.cell ) + if self.conf.placeArea: + self.etesian.setPlaceArea( self.conf.placeArea ) self.etesian.place() Breakpoint.stop( 100, 'Placement done.' ) self.etesian.clearColoquinte() diff --git a/cumulus/src/plugins/alpha/block/configuration.py b/cumulus/src/plugins/alpha/block/configuration.py index 79ef198e..ab48e18d 100644 --- a/cumulus/src/plugins/alpha/block/configuration.py +++ b/cumulus/src/plugins/alpha/block/configuration.py @@ -1087,6 +1087,7 @@ class BlockConf ( GaugeConf ): self.chip = None self.fixedWidth = None self.fixedHeight = None + self.placeArea = None self.deltaAb = [ 0, 0, 0, 0 ] self.useClockTree = False self.useHFNS = False diff --git a/cumulus/src/plugins/alpha/core2chip/core2chip.py b/cumulus/src/plugins/alpha/core2chip/core2chip.py index ee4f1e3f..bce4f114 100644 --- a/cumulus/src/plugins/alpha/core2chip/core2chip.py +++ b/cumulus/src/plugins/alpha/core2chip/core2chip.py @@ -665,17 +665,20 @@ class CoreToChip ( object ): elif coreNet.isClock(): continue elif self.hasIoNet(coreNet.getName()): continue # Remaining non configured Standard I/O pads. - ioNet = IoNet( self, coreNet ) - directPad = IoPadConf( ( 0 # Unkown side. - , None # Unknow position. - , ioNet.padInstanceName - , ioNet.chipExtNetName - , ioNet.coreNetName - ) ) - directPad.udata = IoPad( self, directPad.instanceName ) - directPad.udata.addNet( ioNet ) - ioPads.append( directPad ) - trace( 550, '\tNon-configured core net {}, adding {}\n'.format(coreNet,directPad) ) + print( ErrorMessage( 1, 'CoreToChip.buildChip(): No pad configured for core signal "{}".' \ + .format(coreNet.getName()) ) ) + continue + #ioNet = IoNet( self, coreNet ) + #directPad = IoPadConf( ( 0 # Unkown side. + # , None # Unknow position. + # , ioNet.padInstanceName + # , ioNet.chipExtNetName + # , ioNet.coreNetName + # ) ) + #directPad.udata = IoPad( self, directPad ) + #directPad.udata.addNet( ioNet ) + #ioPads.append( directPad ) + #trace( 550, '\tNon-configured core net {}, adding {}\n'.format(coreNet,directPad) ) for ioPad in ioPads: ioPad.udata.createPad() self._connectRing()