Sta::networkChanged

This commit is contained in:
James Cherry 2020-05-06 14:12:55 -07:00
parent 34159b6742
commit a50bbc788b
3 changed files with 31 additions and 0 deletions

View File

@ -1116,6 +1116,8 @@ public:
Net *net); Net *net);
// disconnect_net // disconnect_net
virtual void disconnectPin(Pin *pin); virtual void disconnectPin(Pin *pin);
// Notify STA of network change.
void networkChanged();
// Network edit before/after methods. // Network edit before/after methods.
void makeInstanceAfter(Instance *inst); void makeInstanceAfter(Instance *inst);

View File

@ -534,6 +534,28 @@ Sta::clear()
updateComponentsState(); updateComponentsState();
} }
void
Sta::networkChanged()
{
// Remove sdc graph annotations.
sdc_->annotateGraph(false);
// Everything else from clear().
search_->clear();
levelize_->clear();
if (parasitics_)
parasitics_->clear();
graph_delay_calc_->clear();
sim_->clear();
if (check_min_pulse_widths_)
check_min_pulse_widths_->clear();
if (check_min_periods_)
check_min_periods_->clear();
delete graph_;
graph_ = nullptr;
current_instance_ = nullptr;
updateComponentsState();
}
void void
Sta::setTclInterp(Tcl_Interp *interp) Sta::setTclInterp(Tcl_Interp *interp)
{ {

View File

@ -93,4 +93,11 @@ disconnect_pin_cmd(Pin *pin)
Sta::sta()->disconnectPin(pin); Sta::sta()->disconnectPin(pin);
} }
// Notify STA of network change.
void
network_changed()
{
Sta::sta()->networkChanged();
}
%} // inline %} // inline