Sta::netorkChangedNonSdc resolves #372

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2026-01-29 16:35:54 -07:00
parent 74f756c77c
commit 5605979049
3 changed files with 27 additions and 4 deletions

View File

@ -866,7 +866,9 @@ public:
// User visible but non SDC commands. // User visible but non SDC commands.
// Clear all state except network, scenes and liberty libraries. // Clear all state except network, scenes and liberty libraries.
virtual void clear(); void clear();
// Clear all state except network, scenes liberty libraries, and sdc.
void clearNonSdc();
// Namespace used by command interpreter. // Namespace used by command interpreter.
CmdNamespace cmdNamespace(); CmdNamespace cmdNamespace();
void setCmdNamespace(CmdNamespace namespc); void setCmdNamespace(CmdNamespace namespc);
@ -1261,6 +1263,8 @@ public:
// editing API. For example, reading a netlist without using the // editing API. For example, reading a netlist without using the
// builtin network readers. // builtin network readers.
void networkChanged(); void networkChanged();
// Network changed but all SDC references to instance/net/pin/port are preserved.
void networkChangedNonSdc();
void deleteLeafInstanceBefore(const Instance *inst); void deleteLeafInstanceBefore(const Instance *inst);
void deleteInstancePinsBefore(const Instance *inst); void deleteInstancePinsBefore(const Instance *inst);

View File

@ -104,4 +104,11 @@ network_changed()
Sta::sta()->networkChanged(); Sta::sta()->networkChanged();
} }
// Notify STA of network change without touching SDC network references.
void
network_changed_non_sdc()
{
Sta::sta()->networkChangedNonSdc();
}
%} // inline %} // inline

View File

@ -534,6 +534,14 @@ Sta::~Sta()
void void
Sta::clear() Sta::clear()
{
clearNonSdc();
for (Mode *mode : modes_)
mode->sdc()->clear();
}
void
Sta::clearNonSdc()
{ {
// Sdc holds search filter, so clear search first. // Sdc holds search filter, so clear search first.
search_->clear(); search_->clear();
@ -548,10 +556,8 @@ Sta::clear()
clk_skews_->clear(); clk_skews_->clear();
// scenes are NOT cleared because they are used to index liberty files. // scenes are NOT cleared because they are used to index liberty files.
for (Mode *mode : modes_) { for (Mode *mode : modes_)
mode->sdc()->clear();
mode->clkNetwork()->clkPinsInvalid(); mode->clkNetwork()->clkPinsInvalid();
}
delete graph_; delete graph_;
graph_ = nullptr; graph_ = nullptr;
@ -616,6 +622,12 @@ Sta::networkChanged()
clear(); clear();
} }
void
Sta::networkChangedNonSdc()
{
clearNonSdc();
}
void void
Sta::setTclInterp(Tcl_Interp *interp) Sta::setTclInterp(Tcl_Interp *interp)
{ {