From ec537b189f8ac022869dbd0c5a46d0e500021c49 Mon Sep 17 00:00:00 2001 From: AdvaySingh1 Date: Fri, 20 Feb 2026 11:34:08 -0800 Subject: [PATCH] Added is_clock_gated attr to flops created via clockgate.cc pass --- kernel/constids.inc | 1 + passes/techmap/clockgate.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/constids.inc b/kernel/constids.inc index 59f7246e9..02dc64a12 100644 --- a/kernel/constids.inc +++ b/kernel/constids.inc @@ -909,6 +909,7 @@ X(interface_type) X(interfaces_replaced_in_module) X(invertible_pin) X(iopad_external_pin) +X(is_clock_gated) X(is_inferred) X(is_interface) X(it) diff --git a/passes/techmap/clockgate.cc b/passes/techmap/clockgate.cc index 7c90ba630..04d17cf09 100644 --- a/passes/techmap/clockgate.cc +++ b/passes/techmap/clockgate.cc @@ -448,7 +448,8 @@ struct ClockgatePass : public Pass { ff.sig_clk = (*it).second.new_net; // Rebuild the flop - (void)ff.emit(); + Cell *new_ff = ff.emit(); + new_ff->set_bool_attribute(ID::is_clock_gated); gated_flop_count++; }