@@ -768,7 +768,7 @@ ObjectId dbNetwork::id(const Port* port) const
768768 return std::numeric_limits<ObjectId>::max ();
769769 }
770770
771- if (hierarchy_ ) {
771+ if (hasHierarchy () ) {
772772 if (isConcretePort (port)) {
773773 return ConcreteNetwork::id (port);
774774 }
@@ -790,7 +790,7 @@ ObjectId dbNetwork::id(const Port* port) const
790790ObjectId dbNetwork::id (const Cell* cell) const
791791{
792792 // in hierarchical flow we use the object id for the index
793- if (hierarchy_ ) {
793+ if (hasHierarchy () ) {
794794 if (!isConcreteCell (cell)) {
795795 const dbObject* obj = reinterpret_cast <const dbObject*>(cell);
796796 return getDbNwkObjectId (obj);
@@ -808,7 +808,7 @@ ObjectId dbNetwork::id(const Instance* instance) const
808808 if (instance == top_instance_) {
809809 return 0 ;
810810 }
811- if (hierarchy_ ) {
811+ if (hasHierarchy () ) {
812812 const dbObject* obj = reinterpret_cast <const dbObject*>(instance);
813813 return getDbNwkObjectId (obj);
814814 }
@@ -840,7 +840,7 @@ const char* dbNetwork::name(const Port* port) const
840840 return nullptr ;
841841 }
842842
843- if (hierarchy_ ) {
843+ if (hasHierarchy () ) {
844844 size_t last_idx = name.find_last_of (' /' );
845845 if (last_idx != std::string::npos) {
846846 name = name.substr (last_idx + 1 );
@@ -887,7 +887,7 @@ const char* dbNetwork::name(const Instance* instance) const
887887 name = mod_inst->getName ();
888888 }
889889
890- if (hierarchy_ ) {
890+ if (hasHierarchy () ) {
891891 size_t last_idx = std::string::npos;
892892 size_t pos = name.length ();
893893 while ((pos = name.rfind (' /' , pos)) != std::string::npos) {
@@ -1096,7 +1096,7 @@ Instance* dbNetwork::parent(const Instance* instance) const
10961096
10971097Port* dbNetwork::findPort (const Cell* cell, const char * name) const
10981098{
1099- if (hierarchy_ ) {
1099+ if (hasHierarchy () ) {
11001100 dbMaster* db_master;
11011101 dbModule* db_module;
11021102 staToDb (cell, db_master, db_module);
@@ -1125,7 +1125,7 @@ bool dbNetwork::isLeaf(const Instance* instance) const
11251125 if (instance == top_instance_) {
11261126 return false ;
11271127 }
1128- if (hierarchy_ ) {
1128+ if (hasHierarchy () ) {
11291129 dbMaster* db_master;
11301130 dbModule* db_module;
11311131 Cell* cur_cell = cell (instance);
@@ -1140,7 +1140,7 @@ bool dbNetwork::isLeaf(const Instance* instance) const
11401140
11411141Instance* dbNetwork::findInstance (const char * path_name) const
11421142{
1143- if (hierarchy_ ) { // are we in hierarchical mode ?
1143+ if (hasHierarchy () ) { // are we in hierarchical mode ?
11441144 // find a hierarchical module instance first
11451145 dbModInst* mod_inst = block ()->findModInst (path_name);
11461146 if (mod_inst) {
@@ -1395,7 +1395,7 @@ ObjectId dbNetwork::id(const Pin* pin) const
13951395
13961396 staToDb (pin, iterm, bterm, moditerm);
13971397
1398- if (hierarchy_ ) {
1398+ if (hasHierarchy () ) {
13991399 // get the id for hierarchical objects using dbid.
14001400 std::uintptr_t tag_value
14011401 = reinterpret_cast <std::uintptr_t >(pin) & kPointerTagMask ;
@@ -1784,7 +1784,7 @@ ObjectId dbNetwork::id(const Net* net) const
17841784 dbModNet* modnet = nullptr ;
17851785 dbNet* dnet = nullptr ;
17861786 staToDb (net, dnet, modnet);
1787- if (hierarchy_ ) {
1787+ if (hasHierarchy () ) {
17881788 const dbObject* obj = reinterpret_cast <const dbObject*>(net);
17891789 return getDbNwkObjectId (obj);
17901790 }
@@ -1865,7 +1865,7 @@ const char* dbNetwork::name(const Net* net) const
18651865 // strip out the parent name in hierarchy mode
18661866 // turn this off to get full flat names
18671867
1868- if (hierarchy_ ) {
1868+ if (hasHierarchy () ) {
18691869 //
18701870 // If this is not a hierarchical name, return it
18711871 //
@@ -2054,7 +2054,7 @@ const Net* dbNetwork::highestConnectedNet(Net* net) const
20542054
20552055ObjectId dbNetwork::id (const Term* term) const
20562056{
2057- if (hierarchy_ ) {
2057+ if (hasHierarchy () ) {
20582058 const dbObject* obj = reinterpret_cast <const dbObject*>(term);
20592059 return getDbNwkObjectId (obj);
20602060 }
@@ -3408,7 +3408,7 @@ we can decide whether or not to use the ConcreteNetwork api.
34083408*/
34093409bool dbNetwork::isConcreteCell (const Cell* cell) const
34103410{
3411- if (!hierarchy_ ) {
3411+ if (!hasHierarchy () ) {
34123412 return true ;
34133413 }
34143414
@@ -3426,7 +3426,7 @@ void dbNetwork::registerConcretePort(const Port* port)
34263426
34273427bool dbNetwork::isConcretePort (const Port* port) const
34283428{
3429- if (!hierarchy_ ) {
3429+ if (!hasHierarchy () ) {
34303430 return true ;
34313431 }
34323432 if (concrete_ports_.find (port) != concrete_ports_.end ()) {
@@ -3494,7 +3494,7 @@ int dbNetwork::toIndex(const Port* port) const
34943494
34953495bool dbNetwork::hasMembers (const Port* port) const
34963496{
3497- if (hierarchy_ ) {
3497+ if (hasHierarchy () ) {
34983498 dbMTerm* mterm = nullptr ;
34993499 dbBTerm* bterm = nullptr ;
35003500 dbModBTerm* modbterm = nullptr ;
@@ -3580,7 +3580,7 @@ PortMemberIterator* dbNetwork::memberIterator(const Port* port) const
35803580{
35813581 // top-level port is concrete port. DbNetworkPortMemberIterator cannot handle
35823582 // it.
3583- if (!hierarchy_ || isConcretePort (port)) {
3583+ if (!hasHierarchy () || isConcretePort (port)) {
35843584 return ConcreteNetwork::memberIterator (port);
35853585 }
35863586
0 commit comments