From 0fa6f8be9b4e8884aa9ca457cd1bbe4fad29d727 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 25 Mar 2018 00:58:22 +0100 Subject: [PATCH] Determinism correction of Hurricane, CRL core & Katana. * Bug: In Hurricane::Cell::uniquify(), a set sorted on pointers was remaining. Now sorted on Entity::Id. * Bug: In CRL::VhdlEntity, in the driver, the components where driven in pointer order (set<> again). Now use ids. * Bug: In CRL/etc/scn6m_deep_09/technology.conf, the symbolic extentions for VIAs and layers were wrong. Have to be multiplied by two. * Change: In AnabaticEngine, AutoContact and AutoSegment LUTs are now sorted on Entity::Id. Should not have had any impact, but better safe than sorry. * Change: In KatanaEngine, Symmetric contraint map<> is now sorted on Entity::id. Idem for TrackSegmentLut. --- anabatic/src/AutoSegment.cpp | 2 +- anabatic/src/anabatic/AutoContact.h | 3 +- anabatic/src/anabatic/AutoSegments.h | 15 +++---- crlcore/etc/180/scn6m_deep_09/kite.conf | 12 +++--- crlcore/etc/180/scn6m_deep_09/technology.conf | 42 +++++++++---------- crlcore/python/helpers/Technology.py | 3 +- crlcore/src/ccore/alliance/vst/VhdlEntity.cpp | 2 +- hurricane/src/hurricane/Cell.cpp | 4 +- katana/src/katana/DataSymmetric.h | 3 ++ katana/src/katana/KatanaEngine.h | 28 ++++++------- katana/src/katana/TrackElement.h | 3 +- 11 files changed, 60 insertions(+), 57 deletions(-) diff --git a/anabatic/src/AutoSegment.cpp b/anabatic/src/AutoSegment.cpp index 1247341c..2333e6e6 100644 --- a/anabatic/src/AutoSegment.cpp +++ b/anabatic/src/AutoSegment.cpp @@ -1143,7 +1143,7 @@ namespace Anabatic { AutoContact* source = getAutoSource(); AutoContact* target = getAutoTarget(); - + if (isLocal() and source->isTurn() and target->isTurn() and not isUserDefined()) { AutoSegment* sourcePerpand = source->getPerpandicular(this); AutoSegment* targetPerpand = target->getPerpandicular(this); diff --git a/anabatic/src/anabatic/AutoContact.h b/anabatic/src/anabatic/AutoContact.h index cc958b67..e48961a8 100644 --- a/anabatic/src/anabatic/AutoContact.h +++ b/anabatic/src/anabatic/AutoContact.h @@ -35,6 +35,7 @@ namespace Anabatic { using Hurricane::setInBound; using Hurricane::tab; using Hurricane::Name; + using Hurricane::Entity; using Hurricane::Net; using Hurricane::Component; using Hurricane::Components; @@ -48,7 +49,7 @@ namespace Anabatic { class AutoContact; - typedef std::map AutoContactLut; + typedef std::map AutoContactLut; // ------------------------------------------------------------------- diff --git a/anabatic/src/anabatic/AutoSegments.h b/anabatic/src/anabatic/AutoSegments.h index b5367aa9..9086a84c 100644 --- a/anabatic/src/anabatic/AutoSegments.h +++ b/anabatic/src/anabatic/AutoSegments.h @@ -48,6 +48,7 @@ namespace Anabatic { using Hurricane::DbU; using Hurricane::Box; using Hurricane::Hook; + using Hurricane::Entity; using Hurricane::Component; using Hurricane::Contact; using Hurricane::Segment; @@ -70,13 +71,13 @@ namespace Anabatic { // ------------------------------------------------------------------- // Collections. - typedef Hurricane::Filter AutoSegmentHF; - typedef Hurricane::Locator AutoSegmentHL; - typedef Hurricane::Collection AutoSegmentHC; - typedef GenericCollection AutoSegments; - typedef GenericLocator AutoSegmentLocator; - typedef GenericFilter AutoSegmentFilter; - typedef map AutoSegmentLut; + typedef Hurricane::Filter AutoSegmentHF; + typedef Hurricane::Locator AutoSegmentHL; + typedef Hurricane::Collection AutoSegmentHC; + typedef GenericCollection AutoSegments; + typedef GenericLocator AutoSegmentLocator; + typedef GenericFilter AutoSegmentFilter; + typedef map AutoSegmentLut; // ------------------------------------------------------------------- diff --git a/crlcore/etc/180/scn6m_deep_09/kite.conf b/crlcore/etc/180/scn6m_deep_09/kite.conf index 26644c7b..7ea03ab9 100644 --- a/crlcore/etc/180/scn6m_deep_09/kite.conf +++ b/crlcore/etc/180/scn6m_deep_09/kite.conf @@ -42,16 +42,16 @@ routingGaugesTable = {} routingGaugesTable['msxlib'] = \ ( ( 'METAL1' , ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 10, 2, 2, 7 ) ) - , ( 'METAL2' , ( Gauge.Horizontal, Gauge.Default, 1, 0.0, 0, 10, 3, 2, 8 ) ) - , ( 'METAL3' , ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 10, 3, 2, 8 ) ) - , ( 'METAL4' , ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 10, 3, 2, 8 ) ) - , ( 'METAL5' , ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 10, 3, 2, 8 ) ) - #, ( 'METAL6' , ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 10, 5, 2, 8 ) ) + , ( 'METAL2' , ( Gauge.Horizontal, Gauge.Default, 1, 0.0, 0, 10, 4, 2, 8 ) ) + , ( 'METAL3' , ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 10, 4, 2, 8 ) ) + , ( 'METAL4' , ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 10, 4, 2, 8 ) ) + , ( 'METAL5' , ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 10, 4, 2, 8 ) ) + #, ( 'METAL6' , ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 10,10, 2, 8 ) ) ) routingGaugesTable['msxlib-2M'] = \ ( ( 'METAL1', ( Gauge.Horizontal, Gauge.Default, 0, 0.0, 0, 10, 2, 2, 7 ) ) - , ( 'METAL2', ( Gauge.Vertical , Gauge.Default, 1, 0.0, 0, 10, 3, 2, 8 ) ) + , ( 'METAL2', ( Gauge.Vertical , Gauge.Default, 1, 0.0, 0, 10, 4, 2, 8 ) ) ) diff --git a/crlcore/etc/180/scn6m_deep_09/technology.conf b/crlcore/etc/180/scn6m_deep_09/technology.conf index 7563fe28..09d25fd1 100644 --- a/crlcore/etc/180/scn6m_deep_09/technology.conf +++ b/crlcore/etc/180/scn6m_deep_09/technology.conf @@ -106,35 +106,35 @@ layersExtensionsTable = \ # Routing Layers (symbolic). , ('METAL1.minimum.width' , 2.0) , ('METAL1.metal1.extention.cap' , 2.0) - , ('METAL1.metal1.extention.width' , 0.5) - , ('METAL2.minimum.width' , 3.0) - , ('METAL2.metal2.extention.cap' , 1.5) - , ('METAL3.minimum.width' , 3.0) - , ('METAL3.metal3.extention.cap' , 1.5) - , ('METAL4.minimum.width' , 3.0) - , ('METAL4.metal4.extention.cap' , 1.5) - , ('METAL5.minimum.width' , 3.0) - , ('METAL5.metal5.extention.cap' , 1.5) - , ('METAL6.minimum.width' , 5.0) - , ('METAL6.metal6.extention.cap' , 2.5) + , ('METAL1.metal1.extention.width' , 1.0) + , ('METAL2.minimum.width' , 4.0) + , ('METAL2.metal2.extention.cap' , 2.0) + , ('METAL3.minimum.width' , 4.0) + , ('METAL3.metal3.extention.cap' , 2.0) + , ('METAL4.minimum.width' , 4.0) + , ('METAL4.metal4.extention.cap' , 2.0) + , ('METAL5.minimum.width' , 4.0) + , ('METAL5.metal5.extention.cap' , 2.0) + , ('METAL6.minimum.width' , 10.0) + , ('METAL6.metal6.extention.cap' , 5.0) #, ('METAL7.minimum.width' , 2.0) #, ('METAL7.metal7.extention.cap' , 2.5) #, ('METAL8.minimum.width' , 2.0) #, ('METAL8.metal8.extention.cap' , 2.5) # Blockages (symbolic). - , ('BLOCKAGE1.minimum.width' , 3.0) + , ('BLOCKAGE1.minimum.width' , 4.0) , ('BLOCKAGE1.blockage1.extention.cap' , 2.0) , ('BLOCKAGE1.blockage1.extention.width', 0.5) - , ('BLOCKAGE2.minimum.width' , 3.0) + , ('BLOCKAGE2.minimum.width' , 4.0) , ('BLOCKAGE2.blockage2.extention.cap' , 2.0) - , ('BLOCKAGE3.minimum.width' , 3.0) + , ('BLOCKAGE3.minimum.width' , 4.0) , ('BLOCKAGE3.blockage3.extention.cap' , 2.0) - , ('BLOCKAGE4.minimum.width' , 3.0) + , ('BLOCKAGE4.minimum.width' , 4.0) , ('BLOCKAGE4.blockage4.extention.cap' , 2.0) - , ('BLOCKAGE5.minimum.width' , 3.0) + , ('BLOCKAGE5.minimum.width' , 4.0) , ('BLOCKAGE5.blockage5.extention.cap' , 2.0) - , ('BLOCKAGE6.minimum.width' , 4.0) + , ('BLOCKAGE6.minimum.width' , 8.0) , ('BLOCKAGE6.blockage6.extention.cap' , 2.5) #, ('BLOCKAGE7.minimum.width' , 2.0) #, ('BLOCKAGE7.blockage6.extention.cap' , 4.0) @@ -169,16 +169,16 @@ layersExtensionsTable = \ , ('CONT_POLY.metal1.enclosure' , 1.0) # VIAs (i.e. Metal <--> Metal) (symbolic). - , ('VIA12.minimum.side' , 3.0) + , ('VIA12.minimum.side' , 2.0) , ('VIA12.metal1.enclosure' , 1.0) , ('VIA12.metal2.enclosure' , 1.0) - , ('VIA23.minimum.side' , 3.0) + , ('VIA23.minimum.side' , 2.0) , ('VIA23.metal2.enclosure' , 1.0) , ('VIA23.metal3.enclosure' , 1.0) - , ('VIA34.minimum.side' , 3.0) + , ('VIA34.minimum.side' , 2.0) , ('VIA34.metal3.enclosure' , 1.0) , ('VIA34.metal4.enclosure' , 1.0) - , ('VIA45.minimum.side' , 3.0) + , ('VIA45.minimum.side' , 2.0) , ('VIA45.metal4.enclosure' , 1.0) , ('VIA45.metal5.enclosure' , 1.0) , ('VIA56.minimum.side' , 5.0) diff --git a/crlcore/python/helpers/Technology.py b/crlcore/python/helpers/Technology.py index af8786fd..8dcd436d 100644 --- a/crlcore/python/helpers/Technology.py +++ b/crlcore/python/helpers/Technology.py @@ -226,7 +226,7 @@ def loadLayersExtensions ( layersExtensionsTable, confFile ): elements = rule[0].split('.') if len(elements) == 2: - ruleLayer = layersLUT.lookup( elements[0], LayersLUT.Real|LayersLUT.MissingError ) + ruleLayer = layersLUT.lookup( elements[0], LayersLUT.Real|LayersLUT.Composite|LayersLUT.MissingError ) subLayer = None elif len(elements) == 3 or len(elements) == 4: ruleLayer = layersLUT.lookup( elements[0], LayersLUT.Composite|LayersLUT.MissingError ) @@ -239,7 +239,6 @@ def loadLayersExtensions ( layersExtensionsTable, confFile ): ,str(rule) ]) - if elements[0].startswith('via') or elements[0].startswith('metal'): if isinstance(rule[1],tuple): value = ( toDbU(rule[1][0]), toDbU(rule[1][1]) ) diff --git a/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp b/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp index 8ccbbc50..e613e6b9 100644 --- a/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp +++ b/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp @@ -345,7 +345,7 @@ namespace Vhdl { out << "architecture structural of " << cellName << " is\n\n"; ++tab; - set masterCells; + set masterCells; forEach ( Instance*, iinstance, getCell()->getInstances() ) { masterCells.insert( iinstance->getMasterCell() ); } diff --git a/hurricane/src/hurricane/Cell.cpp b/hurricane/src/hurricane/Cell.cpp index 8037cddf..fa955bb2 100644 --- a/hurricane/src/hurricane/Cell.cpp +++ b/hurricane/src/hurricane/Cell.cpp @@ -1022,8 +1022,8 @@ void Cell::uniquify(unsigned int depth) deepNets.pop_back(); } - vector toUniquify; - set masterCells; + vector toUniquify; + set masterCells; for ( Instance* instance : getInstances() ) { Cell* masterCell = instance->getMasterCell(); diff --git a/katana/src/katana/DataSymmetric.h b/katana/src/katana/DataSymmetric.h index 1dcd2425..1574d54a 100644 --- a/katana/src/katana/DataSymmetric.h +++ b/katana/src/katana/DataSymmetric.h @@ -38,6 +38,7 @@ namespace Katana { using Hurricane::DbU; using Hurricane::Point; using Hurricane::Interval; + using Hurricane::Entity; using Hurricane::Net; using Hurricane::NetRoutingState; using Hurricane::NetRoutingExtension; @@ -115,6 +116,8 @@ namespace Katana { } + typedef std::map DataSymmetricMap; + } // Katana namespace. #endif // KATANA_DATA_SYMMETRIC_H diff --git a/katana/src/katana/KatanaEngine.h b/katana/src/katana/KatanaEngine.h index 74a98fab..0cdc4c6c 100644 --- a/katana/src/katana/KatanaEngine.h +++ b/katana/src/katana/KatanaEngine.h @@ -93,8 +93,7 @@ namespace Katana { RoutingPlane* getRoutingPlaneByLayer ( const Layer* ) const; Track* getTrackByPosition ( const Layer*, DbU::Unit axis, uint32_t mode=Constant::Nearest ) const; DataSymmetric* getDataSymmetric ( Net* ); - inline const std::map& - getSymmetrics () const; + inline const DataSymmetricMap& getSymmetrics () const; inline Block* getBlock ( size_t i ) const; inline void printConfiguration () const; void printCompletion () const; @@ -140,17 +139,17 @@ namespace Katana { virtual string _getTypeName () const; private: // Attributes. - static Name _toolName; - protected: - CellViewer* _viewer; - Configuration* _configuration; - vector _blocks; - vector _routingPlanes; - NegociateWindow* _negociateWindow; - double _minimumWL; - std::map _symmetrics; - uint32_t _mode; - mutable bool _toolSuccess; + static Name _toolName; + protected: + CellViewer* _viewer; + Configuration* _configuration; + vector _blocks; + vector _routingPlanes; + NegociateWindow* _negociateWindow; + double _minimumWL; + DataSymmetricMap _symmetrics; + uint32_t _mode; + mutable bool _toolSuccess; protected: // Constructors & Destructors. KatanaEngine ( Cell* ); @@ -180,8 +179,7 @@ namespace Katana { inline uint32_t KatanaEngine::getVTracksReservedLocal () const { return _configuration->getVTracksReservedLocal(); } inline uint32_t KatanaEngine::getRipupLimit ( uint32_t type ) const { return _configuration->getRipupLimit(type); } inline bool KatanaEngine::profileEventCosts () const { return _configuration->profileEventCosts(); } - inline const std::map& - KatanaEngine::getSymmetrics () const { return _symmetrics; } + inline const DataSymmetricMap& KatanaEngine::getSymmetrics () const { return _symmetrics; } inline Block* KatanaEngine::getBlock ( size_t i ) const { return (i < _blocks.size()) ? _blocks[i] : NULL; } inline NegociateWindow* KatanaEngine::getNegociateWindow () { return _negociateWindow; } inline size_t KatanaEngine::getRoutingPlanesSize () const { return _routingPlanes.size(); } diff --git a/katana/src/katana/TrackElement.h b/katana/src/katana/TrackElement.h index fbf62ed7..33d86c3f 100644 --- a/katana/src/katana/TrackElement.h +++ b/katana/src/katana/TrackElement.h @@ -45,6 +45,7 @@ namespace Katana { using Hurricane::Interval; using Hurricane::DbU; using Hurricane::Box; + using Hurricane::Entity; using Hurricane::Net; using Hurricane::Layer; using Anabatic::GCell; @@ -56,7 +57,7 @@ namespace Katana { class TrackSegment; - typedef map TrackElementLut; + typedef map TrackElementLut; typedef void (SegmentOverlapCostCB)( const TrackElement*, TrackCost& );