From 21bbbcfee90b7b476f1ba795c43f8379f6f12410 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Wed, 5 Oct 2022 13:39:40 -0700 Subject: [PATCH] makeComponents() Signed-off-by: James Cherry --- include/sta/Sta.hh | 2 ++ search/Sta.cc | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index f01d538b..254d9ef8 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -1400,6 +1400,8 @@ protected: CornerSeq makeCornerSeq(Corner *corner) const; void makeParasiticAnalysisPts(); void clkSkewPreamble(); + void setCmdNamespace1(CmdNamespace namespc); + void setThreadCount1(int thread_count); CmdNamespace cmd_namespace_; Instance *current_instance_; diff --git a/search/Sta.cc b/search/Sta.cc index bd3852dc..96d6f83c 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -297,13 +297,13 @@ Sta::makeComponents() makeSdcNetwork(); makeReportPath(); makePower(); - setCmdNamespace(CmdNamespace::sdc); + setCmdNamespace1(CmdNamespace::sdc); + setThreadCount1(defaultThreadCount()); updateComponentsState(); makeObservers(); // This must follow updateComponentsState. makeParasiticAnalysisPts(); - setThreadCount(defaultThreadCount()); } void @@ -322,20 +322,24 @@ Sta::defaultThreadCount() const void Sta::setThreadCount(int thread_count) +{ + setThreadCount1(thread_count); + updateComponentsState(); +} + +void +Sta::setThreadCount1(int thread_count) { thread_count_ = thread_count; if (dispatch_queue_) dispatch_queue_->setThreadCount(thread_count); else if (thread_count > 1) dispatch_queue_ = new DispatchQueue(thread_count); - updateComponentsState(); } void Sta::updateComponentsState() { - // These components do not use StaState: - // units_ network_->copyState(this); cmd_network_->copyState(this); sdc_network_->copyState(this); @@ -611,6 +615,13 @@ Sta::cmdNamespace() void Sta::setCmdNamespace(CmdNamespace namespc) +{ + setCmdNamespace1(namespc); + updateComponentsState(); +} + +void +Sta::setCmdNamespace1(CmdNamespace namespc) { cmd_namespace_ = namespc; switch (cmd_namespace_) { @@ -621,7 +632,6 @@ Sta::setCmdNamespace(CmdNamespace namespc) cmd_network_ = sdc_network_; break; } - updateComponentsState(); } Instance *