Understanding What Are Clock Gating Checks and How To Specify, Report and Disable These Checks
Understanding What Are Clock Gating Checks and How To Specify, Report and Disable These Checks
What is a clock gating check? How is clock gating check done and reported in Tempus, Innovus and Genus?
Solution
Clock Gating Definition
A gated clock signal occurs when the clock network contains logic other than inverters and buffers as shown in following
example:
In this case:
When the data signal EN=0, the output clock, GCK, will always be 0, irrespective of clock CK state.
When the data signal EN=1, the output clock, GCK, will be equal to CK.
To obtain a proper gated clock signal at the output, the following condition must be satisfied:
The control input, EN, must satisfy a setup check and a hold check.
The clock input, CK, must have a dominant phase or the controlling state.
For AND/NAND gate, the CK’s controlling state is ‘0’ (because the output will always be 0 during this time,
irrespective of the state of EN ).
For OR/NOR gate, the CK’s controlling state is ‘1’.
For example, in the case shown in above diagram, where CG1 is an AND gate, the clock, CK, will be controlling low as
shown in the following diagram:
When the CK is in control, the EN signal can change. Otherwise, it will result in the setup or hold violation.
A clock gating setup failure can cause either a glitch at the leading edge of the clock pulse, or a clipped clock pulse.
The hold check is performed with respect to the edge of the clock signal that changes the state of the clock pin from non-
controlling to controlling. The clock gating hold check is used to ensure that the data signals are stable while the clock is
active.
A clock gating hold violation causes either a glitch at the trailing edge of the clock pulse, or a clipped clock pulse.
The following diagram shows the controlling and non-controlling state of the clock along with the setup and hold values:
In the following diagram, assume the setup and hold values for clock gating checks to be zero. If EN changes in the non-
controlling state, it will cause either setup or hold violation.
The setup and hold values for inferred clock gating checks, for the logical cells such as AND gates that do not have setup
or hold constraints defined in the timing library, can be specified using the set_clock_gating_check command else
tool will consider clock gates with zero setup and hold value.
For ICG cells, the setup and hold values are already specified in the library. Because the ICG cells are characterized with
the setup and hold values, it is not recommended to change the internal characterization using
set_clock_gating_check command. However, if the set_clock_gating_check is applied, it will override
only the internal values if applied to the specific pins. It will not override the internal values if applied to the clock
waveform.
You can generate the clock gating setup report using the following command:
You can generate the clock gating hold report using the following command:
You can use the report_clock_gating_check command to report information of all or specific clock gating checks
as follows:
> report_clock_gating_check
------------------------------------------------------------------------------
-------------------
Clock Gating Check
Report
------------------------------------------------------------------------------
-------------------
Instance Enable Clock Type Level Setup
Setup Hold Hold
Rise
Fall Rise Fall
------------------------------------------------------------------------------
-------------------
A1 A B I H 1.500
1.500 1.000 1.000
------------------------------------------------------------------------------
-------------------
A clock gating check at MUX inputs ensure that the MUX select signal arrives at the right time while switching from one
input to another.
By default, the clock gating check is not inferred for complex combinational cells such as MUX, AND-OR, XOR because the
clock is never in the controlling state. However, you can force clock gating on MUX by specifying explicitly either -high or
-low option with set_clock_gating_check command. The -high/-low option will force non-controlling state of
the clock as logic high or logic low respectively. For a MUX, the select signal acts as the gating signal and -high option
implies that the select signal should switch only before the input clock goes to high logic level (logic 1). It is worthwhile to
note a few essential points regarding -high/-low option:
The -high/-low option sets the attribute only on the specified pin or the cell and does not affect the transitive
fanout of it.
Specifying object list is mandatory with -high/-low option.
A clock or port cannot be specified in the object list, if you are using -high/-low option.
Example:
The above clock gating setup and hold checks will apply for both clock inputs to the multiplexer cell. If you want to
disable clock gating check for one of clock inputs, you can turn off the clock gating check for that multiplexer input pin as
follows:
For the clock gating check to be recognized, it is a necessary condition that the output of the MUX is used as a clock
signal downstream. The downstream clock usage can be either of the following:
Example:
To confirm whether or not the clock gating check is successfully asserted on the cell/pin, use
report_clock_gating_check command to get a report as shown below:
> report_clock_gating_check
------------------------------------------------------------------------------------
-------------
Clock Gating Check
Report
------------------------------------------------------------------------------------
-------------
Instance Enable Clock Type Level Setup Setup
Hold Hold
Rise Fall
Rise Fall
------------------------------------------------------------------------------------
-------------
MUX0 S0 B I H 0.230 0.230
0.000 0.000
MUX0 S0 A I H 0.230 0.230
0.000 0.000
------------------------------------------------------------------------------------
-------------
Clock gating check can also be applied on a MUX cell that samples data signals and has a clock as select pin driver. A
typical example is frequently seen in case of DDR MUX interface and MUX based frequency divider.
Note that output of the MUX reaches an output port, thus making it a valid downstream clock usage.The clock phase
reaches through the select pin S to the MUX output pin Y and through the buffer to the output port.
Note: If one of the MUX inputs is a clock signal and the other (for 2x1 MUX) is constrained to a logic 1/0 value, in that
case the MUX select pin will act like a clock-gating enable signal, because the MUX function will reduce to a simple OR-
type or AND-type clock-gating cell as shown below:
When A pin is driven by CLK and B pin is set to logic 0 or logic 1, the MUX output function becomes:
In that scenario, no explicit set_clock_gating_check command is required for the MUX cell anymore. Clock
gating check will be automatically inferred for it.
If the clock gating checks are specified using the set_clock_gating_check command, it is called inferred clock
gating and can be disabled using the following command:
If you want to disable a particular inferred clock gating check, use the following command:
set_disable_clock_gating_check <object_list>
Here, <object_list> specifies a list of pins or instances for which the clock gating check should be disabled.
Note: To disable clock gating checks for a specific view, the above constraint can be used in the constraints file for that
view.
The set_disable_clock_gating_check command does not work to disable any timing to the data/enable pin for
the ICG cells. To disable timing on the ICG cells, you need to set a false path to the data/enable pins of these cells:
Exceptions/Constraints:
output_delay 200 clk_gating_check_2
#------------------------------------
# Timing Point Arc Delay Arrival
# (ps) (ps)
#------------------------------------
UFF1/CK - - 4000
UFF1/Q CK->Q 140 4140
UMUX0/A - 0 4140
#------------------------------------