Clock gating cell

Clock gating is a very common technique to save power by stopping the clock to a module when the module is not operating. As discussed in Clock switching and clock gating checks, there are two kinds of clock gating checks at combinational gates. We also discussed that for an AND type check, enable must launch from a negative edge-triggered flip-flop and for an OR type check, enable must launch from a positive edge-triggered flip-flop. However, it is very difficult to control the generic state machine to launch the signals to gate a clock either all from positive edge or from negative edge.

Evolution of integrated clock gating cell: To reduce the burden of same kind of launch registers from the state machine, an AND type clock gate can always be preceded with a negative level-sensitive latch and an OR type clock gate can be preceded with a positive level-sensitive latch. This has the same impact as a lockup latch in case of scan chain and eases hold timing. It results in zero cycle hold check from both positive and negative edge-triggered registers, without introduction of any additional latency. Since, each clock gate has to be preceded by a latch, why not build a special cell with an AND gate + a negative level-sensitive latch (or an OR gate + a positive level-sensitive latch). This concept served as motivation for Integrated Clock Gating Cell. This will provide more optimum area, power and timing for the resulting structure.

Test enable pin in integrated clock gating cell: During shift in scan testing, all the clock control signals have to be bypassed to let shifting happen. This can be achieved by providing a bypass signal called “test enable” that is ORed with functional enable signal (shown in figure 1 below). As soon as design goes into shift mode, test enable signal goes high, thereby bypassing all functional enable signals. So, it makes sense to embed this OR gate into integrated clock gating cell itself.


Structure of integrated clock gating cell: Figure 1 below shows the structure of the two kinds of integrated clock gating cells. The one on the left has an AND gate preceded by a negative level-sensitive latch. The enable and test_enable are active high. Clock_out has an inactive low state. The one on the right is complementary to this. It has an OR gate preceded by a positive level-sensitive latch. Both enable and test_enable are active high and output clock has an inactive high state. In case enable and test_enable are active low, NOR gate should be replaced by AND gate.

Figure 1: (a) AND type integrated clock gating cell                         Figure 1: (b) OR type integrated clock gating cell

Hope you’ve found this post useful. Let us know what you think in the comments.

Also read:




7 comments:

  1. In second ICG in place of NAND gate should use AND gate.

    ReplyDelete
    Replies
    1. Hi

      For first ICG, to enable the clock, because of AND gate between clock and enable, you need "1" at the output of latch. So, if either of "func_enable" or "test_enable" is 1, clock will pass through.

      For second ICG, to enable the clock, because of OR gate, you need to send "0" to its input. So, when either of "func_enable" or "test_enable" is "1", latch output should be "0". Which translates to NAND gate

      Delete
    2. Shouldn't it be a NOR gate instead in the OR Gating Check? Since the ICG is active low, we would want the clock to be present at the o/p when either Enable or Test_Enable are 0. In this example, we require that both Enable and Test_Enable be high before the latch can actually activate the clock.

      Delete
    3. Hi

      Yes, corrected. Thanks for your valuable feedback.

      Delete
  2. This was very helpful. Thank you

    ReplyDelete
  3. You mentioned "It results in zero cycle hold check from both positive and negative edge-triggered registers, without introduction of any additional latency". For negative edge-triggered register, hold check would be relaxed by T/2, for positive it would be zero. Can you please confirm?

    ReplyDelete
    Replies
    1. Correct, it would simply behave like a positive edge triggered flop in terms of timing behaviour.

      Delete

Thanks for your valuable inputs/feedbacks. :-)