Update passes/techmap/clockgate.cc

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Stan Lee 2026-05-11 18:41:18 -07:00 committed by GitHub
parent 1be9a8985d
commit 517a174775
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -208,10 +208,11 @@ static void update_ff_activity_attr(Cell *cell, IdString attr_key, double new_cl
std::istringstream iss(cell->get_string_attribute(attr_key));
for (std::string tok; iss >> tok; ) {
if (tok.compare(0, 3, "EN=") == 0) continue; // remove EN from attribute
if (!out.empty()) out += " ";
if (tok.compare(0, 4, "CLK=") == 0)
out += stringf("CLK=%f ", new_clk_value); // Update CLK value
out += stringf("CLK=%f", new_clk_value); // Update CLK value
else
out += tok + " "; // All other values remain unchanged
out += tok; // All other values remain unchanged
}
cell->set_string_attribute(attr_key, out);
}