Skip to content

Commit 60a295a

Browse files
committed
Refactored slightly.
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 68827da commit 60a295a

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/dbSta/src/dbEditHierarchy.cc

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,22 +236,9 @@ void dbEditHierarchy::hierarchicalConnect(dbITerm* source_pin,
236236

237237
dlogHierConnStart(source_pin, dest_pin, connection_name);
238238

239-
// 1. Get the scope (dbModule*) of the source and destination pins
240-
dbModule* source_db_module = source_pin->getInst()->getModule();
241-
dbModule* dest_db_module = dest_pin->getInst()->getModule();
242-
// it is possible that one or other of the pins is not involved
243-
// in hierarchy, which is ok, and the source/dest modnet will be null
244-
dbModNet* source_db_mod_net = source_pin->getModNet();
245-
246239
//
247-
// 2. Make sure there is a direct flat net connection
248-
// Recall the hierarchical connections are overlayed
249-
// onto the flat db network, so we have both worlds
250-
// co-existing, something we respect even when making
251-
// new hierarchical connections.
240+
// 1. Connect source and dest pins directly in flat flow
252241
//
253-
254-
// Connect source and dest pins directly in flat flow
255242
dbNet* source_db_net = source_pin->getNet();
256243
dbNet* dest_db_net = dest_pin->getNet();
257244
if (db_network_->hierarchy_ == false) {
@@ -278,6 +265,13 @@ void dbEditHierarchy::hierarchicalConnect(dbITerm* source_pin,
278265
return; // Done here in a flat flow
279266
}
280267

268+
//
269+
// 2. Make sure there is a direct flat net connection
270+
// Recall the hierarchical connections are overlayed
271+
// onto the flat db network, so we have both worlds
272+
// co-existing, something we respect even when making
273+
// new hierarchical connections.
274+
//
281275
if (!source_db_net) {
282276
dlogHierConnCreateFlatNet(connection_name);
283277
Net* new_net = db_network_->makeNet(
@@ -298,6 +292,13 @@ void dbEditHierarchy::hierarchicalConnect(dbITerm* source_pin,
298292
// 3. Make the hierarchical connection.
299293
// in case when pins in different modules
300294
//
295+
296+
// Get the scope (dbModule*) of the source and destination pins
297+
dbModule* source_db_module = source_pin->getInst()->getModule();
298+
dbModule* dest_db_module = dest_pin->getInst()->getModule();
299+
// it is possible that one or other of the pins is not involved
300+
// in hierarchy, which is ok, and the source/dest modnet will be null
301+
dbModNet* source_db_mod_net = source_pin->getModNet();
301302
if (source_db_module != dest_db_module) {
302303
//
303304
// 3.1. Attempt to factor connection (minimize punch through), and return

0 commit comments

Comments
 (0)