(19)
(11)EP 2 796 958 A1

(12)EUROPEAN PATENT APPLICATION

(43)Date of publication:
29.10.2014 Bulletin 2014/44

(21)Application number: 13164744.8

(22)Date of filing:  22.04.2013
(51)International Patent Classification (IPC): 
G06F 1/04(2006.01)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME

(71)Applicant: NXP B.V.
5656 AG Eindhoven (NL)

(72)Inventors:
  • Hoogerbrugge, Jan
    Redhill, Surrey RH1 1NY (GB)
  • Guntur, Surendra
    Redhill, Surrey RH1 1NY (GB)
  • Al-Kadi, Ghiath
    Redhill, Surrey RH1 1NY (GB)
  • Meijer, Rinze
    Redhill, Surrey RH1 1NY (GB)
  • Fatemi, Hamed
    Redhill, Surrey RH1 1NY (GB)

(74)Representative: Miles, John Richard et al
NXP Semiconductors Intellectual Property and Licensing Red Central 60 High Street
Redhill, Surrey RH1 1SH
Redhill, Surrey RH1 1SH (GB)

 
Remarks:
Amended claims in accordance with Rule 137(2) EPC.
 


(54)A clock control circuit and method


(57) This invention provides a clock control circuit, which can be added to any pipeline-processor to solve timing problems arising from variations due to process outcome and environmental conditions. Critical instructions are detected (instructions that exercise critical paths) in conjunction with environmental sensing (such as process, temperature and voltage). This information is used to control cycle stealing.




Description


[0001] This invention relates to the control of clock signals used by a processor, in particular to selectively implement cycle stealing when it is required.

[0002] Design and fabrication technologies are successful in scaling down transistor dimensions to integrate more and more transistors in a single Integrated Circuit (IC) such as a System-on-Chip (SoC). Technology scaling also introduces major challenges such as high defect rate and device parameter variations. These variations change the propagation delay in CMOS circuits, which may lead to functional failures of the IC.

[0003] A traditional SoC design methodology attempts to meet the timing requirements by considering "worst case" (WC) operating conditions resulting in a reduced maximum operating frequency, and increased area and power overheads.

[0004] The alternative of a "typical case" design approach offers a better trade-off between area, performance and energy. However, the drawback of typical case design is timing errors which can occur due to reduced timing margins in critical paths when the dynamic operating conditions (e.g. temperature/voltage) are changed or aging which make circuits slower than the typical operating frequency.

[0005] There is therefore a need for a variation-resilient architectural solution for enabling better-than-worst case designed ICs in order to improve design specifications (speed, area, power) without sacrificing functional failures.

[0006] Many techniques have been implemented in the Central Processing Unit (CPU) architectures to overcome the timing problem explained above, so that processors operate correctly and become variation resilient.

[0007] One of the earlier techniques is referred to as Razor, which is based on error detection and recovery in the CPU for example by pausing all pipeline stages (or time borrowing) while waiting for the slow stage either to finish its computation or to allow the instruction to be re-executed. This approach is disclosed in Dan Ernst Razor: Circuit-Level Correction Of Timing Errors For Low-Power Operation. Proceedings of the 36th International Symposium on Microarchitecture MICRO-36 2003.

[0008] The pausing action ensures that later instructions do not continue to their next pipeline stage until the faulty instruction is recovered.

[0009] Figure 1 shows the known architecture which uses Razor flip-flops to detect errors and recover by clock gating.

[0010] The drawback of this technique is the feedback signal, which needs to propagate to all pipeline stages in a very short amount of time (50% of one clock cycle when Razor circuits are used).

[0011] This can be difficult to achieve across large CMOS dies where pipeline stages are several millimetres apart. Furthermore, this is completely impractical to implement in complicated microprocessors because it may take several clock cycles just to propagate the clock signal through a clock distribution network, which cannot be halted in only one cycle.

[0012] Applying Razor like techniques also implies a 20 to 30% increase in the area of the CPU. This is due to the fact that the Razor flip-flop typically has more than twice the size of a regular master-slave flip-flop.

[0013] Another technique is error prediction. Toshinori Sato, in "A Simple Flip-Flop Circuit for Typical-Case Designs for DFM" ISQED 2007, proposed an architectural modification to the Razor approach to simplify the design. The idea is to have two flip-flops with the same clock (removing the short path problem that appears in Razor because of the delayed clock), but the shadow flip-flop has a delay buffer in the data path. This circuit predicts that the data path fails if the voltage keeps downscaling or if the frequency is further increased.

[0014] This technique cannot detect errors beyond the checking window (delay buffer). Also, if the technique is used for process compensation, metastability problems will appear in the main flip-flop.

[0015] Traditionally, the error detection and decision should be implemented in one or half a clock cycle, which is difficult to achieve in a large processor, and this problem is not resolved by the approaches outlined above.

[0016] According to the invention, there is provided a method and apparatus as defined in the claims.

[0017] In one aspect, the invention provides a clock control circuit for controlling a clock signal used by a processing system which receives processing instructions, comprising:

a sensor arrangement for sensing process or environmental variations and determining therefrom whether or not cycle stealing may be required;

a detector arrangement for determining if a processing instruction uses a critical path in the processing system; and

a clock control unit for implementing cycle stealing when it is determined by the sensor arrangement that cycle stealing may be required and when it is determined by the detector arrangement that the processing instruction uses a critical path.



[0018] Instead of detecting an error, the circuit of the invention can be used to predicts errors by analysing the processing instructions. For example, the analysis can be one or two cycles before the processing using the instruction, to avoid timing problems. This prediction can be executed in parallel with other units of the processor which gives more time for prediction.

[0019] The error prediction is disabled or enabled based on process variations, by sensing when the cycle stealing is not required, for example when there is no timing problem because there is no aging or the die is typical. In this way, the power consumption of the design is lowered compared to designs based on error detection which is always active.

[0020] The sensor arrangement preferably comprises one or more of:

a ring-oscillator sensor;

a temperature sensor;

a voltage supply drop sensor; and

an aging detector.



[0021] These different sensors can be used to determine whether or not any cycle stealing is necessary, which will be the case when the fabrication conditions or the environmental conditions mean the processing unit is operated outside its design tolerances.

[0022] The detector arrangement can comprise a database which stores information about at least each instruction supported by the processing system which uses a critical path. This enables the need for cycle stealing to be based on analysis of the processing instruction to be processed, rather than based on detection of errors.

[0023] The detector arrangement can comprise a partial decoder for partially decoding the processing instruction, and the database stores information accessed by the partially decoded instructions. A look up table can be used to store the information about the processing instructions, can this can include information that the processing instruction is a critical instruction and also for which processing unit (in the case that the processing system has multiple processing units) the instruction forms a critical path.

[0024] The invention also provides a processing system, comprising:

at least one processor;

a clock signal generator; and

a clock control circuit of the invention for processing the clock signal of the clock signal generator.



[0025] The system can comprise a plurality of processors, comprising at least a fetch unit, a control unit, and an execute unit. Thus, the system can be a CPU architecture.

[0026] The invention also provides a clock control method for controlling a clock signal used by a processing system which receives processing instructions, comprising:

sensing process or environmental variations and determining therefrom whether or not cycle stealing may be required;

determining if a processing instruction uses a critical path in the processing system; and

implementing cycle stealing when it is determined by the sensor arrangement that cycle stealing may be required and when it is determined by the detector arrangement that the processing instruction uses a critical path.



[0027] The sensing and determining preferably take place at least one clock cycle before any processing is implemented using the instruction, thereby providing a predictive approach.

[0028] An example of the invention will now be described in detail with reference to the accompanying drawings, in which:

Figure 1 shows a known approach for providing a variation resilient clock system;

Figure 2 shows the basic structure of a CPU architecture;

Figure 3 shows how the structure of Figure 2 can be modified in accordance with the invention;

Figure 4 shows an example of the detector used in the circuit of Figure 3;

Figure 5 is a timing diagram to explain the operation of the circuit; and

Figure 6 shows an example of the sensor used in the circuit of Figure 3.



[0029] This invention provides a clock control circuit, which can be added to any pipeline-processor to solve timing problems arising from variations due to process outcome and environmental conditions. Critical instructions are detected (instructions that exercise critical paths) in conjunction with environmental sensing (such as process, temperature and voltage). This information is used to control cycle stealing.

[0030] The invention thus provides a variation-resilient architecture which enables better-than-worst-case CPU designs. The invention uses an intelligent error predictor which is based on the critical instructions. An intelligent pipeline stalling unit is used that can preserve the pipeline context and allow correct execution of critical instruction. There is only one clock cycle penalty if the critical instruction is executed.

[0031] Figure 2 shows a block diagram of a general purpose processor, and to which the system of the invention can be added.

[0032] In this example, the processor contains three pipeline stages; the first pipeline stage 10 is the fetch unit, the second one 12 the control (decode) unit and the third one is the execution unit 14.

[0033] It further contains a Clock Generation Unit (CGU) 16 that provides the clock signal to the different pipeline stages. Without loss of generality, the execution unit is shown to contain an Arithmetic Logic Unit (ALU), a Address generation Unit (AGU), a Multiplication unit (MUL), a shift unit (SHIFT) and a register file.

[0034] For executing a program, the following steps are followed by the processor:
  • The control unit sends a command to the AGU for sending the address of instruction to the program memory.
  • The fetch unit receives the instruction and sends it to the control unit.
  • The control unit decodes the instruction and sends the proper addresses and control signals to the register files and ALU/MUL/Shift units.
  • The execution unit executes the instruction and sends the result to the register files or memory.


[0035] The clock generator unit (CGU) is also sending clock to all parts of the processor.

[0036] Because of process variation, the processor can fail in the control or execution unit. Failure does not generally occur in the fetch unit because normally critical paths are in these two stages or the fetch unit is resilient. To avoid this functional failure and to be sure that the processor operates correctly, this invention modifies system by adding an intelligent detector.

[0037] Figure 3 shows how the processor architecture of Figure 2 is modified by the invention. The same components as in Figure 2 are given the same reference numbers.

[0038] The instruction is provided not only to the fetch unit 10, but also to an intelligent detector unit 30, which provides a control input to the clock generation unit 16. The detector 30 receives process variation information from a global sensor 32.

[0039] The global sensor 32 enables or disables the intelligent detector function based on fabrication process state and environmental conditions. These can be detected by a ring oscillator which detects the chip speed, which in turn can vary independence on the process conditions.

[0040] The global sensor 32 is used to detect whether the architecture is working correctly (so that no correction is needed) or needs to predict errors (so that correction may be needed depending on the instruction).

[0041] The intelligent detector 30 is used for detecting the critical instructions.

[0042] The CGU unit 16 is modified to provide the function of removing (stealing) one clock when the critical instruction is in the control unit 12 or execution unit 14.

[0043] Figure 3 shows a clock bus sent to the three processing units, and the cycle stealing takes place in the CGU 16. The control signal for the clock gating comes from the intelligent detector 30.

[0044] The added components are discussed in more detail below.

Intelligent Detector 30



[0045] For finding a critical instruction, it is necessary to specify which instructions are hitting the critical paths.

[0046] This can be carried out using offline simulation for each instruction, which is supported in the instruction set architecture of a given CPU. As result of this profiling, a sub-set of instructions is identified that exercises the critical path in the control or execute units. The critical instructions that have been identified are stored in, for example, a look-up table that is then part of the intelligent detector; this could be a full-form or a partial-from look up table.

[0047] Besides storing the critical instructions, information about where the instruction is critical is stored, e.g. critical for the control pipeline stage, and/or critical for the execution pipeline stage.

[0048] In one example, the operation of the intelligent detector is to partially decode the incoming instruction, and compare this partially decoded instruction with the critical instructions that are stored in the look-up table.

[0049] The partial decoding does not require control signals to be extracted for other parts of system (complete decoding is done in decode stage). The partial decoding only needs to identify the type of instruction, for example add or multiply.

[0050] If a critical instruction is identified, the intelligent detector provides a signal to the CGU 16 identifying for which pipeline stage the incoming instruction is critical.

[0051] This process is shown in Figure 4, in which a partial decoder 40 processes the instruction and compares the result with the contents of a look up table 42.

[0052] If the inputs of the XOR gate are equal then the output is 0 otherwise it is 1. With an inverted output, if the output signal is 1, then a critical instruction is detected.

[0053] Figure 5 shows a series of instructions 50.

[0054] timing plots 52,54,56,58 show a signal 52 representing detection of a signal hitting a critical path, a stall control signal 53 which is active when the critical instruction occurs in the control unit (no example is shown in Figure 5 of such an instruction so the plot is flat) and a stall execute signal 54 which is active when the critical instruction occurs in the execution stage. The basic clock Hclk is plot 56 and the clock after cycle stealing is plot 58.

[0055] Figure 5 shows that when the instruction 434A in the series of instructions 50 is coming to the processor pipeline, the intelligent detector partially decodes it and sends a command to the CGU to steal one clock cycle (i.e. skipping one clock cycle) when it goes to execution stage. This is based on the information from the intelligent detector that the instruction hits the critical path in the execution stage. By stealing a single clock cycle, a delay of one clock cycle is introduced.

[0056] This process is only triggered when the global sensor has indicated that the measured operational performance is lower than a given threshold value.

[0057] The issue of path criticality is well known, and cycle stealing approaches are also well known. Cycle stealing involves skewing or time shifting the arrival of clocks feeding respective latches, so that the portion of time available for solving the logic in one circuit which does not have a critical timing issue is "stolen". This stolen portion is used as additional time to solve logic in a second circuit which is a critical circuit and therefore represents a bottleneck.

[0058] The invention enables a system to work correctly at higher frequencies, by dynamically adjust the clock and only if there is a need to steal a clock cycle. This causes less penalty for the throughput.

[0059] The invention thus resides in the control of the cycle stealing is required, rather than the actual process cycle stealing concept, which can be conventional

CGU 16



[0060] The CGU 16 steals one clock cycle from the processor pipeline based on the command from the intelligent detector. This command not only contains information that a critical instruction will occur, but also for which pipeline stage it occurs. The CGU will then steal the clock cycle when the instruction is executed in the respective pipeline stage. In the CPU architecture described above, the command that is generated based on the decision made in the intelligent controller runs in parallel with the fetch stage. Thus, the command will always come in a previous clock cycle compared the clock cycle where the data is arriving to the targeted stage. Therefore there is no timing issue for stealing a clock phase.

[0061] To describe the operation of the circuit, "stall exe" is used to identify that the critical instruction occurs in the execution stage, while "stall ctrl" is used to identify that the critical instruction occurs in the control unit.

[0062] Figure 5 shows that when the "stall exe" signal 54 is active, the next "Hclk" clock pulse 56 does not propagate to the processor pipeline so that there is enough time to finish the current instruction. In this example, the critical instruction occurs in the execution stage.

[0063] The "Hclk stall" signal 58 shows the clock of the processor pipeline stages (called CLK in Figure 3); one clock cycle has been stolen based on the information provided by the intelligent detector. The "Hclk" signal is the clock signal that is generated by the CGU from which the "Hclk stall" signal is derived.

[0064] Although one clock signal (or clock line) is used for the processor pipeline and the intelligent detector in the example shown, these clock lines can be separated.

Global sensor 32



[0065] The intelligent detector should only be active when there is a certain level of process or environmental variation present in the architecture. Figure 6 shows an example of global sensor using a ring-oscillator sensor 60 for measuring circuit timing, temperature sensor 62, supply drop sensor 64 and aging detector 66 which can for example measure the performance degradation of a MOSFET. The various signals are provided to an OR gate 68 to generate the command to activate the intelligent detector. A Dynamic profiling unit can instead be used to detect when the intelligent detector needs to become active. This is a software sensor, for example based on checking the results of operations such as add, and using detection of errors to active the intelligent detector. Thus, the global sensor can be a collection of multiple sensors as shown.

[0066] The invention can be applied to most CPU architectures in modern systems where process and/or environmental variation affects the operation of the Integrated Circuit. The flexibility of the present invention enables several pipelined execution patterns making the design more tolerant to timing variations.


Claims

1. A clock control circuit for controlling a clock signal used by a processing system which receives processing instructions, comprising:

a sensor arrangement (32) for sensing process or environmental variations and determining therefrom whether or not cycle stealing may be required;

a detector arrangement (30) for determining if a processing instruction uses a critical path in the processing system; and

a clock control unit (16) for implementing cycle stealing when it is determined by the sensor arrangement (32) that cycle stealing may be required and when it is determined by the detector arrangement that the processing instruction uses a critical path.


 
2. A circuit as claimed in claim 1, wherein the sensor arrangement (32) comprises one or more of:

a ring-oscillator sensor;

a temperature sensor;

a voltage supply drop sensor; and

an aging detector.


 
3. A circuit as claimed in claim 1 or 2, wherein the detector arrangement (30) comprises a database (42) which stores information about each instruction supported by the processing system which uses a critical path.
 
4. A circuit as claimed in claim 3, wherein the detector arrangement comprises a partial decoder for partially decoding the processing instruction, and the database (42) stores information accessed by the partially decoded instructions.
 
5. A circuit as claimed in claim 3 or 4, wherein the detector arrangement (42) comprises a look up table.
 
6. A circuit as claimed in claim 3, 4 or 5, wherein the detector arrangement provides an output which indicates that the processing instruction is a critical instruction and identifies for which processing unit the instruction forms a critical path.
 
7. A processing system, comprising:

at least one processor (10,12,14);

a clock signal generator (16); and

a clock control circuit as claimed in any preceding claim for processing the clock signal of the clock signal generator.


 
8. A system as claimed in claim 7, comprising a plurality of processors, comprising at least a fetch unit (10), a control unit (12), and an execute unit (14).
 
9. A system as claimed in claim 7 or 8 comprising a CPU architecture.
 
10. A clock control method for controlling a clock signal used by a processing system which receives processing instructions, comprising:

sensing process or environmental variations and determining therefrom whether or not cycle stealing may be required;

determining if a processing instruction uses a critical path in the processing system; and

implementing cycle stealing when it is determined by the sensor arrangement that cycle stealing may be required and when it is determined by the detector arrangement that the processing instruction uses a critical path.


 
11. A method as claimed in claim 10, wherein the sensing comprises sensing one or more of:

circuit timing;

temperature;

a voltage supply drop; and

aging conditions.


 
12. A method as claimed in claim 10 or 11, wherein the determining comprises comparing the processing instruction with a database which stores information about at least each instruction supported by the processing system which uses a critical path.
 
13. A method as claimed in claim 12, wherein the determining comprises partially decoding the processing instruction, and the database stored information accessed by the partially decoded instructions.
 
14. A method as claimed in claim 12 or 13, wherein the determining comprises indicates that the processing instruction is a critical instruction and identifying for which processing unit the instruction forms a critical path.
 
15. A method as claimed in any one of claims 10 to 14, wherein the sensing and determining take place at least one clock cycle before any processing is implemented using the instruction.
 


Amended claims in accordance with Rule 137(2) EPC.


1. A clock control circuit for controlling a clock signal used by a processing system which receives processing instructions, comprising:

a sensor arrangement (32) for sensing process or environmental variations and determining therefrom whether or not cycle stealing may be required;

a detector arrangement (30) for determining if a processing instruction uses a critical path in the processing system; and

a clock control unit (16) for implementing cycle stealing by removing the clock for a clock cycle when it is determined by the sensor arrangement (32) that cycle stealing may be required and when it is determined by the detector arrangement that the processing instruction uses a critical path.


 
2. A circuit as claimed in claim 1, wherein the sensor arrangement (32) comprises one or more of:

a ring-oscillator sensor;

a temperature sensor;

a voltage supply drop sensor; and

an aging detector.


 
3. A circuit as claimed in claim 1 or 2, wherein the detector arrangement (30) comprises a database (42) which stores information about each instruction supported by the processing system which uses a critical path.
 
4. A circuit as claimed in claim 3, wherein the detector arrangement comprises a partial decoder for partially decoding the processing instruction, and the database (42) stores information accessed by the partially decoded instructions.
 
5. A circuit as claimed in claim 3 or 4, wherein the detector arrangement (42) comprises a look up table.
 
6. A circuit as claimed in claim 3, 4 or 5, wherein the detector arrangement provides an output which indicates that the processing instruction is a critical instruction and identifies for which processing unit the instruction forms a critical path.
 
7. A processing system, comprising:

at least one processor (10,12,14);

a clock signal generator (16); and

a clock control circuit as claimed in any preceding claim for processing the clock signal of the clock signal generator.


 
8. A system as claimed in claim 7, comprising a plurality of processors, comprising at least a fetch unit (10), a control unit (12), and an execute unit (14).
 
9. A system as claimed in claim 7 or 8 comprising a CPU architecture.
 
10. A clock control method for controlling a clock signal used by a processing system which receives processing instructions, comprising:

sensing process or environmental variations and determining therefrom whether or not cycle stealing may be required;

determining if a processing instruction uses a critical path in the processing system; and

implementing cycle stealing by removing the clock for a clock cycle when it is determined by the sensor arrangement that cycle stealing may be required and when it is determined by the detector arrangement that the processing instruction uses a critical path.


 
11. A method as claimed in claim 10, wherein the sensing comprises sensing one or more of:

circuit timing;

temperature;

a voltage supply drop; and

aging conditions.


 
12. A method as claimed in claim 10 or 11, wherein the determining comprises comparing the processing instruction with a database which stores information about at least each instruction supported by the processing system which uses a critical path.
 
13. A method as claimed in claim 12, wherein the determining comprises partially decoding the processing instruction, and the database stored information accessed by the partially decoded instructions.
 
14. A method as claimed in claim 12 or 13, wherein the determining comprises indicates that the processing instruction is a critical instruction and identifying for which processing unit the instruction forms a critical path.
 
15. A method as claimed in any one of claims 10 to 14, wherein the sensing and determining take place at least one clock cycle before any processing is implemented using the instruction.
 




Drawing
















Search report









Search report




Cited references

REFERENCES CITED IN THE DESCRIPTION



This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

Non-patent literature cited in the description