From 2af531991eab6dfb9a9c445b0a028bd7fe9736d9 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 20 Mar 2020 12:05:12 +0100 Subject: [PATCH] Correct drive of the Pin in AP driver. * Bug: In CRL::ApDriver::DumpSegments(), when saving RoutingPads build on Pin *not* at the top level (that is, Pin from an instance), use the pin's orientation to choose the segment type. * NORTH/SOUTH becomes a Vertical. * EAST/WEST becomes an Horizontal. Formerly, the segment direction was guessed only for the bounding box, leading to segments in incorrect directions leading to DRC errors (in nmigen/ALU16, net "b(10)"). * Bug: In CRL/symbolic/cmos/technology.py, forgotten import for WarningMessage. --- .../docker/debian-10/root/socInstaller.py | 20 ++++++----- .../scientificlinux-7/root/socInstaller.py | 2 +- crlcore/etc/symbolic/cmos/technology.py | 1 + crlcore/src/ccore/alliance/ap/ApDriver.cpp | 33 +++++++++++-------- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/bootstrap/docker/debian-10/root/socInstaller.py b/bootstrap/docker/debian-10/root/socInstaller.py index e744c38a..36d9c840 100755 --- a/bootstrap/docker/debian-10/root/socInstaller.py +++ b/bootstrap/docker/debian-10/root/socInstaller.py @@ -307,7 +307,7 @@ class Configuration ( object ): self._doSendReport = False self._nightlyMode = False self._dockerMode = False - self._chrootMode = False + self._chrootMode = None self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._ccbBin = None @@ -352,15 +352,17 @@ class Configuration ( object ): if self._nightlyMode: self._rootDir = self._homeDir + '/nightly/coriolis-2.x' else: - self._rootDir = self._homeDir + '/coriolis-2.x' - self._srcDir = self._rootDir + '/src' - self._logDir = self._srcDir + '/logs' - self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh' - self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' - self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' + self._rootDir = self._homeDir + '/coriolis-2.x' + self._srcDir = self._rootDir + '/src' + self._logDir = self._srcDir + '/logs' + self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh' + self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' + self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' + self._masterHost = self._detectMasterHost() return def _detectMasterHost ( self ): + if self._chrootMode is None: return 'unknown' if self._chrootMode: return 'chrooted-host' masterHost = 'unknown' @@ -438,7 +440,7 @@ class Configuration ( object ): otherArgs.append( '--devtoolset=8' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) - elif target == 'Ubuntu18' or target == 'Debian9': + elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10': if target == 'Ubuntu18': otherArgs.append( '--qt5' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) @@ -536,6 +538,7 @@ parser.add_option ( "--root" , action="store" , type="string", dest= parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." ) (options, args) = parser.parse_args () + conf = Configuration() try: @@ -551,6 +554,7 @@ try: if options.rmSource or options.rmAll: conf.rmSource = True if options.rmBuild or options.rmAll: conf.rmBuild = True + if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doBenchs: conf.openLog( 'benchs' ) diff --git a/bootstrap/docker/scientificlinux-7/root/socInstaller.py b/bootstrap/docker/scientificlinux-7/root/socInstaller.py index 592a562f..36d9c840 100755 --- a/bootstrap/docker/scientificlinux-7/root/socInstaller.py +++ b/bootstrap/docker/scientificlinux-7/root/socInstaller.py @@ -440,7 +440,7 @@ class Configuration ( object ): otherArgs.append( '--devtoolset=8' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) - elif target == 'Ubuntu18' or target == 'Debian9': + elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10': if target == 'Ubuntu18': otherArgs.append( '--qt5' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) diff --git a/crlcore/etc/symbolic/cmos/technology.py b/crlcore/etc/symbolic/cmos/technology.py index 20150ec8..d09b4fb8 100644 --- a/crlcore/etc/symbolic/cmos/technology.py +++ b/crlcore/etc/symbolic/cmos/technology.py @@ -14,6 +14,7 @@ from helpers import l, u, n +from helpers.io import WarningMessage import helpers.io helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) diff --git a/crlcore/src/ccore/alliance/ap/ApDriver.cpp b/crlcore/src/ccore/alliance/ap/ApDriver.cpp index cfa1e486..8cdd9932 100644 --- a/crlcore/src/ccore/alliance/ap/ApDriver.cpp +++ b/crlcore/src/ccore/alliance/ap/ApDriver.cpp @@ -238,6 +238,7 @@ void DumpContacts(ofstream& ccell, Cell *cell) Segment* segment = NULL; RoutingPad* rp = NULL; bool external = false; + const char* direction = NULL; for ( Net* net : cell->getNets() ) { string netName = toMBKName( net->getName() ); @@ -261,18 +262,22 @@ void DumpContacts(ofstream& ccell, Cell *cell) if (pin and (rp->getOccurrence().getPath().getHeadInstance() != NULL)) { Box bb ( pin->getBoundingBox() ); rp->getOccurrence().getPath().getTransformation().applyOn( bb ); - if (bb.getWidth() > bb.getHeight()) { - x1 = bb.getCenter().getX(); - x2 = x1; - y1 = bb.getYMin(); - y2 = bb.getYMax(); - width = bb.getWidth(); + //if (bb.getWidth() > bb.getHeight()) { + if ( (pin->getAccessDirection() == Pin::AccessDirection::NORTH) + or (pin->getAccessDirection() == Pin::AccessDirection::SOUTH)) { + x1 = bb.getCenter().getX(); + x2 = x1; + y1 = bb.getYMin(); + y2 = bb.getYMax(); + width = bb.getWidth(); + direction = "UP"; } else { - x1 = bb.getXMin(); - x2 = bb.getXMax(); - y1 = bb.getCenter().getY(); - y2 = y1; - width = bb.getHeight(); + x1 = bb.getXMin(); + x2 = bb.getXMax(); + y1 = bb.getCenter().getY(); + y2 = y1; + width = bb.getHeight(); + direction = "RIGHT"; } } else continue; @@ -287,8 +292,10 @@ void DumpContacts(ofstream& ccell, Cell *cell) } else continue; - const char* direction = "RIGHT"; - if ( (x1 == x2) and (y1 != y2) ) direction = "UP"; + if (not direction) { + direction = "RIGHT"; + if ( (x1 == x2) and (y1 != y2) ) direction = "UP"; + } if (x1 > x2) std::swap( x1, x2 ); if (y1 > y2) std::swap( y1, y2 );