Method and system for automatic clock gating of a clock grid at a clock source

Hardware-based clock gating at the clock source in microprocessors addresses inefficient energy consumption by detecting critical delay states and suspending clock signal distribution, enhancing processor efficiency.

DE102013216237B4Active Publication Date: 2024-10-24NVIDIA CORP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
DE102013216237
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2012-08-15
Filing Date
2013-08-15
Publication Date
2024-10-24
Estimated Expiration
2033-08-15

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Energy management procedures, exhibiting the procedure: Detecting a critical delay state within a clocked component of a processing unit core, wherein the core has one or more clocked components whose operation is synchronized by a clock signal distributed from a clock grid; Clock gating of the clock grid to prevent the distribution of the clock signal to the core during the critical delay state; and Temporarily disabling the clock gating of the clock grid to temporarily release the distribution of the clock signal to the core for processing selected incoming transactions directed to the core.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND

[0001] High-frequency microprocessors and other computing engines often use a clock grid (rather than a clock tree) as the global clock distribution mechanism to reduce clock uncertainty and to make more of the nominal clock cycle available for computations.

[0002] On the one hand, when a clock tree is used for clock distribution, large parts of the global clock distribution network can be relatively easily gated, largely eliminating clock distribution-related (active / dynamic) power in a relatively local manner.

[0003] But on the other hand, clock grids, when compared to clock trees, are not easy to mask for power management purposes. Although clock grids have a frequency advantage and thus a conceptual advantage in terms of energy efficiency when they are active, clock grids have some energy disadvantages when the microprocessor is inactive, such as when waiting for information from memory without which the processor cannot proceed. Thus, power is partly consumed by clock distribution and by the processor circuitry.

[0004] Clock grids rely on being globally "on" to reduce skew. Because of their configuration, traditional clock gating is forced to clock-gate closer to the "leaves" than is possible when using a clock tree. Because the grid typically has more capacitance and more transistors than the corresponding spanning tree, more power is potentially consumed and / or wasted on circuits clocked by a clock grid. In such idle situations, the global clock grid can consume hundreds of milliwatts, even if all of the units are clock-gated locally, and yet the processor may still be unable to make progress due to the nature of such a miss-to-memory or similar stalling condition.

[0005] In some situations, a clock grid may be managed using software power management. For limited-critical states, for example, the clock grid's active clock power is managed using explicit software power management instructions and sequences. Power management through software control may, for example, be achieved by explicitly entering lower-power states under software control. The software-controlled lower-power states can mask the clock grid at the source.

[0006] However, a software-controlled power management solution does not help with energy savings during dynamic and / or critical conditions, as the software is unable to identify in a timely manner when the critical condition exists. For example, a software-controlled management solution is unable to determine when an instruction branch will be mispredicted and then search for the correct instruction and / or data in lower-level caches or the underlying memory system.

[0007] In this context, US 2007 / 0 074 059 A1 discloses a system and method for dynamic power management in a processor structure. Stall detection logic of a pipeline stage detects a stall condition and sends a signal to idle detection logic to disable the pipeline stage's register clocks. The stall detection logic also monitors the stall condition of a downstream pipeline stage and instructs the idle detection logic to disable the pipeline stage's registers if the downstream pipeline stage is also in a stall condition. If the pipeline stage's stall detection logic detects a stall condition, either from the downstream pipeline stage or from its own pipeline units, the pipeline stage's stall detection logic also informs an upstream pipeline stage to disable its clocks, thus saving more power.

[0008] DE 10 2011 102 238 A1 concerns storage energy management via dynamic storage operating states.

[0009] DE 10 2011 102 871 A1 relates to methods and devices for adaptive memory operating state management.

[0010] US 2010 / 0 077 184 A1 concerns a system for expanding a pipeline with a bubble removal circuit.

[0011] DE 600 32 481 T2 relates to a method and a device for thread switching in a multi-threaded processor.

[0012] US 6 233 690 B1 concerns a mechanism for saving energy during long delay blocking.

[0013] US 6 226 756 B1 discloses an interface for exchanging clock signals and other information between a computer subsystem based on a first clock scheme of a first processor and a second processor.

[0014] US 5 933 627 A relates to a method and apparatus for switching between threads of a program in response to a long latency event. SUMMARY

[0015] According to the present invention, a method for energy management and an apparatus for energy management are achieved as defined in the independent claims. The dependent claims define embodiments of the invention.

[0016] A method and system for performing power management are disclosed. The method comprises performing clock gating on a clock source. In particular, a critical delay condition is detected within a hardware-based clocked component of a core of a processing unit. The core includes one or more clocked components whose operation is synchronized by a clock signal distributed by a clock grid. The clock grid is clock-gated at a root branch that supplies the clock signal to the core to prevent distribution of the clock signal throughout the core during the critical delay condition. The clock grid is temporarily un-gated to temporarily enable distribution of the clock signal to the core for processing selected incoming transactions directed to the core.

[0017] In another embodiment, another method for power distribution is disclosed. The method includes detecting when an instruction is dispatched from a clocked component of a core of a processing unit. The instruction is associated with a response, wherein processing of data in the core is inhibited or inactive until the response is received. In some cases, the response is returned from the memory system. The core includes one or more clocked components whose operation is synchronized by a clock signal distributed by a clock grid. The method includes starting a counter. The counter is incremented, such as by incrementing the counter by one for each clock cycle. Transactions are monitored for the response. For example, transactions are monitored by a memory system for the response to the instruction.The method includes determining that the counter reaches a threshold before the response is detected. If the counter reaches the threshold before the response is detected, the method includes clock gating the clock grid to prevent distribution of the clock signal to the core during the critical delay condition.

[0018] In yet another embodiment, an apparatus for power management is disclosed. The apparatus includes a clock source for providing a clock signal. The apparatus also includes a clock grid for distributing the clock signal to a core of a processing unit. The core includes one or more clocked components whose operation is synchronized by the clock signal. A hardware-based monitor for detecting a critical delay condition within a clocked component of the core is included. In one embodiment, the clocked component includes the hardware-based monitor. The apparatus includes a clock grid control unit for clock gating the clock grid at a root branch of the clock grid to prevent distribution of the clock signal throughout the core during the critical delay condition. The root branch distributes the clock signal to the core.The clock gating of the clock grid is temporarily released to temporarily enable the distribution of the clock signal to the core for processing selected incoming transactions directed to the core.

[0019] These and other objects and advantages of the various embodiments of the present disclosure will be understood by those of ordinary skill in the art after reading the following detailed description of the embodiments illustrated in the various drawing figures. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification and in which like reference characters refer to like elements, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the disclosure. The Fig. 1 illustrates a block diagram of an exemplary computer system suitable for implementing the present methods according to an embodiment of the present disclosure. The Fig. 2 is a diagram of an example instruction pipeline of an example core of a processor used to process instructions into a series of dependent steps, according to an embodiment of the present disclosure. The Fig. 3 is a block diagram of an apparatus configured to perform power management by clock gating a clock source to inhibit distribution of a clock signal when a critical delay condition is detected, according to an embodiment of the present disclosure. The Fig. 4 is a flowchart illustrating a method for performing power management by clock gating a clock source to prevent distribution of a clock signal when a critical delay condition is detected, according to an embodiment of the present disclosure. The Fig. 5 is a flowchart illustrating a method for performing power management by clock gating a clock source to prevent distribution of a clock signal when a counter has reached a threshold after an instruction is sent and before a response to the instruction is detected or received, according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] Detailed reference will now be made to the various embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Although described in connection with these embodiments, it will be understood that they are not intended to limit the disclosure to these embodiments. On the contrary, the disclosure is intended to cover alternatives, modifications, and equivalents that may be included within the spirit and scope of the disclosure as defined by the appended claims. Furthermore, in the following detailed description of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. It will be understood, however, that the present disclosure may be practiced without these specific details.In other instances, well-known methods, procedures, components, and circuits have not been described in detail to avoid unnecessarily obscuring aspects of the present disclosure.

[0022] Some portions of the following detailed description are presented in terms of procedures, logical blocks, processing, and other symbolic representations of operations on data bits within a computer memory. These descriptions and representations are the means used by those skilled in the data processing art to most effectively convey the substance of their work to others skilled in the art. In the present application, a procedure, logical block, process, or the like is understood to be a self-contained sequence of steps or instructions that lead to a desired result. The steps are those that involve physical manipulation of physical quantities.Typically, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transmitted, combined, compared, and otherwise manipulated within a computer system. It has sometimes been convenient, primarily for purposes of popular use, to refer to these signals as transactions, bits, values, elements, symbols, characters, samples, pixels, and the like.

[0023] It should be noted, however, that all of these and similar terms should be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless clearly stated otherwise, and as will be apparent from the following discussion, it will be understood that throughout this disclosure, discussions using such terms as "identify," "determine," "monitor," "screen," or the like refer to acts and processes (for example, flowcharts 400 and 500, respectively, in the Fig. 4 and Fig. 5) a computer system or similar electronic computing device or processor (for example, the system 100 of Fig. 1 and the microarchitecture 300 of Fig. 3). The computer system or similar electronic computing device manipulates and transforms data represented as physical (electronic) quantities within the memories, registers, or other such information storage, transmission, or display devices.

[0024] The Fig. 4 and Fig. 5 are flowcharts of examples of computer-implemented methods for data processing according to embodiments of the present invention. Although specific steps are disclosed in the flowcharts, such steps are exemplary. That is, embodiments of the present invention are well suited to performing various other steps or variations of the steps depicted in the flowcharts.

[0025] Embodiments of the present invention described herein are discussed within the context of hardware-based devices configured to monitor and execute instructions. That is, embodiments of the present invention are implemented within hardware devices of a microarchitecture and configured to monitor for critical delay conditions and perform appropriate clock gating for power management purposes.

[0026] Other embodiments described herein may be discussed in the general context of computer-executable instructions residing on any form of computer-readable storage medium, such as program modules executed by one or more computers or other devices. For example, and not by way of limitation, the computer-readable storage media may include non-transitory computer storage media and communication media. Program modules generally include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or distributed as desired in various embodiments.

[0027] Computer storage media includes volatile and non-volatile, removable and non-removable, and fixed media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other storage technologies, compact disc-ROM (CD-ROM), digital multi-purpose discs (DVDs) or other optical storage media, magnetic cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and accessed to retrieve that information.

[0028] Communication media may include computer-executable instructions, data structures, and program modules, and includes any information transmission media. By way of example and not limitation, communication media includes wired media, such as a cable network or a direct-wired connection, and wireless media, such as acoustic, radio frequency (RF), infrared, and other wireless media. Combinations of any of the above may also be included within the scope of computer-readable media.

[0029] The Fig. 1 is a block diagram of an example of a computer system 100 capable of implementing embodiments of the present disclosure. Computer system 10 broadly represents any single- or multi-processor computer device or system capable of executing computer-readable instructions. Examples of computer system 100 include, without limitation, workstations, laptops, client-side terminals, servers, distributed computer systems, handheld devices, or any other computer system or device. In its simplest configuration, computer system 100 may include at least a processor 110 and system memory 140.

[0030] Both the central processing unit (CPU) 110 and the graphics processing unit (GPU) 120 are coupled to the memory 140. The system memory 140 generally represents any type or form of volatile or non-volatile storage device or storage medium capable of storing data and / or other computer-readable instructions. Examples of the system memory 140 include, without limitation, RAM, ROM, flash memory, or any other suitable storage device. In the example of the Fig. 1, memory 140 is a shared memory, with the memory storing instructions and data for both CPU 110 and CPU 120. Alternatively, there may be separate memories associated with CPU 110 and GPU 120, respectively. The memory may include a frame buffer for storing pixel data driving a display screen 130.

[0031] System 100 includes a user interface 160, which in one implementation includes a control device for a cursor on the screen. The user interface may include a keyboard, a mouse, and / or a touchscreen device (a touchpad).

[0032] The CPU 110 and / or GPU 120 generally represent any type or form of processing unit capable of processing data or interpreting and executing instructions. In certain embodiments, the processors 110 and / or 120 may receive instructions from a software application or from a hardware module. These instructions may cause the processors 110 and / or 120 to perform the functions of one or more of the example embodiments described and / or illustrated herein. For example, the processors 110 and / or 120, either alone or in combination with other elements, may perform and / or be a means for performing one or more of the monitoring, determining, controlling, and detecting, or the like, described herein.Processors 110 and / or 120 may also perform and / or be a means for performing any other steps, methods, or processes described and / or illustrated herein.

[0033] In some embodiments, the computer-readable medium containing a computer program may be loaded into the computer system 100. All or part of the computer program stored on the computer-readable medium may then be stored in the system memory 140 and / or in various areas of storage devices. A computer program loaded into the computer system 100, when executed by the processors 110 and / or 120, may cause the processor 110 and / or 120 to perform and / or be a means for performing the functions of the example embodiments described and / or illustrated herein. Additionally or alternatively, the example embodiments described and / or illustrated herein may be implemented in firmware and / or hardware.

[0034] The Fig. Figure 2 is a diagram of an example instruction pipeline 200 of an example core of a processor used to process instructions in a series of dependent steps, according to an embodiment of the present disclosure. Pipeline 200 is configured to execute higher-level instructions directed to a particular feature or functionality. As shown in Figure Fig. 2, the pipeline 200 has a single instruction path, although for increased performance, the pipeline 200 may include multiple parallel data paths operating simultaneously.

[0035] Pipeline 200 generally includes one or more dependent stages for executing multiple instructions, with each stage executing a specific instruction. This means that the stages are executed in a specific order, as the output from one stage is input to the subsequent stage. Each instruction and / or stage is executed in one clock cycle. As described in the Fig. 2, the stages are generally represented by a corresponding execution unit. For example, pipeline 200 includes one or more execution units, including execution units 210, 220, 230, etc. More specifically, execution unit 210 is located at the front-end of pipeline 200, and execution unit 230 is located at the back-end of pipeline 200.

[0036] At a high level, the execution units of the 200 pipeline may include, but are not limited to, instruction fetch units (IFUs), instruction decode units, execution units, branch prediction units, arithmetic logic units (ALUs), load store units, memory management units, single instruction multiple data (SMID) units, and write-back units. These execution units perform the operations and / or computations from the microarchitecture designed to perform a specific function.

[0037] The execution units may additionally experience a stall condition. For example, processing in the pipeline 200 may be stalled at a particular execution unit, where an instruction at the execution unit cannot be executed during the current clock cycle. Therefore, when an execution unit experiences a stall condition, the pipeline 200 is partially stalled until the corresponding execution unit is able to complete its instructions and resolve its stalled state. The pipeline 200 is more specifically stalled for stages prior to the stalled execution unit. As described in the Fig. As shown in Figure 2, execution units in a stall state are represented by a stall state loop, in which the instruction is looped back to be reprocessed by the execution unit. More specifically, execution unit 210 has a corresponding stall state loop 215, execution unit 220 has a corresponding stall state loop 225, and execution unit 230 has a corresponding stall state loop 235.

[0038] Delay conditions may vary among microarchitectures. Embodiments of the present invention are configured to monitor for one or more delay conditions experienced by a particular microarchitecture. More specifically, embodiments of the present invention are configured to monitor for one or more critical or dynamic delay conditions. A critical or dynamic delay condition that triggers a delay in an execution unit of pipeline 200 is, for example, a translation lookaside buffer (TLB) miss, where a physical address corresponding to a requested virtual address is not in the TLB cache and is also not in a TLB L-2 cache. Therefore, the translation process must perform a pass of a corresponding page table to determine the correct physical address.Another dynamic delay condition that triggers a delay in an execution unit of pipeline 200 is a barrier instruction implemented to enforce an ordering constraint on memory operations and / or to ensure the completion of all memory accesses requested before the barrier instruction. During execution of the barrier instruction, the corresponding execution unit is delayed until the barrier instruction completes, such as when waiting for a return or acknowledgment from a very slow memory system. Yet another dynamic delay condition that triggers a delay in an execution unit of pipeline 200 is a misprediction of a branch, such as when the branch prediction misses on a conditional branch, causing a drain.A stall condition becomes a long-latency miss when the correct instruction or data being fetched is not in the on-chip instruction cache (I-cache or L-1 cache), nor is it in other off-chip higher-level caches (e.g., L-2 cache), and therefore must go to other lower-level caches (e.g., main memory) for the correct information. Another dynamic stall condition that triggers a stall in an execution unit of pipeline 200 is a request for an uncached load, where the information must be fetched from the main memory system rather than from the cache. In some sense, the uncached load request is similar to a TLB miss.Other critical or dynamic delay states are considered for different microarchitectures, which can be identified to perform clock gating for power management.

[0039] The Fig. 3 is a block diagram of a microarchitecture 300 of a computing resource configured to perform power management by clock gating a clock source to prevent distribution of a clock signal when a critical delay condition is detected, according to one embodiment of the present disclosure. For example, the microarchitecture 300 is configured to detect critical delay conditions during the execution of instructions within a pipeline, such as the pipeline 200 of Fig. 2.

[0040] As in the Fig. 3, the microarchitecture 300 includes a clock source 360 ​​configured to provide a clock signal. The clock source 360 ​​is, for example, a phase-locked loop (PLL) circuit that generates the clock signal in one implementation. The clock signal is additionally distributed throughout the microarchitecture 300 via a distribution network. The clock distribution network includes, for example, the clock grid 310, which is used to distribute the clock signal to a core 305 of a processor, where the processor may have one or more cores, although only the core 305 of the processor in Fig. 3. In particular, core 305 includes one or more clocked components (e.g., components 330, 340, etc.), with the operation of each clocked component being synchronized by the clock signal distributed by clock grid 315.

[0041] Clock grid 315 is representative of any of a number of distribution networks or patterns. The clock grid is generally configured to distribute a clock signal throughout core 305 at the same time, such as, in part, by minimizing the skew of the clock signal being distributed. Examples of clock grids 315 include a binary tree, an H-tree, an X-tree, etc.

[0042] As it is in the Fig. 3, the clock signal distributed throughout core 305 is received by one or more clocked components, including clocked component 330 and clocked component 340. The clocked components are configured to perform one or more functions and, in one embodiment, are hardware-based. In one implementation, the clocked components include an execution unit previously configured in conjunction with the Fig. 2, or a component associated with an execution unit or configured to monitor an execution unit.

[0043] For example, in one embodiment, the clocked component 330 includes a monitor 335 for detecting a critical delay condition within a clocked component of the core 305. In one implementation, the monitor 335 is hardware-based and configured to monitor for a predetermined condition or status of the clocked component 330. As an example, the monitor 335 is configured to monitor for cache misses, where the clocked component includes an L-2 I-cache and is configured to detect when an instruction is associated with an I-cache miss, and an L-2 I-cache miss causing a long-latency period within the pipeline of the core 305.

[0044] In another embodiment, the clocked component 330 primarily includes and functions as the monitor 335. That is, the monitor 335 is configured to monitor the state of another device remote from the clocked component 330. For example, the monitor 335 may be configured to monitor activity and responses from an execution unit previously associated with the Fig. 2. Continuing with the previously provided example, monitor 335 may monitor the state of a separately located clocked component, such as an L-2 I-cache.

[0045] Microarchitecture 300 additionally includes a clock grid controller 320 for managing the distribution of the clock signal originating from clock source 360. Clock grid controller 320 is electrically coupled to core 305 and more specifically to one or more supervisors (e.g., supervisors 335 and 345). As such, clock grid controller 320 is capable of receiving messages from each of the supervisors in core 305 instructing clock grid controller 320 to clock-gate clock grid 310 at a root branch 317 of clock grid 310. Root branch 317 distributes the clock signal originating from clock source 360. By hiding the root branch 317, the clock grid controller 320 is configured to inhibit the distribution of the clock signal to the core 305 during a critical delay condition identified by a corresponding supervisor.

[0046] As it is in the Fig. 3, the clock grid controller 320 is not located on the portion of the clock grid 310 that provides the clock signal to the core 305. Specifically, the clock grid controller 320 is separately gated from the clock source 360, as compared to clock gating the core 305 from the clock source 360 ​​via the root branch 317. In this manner, although the root branch 317 is clock-gated, the clock grid controller 320 is not clock-gated and still receives a clock signal from the clock source 360. Furthermore, the clock source 360, the clock grid controller 320, the external device 370 (e.g., memory system), and the response monitors 325 and 370 are located external to the core 305, as shown by the demarcation 350.

[0047] As it is also in the Fig. 3, the microarchitecture 300 includes a response monitor for monitoring responses corresponding to a critical or dynamic delay condition. The response monitor is configured, for example, to monitor responses to instructions generated by the delay condition (e.g., accessing a physical address due to a TLB miss) to include access information from an external device 380 (e.g., a memory system). More specifically, in one embodiment, the response monitor 325 is located within the clock grid controller 320. In another embodiment, the response monitor 370 is a stand-alone device that is separate from the clock grid controller 320 and electrically coupled to the clock grid controller 320.Additionally, response monitors 325 and 370 are located external to core 305, being located on a different branch (e.g., root branch) than the root branch 317 that provides the clock signal to core 305. In this manner, although the clock signal is gated at root branch 371, the clock signal to response monitors 325 and / or 370 is not suppressed even though the clock signal is not provided to core 305. In this manner, when a response is identified as being associated with the critical or dynamic delay condition, the corresponding monitor is configured to notify clock grid controller 320 to de-clock clock grid 310 at root branch 317 of clock grid 310. Therefore, when the response is returned, the received clocked component is powered back on because the core 305 receives the clock signal again.

[0048] In one embodiment, the response monitor 325 and / or 370 is configured to identify a unique transaction identifier corresponding to the instruction that generated the delay state and / or forced the delay state, and the response to that instruction. The transaction identifier is, for example, a memory address. In another example, the transaction identifier is a multi-bit number generated for the transaction and typically uses fewer bits than required for a memory address. As such, the response monitor is capable of monitoring responses from the external device (e.g., the memory system) 380 for the transaction identifier in association with the clock grid control unit.The term "external" used to identify external unit 380 indicates that unit 380 is external to core 305 and, more specifically, is located on a different branch (e.g., a root branch) than root branch 317, which provides the clock to core 305. In this manner, although the clock signal is masked at root branch 371, the clock signal to external unit 380 is not masked even though the clock signal is not provided to core 305. If it is determined that a response contains the transaction identifier, the response monitor (e.g., monitors 325 and 370) is configured to instruct clock grid controller 320 to unlock the clock grid."ungating") or un-clock gating the clock grid 310 to enable distribution of the clock signal to the core 305 in preparation for receiving the response in the corresponding clocked component (e.g., an execution unit) of the core 305.

[0049] The Fig. 4 is a flowchart 400 illustrating a method for performing power management by clock gating a clock source to prevent distribution of a clock signal when a critical delay condition is detected, according to one embodiment of the present disclosure. In one embodiment, the method outlined in flowchart 400 is implemented within the microarchitecture 300 of Fig. 3, which is configured to determine a critical and / or dynamic delay condition and to initiate a power management sequence that includes gating a clock source.

[0050] At 410, a critical and / or dynamic delay condition is detected in which a long latency is expected. For example, the hardware-based monitor located within a core of a processor is configured to monitor for certain state conditions of a hardware device, as previously described (e.g., TLB misses, etc.). The core includes one or more clocked components or hardware devices whose operation is synchronized by a clock signal distributed by a clock grid. These clocked components include various units (e.g., IFUs, memory management units, load / store units, etc.) that may suffer from critical, long-latency delay conditions. The monitors are configured to monitor for these critical and / or dynamic delay conditions within the clocked components.In one embodiment, a monitor is included within the respective clocked component being monitored. In another embodiment, the monitor is external to the respective clocked component being monitored. The hardware-based monitor may also, in one implementation, include monitors 335 and 345 of FIG. Fig. 3 included.

[0051] Critical delay conditions are identified by their long-latency characteristics as experienced in one or more microarchitectures. Detecting a critical delay condition may, for example, include detecting one or more of the following conditions: 1) a pipeline flush, such as when a branch misprediction occurs; 2) an I-cache miss; and an L-2 cache miss. In the case of pipeline flush, the core contains the pipeline, where the pipeline includes one or more of the clocked components. In one embodiment, the monitor is located in the I-cache, which is capable of detecting one or more of the conditions identified above.Other critical latency conditions include, but are not limited to: 1) one or more of the following conditions, such as an I-cache miss and an L-2 cache miss; 2) a TLB miss and an L-2 cache miss; a fetch from an uncached load; and a barrier instruction. In one embodiment, the memory system is configured to inform the monitor when a miss is a long-latency miss (e.g., last-level cache miss).

[0052] At 420, the clock grid is clock-gated to prevent distribution of the clock signal to the core during the critical delay state. This means that power management is achieved by gating the clock signal, preventing distribution of the clock signal throughout the core. Therefore, components in the core will draw no power or will draw minimal power.

[0053] In particular, the monitors configured to monitor corresponding clocked components are capable of informing a clock gate controller when it should clock-gate the clock gate, for example, after a critical delay has been detected. This means that the monitor is capable of informing the clock gate controller that the clock gate should be clock-gated at a root branch based on a pending transaction to an external entity, such as the memory system. The root branch is specifically configured to distribute the clock signal to the core, so that hiding the root branch also prevents the clock signal from being distributed throughout the core.In this way, in the presence of a long-latency miss or other sufficiently critical memory delay condition, the core processor would perform little or no useful work during the delayed period; the clock grid associated with the core is hidden at the root branch. This conserves the active power used by the various inactive clocked components, but also conserves the dynamic power of the clock propagated throughout the clock grid.

[0054] The clock grid controller is coupled to the external device (e.g., the memory system) that provides responses to pending transactions. The clock grid controller is also located on a branch of the clock grid that will not be inhibited and is active through the critical delay state. A response monitor associated with the clock grid controller is configured, for example, to monitor responses in the pending transaction stream and to timely de-gate the clock grid so that the corresponding response reaches the corresponding clocked component in the grid that is correctly active due to the distribution of the clock signal. Coordinated timing of the de-gating of the clock is particularly important in a synchronous interface between the memory and the core, so that the clock grid is de-gated before the response is delivered to the core.In particular, when the response is identified by the response monitor and / or the clock grid controller, an instruction is sent to the clock grid controller to un-clock the clock grid (e.g., the clock gating of the root branch).

[0055] In one embodiment, the response is identified using a transaction identifier. Specifically, a transaction identifier is generated in association with the pending transaction, such as an instruction that causes the critical delay state. As an example, the instruction may be an instruction to retrieve the correct data or an instruction in the event of a misprediction. During the critical delay state, responses from memory are monitored by the response monitor in association with the clock grid controller. The responses are specifically monitored to identify when the response is returned with the transaction identifier.When it is determined that a response with the correct transaction identifier has been returned from the memory system, the clock gate is unclocked to enable distribution of the clock signal to the core in time for the response to be received by the correct clocked device that is now active.

[0056] In embodiments of the present invention, the clock grid's clock gating is temporarily released to temporarily enable distribution of the clock signal to the core to process selected incoming transactions directed to the core. For example, the clock grid controller is configured to exit the automatic power-managed state when the response is received, as described earlier, but is also configured to temporarily re-enable the clock grid to process incoming requests. For example, the clock grid is temporarily re-enabled to handle coherency snoops and accept responses to non-critical transactions that were pending at the time the clock grid was clock gated (e.g., pending pre-fetches).

[0057] The Fig. 5 is a flowchart 500 illustrating a method for performing power management by clock gating a clock source to prevent distribution of a clock signal when a counter has reached a threshold after an instruction has been sent and before a response to the instruction has been detected or received, according to one embodiment of the present disclosure. In one embodiment, the method outlined in flowchart 500 is implemented within the microarchitecture 300 of Fig. 3, which is configured to determine a critical and / or dynamic delay condition and to initiate a power management sequence that includes gating a clock source.

[0058] At 510, the method includes detecting when an instruction is dispatched from a clocked component of a core of a processing unit, the instruction relating to a pending transaction. The core comprises one or more clocked components or hardware devices whose operation is synchronized by a clock signal distributed by a clock grid. These clocked components comprise various units (e.g., IFUs, memory management units, load-store units, etc.) that may suffer from critical long-latency delay conditions. The identified instruction may be predetermined or within a group of instructions selected for detection within the clocked component, all of which are known at some point to be sensitive to long-latency delays, in one embodiment.In further embodiments, the instruction may be any instruction originating from the clocked device. That is, any instruction is assumed to be sensitive to long-latency delays and eligible for clock gating of the clock source for power management purposes.

[0059] In one embodiment, the instruction is detected by a hardware-based monitor located within the core processor and configured to monitor for generic or specific instructions. For example, the monitors are configured to monitor for instructions related to pending transactions associated with the clocked components in the processor core. In one embodiment, a monitor is included within the respective clocked component being monitored, such as monitor 335 of clocked component 330 and monitor 345 of clocked component 340. In another embodiment, the monitor is external to the respective clocked component being monitored.

[0060] When the instruction is detected, a counter is started at 520. The counter provides an indication of whether the instruction and any responses associated with the instruction are characteristic of a critical or dynamic delay condition. The counter is incremented on each new clock cycle. In one embodiment, the counter is contained within the corresponding clocked component being monitored, such as counter 337 of component 330 and counter 347 of component 340. In another embodiment, the counter is external to the corresponding clocked component being monitored. In still other embodiments, the counter is contained within the corresponding monitor or is external to the corresponding monitor.

[0061] At 530, transactions related to the instruction are monitored. A transaction and / or response monitor coupled to the counter is configured, for example, to monitor transactions and responses related to the instructions in the pending transaction stream. In another embodiment, the monitor is implemented outside the core so that monitoring of transactions (e.g., responses) can occur even though the core has been clock-gated for power management purposes. That is, the transaction or response monitor is located on a branch of the clock gate that is not inhibited when the root branch that provides a clock signal to the core has been gated. The transaction or response monitor is additionally configured to monitor transactions and responses in the pending transaction stream.In one embodiment, the transaction or response monitor is coupled to a storage system for purposes of monitoring transactions and responses in the pending transaction stream.

[0062] At 540, the counter is capable of determining when it reaches a threshold before a transaction or response related to the instruction is detected in the pending transaction stream. That is, when the counter reaches the threshold, it is highly likely that the pending transaction stream is experiencing a critical and / or dynamic latency condition. On the other hand, if a transaction or response related to the instruction is detected in the pending transaction stream before the counter reaches a threshold, then the counter is reset for use in conjunction with another detected instruction. That is, the microarchitecture, or rather the clocked component of the microarchitecture, is not currently experiencing a critical and / or dynamic latency condition in the pending transaction stream.

[0063] At 550, if the counter reaches a threshold before a transaction or response related to the instruction is detected, power management techniques are employed by clock-gating the clock grid at a root branch to prevent distribution of the clock signal to the core during the critical delay condition. In other words, power management is achieved by gating the clock signal so that distribution of the clock signal throughout the core is prevented. In this case, clocked components in the core will not draw power or will draw minimal power. In particular, the counter is configured to inform a clock grid controller when it should clock-gate the clock grid at the root branch, such as when the counter reaches the threshold.Therefore, in the presence of the critical delay condition, the core processor would perform little or no useful work during the delayed period by minimizing the use of active power by the various inactive clocked components in the core, and also by masking the use of dynamic power related to the distribution of the clock signal throughout the clock grid.

[0064] As previously described, the clock grid controller is coupled to the external unit (e.g., the memory system) that provides transactions and responses for the pending transactions related to the instruction. The clock grid controller is also located on a branch of the clock grid that will not be inhibited and is active throughout the critical delay state. The transaction and response supervisor is similarly configured to be located on a branch of the clock grid that will not be inhibited and is active throughout the critical delay period. Therefore, when a transaction or response related to the instruction is detected in the pending transaction stream, the supervisor is configured to instruct the clock grid controller to unclock the clock grid in a timely manner (i.e., unclock the root branch).In this way, the core processor is active before the corresponding transaction or response reaches the corresponding clocked component in the grid. Coordinated timing of the clock grid's clock gating is especially important in a synchronous interface between memory and the core, so that the clock grid's clock gating is released before the response is delivered to the core.

[0065] In one embodiment, the transaction or response related to the instruction in the pending transaction stream is identified using a transaction identifier. Specifically, a transaction identifier is generated in association with the pending transaction, such as in relation to the instruction causing the critical delay state. During the critical delay state, transactions and responses from memory or any other external device are monitored by the response monitor in association with the clock grid control unit. The responses are specifically monitored to identify when the transaction or response with the same transaction identifier is detected.

[0066] Accordingly, according to embodiments of the present disclosure, systems and methods are described in which a clock grid at a root branch is automatically masked for power management purposes to a core of a processor upon identified critical and dynamic delay conditions. Embodiments of the present invention include determining that a core of a microarchitecture is in the presence of a critical and / or dynamic delay condition and automatically or autonomously initiating a power distribution sequence.

[0067] While the foregoing disclosure illustrates various embodiments using specific block diagrams, flowcharts, and examples, each block diagram component, flowchart step, flowchart operation, and / or flowchart component described and / or illustrated herein may be implemented individually and / or collectively using a wide variety of hardware, software, or firmware configurations (or any combination thereof). Additionally, any disclosure of components contained within other components should be considered examples, as many other architectures may be implemented to achieve the same functionality.

[0068] The process parameters and sequence of steps described and / or illustrated herein are provided for illustrative purposes only and may be varied as desired. For example, while the steps illustrated and / or described herein may be shown or discussed in a particular order, these steps need not necessarily be performed in the order shown or discussed herein. The various exemplary processes described and / or illustrated herein may also omit one or more of the steps described or illustrated herein or include additional steps to those disclosed.

[0069] While various embodiments have been described and / or illustrated herein in the context of a fully functional computer system, one or more of these example embodiments may be distributed as a program product in a variety of forms, regardless of the particular type of computer-readable media actually used to carry out the distribution. The embodiments disclosed herein may also be implemented using software modules that perform particular tasks. These software modules may include script, batch, or other executable files that may be stored on a computer-readable storage medium or within a computer system. These software modules may configure a computer system to perform one or more of the example embodiments disclosed herein.One or more of the software modules disclosed herein may be implemented in a cloud computing environment. Cloud computing environments may provide various services and applications over the Internet. These cloud-based services (e.g., software as a service, infrastructure as a service, etc.) may be accessible through a web browser or other remote interface. Various functions described herein may be provided through a remote desktop environment or any other cloud-based computing environment.

[0070] The foregoing description has been made with reference to specific embodiments for purposes of explanation. However, the above illustrative discussions are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in light of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and their practical application, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as may be suited to the particular use contemplated.

[0071] Embodiments according to the present disclosure have thus been described. While the present disclosure has been described in particular embodiments, it should be understood that the disclosure should not be construed as limited to such embodiments, but rather should be construed in accordance with the following claims.

Claims

[1] A method for energy management, the method comprising: Detecting a critical delay condition within a clocked component of a core of a processing unit, the core comprising one or more clocked components whose operation is synchronized by a clock signal distributed by a clock grid; Clock gating of the clock grid to prevent the distribution of the clock signal to the core during the critical delay state; and Temporarily un-gating the clock grid to temporarily enable the distribution of the clock signal to the core for processing selected incoming transactions directed to the core. [2] The method according to claim 1, wherein the detecting comprises: Detecting the critical delay condition in a hardware-based monitor, wherein the clocked component comprises the hardware-based monitor. [3] The method of claim 2, wherein detecting a critical deceleration condition comprises: detecting a pipeline drain at the monitor, wherein the core comprises the pipeline including one or more of the clocked components, and wherein the clocked component includes an I-cache; Detecting an I-cache miss; and Detecting an L-2 miss. [4] The method according to any one of claims 1 to 3, wherein the clock gating comprises: Hiding the clock signal at a root branch of the clock grid, where the root branch distributes the clock signal to the core. [5] The method according to any one of claims 1-3, wherein the clock gating comprises: Sending an instruction to a clock controller to clock-gate the clock signal, the clock controller being on a branch of the clock gate that is not inhibited. [6] The method according to claim 5, further comprising: Determining a transaction identifier from an instruction that enforces the critical stall condition; Monitoring, in association with the clock grid control unit, responses from the memory for the transaction identifier; Determining that a response contains the transaction identifier; and Ungating the clock grid to enable the clock signal to be distributed to the core. [7] The method of claim 6, wherein un-clock gating the clock grid further comprises: in a synchronous interface between the memory and the core: Ungating the clock grid before the response is delivered to the core. [8] The method according to any one of claims 1 to 7, wherein the critical delay condition is taken from a group essentially comprising: a pipeline flush, an I-cache miss, and an L-2 cache miss; a cache data load miss in L1 cache and L2 cache; a TLB miss and an L-2 cache miss; retrieving a non-cached load; and a barrier instruction. [9] The method according to any one of claims 1 to 8, wherein the clocked component is taken from a group essentially comprising: a charging and storage unit; an instruction fetching unit; and a memory management unit. [10] The method of claim 1, wherein detecting a critical deceleration condition comprises: Detecting that an instruction is dispatched from a clocked component of a core of a processing unit, the core comprising one or more clocked components whose operation is synchronized by a clock signal distributed by a clock grid; Starting a counter; Monitor transactions from a storage system for a response to the instruction; and Determine that the counter reaches a threshold before detecting the response. [11] A power management device, the device comprising: a clock source that provides a clock signal; a clock grid; a core of a processing unit, the core comprising one or more clocked components whose operation is synchronized by the clock signal distributed by the clock grid; a hardware-based monitor for detecting a critical delay condition within a clocked component of the core, the clocked component comprising the hardware-based monitor; a clock grid control unit for clock gating the clock grid at a root branch of the clock grid to inhibit distribution of the clock signal to the core during the critical delay condition, the root branch distributing the clock signal to the core, and for temporarily un-gating the clock grid to temporarily enable distribution of the clock signal to the core for processing selected incoming transactions directed to the core. [12] The apparatus of claim 11, wherein the clock source comprises a phase-locked loop circuit, and wherein the clock grid controller is on a different branch than the root branch. [13] The apparatus according to any one of claims 11 or 12, wherein the clock grid control unit is configured to perform the following operations: Determining a transaction identifier from an instruction that enforces the critical stall condition; Monitoring, in association with the clock grid control unit, responses from the memory for the transaction identifier; Determining that a response contains the transaction identifier; and Ungating the clock grid to enable the clock signal to be distributed to the core. [14] The device according to any one of claims 11 to 13, wherein the clocked component is taken from a group essentially comprising: a charging and storage unit; an instruction fetching unit; and a memory management unit.

Citation Information

Patent Citations

  • Energy management via dynamic storage operating states

    DE102011102238A1

  • Adaptive scaling of the storage frequency

    DE102011102871A1

  • METHOD AND DEVICE FOR THREAD SWITCHING IN A MULTITHREAD PROCESSOR

    DE60032481T2

  • System and method for dynamic power management in a processor design

    US20070074059A1

  • Method and apparatus for removing a pipeline bubble

    US20100077184A1