Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dbSta/include/db_sta/dbNetwork.hh
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class dbNetwork : public ConcreteNetwork
bool isGround(const Net* net) const override;
NetPinIterator* pinIterator(const Net* net) const override;
NetTermIterator* termIterator(const Net* net) const override;
const Net* highestConnectedNet(Net* net) const override;
const Net* highestConnectedNet(const Net* net) const override;

// Get the flat net (odb::dbNet) with the Net*.
// If the net is a hierarchical net (odb::dbModNet), return nullptr
Expand Down Expand Up @@ -412,7 +412,7 @@ class dbNetwork : public ConcreteNetwork
// This ensures parasitic externality checks in ensureParasiticNode work
// correctly: net_ is always a flat net, so the comparison net != net_
// must also operate on flat nets.
Net* highestNetAbove(Net* net) const override;
const Net* highestNetAbove(const Net* net) const override;

////////////////////////////////////////////////////////////////
// Edit functions
Expand Down
4 changes: 2 additions & 2 deletions src/dbSta/src/dbNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2743,7 +2743,7 @@ void dbNetwork::visitConnectedPins(const Net* net,
// - It behaves differently to cope with the issue 9724.
// - This redefinition may cause another issue later when
// `Network::highestConnectedNet(Net *net)` is used elsewhere.
const Net* dbNetwork::highestConnectedNet(Net* net) const
const Net* dbNetwork::highestConnectedNet(const Net* net) const
{
const Net* flat = findFlatNet(net);
return flat ? flat : net;
Expand Down Expand Up @@ -5987,7 +5987,7 @@ bool dbNetwork::isPGSupply(dbNet* net) const
return net->isSpecial() && net->getSigType().isSupply();
}

Net* dbNetwork::highestNetAbove(Net* net) const
const Net* dbNetwork::highestNetAbove(const Net* net) const
{
if (net == nullptr) {
return nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/dbSta/test/cpp/TestDbSta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TEST_F(TestDbSta, TestHierarchyConnectivity)
ASSERT_NE(dbnet_out2, nullptr);
Net* sta_dbnet_out2 = db_network_->dbToSta(dbnet_out2);
ASSERT_NE(sta_dbnet_out2, nullptr);
Net* sta_highest_net = db_network_->highestNetAbove(sta_dbnet_out2);
const Net* sta_highest_net = db_network_->highestNetAbove(sta_dbnet_out2);
ASSERT_EQ(sta_highest_net, sta_dbnet_out2);

odb::dbModNet* modnet_mod_out = block_->findModNet("sub_inst/mod_out");
Expand All @@ -86,7 +86,7 @@ TEST_F(TestDbSta, TestHierarchyConnectivity)
ASSERT_NE(sta_modnet_out2, nullptr);
// highestNetAbove on a mod net now returns the associated flat dbNet, not the
// highest mod net, so that parasitic externality checks work correctly.
Net* sta_highest_modnet_out
const Net* sta_highest_modnet_out
= db_network_->highestNetAbove(sta_modnet_mod_out);
ASSERT_EQ(sta_highest_modnet_out, sta_dbnet_out2);

Expand Down
3 changes: 3 additions & 0 deletions src/est/include/est/EstimateParasitics.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ class EstimateParasitics : public sta::dbStaState, public ParasiticsService
const std::vector<std::pair<odb::dbNet*, grt::GRoute*>>& work,
int threads,
bool partial);
// Make the parasitic placeholders for every driver and net so threads
// only look up sta::Parasitics entries, which are not locked.
void ensureParasiticsForThreads();
void clearParasitics();

////////////////////////////////////////////////////////////////
Expand Down
21 changes: 18 additions & 3 deletions src/est/src/EstimateParasitics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,15 @@ void EstimateParasitics::estimateRoutesInParallel(
threads = std::min(threads, static_cast<int>(work.size()));
// Each net is estimated and reduced on its own and stored by net and
// driver pin, so the result does not depend on the thread count or the
// order the threads run in. The parasitics store locks its own writes;
// the reduction goes through one arc delay calculator per thread, as
// sta::GraphDelayCalc does for its threads.
// order the threads run in. The parasitics store is not locked, so its
// entries are made before the threads; the reduction goes through one arc
// delay calculator per thread, as sta::GraphDelayCalc does for its threads.
std::vector<std::unique_ptr<sta::ArcDelayCalc>> calcs;
calcs.reserve(threads);
for (int i = 0; i < threads; ++i) {
calcs.emplace_back(sta_->arcDelayCalc()->copy());
}
ensureParasiticsForThreads();
odb::dbTech* tech = block_->getTech();
#pragma omp parallel for num_threads(threads) schedule(dynamic, 64)
for (int i = 0; i < static_cast<int>(work.size()); ++i) {
Expand All @@ -154,6 +155,19 @@ void EstimateParasitics::estimateRoutesInParallel(
}
}

void EstimateParasitics::ensureParasiticsForThreads()
{
std::set<sta::Parasitics*> done;
for (Scene* scene : sta_->scenes()) {
for (const sta::MinMax* min_max : sta::MinMax::range()) {
sta::Parasitics* parasitics = scene->parasitics(min_max);
if (parasitics && done.insert(parasitics).second) {
parasitics->ensureParasitics();
}
}
}
}

void EstimateParasitics::updateGlobalRouteParasitics(odb::dbNet* db_net,
grt::GRoute& route)
{
Expand Down Expand Up @@ -812,6 +826,7 @@ void EstimateParasitics::estimateWireParasitics(sta::SpefWriter* spef_writer)
for (int i = 0; i < threads; ++i) {
calcs.emplace_back(arc_delay_calc_->copy());
}
ensureParasiticsForThreads();
#pragma omp parallel for num_threads(threads) \
schedule(dynamic, 64) if (threads > 1)
for (int i = 0; i < static_cast<int>(work.size()); ++i) {
Expand Down
3 changes: 2 additions & 1 deletion src/rsz/test/cpp/TestResizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ TEST_F(TestResizer, ResizeSlacksExcludeNonTimingDrivers)
ASSERT_TRUE(unconstrained->hasFanout());
const sta::Slack wns = sta_->worstSlack(max);
EXPECT_NEAR(wns, staTime(-0.028), tolerance);
EXPECT_NEAR(sta_->slack(isolated, max), staTime(-0.270), tolerance);
// An input with no fanout is on no timing path (OpenSTA #523).
EXPECT_TRUE(sta::fuzzyInf(sta_->slack(isolated, max)));
EXPECT_TRUE(sta::fuzzyInf(sta_->slack(unconstrained, max)));

const odb::dbNet* timed_net = db_network_->flatNet(constrained->pin());
Expand Down
2 changes: 1 addition & 1 deletion src/sta
Submodule sta updated 73 files
+0 −2 BUILD.bazel
+13 −9 dcalc/ArnoldiReduce.cc
+160 −102 dcalc/GraphDelayCalc.cc
+48 −10 graph/Graph.cc
+2 −0 include/sta/Graph.hh
+77 −61 include/sta/GraphDelayCalc.hh
+3 −3 include/sta/Network.hh
+6 −0 include/sta/Parasitics.hh
+33 −31 include/sta/PortDirection.hh
+1 −0 include/sta/Sdc.hh
+1 −2 include/sta/Search.hh
+0 −1 liberty/test/cpp/TestLibertyClasses.cc
+0 −1 liberty/test/cpp/TestLibertyStaBasicsB.cc
+6 −6 network/Network.cc
+27 −71 network/PortDirection.cc
+1 −41 network/test/cpp/TestNetwork.cc
+0 −6 network/test/cpp/TestNetworkB.cc
+80 −30 parasitics/ConcreteParasitics.cc
+5 −1 parasitics/ConcreteParasitics.hh
+6 −5 parasitics/ConcreteParasiticsPvt.hh
+26 −2 parasitics/Parasitics.cc
+23 −13 parasitics/SpefReader.cc
+1 −0 parasitics/SpefReaderPvt.hh
+33 −30 parasitics/test/cpp/TestParasitics.cc
+10 −3 sdc/Sdc.cc
+23 −29 search/Crpr.cc
+57 −45 search/Levelize.cc
+5 −3 search/Levelize.hh
+47 −0 search/MakeTimingModel.cc
+2 −0 search/MakeTimingModelPvt.hh
+6 −6 search/Path.cc
+2 −2 search/ReportPath.cc
+22 −34 search/Search.cc
+21 −5 search/Sta.cc
+4 −7 search/test/cpp/TestSearchStaDesign.cc
+4 −0 search/test/cpp/TestSearchStaDesignB.cc
+0 −12 search/test/cpp/TestSearchStaInit.cc
+1 −10 search/test/cpp/TestSearchStaInitB.cc
+1 −1 search/test/search_fanin_fanout_deep.ok
+9 −9 search/test/search_multiclock.ok
+0 −2 search/test/search_network_sta_deep.ok
+2 −2 search/test/search_property.ok
+2 −2 search/test/search_property_deep.ok
+2 −2 search/test/search_report_path_detail.ok
+10 −10 search/test/search_report_path_expanded.ok
+18 −0 tcl/Init.tcl
+59 −11 tcl/Util.tcl
+25 −0 test/bidirect_pad_fanout.lib
+60 −0 test/bidirect_pad_fanout.ok
+16 −0 test/bidirect_pad_fanout.tcl
+28 −0 test/bidirect_pad_fanout.v
+60 −0 test/disable_timing_load_slew.ok
+25 −0 test/disable_timing_load_slew.tcl
+2 −0 test/include_error_line.ok
+3 −0 test/include_error_line.sdc
+7 −0 test/include_error_line.tcl
+2 −7 test/input_delay_ref_pin_rebuild.tcl
+60 −0 test/parasitic_network_new_net.ok
+19 −0 test/parasitic_network_new_net.tcl
+7 −0 test/regression_vars.tcl
+61 −0 test/set_max_time_borrow_pg_pin.ok
+16 −0 test/set_max_time_borrow_pg_pin.tcl
+18 −0 test/spef_hier_reduce.ok
+29 −0 test/spef_hier_reduce.spef
+10 −0 test/spef_hier_reduce.tcl
+13 −0 test/spef_hier_reduce.v
+1 −0 test/wireload_before_link.ok
+6 −0 test/wireload_before_link.tcl
+1 −1 test/write_path_spice_arc_sense.ok
+1 −1 util/test/util_parallel_misc.ok
+1 −1 util/test/util_pattern_string.ok
+2 −2 util/test/util_report_debug.ok
+0 −21 verilog/test/cpp/TestVerilog.cc
Loading