diff --git a/liberty/Liberty.cc b/liberty/Liberty.cc index 3cf867f2..ec922176 100644 --- a/liberty/Liberty.cc +++ b/liberty/Liberty.cc @@ -1132,7 +1132,7 @@ LibertyCell::isClockGateLatchPosedge() const bool LibertyCell::isClockGateLatchNegedge() const { - return clock_gate_type_ == ClockGateType::latch_posedge; + return clock_gate_type_ == ClockGateType::latch_negedge; } bool diff --git a/liberty/LibertyReader.cc b/liberty/LibertyReader.cc index 6b86742b..b42a6635 100644 --- a/liberty/LibertyReader.cc +++ b/liberty/LibertyReader.cc @@ -602,8 +602,8 @@ LibertyReader::defineScalingFactorVisitors() string attr_name; stringPrint(attr_name, "k_%s_%s_%s", pvt_name, - tr_name, - type_name); + type_name, + tr_name); defineAttrVisitor(attr_name.c_str(),&LibertyReader::visitScaleFactorHiLow); } } diff --git a/power/Power.cc b/power/Power.cc index c5297b33..ef1f2fa4 100644 --- a/power/Power.cc +++ b/power/Power.cc @@ -1331,12 +1331,15 @@ Power::findLeakagePower(const Instance *inst, cell_leakage *= duty; } // Ignore unconditional leakage unless there are no conditional leakage groups. - if (found_cond) + if (found_cond) { leakage = cond_leakage; + if (cell_leakage_exists) + leakage += cell_leakage; + } else if (found_uncond) leakage = uncond_leakage; - if (cell_leakage_exists) - leakage += cell_leakage; + else if (cell_leakage_exists) + leakage = cell_leakage; debugPrint(debug_, "power", 2, "leakage %s %.3e", cell->name(), leakage);