Need for clock gating checks - need for glitchless clock propagation


One of the most important things in designs is to ensure glitch free propagation of clocks. Even a single glitch in clock path can cause the chip to be metastable and even fail. A glitch is any unwanted clock pulse that may cause the sequential cells to consider it as an actual clock pulse. Thus, a glitch can put your device in an unwanted state that is functionally never possible. That is why; there should never be a glitch in clock path. Every effort should be done by designers to minimize its probability. The figure below shows a flip-flop receiving a data signal and a clock signal; if there is some glitch (unwanted change of state) in clock, it will take it as a real clock edge and latch the data to its output. However, if the pulse is too small, the data may not propagate properly to output and the flop may go metastable.

Figure showing functional glitch in clock path. It may be due to race condition or due to crosstalk between different signals
Figure showing functional glitch in clock path

There may be following kind of cells present in clock path:

     1)      Buffers/inverters: Since, there is only one input for a buffer/inverter, the glitch may occur on the output of these gates only through coupling with other signals in the vicinity. If we ensure that the buffer/inverter has good drive strength and that the load and transition at its output are under a certain limit, we can be certain that the glitch will not occur.

      2)   Combinational gates: There can be combinational gates other than buffers/inverters in clock path, say, a 2-input AND gate having an enable signal that tells if the clock is to be propagated or not. Each combinational gate might have one or more clocks and data/enable pins. Let us say, we have a two input AND gate with one input as clock and the other acting as an enable to the clock. We can have following cases possible:

i)             The other input is static: By static, we mean the other input will not change on the fly. In other words, whenever the enable will change, the clock will be off. So, enable will not cause the waveform at the output of the gate to change. This case is similar to a buffer/inverter as the other input will not cause the shape of the output pulse to change.

ii)                The other input is toggling: In this case, the enable might affect the waveform at the output of the gate to change. To ensure that there is not glitch causes by this, there are certain requirements related to skew between data and clock to be met, which will be discussed later in the text. These requirements are termed as clock gating checks.

3   3)    Sequential gates: There may also be sequential gates in clock path, say, a flop, a latch or an integrated clock gating cell with the clock at its clock input and the enable for the clock will be coming at its data input. The output of these cells will be a clock pulse. For these also, two cases are possible as in case 2. In other words, if the enable changes when clock is off, the enable is said to be static. In that case, the output either has clock or does not have clock. On the other hand, if the input is toggling while clock is there at the input, we may get away by meeting the setup and hold checks for the enable signal with respect to clock input.

As discussed above, to ensure a glitch free propagation of clock at the output of the combinational gates, we have to ensure some timing requirements between the enable signal and clock. These timing requirements ensure that there is no functionally unwanted pulse in clock path. If we ensure these timing requirements are met, there will be no functional glitch in clock path. However, glitches due to crosstalk between signals can still occur. There are other techniques to prevent glitches due to crosstalk. The functional glitches in clock path can be prevented by ensuring the above discussed timing requirements. In STA, these requirements are enforced on designs through timing checks known as clock gating checks. By ensuring these checks are applied and taken care of properly, an STA engineer can sign-off for functional glitches. In later posts, we will be dealing with these checks in more details.

Also read:

Timing Corners – dimensions in timing signoff



Integrated circuits are designed to work for a range of temperatures and voltages, and not just for a single temperature and voltage. These have to work under different environmental conditions and different electrical setup and user environments. For instance, the temperature in the internals of an automobile may reach as high as 150 degrees while operating. Also, automobiles may have to work in colder regions where temperatures may reach -40 degrees during winters. So, a chip designed for automobiles has to be designed so as to be able to work in temperatures ranging from -40 to 150 degree Celsius. On the other hand, consumer electronics may have to work in the range of -20 to +40 degrees only. Thus, depending upon the application, the chip has to be robust enough to handle varying surrounding temperatures. Not just surrounding temperatures, the voltage supplied by the voltage source may vary. The battery may have an output voltage range. Also, the voltage regulator sitting inside or outside the chip may have some inaccuracy range defined. Let us say, a SoC has a nominal operating voltage of 1.2V with 10% variation. Thus, it can operate at any voltage from 1.08 V to 1.32V. The integrated circuits have to be tolerable enough to handle these variations. Not just these variations, the process by which the integrated circuits are manufactured has variations due to its micro nature. For example, while performing etching, the depth of etching may vary from wafer to wafer, and from die to die. Similarly, doping, width of wires drawn, distance between wires may vary for each wire from chip-to-chip. Depending upon these, the behavior (delay, static and dynamic power consumption etc) of cells on chip vary. These variations are together referred as PVT (Process Voltage Temperature) variations. The behavior of the devices also varies according to the PVT variations. The library (liberty) models of the cells are characterized for cell delays, transitions, static and dynamic power corresponding to different PVT combinations. Not just for cells, for nets too, these variations are possible. The net parameters (resistance, capacitance and inductance) may also vary. These parameters also account for cell delay. In addition, nets introduce delay of their own too. Hence, one may get nets with high or less delay. So, these variations also have to be taken into account for robust integrated circuit manufacture. This variation in net characteristic can be modeled as their RC variation as it accounts for changes in resistance and capacitance (ignoring inductance) of net.

The operating conditions of an SoC may vary based upon the application. For instance, an SoC being used in a car can be exposed to temperatures ranging from -40 to 150 degree celsius. The figure shows a racing car.

Figure 1: A racing car. (Taken from en.wikipedia.com)

With proper techniques, the patterns of the variations for both the cell and net parameters (delay, power, resistance and capacitance) are characterized and their minima and maxima are recorded. Each minima and maxima can be termed as a corner. Let us say, each minima/maxima in cell characteristics as ‘PVT corner’ and net characteristics as ‘extraction corner’.  Each combination of PVT extraction corners is referred to as a ‘timing corner’ as it represents a point where timing will be extreme. There is an assumption that if the setup and hold conditions are met for the design at these corners, these will be met at intermediate points and it will be safe to run under all conditions. This is true in most of the cases, not always. There is always a trade-off between number of signed-off corners and the sign-off quality.
 
For bigger technologies, say 250 nm, only two corners used to be sufficient, one that showed maximum cell delay and the other that showed least cell delay. Net variations could be ignored for such technologies. In all, there used to be 2 PVT and 1 extraction corner.  As we go down technology nodes, net variations start coming into picture. Also, cell characteristics do not show a linear behavior. Therefore, there is increased number of PVT as well as extraction corners for lower technology nodes. For 28 nm, say, there can be 8 PVT corners as well 8 extraction corners. The number of corners differs from foundry to foundry.  The chip has to be signed off in each and every corner to ensure it works in every corner. However, we may choose to sign-off in lesser corners with applying some extra uncertainty as margin in lieu of not signing off at these timing corners. The timing analyst needs to decide what is appropriate depending upon the resources and schedule.

Also read: