diff --git a/Seabreeze/CMakeLists.txt b/Seabreeze/CMakeLists.txt index 82080557..5773d435 100644 --- a/Seabreeze/CMakeLists.txt +++ b/Seabreeze/CMakeLists.txt @@ -18,9 +18,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/anabatic/CMakeLists.txt b/anabatic/CMakeLists.txt index 9a752dc8..2046b1a9 100644 --- a/anabatic/CMakeLists.txt +++ b/anabatic/CMakeLists.txt @@ -18,8 +18,8 @@ set_cmake_policies() setup_boost() setup_qt() + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/anabatic/src/AutoSegment.cpp b/anabatic/src/AutoSegment.cpp index 53527aa9..ac7d982e 100644 --- a/anabatic/src/AutoSegment.cpp +++ b/anabatic/src/AutoSegment.cpp @@ -3069,6 +3069,7 @@ namespace Anabatic { if (wPitch > 1) segment->setFlags( SegWide ); if (source->canDrag() or target->canDrag()) segment->setFlags( SegDrag ); if (dir & Flags::UseNonPref) segment->setFlags( SegNonPref ); + if (dir.contains(Flags::UseNonPref|Flags::OnVSmall)) segment->setFlags( SegOnVSmall ); return segment; } diff --git a/anabatic/src/CMakeLists.txt b/anabatic/src/CMakeLists.txt index a145b8af..6d9992f0 100644 --- a/anabatic/src/CMakeLists.txt +++ b/anabatic/src/CMakeLists.txt @@ -14,7 +14,6 @@ endif ( CHECK_DETERMINISM ) ${QtX_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes anabatic/Constants.h anabatic/Configuration.h anabatic/Matrix.h diff --git a/anabatic/src/Constants.cpp b/anabatic/src/Constants.cpp index 3a08772c..dc4c2bee 100644 --- a/anabatic/src/Constants.cpp +++ b/anabatic/src/Constants.cpp @@ -132,6 +132,7 @@ namespace Anabatic { const BaseFlags Flags::NoMinLength = (1L << 37); const BaseFlags Flags::NoSegExt = (1L << 38); const BaseFlags Flags::NullLength = (1L << 39); + const BaseFlags Flags::OnVSmall = (1L << 40); Flags::~Flags () diff --git a/anabatic/src/NetBuilderHV.cpp b/anabatic/src/NetBuilderHV.cpp index 63585ee2..644d7951 100644 --- a/anabatic/src/NetBuilderHV.cpp +++ b/anabatic/src/NetBuilderHV.cpp @@ -277,7 +277,9 @@ namespace Anabatic { if (flags & (VSmall|UseNonPref)) { cdebug_log(145,0) << "case: UseNonPref" << endl; - + + if (flags & VSmall) + useNonPref.reset( Flags::UseNonPref ); AutoContact* subContact1 = AutoContactTurn::create( gcell, rp->getNet(), Session::getBuildContactLayer(rpDepth+1) ); AutoSegment::create( rpSourceContact, subContact1, Flags::Vertical|useNonPref ); rpSourceContact = subContact1; diff --git a/anabatic/src/anabatic/AutoSegment.h b/anabatic/src/anabatic/AutoSegment.h index 55803bfc..89404160 100644 --- a/anabatic/src/anabatic/AutoSegment.h +++ b/anabatic/src/anabatic/AutoSegment.h @@ -109,6 +109,7 @@ namespace Anabatic { static const uint64_t SegNonPref = (1L<<37); static const uint64_t SegAtMinArea = (1L<<38); static const uint64_t SegNoMoveUp = (1L<<39); + static const uint64_t SegOnVSmall = (1L<<40); // Masks. static const uint64_t SegWeakTerminal = SegStrongTerminal|SegWeakTerminal1|SegWeakTerminal2; static const uint64_t SegNotAligned = SegNotSourceAligned|SegNotTargetAligned; @@ -202,6 +203,7 @@ namespace Anabatic { inline bool isTerminal () const; inline bool isUnbreakable () const; inline bool isNonPref () const; + inline bool isNonPrefOnVSmall () const; inline bool isDrag () const; inline bool isAtMinArea () const; inline bool isNotSourceAligned () const; @@ -536,6 +538,7 @@ namespace Anabatic { inline bool AutoSegment::isLocal () const { return not (_flags & SegGlobal); } inline bool AutoSegment::isUnbreakable () const { return _flags & SegUnbreakable; } inline bool AutoSegment::isNonPref () const { return _flags & SegNonPref; } + inline bool AutoSegment::isNonPrefOnVSmall () const { return (_flags & SegNonPref) and (_flags & SegOnVSmall); } inline bool AutoSegment::isBipoint () const { return _flags & SegBipoint; } inline bool AutoSegment::isWeakTerminal () const { return (_rpDistance < 2); } inline bool AutoSegment::isWeakTerminal1 () const { return (_rpDistance == 1); } diff --git a/anabatic/src/anabatic/Constants.h b/anabatic/src/anabatic/Constants.h index 8624d2fb..92e97564 100644 --- a/anabatic/src/anabatic/Constants.h +++ b/anabatic/src/anabatic/Constants.h @@ -110,6 +110,7 @@ namespace Anabatic { static const BaseFlags NoMinLength ; static const BaseFlags NoSegExt ; static const BaseFlags NullLength ; + static const BaseFlags OnVSmall ; public: inline Flags ( uint64_t flags = NoFlags ); inline Flags ( const Hurricane::BaseFlags& ); diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 8fba48b9..7552a3e1 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -11,7 +11,6 @@ list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") find_package(Bootstrap REQUIRED) - # find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) print_cmake_module_path() diff --git a/bootstrap/builder/Builder.py b/bootstrap/builder/Builder.py index 68a29c7d..2d4f06c1 100644 --- a/bootstrap/builder/Builder.py +++ b/bootstrap/builder/Builder.py @@ -35,6 +35,7 @@ class Builder: self._noCache = False self._ninja = False self._clang = False + self._manylinux = False self._noSystemBoost = False self._macports = False self._devtoolset = 0 @@ -62,6 +63,7 @@ class Builder: elif attribute == "noCache": self._noCache = value elif attribute == "ninja": self._ninja = value elif attribute == "clang": self._clang = value + elif attribute == "manylinux": self._manylinux = value elif attribute == "macports": self._macports = value if value: self._noSystemBoost = True @@ -177,6 +179,7 @@ class Builder: if self._bfd: command += [ "-D", "USE_LIBBFD:STRING=%s" % self._bfd ] if self._qt4: command += [ "-D", "WITH_QT4:STRING=TRUE" ] if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ] + if self._manylinux: command += [ "-D", "USE_MANYLINUX:STRING=TRUE" ] command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode #, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index 1e454757..89b04430 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -211,6 +211,7 @@ parser.add_option ( "--bfd" , action="store_true" , parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." ) parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." ) parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." ) +parser.add_option ( "--manylinux" , action="store_true" , dest="manylinux" , help="Build target is manylinux (PyPY)." ) parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments" , help="Arguments to pass to make (ex: \"-j4 install\")." ) parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." ) parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." ) @@ -282,6 +283,7 @@ else: if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset if options.bfd: builder.bfd = "ON" if options.qt4: builder.qt4 = True + if options.manylinux: builder.manylinux = True if options.openmp: builder.openmp = True if options.makeArguments: builder.makeArguments = options.makeArguments #if options.svnMethod: builder.svnMethod = options.svnMethod diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 1f9c55db..2bcd02db 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -223,6 +223,20 @@ endif() endmacro(setup_boost) +# +# Setup Python, select detection depending on USE_MANYLINUX. +# + macro(setup_python) + set(pydevelArg "Development") + + if (USE_MANYLINUX) + message(STATUS "Build for manylinux") + set(pydevelArg "Development.Module") + endif() + find_package(Python 3 REQUIRED COMPONENTS Interpreter ${pydevelArg} ) + endmacro() + + # # Find Qt, the union of all the modules we need for the whole project. # diff --git a/bora/CMakeLists.txt b/bora/CMakeLists.txt index e55b6d39..cdad18f5 100644 --- a/bora/CMakeLists.txt +++ b/bora/CMakeLists.txt @@ -18,9 +18,9 @@ setup_boost(program_options) setup_qt() setup_qwt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index e010611c..0e6e3515 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -21,6 +21,7 @@ setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) setup_qt() + setup_python() cmake_policy(SET CMP0054 NEW) @@ -28,7 +29,6 @@ find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/crlcore/python/technos/node180/gf180mcu/mcu9t5v0.py b/crlcore/python/technos/node180/gf180mcu/mcu9t5v0.py index 6af50d79..682bf53f 100644 --- a/crlcore/python/technos/node180/gf180mcu/mcu9t5v0.py +++ b/crlcore/python/technos/node180/gf180mcu/mcu9t5v0.py @@ -11,6 +11,7 @@ from coriolis.CRL import AllianceFramework, Gds, LefImport, CellGa RoutingGauge, RoutingLayerGauge from coriolis.helpers import l, u, n, overlay, io, ndaTopDir from coriolis.helpers.overlay import CfgCache, UpdateSession +from coriolis.Anabatic import StyleFlags __all__ = [ "setup" ] @@ -27,7 +28,7 @@ def _routing (): rg.setSymbolic( False ) rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer( 'Metal1' ) # metal - , RoutingLayerGauge.Vertical # preferred routing direction + , RoutingLayerGauge.Horizontal # preferred routing direction , RoutingLayerGauge.PinOnly # layer usage , 0 # depth , 0.0 # density (deprecated) @@ -39,7 +40,7 @@ def _routing (): , u(0.0 ) )) # obstacle dW rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer( 'Metal2' ) # metal - , RoutingLayerGauge.Horizontal # preferred routing direction + , RoutingLayerGauge.Vertical # preferred routing direction , RoutingLayerGauge.Default # layer usage , 1 # depth , 0.0 # density (deprecated) @@ -48,10 +49,10 @@ def _routing (): , u(0.28) # wire width , u(0.28) # perpandicular wire width , u(0.26) # VIA side - , u(0.0 ) )) # obstacle dW + , u(0.0 ) )) # obstacle dW rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer( 'Metal3' ) # metal - , RoutingLayerGauge.Vertical # preferred routing direction + , RoutingLayerGauge.Horizontal # preferred routing direction , RoutingLayerGauge.Default # layer usage , 2 # depth , 0.0 # density (deprecated) @@ -63,7 +64,7 @@ def _routing (): , u(0.0 ) )) # obstacle dW rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer( 'Metal4' ) # metal - , RoutingLayerGauge.Horizontal # preferred routing direction + , RoutingLayerGauge.Vertical # preferred routing direction , RoutingLayerGauge.Default # layer usage , 3 # depth , 0.0 # density (deprecated) @@ -75,7 +76,7 @@ def _routing (): , u(0.0 ) )) # obstacle dW rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer( 'Metal5' ) # metal - , RoutingLayerGauge.Vertical # preferred routing direction + , RoutingLayerGauge.Horizontal # preferred routing direction , RoutingLayerGauge.Default # layer usage , 4 # depth , 0.0 # density (deprecated) @@ -87,7 +88,7 @@ def _routing (): , u(0.0 ) )) # obstacle dW rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer( 'MetalTop' ) # metal - , RoutingLayerGauge.Horizontal # preferred routing direction + , RoutingLayerGauge.Vertical # preferred routing direction , RoutingLayerGauge.PowerSupply # layer usage , 5 # depth , 0.0 # density (deprecated) @@ -161,7 +162,9 @@ def _routing (): cfg.anabatic.globalIterations = [ 1, 100 ] cfg.anabatic.gcell.displayMode = 1 cfg.anabatic.gcell.displayMode = (("Boundary", 1), ("Density", 2)) - cfg.katana.disableStackedVias = True + cfg.anabatic.netBuilderStyle = 'VH,3RL+' + cfg.anabatic.routingStyle = StyleFlags.VH + cfg.katana.disableStackedVias = False cfg.katana.hTracksReservedLocal = 4 cfg.katana.hTracksReservedLocal = [0, 20] cfg.katana.vTracksReservedLocal = 3 diff --git a/crlcore/python/technos/node180/gf180mcu/techno.py b/crlcore/python/technos/node180/gf180mcu/techno.py index dfdda812..8972bb65 100644 --- a/crlcore/python/technos/node180/gf180mcu/techno.py +++ b/crlcore/python/technos/node180/gf180mcu/techno.py @@ -80,20 +80,20 @@ def _setup_techno(): setEnclosures( CONT, Poly2 , u(0.07) ) setEnclosures( CONT, Metal1, u(0.12) ) VIA12 = createVia( tech, 'VIA12', 'Metal1', 'Via1', 'Metal2', u(0.26) ) - setEnclosures( VIA12, Metal1, u(0.06) ) - setEnclosures( VIA12, Metal2, u(0.06) ) + setEnclosures( VIA12, Metal1, (u(0.06), u(0.00)) ) + setEnclosures( VIA12, Metal2, (u(0.06), u(0.01)) ) VIA23 = createVia( tech, 'VIA23', 'Metal2', 'Via2', 'Metal3', u(0.26) ) - setEnclosures( VIA23, Metal2, u(0.06) ) - setEnclosures( VIA23, Metal3, u(0.06) ) + setEnclosures( VIA23, Metal2, (u(0.06), u(0.01)) ) + setEnclosures( VIA23, Metal3, (u(0.01), u(0.06)) ) VIA34 = createVia( tech, 'VIA34', 'Metal3', 'Via3', 'Metal4', u(0.26) ) - setEnclosures( VIA34, Metal3, u(0.06) ) - setEnclosures( VIA34, Metal4, u(0.06) ) + setEnclosures( VIA34, Metal3, (u(0.01), u(0.06)) ) + setEnclosures( VIA34, Metal4, (u(0.06), u(0.01)) ) VIA45 = createVia( tech, 'VIA45', 'Metal4', 'Via4', 'Metal5', u(0.26) ) - setEnclosures( VIA45, Metal4, u(0.06) ) - setEnclosures( VIA45, Metal5, u(0.06) ) + setEnclosures( VIA45, Metal4, (u(0.06), u(0.01)) ) + setEnclosures( VIA45, Metal5, (u(0.01), u(0.06)) ) VIA5T = createVia( tech, 'VIA5T', 'Metal5', 'Via5', 'MetalTop', u(0.26) ) - setEnclosures( VIA5T, Metal5 , u(0.06) ) - setEnclosures( VIA5T, MetalTop, u(0.06) ) + setEnclosures( VIA5T, Metal5 , (u(0.01), u(0.06)) ) + setEnclosures( VIA5T, MetalTop, (u(0.06), u(0.01)) ) Border = createBL( tech, 'Border', BasicLayer.Material.other, gds2Layer=63 ) diff --git a/crlcore/src/ccore/lefdef/LefImport.cpp b/crlcore/src/ccore/lefdef/LefImport.cpp index 593b1392..32c0a9fe 100644 --- a/crlcore/src/ccore/lefdef/LefImport.cpp +++ b/crlcore/src/ccore/lefdef/LefImport.cpp @@ -110,8 +110,8 @@ namespace { inline int getNthRouting () const; inline void incNthRouting (); inline RoutingGauge* getRoutingGauge () const; - inline void addPinSegment ( string name, Segment* ); - inline void clearPinSegments (); + inline void addPinComponent ( string name, Component* ); + inline void clearPinComponents (); private: static int _unitsCbk ( lefrCallbackType_e, lefiUnits* , lefiUserData ); static int _layerCbk ( lefrCallbackType_e, lefiLayer* , lefiUserData ); @@ -131,7 +131,7 @@ namespace { Net* _net; string _busBits; double _unitsMicrons; - map< string, vector > _pinSegments; + map< string, vector > _pinComponents; static map _layerLut; vector _unmatchedLayers; vector _errors; @@ -173,8 +173,8 @@ namespace { inline const vector& LefParser::getErrors () const { return _errors; } inline void LefParser::pushError ( const string& error ) { _errors.push_back(error); } inline void LefParser::clearErrors () { return _errors.clear(); } - inline void LefParser::addPinSegment ( string name, Segment* s ) { _pinSegments[name].push_back(s); } - inline void LefParser::clearPinSegments () { _pinSegments.clear(); } + inline void LefParser::addPinComponent ( string name, Component* comp ) { _pinComponents[name].push_back(comp); } + inline void LefParser::clearPinComponents () { _pinComponents.clear(); } Library* LefParser::_mergeLibrary = nullptr; @@ -520,6 +520,8 @@ namespace { points.push_back( Point( parser->fromUnitsMicrons(polygon->x[ipoint]) , parser->fromUnitsMicrons(polygon->y[ipoint]) )); } + points.push_back( Point( parser->fromUnitsMicrons(polygon->x[0]) + , parser->fromUnitsMicrons(polygon->y[0]) )); Rectilinear::create( blockageNet, blockageLayer, points ); continue; } @@ -577,7 +579,7 @@ namespace { if (not isPad) parser->_pinStdPostProcess(); else parser->_pinPadPostProcess(); - parser->clearPinSegments(); + parser->clearPinComponents(); cerr << " - " << cellName << " " << DbU::getValueString(width) << " " << DbU::getValueString(height) @@ -667,7 +669,7 @@ namespace { , parser->fromUnitsMicrons( r->yh ) ); } - if (segment) parser->addPinSegment( pin->name(), segment ); + if (segment) parser->addPinComponent( pin->name(), segment ); //cerr << " | " << segment << endl; continue; } @@ -678,7 +680,10 @@ namespace { points.push_back( Point( parser->fromUnitsMicrons(polygon->x[ipoint]) , parser->fromUnitsMicrons(polygon->y[ipoint]) )); } - Rectilinear::create( net, layer, points ); + points.push_back( Point( parser->fromUnitsMicrons(polygon->x[0]) + , parser->fromUnitsMicrons(polygon->y[0]) )); + Rectilinear* rectilinear = Rectilinear::create( net, layer, points ); + if (rectilinear) parser->addPinComponent( pin->name(), rectilinear ); continue; } if (geoms->itemType(igeom) == lefiGeomClassE) { @@ -722,20 +727,27 @@ namespace { const RoutingLayerGauge* gaugeMetal2 = _routingGauge->getLayerGauge( 1 ); Box ab = _cell->getAbutmentBox(); - //cerr << " @ _pinStdPostProcess" << endl; + cerr << " @ _pinStdPostProcess" << endl; - for ( auto element : _pinSegments ) { - string pinName = element.first; - vector& segments = element.second; - vector ongrids; + for ( auto element : _pinComponents ) { + string pinName = element.first; + vector& components = element.second; + vector ongrids; - for ( Segment* segment : segments ) { - bool isWide = (segment->getWidth() >= getMinTerminalWidth()); + for ( Component* component : components ) { + Segment* segment = dynamic_cast( component ); + if (segment) { + if (component->getNet()->isSupply()) continue; + bool isWide = (segment->getWidth() >= getMinTerminalWidth()); - //cerr << " > " << segment << endl; + cerr << " > " << segment << endl; + if (not isVH()) + cerr << "NOT isVH()" << endl; + else + cerr << "isVH()" << endl; - if (not segment->getNet()->isSupply()) { if (isVH() and (segment->getLayer()->getMask() == metal1->getMask())) { + cerr << "isVH()" << endl; Vertical* v = dynamic_cast( segment ); if (v) { DbU::Unit nearestX = gaugeMetal2->getTrackPosition( ab.getXMin() @@ -746,7 +758,7 @@ namespace { if (nearestX == v->getX()) { } else { DbU::Unit neighbor = nearestX - + ((nearestX > v->getX()) ? 1 : -1) * gaugeMetal2->getPitch(); + + ((nearestX > v->getX()) ? 1 : -1) * gaugeMetal2->getPitch(); //cerr << " | X:" << DbU::getValueString(v->getX()) // << " nearestX:" << DbU::getValueString(nearestX) @@ -772,16 +784,67 @@ namespace { } } } - } - if (isWide) ongrids.push_back( segment ); + if (isWide) ongrids.push_back( segment ); + } + Rectilinear* rectilinear = dynamic_cast( component ); + if (not (rectilinear->getLayer()->getMask() == metal1->getMask())) + continue; + + if (rectilinear) { + cerr << " > " << rectilinear << endl; + vector boxes; + rectilinear->getAsRectangles( boxes ); + + if (component->getNet()->isSupply()) { + ongrids.push_back( Horizontal::create( rectilinear->getNet() + , rectilinear->getLayer() + , boxes.front().getYCenter() + , boxes.front().getHeight() + , _cell->getAbutmentBox().getXMin() + , _cell->getAbutmentBox().getXMax() + ) + ); + } else { + for ( const Box& box : boxes ) { + DbU::Unit nearestX = gaugeMetal2->getTrackPosition( ab.getXMin() + , ab.getXMax() + , box.getXCenter() + , Constant::Nearest ); + DbU::Unit xmin = std::min( box.getXMin(), nearestX - gaugeMetal2->getViaWidth()/2 ); + DbU::Unit xmax = std::max( box.getXMax(), nearestX + gaugeMetal2->getViaWidth()/2 ); + ongrids.push_back( Vertical::create( rectilinear->getNet() + , rectilinear->getLayer() + , (xmax+xmin)/2 + , xmax-xmin + , box.getYMin() + , box.getYMax() + ) + ); + // DbU::Unit neighbor = nearestY + // + ((nearestY > box.getYCenter()) ? 1 : -1) * gaugeMetal2->getPitch(); + + // if ( (box.getYMin() > neighbor) + // or (box.getYMax() < neighbor) ) { + // ongrids.push_back( Vertical::create( rectilinear->getNet() + // , rectilinear->getLayer() + // , box.getXCenter() + // , box.getWidth() + // , box.getYMin() + // , box.getYMax() + // ) + // ); + // } + } + } + } } if (ongrids.empty()) { cerr << Warning( "LefParser::_pinStdPostProcess(): Pin \"%s\" has no terminal ongrid." , pinName.c_str() ) << endl; - for ( Segment* segment : segments ) { - NetExternalComponents::setExternal( segment ); + for ( Component* component : components ) { + NetExternalComponents::setExternal( component ); } } else { for ( Segment* segment : ongrids ) { @@ -797,10 +860,10 @@ namespace { Box ab = getCell()->getAbutmentBox(); bool isCornerPad = (_cellGauge) and (_cellGauge->getSliceHeight() == _cellGauge->getSliceStep()); - for ( auto element : _pinSegments ) { - string pinName = element.first; - vector& segments = element.second; - vector ongrids; + for ( auto element : _pinComponents ) { + string pinName = element.first; + vector& segments = element.second; + vector ongrids; if (segments.empty()) continue; diff --git a/crlcore/src/cyclop/CMakeLists.txt b/crlcore/src/cyclop/CMakeLists.txt index 33926156..15613590 100644 --- a/crlcore/src/cyclop/CMakeLists.txt +++ b/crlcore/src/cyclop/CMakeLists.txt @@ -1,6 +1,5 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} diff --git a/crlcore/src/pyCRL/CMakeLists.txt b/crlcore/src/pyCRL/CMakeLists.txt index e83c3c54..e02b497f 100644 --- a/crlcore/src/pyCRL/CMakeLists.txt +++ b/crlcore/src/pyCRL/CMakeLists.txt @@ -32,8 +32,6 @@ -lutil ) - find_package (Python 3 COMPONENTS Interpreter Development.Module ) - add_definitions( -DCORIOLIS_TOP="${CORIOLIS_TOP}" -DSYS_CONF_DIR="${SYS_CONF_DIR}" -DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}" diff --git a/crlcore/src/x2y/CMakeLists.txt b/crlcore/src/x2y/CMakeLists.txt index c44913c3..dbe99f20 100644 --- a/crlcore/src/x2y/CMakeLists.txt +++ b/crlcore/src/x2y/CMakeLists.txt @@ -1,7 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt -*- - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index ff37810a..0cc4d88c 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -17,8 +17,8 @@ set_cmake_policies() setup_boost(program_options) + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) #find_package(KATABATIC REQUIRED) diff --git a/etesian/src/CMakeLists.txt b/etesian/src/CMakeLists.txt index ad70dda9..979f00c8 100644 --- a/etesian/src/CMakeLists.txt +++ b/etesian/src/CMakeLists.txt @@ -10,7 +10,6 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes etesian/Configuration.h etesian/Placement.h etesian/FeedCells.h diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 3f9c3530..0947ce28 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -709,6 +709,7 @@ namespace Etesian { cmess1 << " o Converting \"" << getCell()->getName() << "\" into Coloquinte." << endl; cmess1 << ::Dots::asString(" - H-pitch" , DbU::getValueString(hpitch)) << endl; cmess1 << ::Dots::asString(" - V-pitch" , DbU::getValueString(vpitch)) << endl; + cmess1 << ::Dots::asString(" - Slice height" , DbU::getValueString(sliceHeight)) << endl; if (isFlexLib) cmess1 << ::Dots::asString(" - Using patches for" , "\"FlexLib\"") << endl; cmess2 << " o Looking through the hierarchy." << endl; @@ -749,11 +750,16 @@ namespace Etesian { } } } + _surface = new coloquinte::Rectangle( (int)(topAb.getXMin() / hpitch) + , (int)(topAb.getXMax() / hpitch) + , (int)(topAb.getYMin() / vpitch) + , (int)(topAb.getYMax() / vpitch) + ); for ( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences(getBlockInstance()) ) { ++instancesNb; Instance* instance = static_cast(occurrence.getEntity()); - Box instanceAb = instance->getAbutmentBox(); + Box instanceAb = _bloatCells.getAb( occurrence ); string masterName = getString( instance->getMasterCell()->getName() ); DbU::Unit length = (instanceAb.getHeight() / sliceHeight) * instanceAb.getWidth(); if (af->isRegister(masterName)) { @@ -843,10 +849,10 @@ namespace Etesian { } } - // Compute the space margin from the row length computed earlier - double spaceMargin = (double) (totalLength - usedLength) / usedLength; - double densityVariation = getDensityVariation(); - double bloatFactor = 1.0 + std::max(spaceMargin - densityVariation, 0.0); + // Compute a bloat factor to be reach 1 - densityVariation density + double bloatFactor = std::max(1.0, (1.0 - getDensityVariation()) * totalLength / usedLength); + // Limit the maximum size of cells after bloat to avoid placement issues + int maxBloatSize = _surface->width() / 8; if (bloatFactor != 1.0) { ostringstream bf; bf << fixed << setprecision(2) << bloatFactor << "%"; @@ -886,7 +892,7 @@ namespace Etesian { ++xsize; // Take bloat into account to compute the size - xsize *= bloatFactor; + xsize = std::max(xsize, std::min(maxBloatSize, (int) (xsize * bloatFactor))); cellX[instanceId] = xpos; cellY[instanceId] = ypos; @@ -1032,11 +1038,6 @@ namespace Etesian { if (_bloatCells.getSelected()->getName() != "disabled") cmess2 << stdCellSizes.toString(1) << endl; - _surface = new coloquinte::Rectangle( (int)(topAb.getXMin() / hpitch) - , (int)(topAb.getXMax() / hpitch) - , (int)(topAb.getYMin() / vpitch) - , (int)(topAb.getYMax() / vpitch) - ); _circuit->setupRows(*_surface, rowHeight); _circuit->check(); _placementLB = new coloquinte::PlacementSolution (); diff --git a/flute/CMakeLists.txt b/flute/CMakeLists.txt index cb5924b3..ffd9a41a 100644 --- a/flute/CMakeLists.txt +++ b/flute/CMakeLists.txt @@ -16,8 +16,8 @@ set_cmake_policies() check_distribution() setup_sysconfdir( "${CMAKE_INSTALL_PREFIX}" ) + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/flute/src/3.1/CMakeLists.txt b/flute/src/3.1/CMakeLists.txt index 709737b2..5274224b 100644 --- a/flute/src/3.1/CMakeLists.txt +++ b/flute/src/3.1/CMakeLists.txt @@ -6,7 +6,6 @@ ${CONFIGURATION_INCLUDE_DIR} ${Python_INCLUDE_DIRS} ) - find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes flute.h dl.h diff --git a/foehn/CMakeLists.txt b/foehn/CMakeLists.txt index 11acbd7a..77d06664 100644 --- a/foehn/CMakeLists.txt +++ b/foehn/CMakeLists.txt @@ -18,9 +18,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index ba5d0ded..ab937cc7 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -20,11 +20,11 @@ cmake_policy(SET CMP0054 NEW) setup_boost(program_options) setup_qt() + setup_python() find_package(BZip2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(Libexecinfo REQUIRED) if (USE_LIBBFD) diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index 928adc58..77f68b64 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -8,7 +8,6 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( pyCpps ProxyProperty.cpp PythonAttributes.cpp PyBreakpoint.cpp diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index d3e76e69..701632e4 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -14,10 +14,10 @@ set_cmake_policies() #setup_apple() setup_boost(program_options) + setup_python() set(QT_USE_QTXML "true") find_package(Qt4 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/karakaze/CMakeLists.txt b/karakaze/CMakeLists.txt index be5e1291..5597414a 100644 --- a/karakaze/CMakeLists.txt +++ b/karakaze/CMakeLists.txt @@ -15,7 +15,7 @@ check_distribution() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) + setup_python() find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/katana/CMakeLists.txt b/katana/CMakeLists.txt index 27f3e1e4..9be4a8c4 100644 --- a/katana/CMakeLists.txt +++ b/katana/CMakeLists.txt @@ -18,9 +18,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/katana/src/CMakeLists.txt b/katana/src/CMakeLists.txt index fb6e7a54..bab5fdc0 100644 --- a/katana/src/CMakeLists.txt +++ b/katana/src/CMakeLists.txt @@ -12,7 +12,6 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes katana/Constants.h katana/Block.h katana/TrackCost.h diff --git a/katana/src/NegociateWindow.cpp b/katana/src/NegociateWindow.cpp index ddf701bb..1f2af140 100644 --- a/katana/src/NegociateWindow.cpp +++ b/katana/src/NegociateWindow.cpp @@ -76,6 +76,16 @@ namespace { cdebug_tabw(159,-1); return; } + + if (segment->isNonPrefOnVSmall()) { + cdebug_log(159,0) << "Infinite cost from (NonPref on VSmall): " << segment << endl; + cost.setInfinite (); + cost.setOverlap (); + cost.setHardOverlap(); + cost.setBlockage (); + cdebug_tabw(159,-1); + return; + } } if (cost.getInterval().getVMax() > intersect.getVMax()) cost.setLeftOverlap(); diff --git a/katana/src/TrackElement.cpp b/katana/src/TrackElement.cpp index a2383d33..0adfa03b 100644 --- a/katana/src/TrackElement.cpp +++ b/katana/src/TrackElement.cpp @@ -152,6 +152,7 @@ namespace Katana { bool TrackElement::isAnalog () const { return false; } bool TrackElement::isWide () const { return false; } bool TrackElement::isNonPref () const { return false; } + bool TrackElement::isNonPrefOnVSmall () const { return false; } bool TrackElement::isShortNet () const { return false; } // Predicates. bool TrackElement::hasSymmetric () const { return false; } diff --git a/katana/src/TrackSegment.cpp b/katana/src/TrackSegment.cpp index 57fddbdc..77382dfb 100644 --- a/katana/src/TrackSegment.cpp +++ b/katana/src/TrackSegment.cpp @@ -195,6 +195,7 @@ namespace Katana { bool TrackSegment::isWide () const { return _base->isWide(); } bool TrackSegment::isShortNet () const { return _base->isShortNet(); } bool TrackSegment::isPriorityLocked () const { return _flags & PriorityLocked; } + bool TrackSegment::isNonPrefOnVSmall () const { return _base->isNonPrefOnVSmall(); } // Predicates. bool TrackSegment::hasSymmetric () const { return _symmetric != NULL; } // Accessors. diff --git a/katana/src/katana/TrackElement.h b/katana/src/katana/TrackElement.h index 34f67e14..d9f3cbd4 100644 --- a/katana/src/katana/TrackElement.h +++ b/katana/src/katana/TrackElement.h @@ -106,6 +106,7 @@ namespace Katana { virtual bool isVertical () const = 0; virtual bool isWide () const; virtual bool isNonPref () const; + virtual bool isNonPrefOnVSmall () const; virtual bool isUnbreakable () const; virtual bool isLocal () const; virtual bool isGlobal () const; diff --git a/katana/src/katana/TrackSegment.h b/katana/src/katana/TrackSegment.h index b552ec60..79f4d36a 100644 --- a/katana/src/katana/TrackSegment.h +++ b/katana/src/katana/TrackSegment.h @@ -82,6 +82,7 @@ namespace Katana { virtual bool isAnalog () const; virtual bool isWide () const; virtual bool isShortNet () const; + virtual bool isNonPrefOnVSmall () const; virtual bool isPriorityLocked () const; // Predicates. virtual bool hasSymmetric () const; diff --git a/oroshi/CMakeLists.txt b/oroshi/CMakeLists.txt index 1f1357e8..c857cdc4 100644 --- a/oroshi/CMakeLists.txt +++ b/oroshi/CMakeLists.txt @@ -14,11 +14,11 @@ set_cmake_policies() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) + setup_python() if (USE_LIBBFD) find_package(Libbfd) endif() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index a3e73165..ee90f606 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -12,6 +12,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) + setup_python() find_package(Bootstrap REQUIRED) set_cmake_policies() @@ -19,7 +20,6 @@ cmake_policy(SET CMP0002 OLD) setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/tramontana/CMakeLists.txt b/tramontana/CMakeLists.txt index 6af613ef..5dedfe37 100644 --- a/tramontana/CMakeLists.txt +++ b/tramontana/CMakeLists.txt @@ -17,8 +17,8 @@ set_cmake_policies() setup_boost() setup_qt() + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/tutorial/CMakeLists.txt b/tutorial/CMakeLists.txt index 1272f4ad..879f0f80 100644 --- a/tutorial/CMakeLists.txt +++ b/tutorial/CMakeLists.txt @@ -17,9 +17,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index cf6964db..ed1074d2 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -19,12 +19,12 @@ setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) setup_qt() + setup_python() if (USE_LIBBFD) find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(COLOQUINTE) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 2bacda2e..60909c27 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -21,13 +21,13 @@ setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) setup_qt() + setup_python() if (USE_LIBBFD) find_package(Libbfd) endif() find_package(Libexecinfo REQUIRED) find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF) find_package(HURRICANE REQUIRED)