diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index 0c176ba4..3bd008cf 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -1257,7 +1257,9 @@ public: virtual void disconnectPin(Pin *pin); virtual void makePortPin(const char *port_name, PortDirection *dir); - // Notify STA of network change. + // Notify STA that the network has changed without using the network + // editing API. For example, reading a netlist without using the + // builtin network readers. void networkChanged(); void deleteLeafInstanceBefore(const Instance *inst); void deleteInstancePinsBefore(const Instance *inst); diff --git a/power/Power.cc b/power/Power.cc index 6cc8795f..94d6fccf 100644 --- a/power/Power.cc +++ b/power/Power.cc @@ -1795,15 +1795,7 @@ Power::clockMinPeriod(const Sdc *sdc) } void -Power::deleteInstanceBefore(const Instance *) -{ - activities_valid_ = false; - instance_powers_.clear(); - scene_ = nullptr; -} - -void -Power::deletePinBefore(const Pin *) +Power::powerInvalid() { activities_valid_ = false; instance_powers_.clear(); diff --git a/power/Power.hh b/power/Power.hh index 83930253..661f6e1f 100644 --- a/power/Power.hh +++ b/power/Power.hh @@ -127,8 +127,8 @@ public: void reportActivityAnnotation(bool report_unannotated, bool report_annotated); float clockMinPeriod(const Sdc *sdc); - void deleteInstanceBefore(const Instance *inst); - void deletePinBefore(const Pin *pin); + float clockMinPeriod(); + void powerInvalid(); protected: PwrActivity &activity(const Pin *pin); diff --git a/search/Sta.cc b/search/Sta.cc index 07bd6c3c..9bf83330 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -4428,6 +4428,7 @@ Sta::makeInstanceAfter(const Instance *inst) } } graph_->makeInstanceEdges(inst); + power_->powerInvalid(); } } } @@ -4496,6 +4497,8 @@ Sta::replaceEquivCellAfter(const Instance *inst) } } delete pin_iter; + clk_skews_->clear(); + power_->powerInvalid(); } } @@ -4569,7 +4572,6 @@ Sta::replaceCellBefore(const Instance *inst, } } delete pin_iter; - clk_skews_->clear(); } } @@ -4640,6 +4642,7 @@ Sta::connectPinAfter(const Pin *pin) mode->sim()->connectPinAfter(pin); } clk_skews_->clear(); + power_->powerInvalid(); } void @@ -4745,6 +4748,7 @@ Sta::disconnectPinBefore(const Pin *pin) } } clk_skews_->clear(); + power_->powerInvalid(); } } @@ -4791,6 +4795,8 @@ Sta::deleteNetBefore(const Net *net) } for (Mode *mode : modes_) mode->sdc()->deleteNetBefore(net); + clk_skews_->clear(); + power_->powerInvalid(); } void @@ -4820,7 +4826,8 @@ Sta::deleteLeafInstanceBefore(const Instance *inst) mode->sim()->deleteInstanceBefore(inst); mode->sdc()->deleteInstanceBefore(inst); } - power_->deleteInstanceBefore(inst); + clk_skews_->clear(); + power_->powerInvalid(); } void