Skip to content

Commit 21aef1c

Browse files
committed
Merge branch 'master' into update-sta
2 parents e944c0d + 59ef9a9 commit 21aef1c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+73544
-1009
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,8 @@ if(BUILD_MAN)
176176
install(DIRECTORY ${OPENROAD_HOME}/docs/cat DESTINATION ${OPENROAD_SHARE}/man)
177177
install(DIRECTORY ${OPENROAD_HOME}/docs/html DESTINATION ${OPENROAD_SHARE}/man)
178178
endif()
179+
180+
####################################################################
181+
# Add a configuration for ReleaseWithAsserts
182+
set(CMAKE_CXX_FLAGS_RELEASEWITHASSERTS "${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG" CACHE STRING "" FORCE)
183+
set(CMAKE_C_FLAGS_RELEASEWITHASSERTS "${CMAKE_C_FLAGS_RELEASE} -UNDEBUG" CACHE STRING "" FORCE)

src/OpenRoad.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,12 @@ void OpenRoad::readDb(const char* filename, bool hierarchy)
462462
}
463463
// treat this as a hierarchical network.
464464
if (hierarchy) {
465+
logger_->warn(
466+
ORD,
467+
12,
468+
"Hierarchical flow (-hier) is currently in development and may cause "
469+
"multiple issues. Do not use in production environments.");
470+
465471
sta::dbSta* sta = getSta();
466472
// After streaming in the last thing we do is build the hashes
467473
// we cannot rely on orders to do this during stream in
@@ -523,6 +529,12 @@ void OpenRoad::linkDesign(const char* design_name,
523529
}
524530

525531
if (hierarchy) {
532+
logger_->warn(
533+
ORD,
534+
11,
535+
"Hierarchical flow (-hier) is currently in development and may cause "
536+
"multiple issues. Do not use in production environments.");
537+
526538
sta::dbSta* sta = getSta();
527539
sta->getDbNetwork()->setHierarchy();
528540
}

src/cts/test/hier_insertion_delay.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
22
[INFO ODB-0227] LEF file: array_tile_ins_delay.lef, created 1 library cells
3+
[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
34
[INFO IFP-0001] Added 857 rows of 210 site FreePDK45_38x28_10R_NP_162NW_34O.
45
[INFO GPL-0005] Execute conjugate gradient initial placement.
56
[INFO GPL-0002] DBU: 2000

src/cts/test/simple_test_hier.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
23
[INFO IFP-0001] Added 857 rows of 210 site FreePDK45_38x28_10R_NP_162NW_34O.
34
[INFO GPL-0005] Execute conjugate gradient initial placement.
45
[INFO GPL-0002] DBU: 2000

src/dbSta/include/db_sta/dbNetwork.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ class dbNetwork : public ConcreteNetwork
291291
const Net* highestConnectedNet(Net* net) const override;
292292
bool isSpecial(Net* net);
293293
dbNet* flatNet(const Net* net) const;
294+
Net* getFlatNet(Net* net) const;
294295

295296
////////////////////////////////////////////////////////////////
296297
// Edit functions

src/dbSta/src/dbNetwork.cc

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,9 @@ void dbNetwork::staToDb(const Instance* instance,
26352635

26362636
dbNet* dbNetwork::staToDb(const Net* net) const
26372637
{
2638-
return reinterpret_cast<dbNet*>(const_cast<Net*>(net));
2638+
dbNet* db_net = reinterpret_cast<dbNet*>(const_cast<Net*>(net));
2639+
assert(!db_net || db_net->getObjectType() == odb::dbNetObj);
2640+
return db_net;
26392641
}
26402642

26412643
dbNet* dbNetwork::flatNet(const Net* net) const
@@ -2732,7 +2734,9 @@ void dbNetwork::staToDb(const Pin* pin,
27322734

27332735
dbBTerm* dbNetwork::staToDb(const Term* term) const
27342736
{
2735-
return reinterpret_cast<dbBTerm*>(const_cast<Term*>(term));
2737+
dbBTerm* bterm = reinterpret_cast<dbBTerm*>(const_cast<Term*>(term));
2738+
assert(!bterm || bterm->getObjectType() == odb::dbBTermObj);
2739+
return bterm;
27362740
}
27372741

27382742
void dbNetwork::staToDb(const Term* term,
@@ -2780,20 +2784,26 @@ void dbNetwork::staToDb(const Cell* cell,
27802784
dbMaster* dbNetwork::staToDb(const Cell* cell) const
27812785
{
27822786
const ConcreteCell* ccell = reinterpret_cast<const ConcreteCell*>(cell);
2783-
return reinterpret_cast<dbMaster*>(ccell->extCell());
2787+
auto master = reinterpret_cast<dbMaster*>(ccell->extCell());
2788+
assert(!master || master->getObjectType() == odb::dbMasterObj);
2789+
return master;
27842790
}
27852791

27862792
// called only on db cells.
27872793
dbMaster* dbNetwork::staToDb(const LibertyCell* cell) const
27882794
{
27892795
const ConcreteCell* ccell = cell;
2790-
return reinterpret_cast<dbMaster*>(ccell->extCell());
2796+
auto master = reinterpret_cast<dbMaster*>(ccell->extCell());
2797+
assert(!master || master->getObjectType() == odb::dbMasterObj);
2798+
return master;
27912799
}
27922800

27932801
dbMTerm* dbNetwork::staToDb(const Port* port) const
27942802
{
27952803
const ConcretePort* cport = reinterpret_cast<const ConcretePort*>(port);
2796-
return reinterpret_cast<dbMTerm*>(cport->extPort());
2804+
auto mterm = reinterpret_cast<dbMTerm*>(cport->extPort());
2805+
assert(!mterm || mterm->getObjectType() == odb::dbMTermObj);
2806+
return mterm;
27972807
}
27982808

27992809
dbBTerm* dbNetwork::isTopPort(const Port* port) const
@@ -2841,7 +2851,9 @@ void dbNetwork::staToDb(const Port* port,
28412851

28422852
dbMTerm* dbNetwork::staToDb(const LibertyPort* port) const
28432853
{
2844-
return reinterpret_cast<dbMTerm*>(port->extPort());
2854+
auto mterm = reinterpret_cast<dbMTerm*>(port->extPort());
2855+
assert(!mterm || mterm->getObjectType() == odb::dbMTermObj);
2856+
return mterm;
28452857
}
28462858

28472859
void dbNetwork::staToDb(PortDirection* dir,
@@ -4159,4 +4171,19 @@ void dbNetwork::AxiomCheck()
41594171
}
41604172
}
41614173

4174+
Net* dbNetwork::getFlatNet(Net* net) const
4175+
{
4176+
if (!net) {
4177+
return nullptr;
4178+
}
4179+
// Convert net to a flat net, if not already
4180+
dbNet* db_net;
4181+
dbModNet* db_mod_net;
4182+
staToDb(net, db_net, db_mod_net);
4183+
if (db_mod_net) {
4184+
db_net = findRelatedDbNet(db_mod_net);
4185+
}
4186+
return dbToSta(db_net);
4187+
}
4188+
41624189
} // namespace sta

src/dbSta/test/hier2.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[INFO ODB-0227] LEF file: example1.lef, created 2 layers, 6 library cells
2+
[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
23
No differences found.

src/dbSta/test/hierclock.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
23
Startpoint: U2/_66_ (rising edge-triggered flip-flop clocked by clk1)
34
Endpoint: U2/_66_ (rising edge-triggered flip-flop clocked by clk1)
45
Path Group: clk1

src/dbSta/test/hierwrite.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[WARNING ORD-0012] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
23
No differences found.

src/dbSta/test/read_verilog2.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[INFO ODB-0227] LEF file: liberty1.lef, created 2 layers, 6 library cells
2+
[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
23
r1
34
b1out
45
Instance b1/r1

0 commit comments

Comments
 (0)