Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Clock gating can be added manually into the RTL (based on architecture definition) or automatically by synthesis tool.
In an SOC you can have your clock generation module create a separately gated clock for each IP on your chip. Just have a programmable register in you clock module to allow you to turn each clock on/off separately.
synthesis tool can be allowed to add clock gating automatically. The common case is for enable signals like below. You can define minimum number of registers to be gated automatically so you do not get clock gating cells gating single registers.
always @(posedge clk)
regA <= 1'b0;
else if (enable)
regA <= signalB;
this can be synthesized into:
1) a flop with a mux in front of the D pin controlled by enable, one input is signalB the other is output Q of flop
2) a flop with a clock gating cell controlled by enable. Now if regA is 32 bits wide, it would make sense to choose this option. The clock gating cell would be pushed up the clock tree, stopping some of the clock buffers from toggling when enable is low.
nice explanation shelby, just adding to these,, generally tool will be adding clock gates where bunch of mux-register pair has common enable, mostly tools scope will be limited to a single hierarchy, and u can disable this defualut behaviour,,, by ckgating u get dynamic power and area advantage at the cost of speed
EDA tools can come up with best possible number of reg to be combined, and just we need to say the max and min bandwidth, and one more thing, if enable signal is same then only these regs can be merged if not they can;t.
and my exp says that min &max bandwidth limit will come from trials only
Added after 49 seconds:
merging i mean,, can be clked from a single clk gate