makeComponents()

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2022-10-05 13:39:40 -07:00
parent 4f80bd6f8a
commit 21bbbcfee9
2 changed files with 18 additions and 6 deletions

View File

@ -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_;

View File

@ -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 *