Aspects of the present disclosure relate generally to clock gating, and more particularly, to clock gating cells.
Reducing power consumption in a mobile device is important in order to extend the battery life of the mobile device. A significant contributor to power consumption of a chip (die) in a mobile device is dynamic power dissipation, which is due to switching of transistors on the chip. In this regard, various power reduction schemes have been developed to reduce dynamic power consumption on a chip. One scheme involves selectively gating a clock signal to a circuit block on the chip using a clock gating cell, in which the clock gating cell gates the clock signal when the circuit block is not in use. Gating the clock signal stops transistors in the circuit block from switching, thereby reducing the dynamic power dissipation of the circuit block.
The following presents a simplified summary of one or more embodiments in order to provide a basic understanding of such embodiments. This summary is not an extensive overview of all contemplated embodiments, and is intended to neither identify key or critical elements of all embodiments nor delineate the scope of any or all embodiments. Its sole purpose is to present some concepts of one or more embodiments in a simplified form as a prelude to the more detailed description that is presented later.
A first aspect relates to a clock gating cell. The clock gating cell includes a latch having an input and an output, wherein the latch is configured to receive an enable signal at the input of the latch, to latch a logic value of the enable signal on an edge of an input clock signal, and to output the latched logic value at the output of the latch. The clock gating cell also includes a transmission gate coupled between the output of the latch and an output of the clock gating cell, wherein the transmission gate is configured to couple the output of the latch to the output of the clock gating cell when the input clock signal is logically high, and to decouple the output of the latch from the output of the clock gating cell when the input clock signal is logically low. The clock gating cell further includes a pull-down transistor coupled between the output of the clock gating cell and a ground, wherein the pull-down transistor is configured to pull the output of the clock gating cell to the ground when the input clock signal is logically low.
A second aspect relates to a clock gating cell. The clock gating cell includes a latch having an input and an output, wherein the latch is configured to receive an enable signal at the input of the latch, to latch an inverted logic value of the enable signal on an edge of an input clock signal, and to output the latched inverted logic value of the enable signal at the output of the latch. The clock gating cell also includes a transmission gate coupled between the output of the latch and a transmission node, wherein the transmission gate is configured to couple the output of the latch to the transmission node when the input clock signal is logically high, and to decouple the output of the latch from the output of the transmission node when the input clock signal is logically low. The clock gating cell further includes an output inverter having an input coupled to the transmission node and an output coupled to an output of the clock gating cell, and a pull-up transistor coupled between the transmission node and a supply rail, wherein the pull-up transistor is configured to pull the transmission node to the supply rail when the input clock signal is logically low.
A third aspect relates to a method for clock gating. The method includes receiving an enable signal, and latching a logic value of the enable signal on an edge of an input clock signal. The method also includes passing the latched logic value of the enable signal to a clock-gating output when the input clock signal is logically high, blocking the latched logic value of the enable signal from the clock-gating output when the input clock signal is logically low, and pulling the clock-gating output logically low when the input clock signal is logically low.
A fourth aspect relates to a method for clock gating. The method includes receiving an enable signal, and latching an inverted logic value of the enable signal on an edge of an input clock signal. The method also includes passing the latched inverted logic value of the enable signal to a transmission node when the input clock signal is logically high, blocking the latched inverted logic value of the enable signal from the transmission node when the input clock signal is logically low, and pulling the transmission node logically high when the input clock signal is logically low. The method further includes inverting the latched inverted logic value of the enable signal at the transmission node.
To the accomplishment of the foregoing and related ends, the one or more embodiments include the features hereinafter fully described and particularly pointed out in the claims. The following description and the annexed drawings set forth in detail certain illustrative aspects of the one or more embodiments. These aspects are indicative, however, of but a few of the various ways in which the principles of various embodiments may be employed and the described embodiments are intended to include all such aspects and their equivalents.
The detailed description set forth below, in connection with the appended drawings, is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of the various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring such concepts.
A clock gating cell (CGC) 110 typically includes a latch for latching an enable signal, and one or more logic gates for selectively gating a clock signal based on the logic value of the latched enable signal. In this regard,
In this example, the CGC 110 gates the clock signal clk_in when the enable signal en is low (logic zero). In this case, the CGC 110 outputs a logic zero to the circuit block regardless of the logic state of the input clock signal clk_in. The CGC 110 passes the clock signal clk_in to the circuit block when the enable signal en is high (logic one).
In operation, the latch 120 latches the logic value of the enable signal en on a falling edge of the clock signal clk_in, and outputs the latched logic value of the enable signal en to the first input of the AND gate 130. If the latched logic value of the enable signal en is logic one, then the AND gate 130 passes the clock signal clk_in to the output of the CGC 110. If the latched logic value of the enable signal en is logic zero, then the AND gate 130 outputs a logic zero regardless of the logic state of the input clock signal clk_in, effectively gating the clock signal.
A CGC has a setup time that specifies the minimum amount of time that an edge of the enable signal needs to arrive at the latch of the CGC before an edge of the input clock signal in order for the latch to properly latch the logic value of the enable signal. It is desirable for the CGC to have a low setup time. This is because a low setup time allows the edge of the enable signal to arrive at the latch of the CGC closer to the edge of the input clock signal without causing a setup time violation. This makes it easier to meet timing requirements in critical signal paths for higher clock frequencies.
In current CGC designs, when the enable signal changes from logic one to logic zero, an internal node of the latch needs to discharge to ground through a path that includes two gates in order for the latch to properly latch the logic value of zero of the enable signal. As a result, the setup time for these designs is at least two gate delays.
Embodiments of the present disclosure provide CGCs with low setup times, as discussed further below.
The transmission gate 220 is coupled between the output 218 of the latch 215 and the output 265 of the CGC 210, which provides the output clock signal clk_out to a circuit block (not shown). The pull-down transistor 260 is coupled between the output 265 of the CGC 210 and ground.
In operation, when the input clock signal clk_in is low (logic zero), the transmission gate 220 is turned off (opened) and the pull-down transistor 260 is turned on. As a result, the pull-down transistor 260 pulls the output 265 of the CGC 210 to ground (i.e., pulls the output 265 low). Thus, when the input clock signal clk_in is low (logic zero), the output clock signal clk_out is also low (logic zero).
When the input clock signal clk_in is high (logic one), the transmission gate 220 is turned on (closed) and the pull-down transistor 260 is turned off. As a result, the transmission gate 220 passes the latched logic value of the enable signal en at the output 218 of the latch 215 to the output 265 of the CGC 210. Thus, the logic value at the output 265 of the CGC 210 depends on the latched logic value of the enable signal en. If the latched logic value of the enable signal en is logic one, then the output 265 of the CGC 210 is logic one. If the latched logic value of the enable signal en is logic zero, then the output 265 of the CGC 210 is logic zero.
Thus, when the enable signal en is logic one, the output 265 of the CGC 210 is logic one when the input clock signal clk_in is logic one, and therefore tracks the input clock signal clk_in. As a result, the input clock signal clk_in is effectively passed to the output 265 of the CGC 210 in this case. When the enable signal en is logic zero, the output 265 of the CGC 210 stays at logic zero when the input clock signal clk_in is logic one, effectively gating the input clock signal clk_in. Accordingly, in this example, the input clock signal clk_in is gated when the enable signal is logic zero, and un-gated when the enable signal is logic one.
In the example in
In the example in
In the example in
PMOS transistors 222 and 224 are coupled in series between the supply rail Vcc and node pn1. The gate of PMOS transistor 222 is coupled to node pn2, and the gate of PMOS transistor 224 is coupled to the enable input 216 of the latch 215. In the example shown in
NMOS transistors 226 and 228 are coupled in series between node pn1 and ground. The gate of NMOS transistor 226 is coupled to the enable input 216 of the latch 215, and the gate of NMOS transistor 228 is coupled to the inverted clock signal nclk_in, which is generated by inverter 212. In the example shown in
PMOS transistors 230 and 235 are coupled in series between the supply rail Vcc and node pn1. The gate of PMOS transistor 230 is coupled to the inverted clock signal nclk_in. The inverter 240 is coupled between node pn1 and the gate of PMOS transistor 235. The inverter 240 is configured to invert the logic value of node pn1, and input the inverse of the logic value of node pn1 to the gate of PMOS transistor 235. In the example in
NMOS transistor 245 is coupled between node pn1 and ground. In the example in
The NOR gate 248 has a first input coupled to the inverted clock signal nclk_in, a second input coupled to node pn1, and an output coupled to node pn2. As discussed further below, the NOR gate 248 functions as an inverter between nodes pn1 and pn2 when the inverted clock signal nclk_in is low (input clock signal clk_in is high).
Operation of the latch 215 will now be described according to certain aspects of the present disclosure.
When the input clock signal clk_in is low (logic zero), the inverted clock signal nclk_in is high (logic one). The logic one of the inverted clock signal nclk_in causes NMOS transistor 228 to turn on. The logic one of the inverted clock signal nclk_in also causes the NOR gate 248 to output a logic zero at node pn2 regardless of the logic value at node pn1. As a result, node pn2 is low (logic zero). The logic zero at node pn2 causes PMOS transistor 222 to turn on.
Thus, when the input clock signal clk_in is low (inverted clock signal nclk_in is high), both NMOS transistor 228 and PMOS transistor 222 are turned on. PMOS transistor 222 couples the source of PMOS transistor 224 to the supply rail Vcc, and NMOS transistor 228 couples the source of NMOS transistor 226 to ground. As a result, PMOS transistor 224 and NMOS transistor 226 form an input inverter that inverts the enable signal en at the enable input 216 of the latch 215 and outputs the inverted enable signal at node pn1. Thus, when the clock signal clk_in is low, the logic value of node pn1 is the inverse of the logic value of the enable signal en.
When the input clock signal clk_in switches from low (logic zero) to high (logic one) on a rising edge of the input clock signal clk_in, the inverted clock signal nclk_in switches from high (logic one) to low (logic zero). The logic zero of the inverted clock signal nclk_in (which is input to the first input of the NOR gate 248) causes the NOR gate 248 to function as a first latch inverter that inverts the logic value of node pn1, and outputs the inverted logic value at node pn2. Thus, the logic value of node pn2 is the inverse of the logic value of node pn1.
The logic zero of the inverted clock signal nclk also causes PMOS transistors 222 and 235 and NMOS transistor 245 to form a second latch inverter that inverts the logic value of node pn2, and outputs the inverted logic value at node pn1, as explained further below. Thus, the logic value of node pn1 is the inverse of the logic value of node pn2.
Thus, when the input clock signal switch from low to high (inverted clock signal nclk_in switches from high to low), the NOR gate 248 forms a first latch inverter having an input coupled to node pn1 and an output coupled to node pn2, and PMOS transistors 222 and 235 and NMOS transistor 245 form a second latch inverter having an input coupled to node pn2 and an output coupled to node pn1. The first and second latch inverters are coupled in a closed loop, which causes the latch 215 to latch the inverted logic value of the enable signal at node pn1 on a rising edge of the input clock signal clk_in.
In the example in
The input inverter formed by PMOS transistor 224 and NMOS transistor 226 when the input clock signal clk_in is low is disabled when the input clock signal clk_in is high. This is because NMOS transistor 228 is turned off when the input clock signal clk_in is high (inverted clock signal nclk_in is low), and therefore decouples the source of NMOS transistor 226 from ground when the input clock signal clk_in is high. This closes the enable input of the latch 215, allowing the first and second latch inverters discussed above to latch the logic value of the enable signal. The input inverter is enabled when the input clock signal clk_in is low (inverted clock signal nclk_in is high) because NMOS transistor 228 is turned on in this case, and therefore couples the source of NMOS transistor 226 to ground.
The latch 215 shown in
As discussed above, PMOS transistors 222 and 235 and NMOS transistor 245 form the second latch inverter when the input clock signal clk_in is high (inverted clock signal nclk_in is low). An explanation of how the second latch inverter is formed will now be provided according to certain aspects of the present disclosure.
When the inverted clock signal nclk_in is low (logic zero), PMOS transistor 230 turns on and couples the source of PMOS transistor 235 to the supply rail Vcc. This causes PMOS transistor 235 and NMOS transistor 245 to form an inverter that inverts the logic value at node pn2 and outputs the inverted logic value at node pn1. Note that the gate of PMOS transistor 235 is coupled to the output of the inverter 240, which has the same logic value as node pn2. This is because the logic value at node pn2 is the inverse of the logic value at node pn1, as discussed above.
PMOS transistor 222 and NMOS transistor 245 also form an inverter depending on whether the enable signal en is high or low. When the enable signal en is low, PMOS transistor 224 is turned on, thereby coupling the drain of PMOS transistor 222 to the drain of NMOS transistor 245. In this case, PMOS transistor 222 and NMOS transistor 245 form an inverter that inverts the logic value at node pn2 and outputs the inverted logic value at node pn1. When the enable signal en is high, PMOS transistor 224 is turned off. In this case, the drain of PMOS transistor 222 is decoupled from the drain of NMOS transistor 244. In either case, PMOS transistor 235 and NMOS transistor 245 form an inverter that inverts the logic value at node pn2 and outputs the inverted logic value at node pn1, as discussed above.
Thus, the second inverter latch includes the inverter formed by PMOS transistor 235 and NMOS transistor 245 and the inverter formed by PMOS transistor 222 and NMOS transistor 245 when the enable signal en is low (logic zero), and includes the inverter formed by PMOS transistor 235 and NMOS transistor 245 when the enable signal is high (logic zero).
The output inverter 340 inverts the latched inverted logic value of the enable signal at node pn1. Thus, the output inverter 340 outputs the latched logic value of the enable signal at the output 318 of the latch 215.
The output inverter 340 may have a high current drive capability for driving a large output load (e.g., a large load coupled to the output of the CGC). Thus, in this example, the output inverter 340 helps isolate node pn1 of the latch from the output load, making the latch less sensitive to the output load.
The CGC 410 also differs from the CGC 210 in
The pull-up transistor 430 is coupled between the supply rail Vcc and a transmission node 425 of the CGC 410 (i.e., node between the transmission gate 220 and the input of the output inverter 420). The pull-up transistor 430 is configured to pull the transmission node 425 to the supply rail Vcc (i.e., pull the transmission node 425 high) when the input clock signal is low (logic zero), as discussed further below.
In operation, when the input clock signal clk_in is low (logic zero), the transmission gate 220 is turned off (opened) and the pull-up transistor 430 is turned on. As a result, the pull-up transistor 430 pulls the transmission node 425 to the supply rail Vcc (i.e., pulls the transmission node 425 high). The output inverter 420 inverts the logic value of one at the transmission node 425, and therefore outputs a logic value of zero at the output 256 of the CGC 410. Thus, when the input clock signal clk_in is low (logic zero), the output clock signal clk_out at the output 265 of the CGC 410 is also low (logic zero).
When the input clock signal clk_in is high (logic one), the transmission gate 220 is turned on (closed) and the pull-up transistor 430 is turned off. As a result, the transmission gate 220 passes the latched inverted logic value of the enable signal en at node pn1 to the input of the output inverter 420. The output inverter 420 undoes the inversion of the enable signal, and therefore output the latched logic value of the enable signal at the output 265 of the CGC 410. Thus, the logic value at the output 265 of the CGC 410 is the latched logic value of the enable signal en. If the latched logic value of the enable signal en is logic one, then the output 265 of the CGC 410 is logic one. If the latched logic value of the enable signal en is logic zero, then the output 265 of the CGC 410 is logic zero.
Thus, when the enable signal en is logic one, the output 265 of the CGC 410 is logic one when the input clock signal clk_in is logic one, and therefore tracks the input clock signal clk_in. As a result, the input clock clk_in is effectively passed to the output 265 of the CGC 410 in this case. When the enable signal en is zero, the output 265 of the CGC 410 stays at logic zero when the input clock signal clk_in is logic one, effectively gating the input clock signal clk_in. Accordingly, in this example, the input clock signal clk_in is gated when the enable signal is logic zero, and un-gated when the enable signal is logic one.
In the example in
In this example, the output inverter 420 may have a high current drive capability for driving a large output load (e.g., a large load coupled to the output of the CGC). This helps isolate node pn1 of the latch from the output load, making the latch less sensitive to the output load.
PMOS transistors 510 and 520 are coupled in series between the supply rail Vcc and node pn2. The gate of PMOS transistor 510 is coupled to the inverted clock signal nclk_in, and the gate of PMOS transistor 520 is coupled to the node pn1. In the example shown in
NMOS transistors 530 and 540 are coupled in parallel between node pn2 and ground. The gate of NMOS transistor 530 is coupled to the inverted clock signal clk_in, and the gate of NMOS transistor 540 is coupled to node pn1. The drain of each of the NMOS transistors 530 and 540 is coupled to node pn2, and the source of each of the NMOS transistors 530 and 540 is coupled to ground.
In operation, when the inverted clock signal nclk_in is high (logic one), NMOS transistor 530 is turned on and PMOS transistor 510 is turned off. As a result, NMOS transistor 530 pulls node pn2 to ground (i.e., pulls node pn2 low). In this case, node pn2 is low (logic zero) regardless of the logic value of node pn1.
When the inverted clock signal nclk_in is low (logic zero), NMOS transistor 530 is turned off and PMOS transistor 510 is turned on. As a result, PMOS transistor 510 couples the source of PMOS transistor 520 to the supply rail Vcc. In this case, PMOS transistor 510 and NMOS transistor 540 form an inverter that inverts the logic value of node pn1, and outputs the inverted logic value at node pn2.
In this example, the CGC 620 receives the input clock signal clk_in from the clock source 640 via a clock path (e.g., clock path in a clock distribution network). The clock source 640 may include a phase locked loop (PLL) or another type of clock source. The CGC 620 receives the enable signal en from the clock gate controller 630. The clock gate controller 630 controls gating of the input clock signal clk_in by controlling the logic value of the enable signal en, as discussed further below. The output of the CGC 620 is coupled to the clock input of the circuit block 650. The circuit block 650 uses the output clock signal clk_out from the CGC 620 for timing operations of the circuit block 650. The circuit block 650 may include a processor, a sequential logic circuit, a pipeline, and/or one or more flip-flops, etc.
In operation, the clock gate controller 630 may monitor an activity state of the circuit block 650, and determine whether to gate the clock signal clk_in based on the monitored state. For example, if the circuit block 650 is in an inactive state (e.g., not processing data, not receiving data, etc.), then the clock gate controller 630 may gate the clock signal clk_in by asserting the enable signal en to the CGC 620 low (logic zero). The inactive state may also be referred to as an idle state. If the circuit block 650 is in an active state (e.g., processing data, receiving data, etc.), then the clock gate controller 630 may un-gate the clock signal clk_in by asserting the enable signal en to the CGC 620 high (logic one).
In this example, the clock gate controller 630 may monitor the input D and/or output Q of the flip flop 710 to determine whether to gate the clock signal clk_in. For example, if the logic values at the input D and output Q of the flip flop 710 are the same over one or more clock cycles (e.g., of the input clock signal clk_in), then the clock gate controller 630 may determine to gate the clock signal to the flip flop 710 to conserve power. This may occur when the flip flop 710 is not receiving new data that needs to be latched. In this case, clock gate controller 630 may gate the clock signal clk_in by asserting the enable signal en to the CGC 620 low (logic zero). If the logic values at the input D and output Q of the flip flop 710 are different, then the clock gate controller 630 may determine to un-gate the clock signal. In this case, the gate clock gate controller 630 may un-gate the clock signal clk_in by asserting the enable signal en to the CGC 620 high (logic one).
The flip flop 710 may be used, for example, to latch data in a sequential logic circuit, a pipeline, a processor, a shift register, etc. The flip flop 710 may also be used to synchronize a data signal with the clock signal clk_out by latching logic values of the data signal on rising or falling edges of the clock signal clk_out.
At step 810, an enable signal is received. For example, the enable signal may be received from a clock gate controller (e.g., clock gate controller 630).
At step 820, a logic value of the enable signal is latched on an edge of an input clock signal. For example, the logic value may be latched on a rising edge of the input clock signal (e.g., input clock signal clk_in).
At step 830, the latched logic value of the enable signal is passed to a clock-gating output when the input clock signal is logically high. For example, the latched logic value may be passed to the clock-gating output (e.g., output 265) by turning on a transmission gate (e.g., transmission gate 220).
At step 840, the latched logic value of the enable signal is blocked from the clock-gating output when the input clock signal is logically low. For example, the latched logic value may be blocked by turning off the transmission gate.
At step 850, the clock-gating output is pulled logically low when the input clock signal is logically low. For example, the output may be pulled low (e.g., to ground) by turning on a pull-down transistor (e.g., pull-down transistor 260).
At step 910, an enable signal is received. For example, the enable signal may be received from a clock gate controller (e.g., clock gate controller 630).
At step 920, an inverted logic value of the enable signal is latched on an edge of an input clock signal. For example, the inverted logic value may be latched on a rising edge of the input clock signal (e.g., input clock signal clk_in).
At step 930, the latched inverted logic value of the enable signal is passed to a transmission node when the input clock signal is logically high. For example, the latched inverted logic value may be passed to the transmission node (e.g., transmission node 425) by turning on a transmission gate (e.g., transmission gate 220).
At step 940, the latched inverted logic value of the enable signal is blocked from the transmission node when the input clock signal is logically low. For example, the latched inverted logic value may be blocked by turning off the transmission gate.
At step 950, the transmission node is pulled logically high when the input clock signal is logically low. For example, the transmission node may be pulled high (e.g., to supply rail Vcc) by turning on a pull-up transistor (e.g., pull-up transistor 430).
At step 960, the latched inverted logic value of the enable signal is inverted. For example, the latched inverted logic value may be inverted using an inverter (e.g., output inverter 420). The resulting inverted latched inverted logic value may be output to the clock input of a circuit block (e.g., circuit block 650).
It is to be appreciated that the present disclosure is not limited to the exemplary terminology used above. For example, a transmission gate may also be referred to as a switch, a pass gate, or another term. Also, a CGC may be referred to as a clock gating circuit or another term.
In the present disclosure, the term “logically low” corresponds to a logic value of zero, and the term “logically high” corresponds to a logic value of one. A logic value of zero may correspond to a voltage approximately equal to ground, and a logic value of one may correspond to a voltage approximately equal to the supply voltage of the supply rail Vcc.
The clock gate controller 630 discussed above may be implemented with a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete hardware components (e.g., logic gates), or any combination thereof designed to perform the functions described herein. A processor may perform the functions described herein by executing software comprising code for performing the functions. The software may be stored on a computer-readable storage medium, such as a RAM, a ROM, an EEPROM, an optical disk, and/or a magnetic disk.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.