From 8f5b8cb46c4715b9e8a9c03fe45b230660d1a62e 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 c99aa788d..e567e2af9 100644 --- a/kernel/constids.inc +++ b/kernel/constids.inc @@ -906,6 +906,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 01ab2e771..6a5f95d5b 100644 --- a/passes/techmap/clockgate.cc +++ b/passes/techmap/clockgate.cc @@ -428,7 +428,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++; }