Skip to content

Commit c7a8700

Browse files
committed
cgt: Error on gating distinct clocks
Signed-off-by: Krzysztof Bieganski <[email protected]>
1 parent 481aef4 commit c7a8700

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cgt/src/ClockGating.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,12 @@ void ClockGating::insertClockGate(const std::vector<sta::Instance*>& instances,
12221222
for (size_t i = 1; i < instances.size(); i++) {
12231223
auto clk_pin = getClockPin(network, instances[i]);
12241224
assert(clk_pin);
1225-
assert(*sta_->clkNetwork()->clocks(clk_pin) == *clocks);
1225+
if (*sta_->clkNetwork()->clocks(clk_pin) != *clocks) {
1226+
logger_->error(
1227+
utl::CGT,
1228+
12,
1229+
"Cannot insert a clock gate for multiple distinct clocks.");
1230+
}
12261231
}
12271232

12281233
auto gated_clk

0 commit comments

Comments
 (0)