You are on page 1of 4

12/4/2016 Clock 

Gating

14th July 2012 Clock Gating
Clock signal is the highest frequency toggling signal in any SoC. As we discussed
in  the  post:  Need  for  Low­Power  Design  Methodology  [http://vlsi­
soc.blogspot.in/2012/07/need­for­low­power­design­methodology.html]  ,  the  capacitive
load  power  component  of  the  dynamic  power  is  directly  proportional  to  the
switching  frequency  of  the  devices.  This  implies  that  clock  path  cells  would
contribute maximum to the dynamic power consumption in the SoC. 

Power  consumption  in  the  clock  paths  alone  contribute  to  more  than  50%
of  the  total  dynamic  power  consumed  within  modern  SoCs.  Power  being  a
very  critical  aspect  of  the  design,  one  needs  to  make  prudent  efforts  to  reduce
this. Clock Gating is one such method. 

Let's try and build further on this perspective.
Clock  feeds  the  CLOCK  pins  all  the  Flip­Flops  in  the  design.  Clock  Tree  itself
comprises  of  clock  tree  buffers  which  are  needed  to  maintain  a  sharp  slew
(numerically small) in the clock path. Refer to the post Clock Transition  [http://vlsi­
soc.blogspot.in/2012/07/puzzle­clock­transition.html]   for details. 

[http://2.bp.blogspot.com/­dc9bzd_­
rDc/UAEzXDcEWFI/AAAAAAAAAF8/XoyqlQQcOyA/s1600/clocktree.png]

Consider the above figure. It is not necessary that the output of the flip­flop would
be  switching  at  all  times.  Modern  devices  support  various  low­power  modes
in which only a certain part of your SoC is working. This may include some
key  features  pertaining  to  security  or  some  critical  functional  aspects  of
your  device.  Apart  from  this,  there  are  some  configuration  registers  in  your
device  which  need  to  be  programmed  either  once  or  very  seldom.  So,  let's  say,
the above FF will not be switching states for a considerable period of time. If it is
used  the  way  it  is,  what's  the  problem?  Power!  Clock  is  switching  incessantly.
Clock Tree buffers are switching states and hence consuming power. So are the
FFs. Remember that FF itself is made up of latches. So, despite the fact that input
and  output  of  the  FF  is  not  switching,  some  part  of  the  latch  is  switching  and
consuming power.

What  could  be  done  to  alleviate  the  above  problem?  Clock  Gating  is  one  such
solution. Here's how it'll help.

http://vlsi­soc.blogspot.in/2012/07/clock­gating.html 1/4
12/4/2016 Clock Gating

[http://2.bp.blogspot.com/­
Up267UTNGTE/UAE3Ql6N8SI/AAAAAAAAAGQ/a4UM5DAocM8/s1600/clocktree.png]

If  you  place  an  AND  gate  at  the  clock  path  and  knowing  that  you  don't  need  a
certain  part  of  your  device  to  receive  clock,  drive  a  logic  '0'  on  the  ENABLE  pin.
This  would  ensure  that  all  the  Clock  Tree  buffers  and  the  sink  pin  of  the  FF  are
held at a constant value (0 in this case). Hence these cells would not contribute to
dynamic power dissipation. However, they would still consume leakage power.

Similarly, you can place an OR gate and drive it's one input to logic 1. Again, you
would save on the dynamic power.

However, a word of caution. The output of the AND gate feeding the entire clock
path might be glitchy. See the following figure:

[http://3.bp.blogspot.com/­
T9YnMD1CMC8/UAE7eQkbinI/AAAAAAAAAGc/3Rhu5yev4RA/s1600/clocktree_and.png]

Solution:  The  output  won't  be  glitchy  if  the  enable  signal  changes  only
when the CLOCK signal is low. So, all you gotta make sure is that ENABLE
is  generated  by  a  negative­edge  triggered  FF.  This  would  ensure  that  the
signal is changing after the fall edge of the CLOCK signal.

Similarly,  while  using  an  OR­gate,  clock  pulse  would  be  propagated  if  the
ENABLE  signal  changes  when  the  CLOCK  is  high.  Make  sure  that  it  is
generated  by  a  positive­edge  triggered  FF  in  order  to  avoid  any  glitch
being passed onto the FFs. 

http://vlsi­soc.blogspot.in/2012/07/clock­gating.html 2/4
12/4/2016 Clock Gating

[http://3.bp.blogspot.com/­
be7K_jtatJo/UAFGTqW9qsI/AAAAAAAAAGo/Kl7bfH1rgf4/s1600/clocktree_and.png]

Why would a glitch be detrimental anyway? The answer is:
Glitches  constitute  an  edge!  FF  might  sample  the  value  because  they  are
edge­triggered.  But,  problem  is  that  all  FFs  have  a  certain  duty  cycle
requirement (Also called Pulse­width check), which needs to be fulfilled in
order to ensure that they don't go into METASTABILITY. And if an unknown
state : X is propagated in a design, the entire functionality of the chip can
go haywire!

Some terminologies: 
AND/NAND  gate  based  clock  gating  is  referred  to  as  Active­High  Clock
Gating.
OR/NOR gate based clock gating is referred to as Active­Low Clock Gating.
NAND and NOR clock gates work similar to AND and OR respectively. 

So,  Clock  Gating  is  an  efficient  solution  to  save  dynamic  power  consumption  in
the design. Modern SoCs have many IPs integrated together. Placing a clock gate
and enabling them in various possible combinations is what gives rise to different
low­power modes in the device.
Posted 14th July 2012 by Naman Gupta
Labels: Clock Gating, Clock Transition, Low Power Design, Low Power
Methodology, SoC Design

4   View comments

Anonymous March 19, 2014 12:51 pm
Hi Naman,

Won't this be negative level­sensitive latch in case of clock gating using AND

http://vlsi­soc.blogspot.in/2012/07/clock­gating.html 3/4
12/4/2016 Clock Gating

gate ? This makes sure that the EN signal can change during negative level of
clock but will surely be "latched" (unchanged) throughout the positive level of
the clock. Correct me if I misunderstood your explanation.

Thanks,
Sarth
Reply

Anonymous November 17, 2014 5:08 pm
Hi Naman
Can  you  pls  share  the  logic.  How  this  Enable  will  be  generated?.  If  its  based
on  "Data"  of  grouped  flops,  then  while  implementing  ICG  cells  in  Synthesis.
How we will add up a logic based on that "Data" to generate "Enable"?
Reply

Anonymous February 28, 2016 11:24 pm
Answer  to  first  question:  I  think  negative  level  sensitive  latch  sounds  right  to
me. Namen?
Reply

Replies

Anonymous February 28, 2016 11:25 pm
Sorry for typo of name on cell phone : Naman

Reply

Enter your comment...

Comment as:  Saurav Gupta (Google) Sign out

 
Publish Preview   Notify me

http://vlsi­soc.blogspot.in/2012/07/clock­gating.html 4/4

You might also like