From dc25159cd612d7929d97e77e08f34234f2f3d139 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 30 Apr 2020 00:38:32 +0200 Subject: [PATCH] Bug fix, reset Cell flags after unrouting an analog design. * Bug: In Bora::SlicingNode::clearGlobalRouting(), as we are unrouting the cell, the flags set up by Katana must be reset. The Cell is no longer "Terminal" and it's nets are "Un-flattened". --- anabatic/src/Dijkstra.cpp | 5 ++++- bora/src/SlicingNode.cpp | 3 +++ hurricane/src/hurricane/Cell.cpp | 2 +- hurricane/src/hurricane/hurricane/Cell.h | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/anabatic/src/Dijkstra.cpp b/anabatic/src/Dijkstra.cpp index b21933e6..995ccf6b 100644 --- a/anabatic/src/Dijkstra.cpp +++ b/anabatic/src/Dijkstra.cpp @@ -1508,7 +1508,10 @@ namespace Anabatic { } } - if (rps.size() < 2) return; + if (rps.size() < 2) { + cdebug_tabw(112,-1); + return; + } for ( auto rp : rps ) { if (not _anabatic->getConfiguration()->selectRpComponent(rp)) diff --git a/bora/src/SlicingNode.cpp b/bora/src/SlicingNode.cpp index 4e4a87e7..4f8c4f31 100644 --- a/bora/src/SlicingNode.cpp +++ b/bora/src/SlicingNode.cpp @@ -698,6 +698,9 @@ namespace Bora { for ( RoutingPad* rp : net->getRoutingPads() ) rps.push_back( rp ); for ( RoutingPad* rp : rps ) rp->destroy(); } + + _cell->getFlags().reset( Cell::Flags::FlattenedNets|Cell::Flags::Routed ); + _cell->setTerminalNetlist( false ); } diff --git a/hurricane/src/hurricane/Cell.cpp b/hurricane/src/hurricane/Cell.cpp index 2d452b75..b17a4460 100644 --- a/hurricane/src/hurricane/Cell.cpp +++ b/hurricane/src/hurricane/Cell.cpp @@ -875,7 +875,7 @@ void Cell::flattenNets ( const Instance* instance, uint64_t flags ) Net* net = static_cast(topHyperNets[i].getNetOccurrence().getEntity()); DebugSession::open( net, 18, 19 ); - cdebug_log(18,1) << "Flattening top: " << net << endl; + cdebug_log(18,1) << "Flattening top net: " << net << endl; vector plugOccurrences; for ( Occurrence plugOccurrence : topHyperNets[i].getTerminalNetlistPlugOccurrences() ) diff --git a/hurricane/src/hurricane/hurricane/Cell.h b/hurricane/src/hurricane/hurricane/Cell.h index 4490844f..0bac8b8e 100644 --- a/hurricane/src/hurricane/hurricane/Cell.h +++ b/hurricane/src/hurricane/hurricane/Cell.h @@ -411,6 +411,7 @@ class Cell : public Entity { public: string getHierarchicalName() const; public: const Name& getName() const {return _name;}; public: const Flags& getFlags() const { return _flags; } + public: Flags& getFlags() { return _flags; } public: Path getShuntedPath() const { return _shuntedPath; } public: Entity* getEntity(const Signature&) const; public: Instance* getInstance(const Name& name) const {return _instanceMap.getElement(name);};