Checkpointing the shift register
By combining the expansion shift register and the update history register, the inefficiency of the shift register checkpoint operation in a multi-threaded environment is solved, and efficient storage and recovery of the shift register historical data is achieved, ensuring the consistency of the prediction method sex.
Patent Information
- Application Number
- CN202111144056.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2015-09-30
- Filing Date
- 2016-07-08
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2036-07-08
AI Technical Summary
In the prior art, when checkpointing the shift register, it is difficult to effectively save and restore the historical data of the shift register, especially in a multi-threaded processor environment, resulting in inconsistency and inefficiency of the prediction method.
Using a combination of extended shift registers and update history registers, select the extension register's data element by storing each checkpoint's data element in the extended shift register and recording the update information of each checkpoint in the update history register. A subset of data locations to achieve state recovery for each checkpoint.
It improves the state storage and recovery efficiency of shift registers in a multi-threaded environment, ensures the consistency and accuracy of prediction methods, and reduces the storage requirements of recovery buffers.
Smart Images

Figure CN113868056B_ABST
Abstract
Description
[0001] This application is a divisional application of an application filed on July 8, 2016, with application number 201610539460.0 and invention name “CHECKPOINT OPERATION ON SHIFT REGISTER”.
[0002] background
[0003] As known to those skilled in the art, a shift register is a data structure used to sequentially record a predetermined number N of data elements. When a new data element is received at the shift register, the existing data element in the shift register is "shifted" by one data position to make room for the new data element, and the new data element is stored at the first data position of the shift register.
[0004] Where a shift register has only N data positions (and therefore can store only N data elements), if the shift register already has N data elements when it receives a new data element, the last (or oldest) data element is shifted out of the shift register to make room for the new data element. The shifted out data element (and information associated with it) is then lost. In some cases, however, it is important to know what the shift register looked like before it was updated or before some event occurred. In these cases, a copy or snapshot of the shift register is obtained and stored before the shift register is updated or before the event occurs. This process of obtaining and storing a snapshot of the shift register is called checkpointing the shift register.
[0005] The embodiments described below are provided by way of example only and are not intended to be limiting of implementations that address any or all disadvantages of known methods of checkpointing shift registers.
[0006] Overview
[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
[0008] Methods and hardware structures for checkpointing a main shift register one or more times are described herein. The hardware structure includes an extended shift register for storing data elements most recently shifted to the main shift register, the extended shift register having additional data locations for each checkpoint. An update history shift register has data location information for each checkpoint, the data location information for each checkpoint being used to store information indicating whether the extended shift register is updated at a particular clock cycle. Checkpoint generation logic derives each checkpoint by selecting a subset of data elements stored in the extended shift register based on information stored in the update history shift register.
[0009] A first aspect provides a hardware structure configured to obtain one or more checkpoints of a main shift register having a predetermined number of data positions. The hardware structure includes an extended shift register having a data position for each data position of the main shift register and an additional data position for each checkpoint. The data position of the extended shift register stores the data element most recently shifted onto the main shift register. An update history shift register has a data position for each checkpoint, and each data position of the update history register stores information indicating whether the extended shift register is updated at the same clock cycle as a particular checkpoint triggering event. Checkpoint generation logic obtains each checkpoint by selecting a subset of the data positions of the extended shift register based on information stored in the update history shift register.
[0010] A second aspect provides a method for obtaining one or more checkpoints of a main shift register having a predetermined number of data positions. The method includes storing a predetermined number of data elements most recently shifted to the main shift register at a plurality of data positions of an extended shift register. The method stores additional data elements for each checkpoint at additional data positions of the extended shift register. Information indicating whether the extended shift register is updated at the same clock cycle as a particular checkpoint triggering event is stored at a data position of an update history shift register. The method obtains each checkpoint by selecting a subset of data positions of the extended shift register based on information stored in the update history shift register.
[0011] The embodiments of the present disclosure relate to the following aspects:
[0012] 1) A hardware structure configured to obtain one or more checkpoints of a main shift register, wherein the checkpoints are triggered by a triggering event, the hardware structure comprising:
[0013] an extended shift register having a plurality of data locations for storing data elements, the plurality of data locations including a first subset of data locations representing the main shift register and additional data locations for each checkpoint;
[0014] an update history shift register having a data position for each checkpoint, each data position of the update history shift register storing information indicating whether the extended shift register was updated in the same clock cycle as a particular checkpoint triggering event; and
[0015] Checkpoint generation logic is configured to derive each checkpoint by selecting a subset of the plurality of data locations of the extended shift register based on information stored in the update history shift register.
[0016] 2) A hardware structure as described in 1), wherein a selected subset of the multiple data positions of the extended shift register with respect to a particular checkpoint can be offset from the first subset of data positions by no offset, one data position, or more than one data position.
[0017] 3) A hardware structure as described in 2), wherein the checkpoint generation logic is configured to determine the offset from the first subset of data locations for a particular checkpoint by evaluating information stored in multiple related data locations of the update history shift register.
[0018] 4) A hardware structure as described in 3), wherein each checkpoint represents the main shift register before multiple checkpoint triggering events, and the number of related data locations about a particular checkpoint is equal to the number of checkpoint triggering events about that checkpoint.
[0019] 5) The hardware structure as described in 3), wherein the offset is equal to the count of the relevant data positions of the update history shift register including information indicating that the extended shift register is updated.
[0020] 6) A hardware structure as described in any one of 2) to 5), wherein the checkpoint generation logic is configured to obtain a first checkpoint representing the main shift register before the most recent checkpoint triggering event by: determining in the checkpoint generation logic whether the first data position of the update history shift register includes information indicating that the extended shift register is updated; in response to determining that the first data position of the update history shift register does not include information indicating that the extended shift register is updated, selecting in the checkpoint generation logic the first subset of data positions of the extended shift register; and in response to determining that the first data position of the update history shift register includes information indicating that the extended shift register is updated, selecting in the checkpoint generation logic a subset of the multiple data positions of the extended shift register that is offset by one data position from the first subset of data positions.
[0021] 7) A hardware structure as described in any one of 2) to 5), wherein the number of checkpoints is at least two, and the checkpoint generation logic is configured to obtain a second checkpoint representing the main shift register before the two most recent checkpoint triggering events by the following operations: counting the number of first two data positions of the update history shift register including information indicating that the extended shift register is updated in the checkpoint generation logic; and selecting in the checkpoint generation logic a subset of the multiple data positions of the extended shift register that is offset from the first subset of data positions by the count of the number of first two data positions of the update history shift register.
[0022] 8) The hardware structure as described in any one of 1) to 5) further includes an update logic, wherein the update logic is configured to: determine in each clock cycle whether a checkpoint trigger event occurs in the update logic; in response to determining that a checkpoint trigger event has occurred, determine in the update logic whether the extended shift register is updated in the current clock cycle; in response to determining that the extended shift register is updated in the current clock cycle, move information indicating that the extended shift register has been updated to the update history shift register through the update logic; and in response to determining that the extended shift register has not been updated in the current clock cycle, move information indicating that the extended shift register has not been updated to the update history shift register through the update logic.
[0023] 9) The hardware structure as described in any one of 1) to 5) further includes: a recovery buffer having multiple data locations, each data location storing a copy of the data elements of the extended shift register at a specific point in time and a copy of the information of the update history shift register; and recovery logic, which is configured to restore the extended shift register and the update history shift register to a specific point in time using the copies stored in the recovery buffer in response to receiving an indication that recovery is to be performed.
[0024] 10. A method for obtaining one or more checkpoints of a main shift register, wherein the checkpoints are triggered by a triggering event, the method comprising:
[0025] storing the data elements at a plurality of data locations of an extended shift register, the plurality of data locations comprising a first subset of data locations representing the main shift register and additional data locations for each checkpoint;
[0026] storing information indicating whether the extended shift register is updated in the same clock cycle as a specific checkpoint triggering event at a data position of the update history shift register; and
[0027] Each checkpoint is derived in hardware logic by selecting a subset of the plurality of data locations of the extended shift register based on information stored in the update history shift register.
[0028] As will be apparent to the skilled person, the preferred features may be combined as appropriate and may be combined with any aspect of the invention.
[0029] BRIEF DESCRIPTION OF THE DRAWINGS
[0030] By way of example, embodiments of the present invention will be described with reference to the following drawings, in which:
[0031] Figure 1(A)-1(D) is a schematic diagram illustrating an example global history register (GHR);
[0032] Figure 2 is used Figure 1(A)-1(D) A block diagram of a three-stage instruction fetch unit pipeline of an example of a GHR;
[0033] Figure 3 is a diagram showing the non-branch instruction being sent to the execution unit. Figure 1(A)-1(D) Schematic diagram of GHR performing checkpointing;
[0034] Figure 4 is a diagram showing the branch instruction being sent to the execution unit. Figure 1(A)-1(D) Schematic diagram of GHR performing checkpoint operation;
[0035] Figure 5(A)-5(C) is a schematic diagram illustrating an example recovery buffer;
[0036] Figure 6 is a schematic diagram showing an extended shift register and an updated history shift register;
[0037] Figure 7 Is used to update Figure 6 A flowchart of an example method of extending a shift register and updating a historical shift register;
[0038] Figure 8(A)-8(D) It is shown that the use Figure 7 Method update Figure 6 Schematic diagram of the extended shift register and the updated history shift register;
[0039] Fig. 9 Is used from Figure 6 A flowchart of an example method of extending a shift register and updating a history shift register to obtain a first checkpoint;
[0040] Fig.10 Is used from Figure 6A flowchart of an example method of extending a shift register and updating a history shift register to obtain a second checkpoint;
[0041] Fig.11 Is used from Figure 6 A flowchart of an example method of extending a shift register and updating a history shift register to obtain a third checkpoint;
[0042] Fig.12 is based on Figures 9 to 11 A schematic diagram of a checkpoint obtained from an example extended shift register and an example updated history shift register by the method;
[0043] Figure 13(A)-13(C) It is used for recovery Figure 6 A schematic diagram of an example recovery buffer of an extended shift register and an update history shift register;
[0044] Fig.14 is a block diagram of an example hardware structure for checkpointing a shift register;
[0045] Fig.15 is a schematic diagram of the circular buffer and update history shift register;
[0046] 16(A) and 16(B) are schematic diagrams showing updating of the loop buffer and updating of the history shift register after a non-branch instruction is sent to an execution unit;
[0047] 17(A) and 17(B) are schematic diagrams showing updating of a loop buffer and updating of a history shift register after a branch instruction is sent to an execution unit;
[0048] 18(A) and 18(B) are schematic diagrams showing updating of a loop buffer and updating of a history shift register after a branch instruction is sent to an execution unit;
[0049] Fig.19 Is used from Fig.15 A flowchart of an example method of obtaining a first checkpoint by using a circular buffer and updating a history shift register;
[0050] Fig. 20 Is used from Fig.15 A flowchart of an example method of obtaining a second checkpoint by using a circular buffer and updating a history shift register;
[0051] Fig.21 Is used from Fig.15 A flowchart of an example method of obtaining a third checkpoint by using a circular buffer and updating a history shift register;
[0052] Fig. 22 is based on Figure 19 to Figure 21A schematic diagram of a checkpoint obtained from an example circular buffer and an example update history shift register by the method;
[0053] Figure 23(A)-23(C) It is used for recovery Fig.15 A schematic diagram of a first example of updating a history shift register and a pointer to restore a buffer;
[0054] Figure 24(A)-24(C) is shown to be updated in response to a conditional branch instruction being issued to an execution unit for execution Fig.15 Schematic diagram of the pointer;
[0055] Figure 25(A)-25(C) It is used for recovery Fig.15 A schematic diagram of a second example of updating the history shift register and pointer to restore the buffer;
[0056] Figure 26(A)-26(B) It is shown that the use Figure 25(A)-25(C) The recovery buffer is used to recover Fig.15 A schematic diagram of the update history and pointers of ; and
[0057] Fig. 27 is a block diagram of an example hardware structure for checkpointing a shift register.
[0058] Common reference numbers are used throughout the drawings to indicate similar features.
[0059] Detailed Description
[0060] Embodiments of the present invention are described below as examples only. These examples represent various ways of implementing the present invention, which are currently known to the applicant, but they are not the only ways in which the present invention can be implemented. This description sets forth the functions of the examples and the order of the steps for constructing and operating the examples. However, the same or equivalent functions and orders can be implemented by different examples.
[0061] An improved method for checkpointing a master shift register is described herein, which uses a small update history shift register to keep track of changes to the master shift register. The shift register can be used for various purposes in a processor. For example, the shift register can be used to store the history of the results (e.g., taken or not taken) of the N most recent conditional branch instructions. Such a shift register is often referred to as a global history register (GHR). The improved checkpoint method will be described with reference to the GHR, however it will be apparent to those skilled in the art that the GHR is merely an example shift register, and the improved checkpoint method can be applied to a variety of shift registers.
[0062] Referring now to the diagram showing an example GHR 102 Figure 1(A)-1(D)In this example, GHR 102 includes eight data locations (numbered 0 to 7) 104 to 118 for storing an ordered list of data elements. In this case, each data element is a predicted outcome (taken / not taken) of a conditional branch instruction, such that GHR 102 stores an ordered list of the eight most recently predicted outcomes (taken / not taken) of the conditional branch instruction. It will be apparent to one skilled in the art that other shift registers and GHRs may have more or fewer data locations.
[0063] In this example, the least significant data position 104 stores the most recently predicted outcome of the conditional branch instruction, while the most significant data position 118 stores the oldest predicted outcome of the conditional branch instruction. However, it will be apparent to one skilled in the art that the data within the GHR may be arranged in another manner (e.g., the most significant data position may store the most recently predicted outcome of the conditional branch instruction).
[0064] exist Figure 1(A)-1(D) In the example of , each data location 104 to 108 includes a single bit for storing a prediction result ("1" or "0") of a conditional branch instruction. In particular, in this example, a one ("1") is used to indicate that the branch is predicted to be taken, while a zero (0) is used to indicate that the branch is predicted to be not taken. However, it will be apparent to those skilled in the art that other shift registers and GHRs may have different numbers of bits per data location, depending on the type of data stored.
[0065] As with any shift register, when GHR 102 receives a new data element (e.g., bit) for insertion into GHR 102, the existing data element (e.g., bit) in GHR 102 is "shifted" by one data position (e.g., bit) and the new data element is stored at the first data position. In particular, Figure 1(A) to Figure 1(D) , when GHR 102 receives a new data element for insertion in GHR 102, the data elements in the first seven data positions 104 to 116 are shifted one data position to the next seven data positions 106 to 118, respectively, and the new data element is inserted at the first data position 104 (and any data stored at the last data position 118 is shifted out of GHR 102).
[0066] This is Figure 1(A) to Figure 1(D)1(A), when the GHR 102 receives a new data element (a prediction of "1"), in FIG. 1(B), the data "0000000" at the first seven data positions 104 to 116 are shifted by one data position to the next seven data positions 106 to 118, respectively, and the new data element (e.g., the new prediction of "1") is placed at the first data position 104, so that the GHR 102 contains the data "00000001". If the GHR 102 subsequently receives a "0" to be inserted into the GHR 102, the data at the first seven data positions 104 to 116 are similarly shifted by one data position and the new data element "0" is inserted at the first data position 104, so that the GHR contains the data "00000010", as shown in FIG. 1(C). Similarly, if GHR 102 subsequently receives a "1" to be inserted into GHR 102, the data in GHR 102 is again shifted by one data position and a new data element "1" is inserted at the first data position 104, so that GHR contains data "00000101", as shown in Figure 1(D).
[0067] As described above, in some cases, it is important to know what a shift register looked like before it was updated or before some event. For example, where the shift register is a GHR, it is important to know what the GHR looked like before instructions were sent to the execution unit for execution. In these cases, a copy or snapshot of the shift register is obtained and stored before it is updated or before some event occurs to preserve a picture of what the shift register looks like. This process of obtaining and storing a snapshot of the shift register is referred to as checkpointing the shift register. Accordingly, an event that triggers a checkpoint operation on the shift register (e.g., sending an instruction to the execution unit for execution) will be referred to herein as a checkpoint triggering event.
[0068] For example, Figure 2 As shown, the instruction fetch unit (IFU) 202 of the multithreaded processor may implement a pipelined (i.e., multi-cycle or multi-stage) process 204 for obtaining instructions from an instruction cache (i-cache) and predicting the outcome of a conditional branch instruction using the GHR 102. In particular, in Figure 2In the example of FIG. 2 , pipelined process 204 includes three stages—fetch stage 206, cache stage 208, and select stage 210; and both fetch stage 206 and cache stage 208 use GHR 102. For example, in fetch stage 206, GHR 102 may be used to generate an index to a jump register cache (JRC), and during cache stage 208, GHR 102 may be used to generate an index to a branch history table (BHT). At the end of process 204, GHR 102 is updated by update logic 211 to include the predicted outcome of any conditional branch instructions.
[0069] In order for the prediction method to work correctly, the GHR value read by any stage in the pipelined process 204 must be constant, meaning that no matter what happens in the pipeline (e.g., different threads fetching), the GHR value must match the best case IFU performance (e.g., one thread fetching, no gaps in fetching, etc.). However, because the GHR 102 is updated and read in different cycles, this is not always the case.
[0070] For example, because the processor is multithreaded in this example, instructions from multiple threads may be interleaved in the pipelined process 204. Thus, if in clock cycle A, a first instruction associated with a first thread is in the fetch stage 206, a second instruction associated with the first thread is in the cache stage 208, and a conditional branch instruction associated with a second thread is in the select stage 210; in clock cycle A+1, the GHR 102 will be updated to include the predicted outcome of the conditional branch instruction associated with the second thread, and the cache stage 208 will read the updated GHR 102. However, the predicted outcome of the second stage included in the updated GHR 102 is irrelevant to the prediction of the outcome of the first instruction or the second instruction associated with the first thread.
[0071] Accordingly, to ensure that the prediction method works correctly, the GHR 102 is checkpointed multiple times so that different stages of the pipelined process 204 can use different versions of the GHR as appropriate. The different versions of the GHR can be snapshots of the GHR before one or more checkpoint triggering events. In this example, the GHR is checkpointed each time the IFU sends an instruction to the execution unit for execution, so the checkpoint triggering event sends the instruction to the execution unit for execution, but in other examples, other checkpoint triggering events may be used. In this example, the GHR is checkpointed three times, but in other examples, the GHR or other shift registers may be checkpointed fewer or more times. The results of each checkpoint may be stored in a separate checkpoint register 212, 214, 216.
[0072] Referring now to the diagram showing checkpointing of the GHR Figure 3 and Figure 4 In these examples, GHR 102 is checkpointed three times, and the results of each checkpoint are stored in separate eight-bit checkpoint registers 212, 214, 216. First checkpoint register 212 stores the GHR when it was one checkpoint trigger event ago (e.g., before the most recent instruction was sent to the execution unit for execution); second checkpoint register 214 stores the GHR when it was two checkpoint trigger events ago (e.g., before the two most recent instructions were sent to the execution unit for execution); and third checkpoint register 216 stores the GHR when it was three checkpoint trigger events ago (e.g., before the three most recent instructions were sent to the execution unit for execution).
[0073] When a checkpoint triggering event occurs (e.g., an instruction is sent to the execution unit for execution), the data in the GHR 102, the first checkpoint register 212, and the second checkpoint register 214 are copied to the first, second, and third checkpoint registers 212, 214, and 216, respectively. Specifically, the data in the second checkpoint register 214 is copied to the third checkpoint register 216, as indicated at 302; the data in the first checkpoint register 212 is copied to the second checkpoint register 214, as indicated at 304; the data in the GHR 102 is copied to the first checkpoint register 212, as indicated at 306; and when the instruction sent to the execution unit is a conditional branch instruction, the GHR 102 is updated to include the predicted result of the conditional branch instruction, otherwise no changes are made to the GHR 102. For example, in Figure 3 In the example of , the instruction sent to the execution unit (EXU) is not a conditional branch instruction, so in clock cycle A+1, GHR 102 remains the same as in clock cycle A. In contrast, in Figure 4 In the example of , the instruction sent to the execution unit (EXU) is a conditional branch instruction and the branch is predicted to be taken, so a "1" is moved onto the GHR 102 in clock cycle A+1.
[0074] Come back for reference Figure 2 When a misprediction occurs, the IFU 202 restores the GHR 102 and the checkpoint registers 212, 214, and 216 to the way they were before the mispredicted instruction was sent to the execution unit. To be able to restore the checkpoint registers 212, 214, and 216 after a misprediction, the IFU 202 stores in a restore buffer 218 a copy of the data in the checkpoint registers 212, 214, and 216 for each incomplete or in-flight conditional branch instruction (i.e., a conditional branch instruction that has been predicted but not yet executed).
[0075] Referring now to FIG. 218, an example recovery buffer 218 is shown. Figure 5(A)-5(C) .exist Figure 5(A)-5(C) In the example, the recovery buffer 218 is implemented as a FIFO (first-in-first-out) circular buffer including multiple data locations 5020 to 5024, each of which is used to store copies of three checkpoint registers for a specific conditional branch instruction; a read pointer 504 points to data locations 5020 to 5024 containing the checkpoint register values of the earliest pending or incomplete conditional branch instruction (i.e., the conditional branch instruction predicted the longest time ago); and a write pointer 506 points to the next data location 5020 to 5024 to be written.
[0076] In some cases, when the IFU 202 makes a conditional branch prediction, the data in the checkpoint registers 212, 214, and 216 are pushed onto the recovery buffer 218. In particular, the data in the checkpoint registers 212, 214, and 216 are written to the data location of the recovery buffer 218 indicated by the write pointer 506, and then the write pointer 506 is incremented to point to the next data location. For example, if the recovery buffer 218 has five data locations 5020 to 5024 and the read pointer 504 points to the first data location 5020 and the write pointer 506 points to the fourth data location 5023, as shown in FIG. 5(A), when the IFU 202 makes a branch prediction for the conditional branch instruction D, the data in the checkpoint registers 212, 214, and 216, referred to as checkpoint 1-D, checkpoint 2-D, and checkpoint 3-D, are stored in the fourth data location 5023, as shown in FIG. 5(B), and the write pointer 506 is incremented to point to the fifth data location 5024.
[0077] When the IFU 202 receives information from the execution unit (EXU) (e.g., via the recovery logic 220) indicating that the branch instruction has been executed, the data in the data locations 5020 to 5024 pointed to by the read pointer 504 are popped out of the recovery buffer 218. In particular, the read pointer 504 is incremented to point to the next data location 5020 to 5024. For example, if the recovery buffer 218 has five data locations 5020 to 5024 and the read pointer 504 points to the first data location 5020 and the write pointer 506 points to the fifth data location 5024, as shown in FIG. 5(B), when the IFU 202 receives information from the EXU indicating that the branch instruction A has been executed, the read pointer 504 is incremented to point to the second data location 5021, as shown in FIG. 5(C).
[0078] If IFU 202 receives an indication that a misprediction has occurred, IFU 202 replaces the data in checkpoint registers 212 , 214 , and 216 with data from the top data location (the data location pointed to by read pointer 504 ) and then invalidates the entry in restore buffer 218 .
[0079] The number of data locations in the restore buffer 218 is generally equal to the maximum number of conditional branch instructions (i.e., conditional branch instructions that have been predicted but not yet executed) that may be outstanding or in-flight at any time, so that the IFU 202 can restore the checkpoint registers to the proper state when any outstanding conditional branch instruction is mispredicted. Accordingly, the number of bits required for the restore buffer 218 is equal to N*M*C, where N is the number of bits of the GHR (and thus the number of bits of each checkpoint register), M is the number of entries in the restore buffer 218, and C is the number of checkpoint registers. Thus, where N equals 8, M equals 16, and C equals 3, then the restore buffer 218 requires 384 bits.
[0080] Due to the considerable duplication of information between the shift register (e.g., GHR) and the checkpoint register, it is inefficient to checkpoint the shift register by storing a copy of the shift register after multiple checkpoint triggering events. Specifically, in clock cycles when a checkpoint triggering event occurs but the shift register is not updated (e.g., when an instruction is sent to the execution unit for execution but the instruction is not a conditional branch instruction), the first checkpoint will be equal to the shift register. Even in clock cycles when a checkpoint triggering event occurs and the shift register (e.g., GHR 102) is updated (e.g., when a conditional branch instruction is sent to the execution unit for execution), the first checkpoint will differ from the shift register (e.g., GHR 102) by only one data element (e.g., bit).
[0081] Accordingly, the present disclosure provides efficient methods and systems for checkpointing a shift register (e.g., a GHR) using replication between the shift register and the checkpoints. In these methods, a main shift register is extended to record a longer history, and a record of updates to the main shift register is saved in a separate update history shift register and used to determine which bits of the extended shift register describe the current state of the main shift register and any checkpoint states of the main shift register.
[0082] Figure 6-12 A first embodiment for checkpointing the master shift register is described. In this embodiment, instead of storing a full copy of the master shift register for each checkpoint, as described above with reference to Figure 2-5 (C) As described, the main shift register is extended to include additional or additional data locations (e.g., bits) for each checkpoint, and a record of whether an update was made to the main shift register for each of the C previous checkpoint triggering events is maintained in a separate update history shift register, where C is the number of checkpoints. The current state of the main shift register and the checkpoints can then be identified from the extended shift register and the update history shift register.
[0083] Figure 6 An example structure is shown for an extended shift register 602 and an update history shift register 604. In this example, the master shift register is the GHR, but it will be apparent to those skilled in the art that the methods and principles described herein are equally applicable to checkpointing other shift registers.
[0084] The extended shift register 602 includes N+C data positions 606 to 626, where N is the number of data positions in the main shift register and C is the number of checkpoints. Accordingly, the extended shift register 602 includes data positions 606 to 620 for each data position in the main shift register and additional data positions 622 to 626 for each checkpoint. The extended shift register 602 is as described above with respect to Figure 1(A) to Figure 1(D) In particular, when a new data element is received at the extended shift register 602, the data elements in the extended shift register 602 are shifted by one data position, and the new data element is inserted in the first data position. For example, if a new data element arrives, the data elements at data positions 606 to 624 are shifted to data positions 608 to 626, respectively, and the new data element is inserted in the first data position 606.
[0085] The data positions 606 to 626 of the extended shift register 602 are divided into two subsets 628 and 630. The first subset 628 includes N data positions that hold the newest data elements (i.e., the data elements most recently added to the main shift register) and represents the current state of the main shift register (e.g., GHR). The second subset 630 includes C data positions that hold the oldest data elements and is used in conjunction with the update history shift register 604 to identify a checkpoint of the main shift register.
[0086] For example, where the main shift register is an 8-bit GHR (N=8) that is to be checkpointed three times (C=3), the extended shift register 602 includes 11 bits representing the 11 most recently predicted conditional branch outcomes. A first subset 628 of the data positions of the extended shift register 602 includes the 8 most recently predicted conditional branch outcomes, and a second subset 630 of the data positions of the extended shift register 602 includes the 3 earliest predicted conditional branch outcomes (i.e., the outcomes predicted the longest time ago).
[0087] The update history shift register 604 is a shift register including C data positions 632 to 636, where C is the number of checkpoints. Each data position includes information indicating whether the extended shift register 602 was updated before a certain number of checkpoint triggering events. In particular, the first data position 632 includes information indicating whether the extended shift register 602 was updated after the last checkpoint triggering event; the second data position 634 includes information indicating whether the extended shift register 602 was updated before two checkpoint triggering events; and so on.
[0088] For example, where the primary shift register is a GHR that is to be checkpointed three times (C=3), then the update history shift register 604 includes three bits that indicate which of the last three instructions sent to the execution unit were branch instructions. In particular, the first bit 632 indicates whether the last instruction sent to the execution unit for execution was a conditional branch instruction (so the result was predicted and the extended shift register 602 was updated); the second bit 634 indicates whether the second to last instruction sent to the execution unit for execution was a conditional branch instruction (so the result was predicted and the extended shift register 602 was updated); and the third bit 636 indicates whether the third to last instruction sent to the execution unit for execution was a conditional branch instruction (so the result was predicted and the extended shift register 602 was updated).
[0089] Figure 7 An example method 700 for updating the extended shift register 602 and updating the history shift register 604 is shown, which may be performed by update logic (not shown) at each clock cycle. The method 700 begins at block 701, where the update logic determines whether a checkpoint triggering event has occurred. Where the master shift register is a GHR, the checkpoint triggering event may be when an instruction is sent to an execution unit for execution. However, it will be apparent to one skilled in the art that other checkpoint triggering events may be used depending on the purpose and use of the shift register. If it is determined that a checkpoint triggering event has occurred, the method 700 proceeds to block 702. However, if it is determined that a checkpoint triggering event has not occurred, the method 700 ends.
[0090] At block 702, the update logic determines whether the extended shift register is updated in the current clock cycle. This may include determining whether there are new data elements shifted onto the extended shift register 602. Where the primary shift register is a GHR, determining whether the extended shift register is updated may include determining whether the outcome of a conditional branch instruction is predicted (i.e., whether the instruction sent to the instruction unit is a conditional branch instruction).
[0091] If it is determined that the extended shift register 602 has not been updated in the current clock cycle, the method proceeds to block 704, where data is moved onto the update history shift register 604 to indicate that the extended shift register 602 has not been updated. In some cases, a "0" indicates that the extended shift register 602 has not been updated, while a "1" indicates that the extended shift register 602 has been updated. In these cases, at block 704, a "0" is moved onto the update history shift register 604. No changes are made to the extended shift register 602. For example, if the main shift register is a GHR and the extended shift register 602 and the update history shift register 604 are as shown in FIG8(A), then if no branch is predicted in the current clock cycle (and therefore there is no update to the extended shift register 602), then a "0" is moved onto the update history shift register 604, as shown in FIG8(B). In particular, the data elements / information in bits 0 and 1 of update history shift register 604 are shifted to bits 1 and 2, respectively, and a "0" is inserted in bit 0.
[0092] However, if it is determined that the extended shift register 602 is updated in the current clock cycle, the method 700 proceeds to blocks 706 and 708, wherein data is moved to the update history shift register 604 to indicate that the extended shift register is updated, and the extended shift register 602 is updated to include new data elements (e.g., the predicted result of the conditional branch instruction). In some cases, a "0" indicates that the extended shift register is not updated, while a "1" indicates that the extended shift register is updated. In these cases, at block 706, a "1" is moved to the update history shift register 604. For example, if the main shift register is a GHR and the extended shift register 602 and the update history shift register 604 are as shown in FIG. 8 (B), and the branch is predicted to be not adopted, a "1" is moved to the update history shift register 604 and a "0" is moved to the extended shift register 602, as shown in FIG. 8 (C). Similarly, if the main shift register is GHR and the extended shift register 602 and the update history shift register 604 are as shown in Figure 8(C), and the branch is predicted to be taken, then "1" is shifted to the update history shift register 604 and "1" is shifted to the extended shift register 602, as shown in Figure 8(D).
[0093] As mentioned above, checkpoints of the main shift register (e.g., GHR) may be derived from the update history shift register 604 and the extended shift register 602. In particular, the checkpoint generation logic (not shown) is configured to derive each checkpoint by selecting a subset of data positions 606 to 626 in the extended shift register 602 based on information stored in the update history shift register 604.
[0094] For example, the checkpoint generation logic may be configured to select a subset of the data positions 606 through 626 that is not offset, offset by one, or offset by more than one data position from the first subset 628 of data positions based on information stored in the update history shift register 604. The offset for a particular checkpoint is based on the number of associated data positions (e.g., bits) of the update history shift register 604 that indicate updates were made to the extended shift register 602 in the corresponding clock cycle.
[0095] The associated data positions (e.g., bits) of the update history shift register 604 of the checkpoint are based on the level or number of checkpoints. In particular, the associated data positions (e.g., bits) of the update history shift register 604 of the checkpoint are the data positions (e.g., bits) of the level up to and including the checkpoint. As described above, each checkpoint represents a data element or value of the main shift register (e.g., GHR) before a predetermined number of checkpoint triggering events. The level or number of checkpoints is equal to the predetermined number of checkpoint triggering events. For example, checkpoint 1 represents the value or data element of the main shift register (e.g., GHR) before one checkpoint triggering event, so checkpoint 1 is a level 1 checkpoint; and checkpoint 3 represents the value or data element of the main shift register (e.g., GHR) before three checkpoint triggering events, so checkpoint 3 is a level 3 checkpoint.
[0096] Accordingly, the offset for a particular checkpoint is based on the number of data positions (e.g., bits) of the update history shift register 604 up to and including the level of the checkpoint. For example, for a level 1 checkpoint (e.g., checkpoint 1), only the first data position of the update history shift register 604 is relevant, while for a level 2 checkpoint (e.g., checkpoint 2), only the first two data positions of the update history shift register 604 are relevant. Thus, for a level 1 checkpoint (e.g., checkpoint 1), the offset is determined from the information in the first data position 632 of the update history shift register 604; and for a level 2 checkpoint (e.g., checkpoint 2), the offset is determined from the information in the first two bits of the update history shift register 604.
[0097] The offset is then equal to the number or count of associated data positions of the update history shift register 604 that indicate that the extended shift register 602 was updated in the same clock cycle as the corresponding checkpoint trigger event. For example, if only one associated position of the update history shift register 604 includes information indicating that the extended shift register 602 was updated (e.g., set to "1") in the same clock cycle as the corresponding checkpoint trigger event, then the subset of data positions for the checkpoint is shifted by one data position relative to the first subset of data positions 628, such that the checkpoint includes the first data position in the second subset of data positions 630 and N-1 data positions from the first subset of data positions 628; and if only two associated data positions of the update history shift register 604 include information indicating that the extended shift register 602 was updated in the same clock cycle as the corresponding checkpoint trigger event, then the subset of data positions for the checkpoint is shifted by two data positions relative to the first subset of data positions 629, such that the checkpoint includes the first two data positions from the second subset of data positions 630 and N-2 data positions from the first subset of data positions 628.
[0098] Figure 9-11 An example method for using these principles to generate first, second, and third checkpoints from the extended shift register 602 and the updated history shift register 604 is shown, as further described in Fig.12 In particular, Fig. 9 An example method is shown for generating checkpoint 1 from the extended shift register 602 and update history shift register 604 described above. Because checkpoint 1 is a level 1 checkpoint, it is only the first bit (bit 0 or data position 632) of the update history shift register 604 that is relevant when determining the offset.
[0099] Method 900 begins at block 902, where it is determined whether the first bit (bit 0 or data position 632) of update history shift register 604 is set. Where "1" is used to indicate that extended shift register 602 is updated, determining whether the first bit of update history shift register 604 is set may include determining whether the first bit is set to 1.
[0100] If it is determined that the first bit of the update history shift register 604 is not set, the method 900 proceeds to block 904, where checkpoint 1 is set to data positions 0 to N-1 (the first subset 628 of data positions) of the extended shift register 602. If, however, it is determined that the first bit of the update history shift register 604 is set, the method 900 proceeds to block 906, where checkpoint 1 is set to data positions 1 to N (the first data position from the second subset 630 + the next N-1 data positions of the first subset 628) of the extended shift register 602. Accordingly, in this case, checkpoint 1 is offset by one data position from the first subset of data positions.
[0101] For example, if the main shift register is an 8-bit GHR (N=8) that will be checkpointed 3 times (C=3) and the extended shift register 602 and the updated history shift register 604 are as follows: Fig.12 As shown, according to Fig. 9 900, checkpoint 1 (indicated by numeral 1202) will be equal to the first 8 bits (bits 0 through 7) of the extended shift register 602 because the first bit of the update history shift register 604 is not set.
[0102] Fig.10 An example method 1000 is shown for generating a checkpoint 2 from the extended shift register 602 and the update history shift register 604 described above. The method 1000 begins at block 1002, where it is determined whether the first two bits of the update history shift register 604 are both set. If it is determined that the first two bits of the update history shift register 604 are both set, the method 1000 proceeds to block 1004, where a checkpoint 2 is generated from the data elements at data positions 2 to N+1. Accordingly, in this case, the checkpoint 2 is offset from the first subset 628 of data positions by two data positions.
[0103] However, if it is determined that neither of the first two bits of the update history shift register is set, the method 1000 proceeds to block 1006, where it is determined whether one of the first two bits of the update history shift register 604 is set. If it is determined that one of the first two bits of the update history shift register is set, the method 1000 proceeds to block 1008, where a checkpoint 2 is generated from the data elements at data positions 1 through N. Accordingly, in this case, the checkpoint 2 is offset from the first subset 628 of data positions by one data position.
[0104] However, if it is determined that none of the first two bits of the update history shift register 604 are set, the method 1000 proceeds to block 1010, where a checkpoint 2 is generated from the data elements at data positions 0 to N-1 (i.e., the first subset 628 of data positions). Accordingly, in this case, the checkpoint 2 is offset from the first subset 628 of data positions by zero data positions.
[0105] For example, if the main shift register is an 8-bit GHR (N=8) that will be checkpointed 3 times (C=3) and the extended shift register 602 and the updated history shift register 604 are as follows: Fig.12 As shown, according to Fig.10 1000, checkpoint 2 (indicated by numeral 1204) will be equal to bits 1 through 8 of the extended shift register 602 because only one of the first two bits of the update history shift register 604 is set.
[0106] Fig.11 An example method 1100 is shown for generating a checkpoint 3 from the extended shift register 602 and the update history shift register 604 described above. The method 1100 begins at block 1102, where it is determined whether all of the first three bits of the update history shift register are set. If it is determined that all of the first three bits of the update history shift register are set, the method 1100 proceeds to block 1104, where a checkpoint 3 is generated from the data elements at data positions 3 to N+2. Accordingly, in this case, the checkpoint 3 is offset by three data positions from the first subset 628 of data positions.
[0107] However, if it is determined that the first three bits of the update history shift register 604 are not all set, the method 1100 proceeds to block 1106, where it is determined whether two of the first three bits of the update history shift register are set. If it is determined that two of the first three bits of the update history shift register 604 are set, the method 1100 proceeds to block 1108, where checkpoint 3 is generated from the data elements at data positions 2 to N+1. Accordingly, in this case, checkpoint 3 is offset by two data positions from the first subset 628 of data positions.
[0108] However, if it is determined that less than two of the first three bits of the update history shift register 604 are set, the method 1100 proceeds to block 1110, where it is determined whether one of the first three bits of the update history shift register 604 is set. If it is determined that one of the first three bits of the update history shift register 604 is set, the method 1100 proceeds to block 1112, where checkpoint 3 is generated from the data elements at data positions 1 through N. Accordingly, in this case, checkpoint 3 is offset from the first subset 628 of data positions by one data position.
[0109] However, if it is determined that none of the first three bits of the update history shift register 604 are set, the method 1100 proceeds to block 1114, where a checkpoint 3 is generated from the data elements at data positions 0 to N-1 (i.e., the first subset 628 of data positions). Accordingly, in this case, the checkpoint 3 is offset from the first subset 628 of data positions by zero data positions.
[0110] For example, if the main shift register is an 8-bit GHR (N=8) that will be checkpointed 3 times (C=3) and the extended shift register 602 and the updated history shift register 604 are as follows: Fig.12 As shown, according to Fig.11 12. For method 1100, checkpoint 3 (indicated by numeral 1206) will be equal to bits 1 through 8 of the extended shift register 602 because only one of the first two bits of the update history shift register 604 is set.
[0111] When the extended shift register 602 and the updated history shift register 604 are used to perform a checkpoint operation on the main shift register (eg, GHR), in order to be able to restore the checkpoint to a previous time point (eg, after a branch misprediction), it is not as described above with respect to Figure 5(A)-5(C) The copies of all checkpoints are stored in the recovery buffer, but only the updated history shift register 604 and the extended shift register 602 for each relevant time point (for example, before the conditional branch instruction is issued to the execution unit) are stored in the recovery buffer.
[0112] Referring now to FIG. 1300, an example recovery buffer 1300 is shown. Figure 13(A)-13(C) , the example restore buffer 1300 is used to store the update history shift register 604 and the extended shift register 602 at a specific point in time (e.g., before a conditional branch instruction is sent to an execution unit for execution) to allow the main shift register (e.g., GHR) and checkpoint to be restored to that point in time (e.g., after a misprediction of a conditional branch instruction). Figure 5(A)-5(C) Like the recovery buffer 218, the recovery buffer 1300 is implemented as a FIFO circular buffer including multiple data locations 13020 to 13024, wherein each data location is used to store a copy of the update history shift register 604 and the extended shift register 602 at a specific time point (e.g., before the conditional branch instruction is issued to the execution unit); a read pointer 1304 pointing to the data locations 13020 to 13024 containing the update history shift register 604 and the extended shift register 602 for the earliest time point (e.g., corresponding to the time point before the earliest uncompleted conditional branch instruction is issued to the execution unit); and a write pointer 1306 pointing to the next data locations 13020 to 13024 to be written.
[0113] Whenever an update trigger event occurs (e.g., the IFU 202 predicts the result of a conditional branch instruction), the update logic (not shown) pushes the information in the update history shift register 604 and the data elements in the extended shift register 602 onto the restore buffer 1300. In particular, the information in the update history shift register 604 and the data elements stored in the extended shift register 602 are written to the data location indicated by the write pointer 1306, and then the write pointer 1306 is incremented to point to the next data location. For example, if the restore buffer 1300 is as shown in FIG. 13 (A), when an update trigger event occurs (e.g., the IFU 202 predicts the result of a conditional branch instruction D), the information in the update history shift register 604 and the data elements stored in the extended shift register 602 are stored at the data location pointed to by the write pointer 1306, and then the write pointer 1306 is incremented to point to the next data location, as shown in FIG. 13 (B).
[0114] Whenever the update logic (not shown) receives a removal trigger (e.g., information indicating that a branch instruction has been executed is received from an execution unit (EXU), the update logic causes the data elements in the data locations 13020 to 13024 pointed to by the read pointer 1304 to be popped from the restore buffer 1300. This can be accomplished by incrementing the read pointer 1304 to point to the next data location 13020 to 13024. For example, if the restore buffer 1300 is as shown in FIG. 13(B), when a removal trigger is received (e.g., information indicating that a branch instruction A has been executed is received from an EXU), the read pointer 1304 is incremented to point to the next data location, as shown in FIG. 13(C).
[0115] If the recovery logic (not shown) receives a recovery trigger (e.g., an indication that a misprediction has occurred), the recovery logic replaces the information in the update history shift register 604 and the data elements in the extended shift register 602 with data from the top data location (the data location pointed to by the read pointer 1304), and then invalidates the entry in the recovery buffer 1300.
[0116] In this example, each data position in the recovery buffer 1300 has C bits (for the update history shift register) + N + C bits (for the extended shift register). Where there are M data positions in the recovery buffer, the total number of bits in the recovery buffer is then M*(2C+N). So where C is 3, N is 8, and M is 16, the total number of bits in the recovery buffer 1300 is 224. Accordingly. Using the update history shift register and the extended shift register to checkpoint the shift registers provides significant cost savings in terms of storage for the recovery buffer 1300 as compared to using the checkpointing method described above with respect to FIGS. 1 to 5(C).
[0117] It will be apparent to those skilled in the art that Figure 13(A)-13(C) The structure of the recovery buffer 1300 in FIG. 1 is merely an example, and the recovery buffer may take another form (eg, recovery may be implemented as an indexed buffer or table).
[0118] Reference is now made to a method for implementing the above Figure 6 to Figure 13 (C) Example hardware structure 1400 of the shift register checkpoint method Fig.14 The hardware structure includes the extended shift register 602, the updated history shift register 604 and the recovery buffer 1300 described above.
[0119] The hardware structure also includes update logic 1402 for updating the extended shift register 602, the updated history shift register 604, and the restore buffer 1300 as described above. In particular, the update logic is configured to receive new data elements of the main shift register (e.g., GHR) and update the extended shift register 602, the updated history shift register 604, and the restore buffer 1300 accordingly, as described with respect to Figure 7 , 8 and 13. For example, where the shift register to be checkpointed is a GHR, the new data element to be added to the GHR may be a predicted result of a conditional branch instruction.
[0120] The hardware structure 1400 also includes the Figure 9-11 The checkpoint generation logic 1404 of the slave extended shift register 602 and the update history shift register 604 generates a checkpoint and / or a master shift register. For example, the checkpoint generation logic 1404 may be configured to implement Figures 9 to 11 One or more of the methods described.
[0121] The hardware structure 1400 may also include a restore logic 1406, which is used to replace the information in the extended shift register 602 and the updated history shift register 604 with the information stored in the restore buffer 1300 when a restore triggering event (such as a misprediction of a conditional branch instruction) occurs, as described above with respect to Figure 13(A)-13(C) described.
[0122] Figure 15 to Figure 26 (B) A second embodiment for checkpointing a shift register is described. The second embodiment is similar to the first embodiment (described above with respect to Figures 6 to 14 The invention also provides a method for recovering a conditional branch register 16 by using an update history shift register to keep track of which of the previous C checkpoint triggering events also resulted in an update to the main shift register; and an extended shift register. However, instead of the extended shift register including additional data locations (e.g., bits) for each checkpoint, the extended shift register is implemented as a circular buffer with M+C additional data locations, where M is the number of different snapshots of the shift register and checkpoints that can be recovered (e.g., the number of branch instructions that may be outstanding or in-flight at any time). Accordingly, in the case where there may be a maximum of 13 conditional branch instructions (M=13) that may be outstanding or in-flight at any time and there are three checkpoints (C=3), the circular buffer 16 includes 16 additional data locations.
[0123] Fig.15 An example update history shift register 1504 and circular buffer 1502 are shown for checkpointing a main shift register. Fig.15 The update history shift register 1504 is consistent with the above Figure 6 to Figure 13 (C) The update history shift register 604 is the same as described above. In particular, it has bits 1506 to 1510 for each checkpoint; and in each clock cycle when a checkpoint triggering event occurs, information (e.g., "1" or "0") is pushed onto the update history shift register 1504 indicating whether the circular buffer 1502 is updated in that clock cycle. When a checkpoint triggering event does not occur in every clock cycle, the update history shift register 1504 is not updated in the clock cycle when the checkpoint triggering event does not occur.
[0124] The circular buffer 1502 includes M+C+N data locations 1512-1558 for storing the M+C+N most recent data elements added to the shift register (e.g., the most recently predicted branch instruction results). As described above, M is the number of different snapshots of the main shift register and checkpoints that can be restored (e.g., the maximum number of branch instructions that can be outstanding or in flight at any one time), C is the number of checkpoints, and N is the size of the main shift register that is being checkpointed.
[0125] The next data location to be written to the circular buffer 1502 is identified by the top pointer 1560. In particular, the top pointer 1560 includes a plurality of bits 1562 to 1570 that together form an index identifying a particular data location 1512 to 1558 of the circular buffer 1502. For example, in Fig.15 , the index formed by bits 1562 through 1570 of top pointer 1560 is "00011" in binary, which is equivalent to a decimal value of 3. Thus, top pointer 1560 points to data location 3 (identified as number 1518). When a new data element is received for insertion into the shift register, the data element is added to the data location identified by top pointer 1560, and top pointer 1560 is then decremented.
[0126] Figures 16(A)-18(B) Examples of how the update history shift register 1504 and the loop buffer 1502 may be updated after a checkpoint triggering event occurs (e.g., when an instruction is sent to an execution unit for execution) are shown. In these examples, the main shift register is an 8-bit GHR (N=8) that is checkpointed three times (C=3); the GHR is updated with a "1" when a branch is predicted to be taken and with a "0" when a branch is predicted to be not taken; and the update history shift register 1504 is updated with a "1" when a conditional branch instruction is sent to the execution unit (and thus a branch is predicted) and with a "0" when an unconditional branch instruction is sent to the execution unit (and thus no branch is predicted).
[0127] 16(A) shows the update history shift register 1504 and loop buffer 1502 when the IFU 202 sends a non-branch instruction to the execution unit for execution. This causes a "0" to be pushed onto the update history shift register 1504 as shown in FIG16(B) to indicate that the loop buffer 1502 is not updated for this instruction. The loop buffer 1502 and the top pointer are not updated.
[0128] 17(A) shows update history shift register 1504 and loop buffer 1502 when IFU 202 sends a conditional branch instruction predicted not to be taken to the execution unit for execution. This causes a "1" to be pushed onto update history shift register 1504 to indicate that loop buffer 1502 is updated in this clock cycle; a "0" is inserted in data position 3 of loop buffer 1502 to indicate that the branch is predicted not to be taken; and top pointer 1560 is decremented to "00010" (2), as shown in FIG17(B).
[0129] 18(A) shows update history shift register 1504 and loop buffer 1502 when IFU 202 sends a conditional branch instruction predicted to be taken to the execution unit for execution. This causes a "1" to be pushed onto the update history shift register to indicate that loop buffer 1502 is updated in this clock cycle; a "1" will be inserted into data position 3 of loop buffer 1502 to indicate that the branch was predicted to be taken; and top pointer 1560 is decremented to "00010" (2), as shown in FIG18(B).
[0130] Come back for reference Fig.15 In addition to indicating the next data location to be written to the circular buffer, the top pointer 1560 also identifies the active data locations A1 to A1 of the circular buffer. 11 . Active data locations A1 to A 11 The data locations of the circular buffer from which the current value of the main shift register and checkpoint can be determined. Active data locations A1 to A 11 Typically, the active data positions are N+C data positions before the data position indicated or pointed to by the top pointer 1560. In particular, if the data position indicated or pointed to by the top pointer is Y, then the active data positions are data positions Y+1 to Y+N+3. For example, when the top pointer points to data position 3 (indicated by reference value 1420), N=8 and C=3, then the active data positions A1 to A 11 These are data positions 4 to 14 (indicated by reference numerals 1520 to 1540).
[0131] Active data locations A1 to A 11 can be understood as similar to the above Figure 6 to Figure 13 (C) The data positions 606 to 626 of the extended shift register 602 are described. In particular, like the data positions 606 to 626 of the extended shift register 602, the active data positions A1 to A2 11 The first subset 1572 is the N active data positions A1 to A8 that hold the latest data elements (i.e., the data elements most recently added to the circular buffer) and represent the current state of the main shift register (e.g., GHR). The second subset 1574 is the next C data positions that hold the next C most recent data elements.
[0132] For example, where the master shift register is an 8-bit GHR (N=8) that is to be checkpointed three times (C=3), there are 11 active data locations A1 through A2 representing the 11 most recently predicted branch outcomes. 11 The first subset 1572 of active data locations includes the 8 most recently predicted branch outcomes, and the second subset 1574 of active data locations includes the 3 next most recently predicted outcomes.
[0133] Accordingly, with Figure 6 to Figure 13 (C) The update history shift register 604 is used to update the Figures 6 to 14 In the same manner that data positions 606 to 626 of the extended shift register 602 identify the current checkpoint value, the updated history shift register 1504 may be used to update the active data positions A1 to A2. 11Identify the current checkpoint value. In particular, update history shift register 1504 identifies and / or selects active data locations A1 through A2 that provide the current value for each checkpoint. 11 .
[0134] For example, the checkpoint generation logic may be configured to select active data locations A1 to A2 that are not offset, offset by one or more data locations from the first subset 1572 of active data locations based on information stored in the update history shift register 1504. 11 The offset for a particular checkpoint is based on the number of associated data positions (eg, bits) of the update history shift register 604 that indicate updates made to the circular buffer 1502 in the same clock cycle as the corresponding checkpoint triggering event.
[0135] As mentioned above Figure 6 to Figure 13 (C) As described, the associated data positions (e.g., bits) of the update history shift register 1504 for a checkpoint are based on the level or number of checkpoints. In particular, the associated data positions (e.g., bits) of the update history shift register 1504 for a checkpoint are data positions (e.g., bits) up to and including the level of the checkpoint. As described above, each checkpoint represents a data element or value of the main shift register (e.g., GHR) before a predetermined number of checkpoint triggering events. The level or number of checkpoints is equal to the predetermined number of checkpoint triggering events. For example, checkpoint 1 represents the value or data element of the main shift register (e.g., GHR) before one checkpoint triggering event, so checkpoint 1 is a level 1 checkpoint; and checkpoint 3 represents the value or data element of the main shift register (e.g., GHR) before three checkpoint triggering events, so checkpoint 3 is a level 3 checkpoint.
[0136] Accordingly, the offset for a particular checkpoint is based on the number of data positions (e.g., bits) of the update history shift register 1504 up to and including the level of the checkpoint. For example, for a level 1 checkpoint (e.g., checkpoint 1), only the first data position of the update history shift register 1504 is relevant, while for a level 2 checkpoint (e.g., checkpoint 2), only the first two data positions of the update history shift register 1504 are relevant. Thus for a level 1 checkpoint (e.g., checkpoint 1), the offset is determined from the information in the first data position 1506 of the update history shift register 1504; and for a level 2 checkpoint (e.g., checkpoint 2), the offset is determined from the information in the first two data positions of the update history shift register 1504.
[0137] The offset is then equal to the number or count of relevant data positions of the update history shift register 1504 that include information indicating that the circular buffer 1502 was updated (e.g., set to "1") in the clock cycle of the corresponding checkpoint trigger event, and then the subset of active data positions regarding the checkpoint is shifted by one data position relative to the first subset of active data positions 1572, so that the checkpoint includes the first data position in the second subset of active data positions 1574 and N-1 data positions from the first subset of active data positions 1572; and if only two relevant data positions of the update history shift register 1504 include information indicating that the circular buffer 1502 was updated (e.g., set to "1") in the clock cycle of the corresponding checkpoint trigger event, then the subset of active data positions of the checkpoint is shifted by two data positions relative to the first subset of active data positions 1572, so that the checkpoint includes the first two data positions from the second subset of active data positions 1574 and N-2 data positions from the first subset of active data positions 1572.
[0138] Figure 19-21 An example method for generating first, second, and third checkpoints from the circular buffer 1502 and the update history shift register 1504 using the principles described above with respect to the extended shift register 602 and the update history shift register 604 is shown. In particular, Fig.19 An example method 1900 is shown for generating checkpoint 1 from the circular buffer 1502 and update history shift register 1504 described above. Because checkpoint 1 is a level 1 checkpoint, it is only the first bit (bit 0 or data position 1506) of the update history shift register 1504 used to determine the relevant bit from the circular buffer 1502.
[0139] The method 1900 begins at block 1902, where it is determined whether a first bit (bit 0 or data position 1506) of the update history shift register 1504 is set. Where "1" is used to indicate that the circular buffer 1502 is updated in the clock cycle of the corresponding checkpoint trigger event, determining whether the first bit of the update history shift register 1504 is set may include determining whether the first bit is set to 1.
[0140] If it is determined that the first bit of the update history shift register 1504 is not set, the method 1900 proceeds to block 1904, where checkpoint 1 is set to active data locations A1 to A2 of the circular buffer 1502. N (the first subset 1572 of active data locations). However, if it is determined that the first bit of the update history shift register 1504 is set, the method 1900 proceeds to block 1906, where checkpoint 1 is set to the data elements in the active data locations A2 to A N+1Data elements in (the first active data position from the second subset 1574 + the next N-1 active data positions from the first subset 1572). Accordingly, in this case, checkpoint 1 is offset by one data position from the first subset of active data positions.
[0141] For example, if the master shift register is an 8-bit GHR (N=8) that will be checkpointed 3 times (C=3) and the circular buffer 1502 and update history shift register 1504 are as follows: Fig. 22 As shown, according to Fig.19 1900, checkpoint 1 (indicated by numeral 2202) will be equal to the data in active data bits A2 through A9 of circular buffer 1502 because the first bit of update history shift register 1504 is set.
[0142] Fig. 20 An example method 2000 for generating a checkpoint 2 from the circular buffer 1502 and the update history shift register 1504 described above is shown. The method 2000 begins at block 2002, where it is determined whether the first two bits of the update history shift register 1504 are both set. If it is determined that the first two bits of the update history shift register 1504 are both set, the method 2000 proceeds to block 2004, where the active data position A3 to A4 is set. N+2 Accordingly, in this case, checkpoint 2 is offset from the first subset 1572 of active data locations by two data locations.
[0143] However, if it is determined that neither of the first two bits of the update history shift register 1504 is set, the method 2000 proceeds to block 2006, where it is determined whether one of the first two bits of the update history shift register is set. If it is determined that one of the first two bits of the update history shift register is set, the method 2000 proceeds to block 2008, where the first two bits of the update history shift register are set from the active data position A2 to A N+1 Accordingly, in this case, checkpoint 2 is offset from the first subset 1572 of active data locations by one data location.
[0144] However, if it is determined that none of the first two bits of the update history shift register 1504 are set, the method 2000 proceeds to block 2010, where the bits are shifted from the active data positions A1 to A2. N (i.e., the first subset of data locations 1572) generates checkpoint 2. Accordingly, in this case, checkpoint 2 is offset from the first subset of active data locations 1572 by zero data locations.
[0145] For example, if the master shift register is an 8-bit GHR (N=8) that will be checkpointed 3 times (C=3) and the circular buffer 1502 and update history shift register 1504 are as follows: Fig. 22 As shown, according to Fig. 20 2000, checkpoint 2 (indicated by numeral 2204) will be equal to active data locations A2 through A9 of the circular buffer 1502 because only one of the first two bits of the update history shift register 1504 is set.
[0146] Fig.21 An example method 2100 for generating checkpoint 3 from the circular buffer 1502 and update history shift register 1504 described above is shown. The method 2100 begins at block 2102, where it is determined whether all the first three bits of the update history shift register 1504 are set. If it is determined that all the first three bits of the update history shift register 1504 are set, the method 2100 proceeds to block 2104, where the active data position A4 to A N+3 Accordingly, in this case, checkpoint 3 is offset from the first subset 1572 of active data locations by three data locations.
[0147] However, if it is determined that the first three bits of the update history shift register 1504 are not all set, the method 2100 proceeds to block 2106, where it is determined whether two of the first three bits of the update history shift register 1504 are set. If it is determined that two of the first three bits of the update history shift register 1504 are set, the method 2100 proceeds to block 2108, where the bits are set from the active data position A3 to A4. N+2 Accordingly, in this case, checkpoint 3 is offset from the first subset 1572 of active data locations by two data locations.
[0148] However, if it is determined that less than two of the first three bits of the update history shift register 1504 are set, the method 2100 proceeds to block 2110, where it is determined whether one of the first three bits of the update history shift register 1504 is set. If it is determined that one of the first three bits of the update history shift register 1504 is set, the method 2100 proceeds to block 2112, where the first three bits of the update history shift register 1504 are set from the active data position A2 to A N+1 Accordingly, in this case, checkpoint 3 is offset from the first subset 1572 of active data locations by one data location.
[0149] However, if it is determined that none of the first three bits of the update history shift register 1504 are set, the method 2100 proceeds to block 2114, where the bits are shifted from the active data positions A1 to A2.N Checkpoint 3 is generated for the data elements on (i.e., the first subset 1572 of active data locations).
[0150] For example, Fig. 22 As shown, if the main shift register is an 8-bit GHR (N=8) that will be checkpointed 3 times (C=3) and the circular buffer 1502 and the update history shift register 1504 are as shown, then according to Fig.21 In method 2100, checkpoint 3 (indicated by numeral 2206) will be generated from bits A3 to A4 of circular buffer 1502. 10 , because only two of the first three bits of the update history shift register 1504 are set.
[0151] As mentioned above Figure 15 to Figure 22 The use of the circular buffer 1502 and the update history shift register 1504 to checkpoint the master shift register (e.g., GHR) significantly reduces the amount of data that needs to be stored to be able to restore the master shift register (e.g., GHR) and checkpoint to a previous point in time (e.g., after a misprediction of a conditional branch instruction). Specifically, rather than Figure 5(A)-5(C) The above-described method stores copies of all checkpoints in the recovery buffer at each relevant time point (e.g., before each uncompleted conditional branch instruction is issued to the execution unit), but only the updated history shift register 1504 and the top pointer 1560 for each relevant time point (e.g., before each uncompleted conditional branch instruction is issued to the execution unit) are stored in the recovery buffer. Because the loop buffer 1502 contains N+M+C predicted results, it contains sufficient predicted results: for any uncompleted conditional branch instruction, the main shift register (e.g., GHR) and the related checkpoint can be restored from the current loop buffer 1502 itself and there is no need to store a copy of the loop buffer 1502.
[0152] Figure 23(A)-23(C)A first example of a restore buffer 2300 for restoring the main shift register and checkpoint to a previous point in time is shown. In this example, the restore buffer 2300 is configured to store the information in the update history shift register 1504 and the value of the top pointer 1560 for a relevant point in time (e.g., before a conditional branch instruction is sent to an execution unit for execution). As with the recovery buffers 218 and 1300 of Figures 5(A)-(C) and Figures 13(A)-(C), the recovery buffer 2300 is implemented as a FIFO circular buffer having multiple data locations 23020 to 23024, each of which is used to store a copy of the information in the update history shift register 1504 and the top pointer 1560 for a particular point in time (e.g., before a conditional branch instruction is sent to an execution unit for execution); a read pointer 2304 pointing to data locations 23020 to 23024 containing the information in the update history shift register and the value of the top pointer for the earliest relevant point in time (e.g., before the earliest pending conditional branch instruction is sent to an execution unit for execution); and a write pointer 2306 pointing to the next data location 23020 to 23024 to be written.
[0153] Whenever an update trigger event occurs (e.g., a conditional branch instruction is issued to the execution unit), the information in the update history shift register 1504 and the value of the top pointer 1560 are pushed onto the restore buffer 2300. In particular, the information in the update history shift register 1504 and the value of the top pointer 1560 are written to the data location indicated by the write pointer 2306, and then the write pointer 2306 is incremented to point to the next data location. For example, if the restore buffer 2300 is as shown in FIG. 23 (A), when an update trigger event occurs (e.g., when the conditional branch instruction D is sent to the execution unit for execution), the information in the update history shift register 1504 and the value of the top pointer 1560 are stored at the data location pointed to by the write pointer 2306, and then the write pointer 2306 is incremented to point to the next data location, as shown in FIG. 23 (B).
[0154] Whenever a removal trigger event occurs (e.g., information indicating that a conditional branch instruction has been executed is received from an execution unit (EXU), the data elements in data locations 23020 to 23024 pointed to by a read pointer 2304 are popped out of the recovery buffer 2300. This can be accomplished by incrementing the read pointer 2304 to point to the next data location 23020 to 23024. For example, if the recovery buffer 2300 is as shown in FIG23(B), when a removal trigger event occurs (e.g., information indicating that a branch instruction A has been executed is received from an EXU), the read pointer 2304 is incremented to point to the next data location, as shown in FIG23(C).
[0155] When a recovery triggering event occurs (e.g., an indication that a misprediction has occurred is received), the information in the history shift register 1504 and the value of the top pointer 1560 are updated with data from the top data location (the data location pointed to by the read pointer 2304), and the entry in the recovery buffer 2300 is invalidated. This causes the active data locations of the circular buffer 1502 to change so that a different set of data locations of the circular buffer 1502 is used to determine the current values of the main shift register (e.g., GHR) and the checkpoint. In other words, it moves the active data locations back to what they were at a previous point in time (e.g., before the conditional branch instruction was issued to the execution unit for execution).
[0156] In this example, each data location in the restore buffer 2300 has C bits (for the update history shift register) + K bits (for the top pointer). Where there are M data locations in the restore buffer, the total number of bits in the restore buffer is then M*(C+K). So where C is 3, K is 5, and M is 16, the total number of bits to implement the restore buffer 2300 is 128. Accordingly, the same as using the method described above with respect to FIGS. 1 to 5(C) or the method described above with respect to Figure 6 to Figure 13 (C) The method described herein is used to checkpoint the shift registers, which provides significant cost savings in terms of storage in the recovery buffer 2300.
[0157] In other examples, rather than storing the value of the top pointer 1560 in the restore buffer at a particular point in time, information that enables the top pointer 1560 to be restored to a particular point in time may be stored in the restore buffer. As described above, the top pointer 1560 is adjusted (e.g., decremented) each time a new element is added to the circular buffer 1502. For example, where the primary shift register is a GHR, a new element will be added to the circular buffer 1502 (and thus the top pointer 1560 will be updated) each time the result of a conditional branch instruction is predicted (e.g., each time a conditional branch instruction is sent to an execution unit for execution). Accordingly, if the number of circular buffer updates (e.g., conditional branch instructions sent to an execution unit) that have occurred since a particular point in time is known, the top pointer may be generated at that particular time by adjusting (e.g., incrementing) the top pointer 1560 by that amount. For example, if two new elements are added to the circular buffer after a particular point in time (e.g., after a particular instruction is sent to an execution unit), the top pointer has been decremented twice since that point in time. Accordingly, the top pointer may be restored to that particular point in time by incrementing the top pointer by two.
[0158] use Figure 24(A)-24(C)24(A) , the update history shift register 1504 is equal to "001", the top pointer 1560 is equal to "00011" (3), and the circular buffer 1502 is equal to "010100000100101100011101", meaning that the active data locations A0 to A1 in the circular buffer are all in the same order. 11 It is data position 4 to 14 of circular buffer 1502.
[0159] If the IFU 202 subsequently sends a conditional branch instruction (instruction X) in which the branch is predicted to be taken to the execution unit for execution, a "1" is pushed onto the update history shift register 1504 to indicate that the loop buffer 1502 is updated in this clock cycle; a "1" is inserted in data position 3 of the loop buffer 1502 to indicate that the branch is predicted to be taken; and the top pointer 1560 is decremented by 1 to "00010" (2), as shown in Figure 24(B).
[0160] If the IFU 202 subsequently sends a conditional branch instruction (instruction X+1) in which the branch is predicted to be not taken to the execution unit for execution, a "1" is pushed onto the update history shift register 1504 to indicate that the loop buffer 1502 is updated in this clock cycle; a "0" is inserted in data position 2 of the loop buffer 1502 to indicate that the branch is predicted to be not taken; and the top pointer 1560 is decremented by 1 to "00001" (1), as shown in FIG. 24(C).
[0161] If it is then determined that instruction X is mispredicted, the history shift register 1504 is updated and the top pointer 1560 is restored to the point in time before instruction X is sent to the execution unit for execution (i.e., the point in time shown in FIG. 24(A)). Because two conditional branch instructions (instruction X and instruction X+1) have been sent to the execution unit since the point in time shown in FIG. 24(A), the circular buffer 1502 is updated twice and thus the top pointer 1560 is decremented twice. The top pointer 1560 can therefore be restored to the point in time shown in FIG. 24(A) by incrementing the top pointer 1560 of "00001" (1) of FIG. 24(C) by 2 to set the top pointer 1560 back to "00011" (3). Accordingly, the top pointer 1560 can be restored to a particular point in time by keeping track of the number of times the circular buffer has been updated after that point in time.
[0162] Figure 25(A)-25(C)A second example of a second example restore buffer 2500 for restoring the master shift register and checkpoint to a previous point in time is shown. In this example, the restore buffer 2500 is configured to update the information stored in the update history shift register 1504 and the indication of whether the loop buffer 1502 was updated in the clock cycle at a specific point in time (e.g., before a control transfer instruction (CTI) - an instruction that changes the direction of the program (e.g., a branch instruction, a jump instruction) - is sent to the execution unit for execution). The indication of whether the loop buffer 1502 is updated may also be referred to as a loop buffer update indication herein. Where the master shift register is a GHR, the indication of whether the loop buffer 1502 is updated is set to indicate that the loop buffer 1502 is updated (and therefore a prediction of whether the branch is taken) when a conditional branch instruction is sent to the execution unit.
[0163] As with the recovery buffers 218, 1300, and 2300 of FIGS. 5(A)-(C), 13(A)-(C), and 23(A)-(C), Figure 25(A)-25(C) The recovery buffer 2500 is implemented as a FIFO circular buffer having multiple data locations 25020 to 25024, wherein each data location is used to store a copy of the information in the update history shift register 1504 at a specific time point (e.g., before a control transfer instruction (CTI) such as a conditional branch instruction or a direct branch instruction is sent to the execution unit for execution) and an indication of whether the circular buffer is updated (e.g., whether the instruction sent to the execution unit is a conditional branch instruction); a read pointer 2504 pointing to the data locations 25020 to 25024 containing the information in the update history shift register and the circular buffer update indication for the earliest relevant time point (e.g., before the earliest pending control transfer instruction is sent to the execution unit for execution); and a write pointer 2506 pointing to the next data location 25020 to 25024 to be written.
[0164] Whenever an update trigger event occurs (e.g., a control transfer instruction, such as a conditional branch instruction or a jump instruction, is sent to the execution unit for execution), the information in the update history shift register 1504 and the indication of whether the loop buffer 1502 is updated (e.g., whether the control transfer instruction is a conditional branch instruction) are pushed onto the recovery buffer 2500. In particular, the information in the update history shift register 1504 and the indication of whether the loop buffer 1502 is updated are written to the data location indicated by the write pointer 2506, and the write pointer 2506 is incremented to point to the next data location. For example, if the recovery buffer 2500 is as shown in FIG. 25(A), when an update trigger event occurs (e.g., a conditional branch instruction D is sent to the execution unit for execution), the information in the update history shift register 1504 and the indication of whether the loop buffer is updated are stored at the data location pointed to by the write pointer 2506, and the write pointer 2506 is incremented to point to the next data location, as shown in FIG. 25(B).
[0165] In some cases, the indication of whether the loop buffer is updated is a single bit that is set to "1" if the loop buffer is updated and is set to "0" if the loop buffer is not updated. For example, if a conditional branch instruction is sent to the execution unit for execution (which causes an update to the loop buffer due to a branch prediction being made), the information in the update history shift register 1504 and a "1" are stored at the data location pointed to by the write pointer 2506. However, if a jump instruction is sent to the execution unit for execution (which is a CTI that does not cause an update to the loop buffer due to no branch prediction being made), the information in the update history shift register 1504 and a "0" are stored at the data location pointed to by the write pointer 2506.
[0166] Whenever a removal trigger event occurs (e.g., information indicating that a control transfer instruction has been executed is received from an execution unit (EXU), the data elements in data locations 25020 to 25024 pointed to by a read pointer 2504 are popped out of the restore buffer 2500. This can be accomplished by incrementing the read pointer 2504 to point to the next data location 25020 to 25024. For example, if the restore buffer 2500 is as shown in FIG. 25(B), when a removal trigger event occurs (e.g., information indicating that a control transfer instruction A has been executed is received from an EXU), the read pointer 2504 is incremented to point to the next data location, as shown in FIG. 25(C).
[0167] When a recovery triggering event occurs (e.g., an indication that a misprediction has occurred is received), the information in the update history shift register 1504 and the value of the top pointer 1560 are replaced based on data from the top data location (the data location pointed to by the read pointer 2504), and the entry in the recovery buffer 2500 is invalidated. In particular, the information in the update history shift register 1504 is replaced with the update history shift register information in the top data location of the recovery buffer; and the number of data locations of the recovery buffer 2500 indicating that a branch prediction was made is counted, and this count is used to update the top pointer 1560 (e.g., the top pointer may be incremented by this count).
[0168] This change in top pointer 1560 causes the active data locations of circular buffer 1502 to change so that a different set of data locations of circular buffer 1502 is used to determine the current values of the main shift register (e.g., GHR) and the checkpoint. In other words, it moves the active data locations back to what they were at a previous point in time (e.g., before the mispredicted instruction was issued to the execution unit for execution). Figure 26(A)-26(B) The depiction shows an example of the circular buffer 1502, the top pointer 1560, the update history shift register 1504, and the restore buffer 2500 after a restore event.
[0169] In this example recovery buffer 2500, each data position in the recovery buffer 2500 has C bits (for the update history shift register) + 1 bit (for the circular buffer update indicator). Where there are M data positions in the recovery buffer, the total number of bits in the recovery buffer 2500 is then M*(C+1). So where C is 3 and M is 16, the total number of bits to implement the recovery buffer 2500 is only 64.
[0170] Figure 26(A)-26(B) An example of circular buffer 1502, top pointer 1560, update history shift register 1504, and restore buffer 2500 after a restore event is shown. In particular, in FIG. 26(A), update history shift register 1504 is equal to "001", top pointer 1560 is equal to "00011" (3), and circular buffer 1502 is equal to "010100000100101100011101", meaning that active data locations A0 to A1 in the circular buffer are all in the same position. 11 It is data position 4 to 14.
[0171] If a restore event (e.g., a misprediction of instruction X) subsequently occurs, the update history shift register 1504 and the top pointer 1560 are updated based on the information in the restore buffer 2500 as shown in FIG26(B) to restore them to the way they were before instruction X was sent to the execution unit for execution. In particular, the information in the update history shift register 1504 is replaced with the update history shift register information at the top data location (the data location pointed to by the read pointer 2502). In the example of FIG26(A), the information in the update history shift register at the top data location 25020 is "101", so after the restore event, the update history shift register 1504 is set to "101", as shown in FIG26(B).
[0172] The number of circular buffer update indicators is also counted and used to restore the top pointer 1560 to its value before instruction X was sent to the execution unit for execution. Figure 26(A)-26(B) In the example of , the restore buffer has two data locations (25020 and 25022) in which the loop buffer update indicator is set, indicating that two branch predictions were made since before instruction X was issued to the execution unit for execution (thus two updates to loop buffer 1502). Accordingly, top pointer 1560 is restored to its value before instruction X was issued to the execution unit for execution by adding two to top pointer 1560. In particular, before the restore event, the top pointer was "00011", so that to restore top pointer 1560 to its value before instruction X was issued to the execution unit for execution, the top pointer value "00011" is incremented by two to "00101" (5).
[0173] from Figure 26(A)-26(B) As can be seen in , this changes the active data locations of the circular buffer from data locations 4 to 14 back to data locations 6 to 16.
[0174] Once the restore updates history shift register 1504 and top pointer 1560, the data in restore buffer 2500 is invalidated. This may involve setting write pointer 2506 and read pointer 1504 to point to the same data location indicating that restore buffer 1500 is empty.
[0175] Fig. 27 Shown is a method for implementing the above Figure 15 to Figure 26 (B) An example hardware structure 2700 of the shift register checkpointing method described above. The hardware structure 2700 includes the circular buffer 1502, the update history shift register 1504, and the top pointer 1560 described above. The hardware structure 2700 also includes a recovery buffer 2702, which can be, for example, Figure 23(A)-23(C) Recovery buffer 2300 or Figure 25(A)-25(C) The recovery buffer is 2500.
[0176] The hardware structure also includes update logic 2704 for updating the circular buffer 1502 as described above, updating the history shift register 1504, the top pointer 1560 and the restore buffer 2702. In particular, the update logic 2704 is configured to receive new data elements of the main shift register (e.g., GHR) and update them accordingly as described above. Figures 16(A)-18(B) and Figure 23(A)-26(B) The update loop buffer 1502, update history shift register 1504, top pointer 1560 and restore buffer 2702 are described. For example, where the checkpointed shift register is a GHR, the new data element to be added to the GHR may be the predicted result of a conditional branch instruction.
[0177] The hardware structure also includes a Figure 19-22 The circular buffer 1502, update history shift register 1504 and top pointer 1560 generate checkpoints and / or the checkpoint generation logic 2706 of the main shift register. For example, the checkpoint generation logic 2706 can be configured to implement Figure 19 to Figure 21 One or more of the methods described.
[0178] The hardware structure 2700 may also include a restore logic 2708 for restoring the update history shift register 1504 and the top pointer 1560 to a previous point in time based on the information stored in the restore buffer 2702 upon receiving a notification of a restore triggering event (e.g., a misprediction of a conditional branch instruction), as described above with respect to Figure 23(A)-26(B) described.
[0179] For example, the restore buffer 2702 is configured to store a copy of the update history shift register 1504 and the top pointer 1560 at a particular point in time (e.g., as described with respect to Figure 23(A)-23(C) When the restore trigger event is notified to the restore logic 2708, the restore logic 2708 may be configured to replace the update history shift register 1504 and the top pointer 1560 with the values stored in the restore buffer 2702. However, in the case where the restore buffer 2702 is configured to store a copy of the update history shift register 1504 and information indicating whether the circular buffer 1502 has been updated (e.g., such as information about Figures 24(A)-26(B) As described above, when the recovery trigger event is notified to the recovery logic 2708, the recovery logic 2708 can be configured to replace the update history shift register 1504 with the update history shift register data stored in the recovery buffer 2702 and update the value of the top pointer 1560 based on the information indicating whether the circular buffer 1502 has been updated.
[0180] A first additional example provides a hardware structure configured to obtain one or more checkpoints of a main shift register having a predetermined number of data positions, the hardware structure comprising: an extended shift register including a data position for each data position of the main shift register and an additional data position for each checkpoint, the data position of the extended shift register storing a data element most recently shifted onto the main shift register; an update history shift register including a data position for each checkpoint, each data position of the update history register storing information indicating whether the extended shift register was updated in the same clock cycle as a particular checkpoint triggering event; and checkpoint generation logic configured to obtain each checkpoint by selecting a subset of the data positions of the extended shift register based on information stored in the update history shift register.
[0181] A second additional example provides a method for obtaining one or more checkpoints of a main shift register having a predetermined number of data positions, the method comprising: storing a predetermined number of data elements most recently shifted to the main shift register at multiple data positions of an extended shift register; storing additional data elements for each checkpoint at additional data positions of the extended shift register; storing information indicating whether the extended shift register was updated in the same clock cycle as a particular checkpoint triggering event at data positions of an update history shift register; and obtaining each checkpoint by selecting a subset of the data positions of the extended shift register based on the information stored in the update history shift register.
[0182] A third additional example provides a hardware structure configured to obtain one or more checkpoints of a main shift register having a predetermined number of data positions and recoverable to multiple time points, the hardware structure comprising: a circular buffer including a data position for each data position of the main shift register, an additional data position for each checkpoint, and an additional data position for each of multiple time points, the data position of the circular buffer storing the data element most recently shifted to the main shift register; a pointer configured to identify multiple active data positions of the circular buffer, the active data positions including a subset of the data positions of the circular buffer storing the data elements most recently written to the circular buffer; an update history shift register having a data position for each checkpoint, the data position of the update history register storing information indicating whether the circular buffer was updated in the same clock cycle as a particular checkpoint triggering event; and checkpoint generation logic configured to obtain each checkpoint by selecting a subset of the active data positions based on the information stored in the update history shift register.
[0183] A fourth additional example provides a method for obtaining one or more checkpoints of a main shift register having a predetermined number of data positions and recoverable to multiple time periods, the method comprising: storing a predetermined number of data elements most recently shifted to the main shift register at multiple data positions in a circular buffer; storing additional data positions for each checkpoint at additional data positions in the circular buffer; storing additional data elements during each time period of multiple time periods at additional data positions in the circular buffer; storing an index to the circular buffer in a pointer, the index identifying an active data position of the circular buffer; storing information indicating whether the circular buffer was updated in the same clock cycle as a particular checkpoint triggering event at a data position in an update history shift register; and obtaining each checkpoint by selecting a subset of the active data positions based on the information stored in the update history shift register.
[0184] A fifth additional example provides a hardware structure configured to restore a main shift register and one or more checkpoints to a previous point in time, the hardware structure comprising: a circular buffer including multiple data locations; a pointer configured to identify a set of active data locations from the data locations of the circular buffer; an update history shift register including information indicating whether the circular buffer was updated in the same cycle as each of one or more checkpoint triggering events; checkpoint generation logic configured to generate one or more checkpoints of the main shift register from the active data locations based on the information stored in the update history shift register; a recovery buffer storing data for one or more time points including a copy of the information of the update history shift register and an indication of whether the circular buffer was updated in the corresponding cycle; and recovery logic configured to restore the update history shift register and the pointer to a specific point in time based on the data stored in the recovery buffer in response to receiving an indication that recovery is to be performed.
[0185] A sixth additional example provides a method for restoring a main shift register and one or more checkpoints to a previous point in time, the method comprising: storing a predetermined number of data elements most recently shifted to the main shift register at multiple data locations in a circular buffer; storing an index to the circular buffer in a pointer, the index identifying a set of active data locations from the multiple data locations in the circular buffer; storing information indicating whether the circular buffer was updated in the same clock cycle as the checkpoint triggering event at a data position in an update history shift register; obtaining each checkpoint by selecting a subset of active data positions based on the information stored in the update history shift register; storing data in a recovery buffer for one or more time points including a copy of the information of the update history shift register and an indication of whether the circular buffer was updated in the corresponding cycle; and in response to receiving an indication that recovery will be performed at the recovery logic, restoring the update history shift register and the pointer to a specific point in time based on the data stored in the recovery buffer.
[0186] A seventh additional example provides a hardware structure configured to obtain one or more checkpoints of a main shift register having a predetermined number of data positions and recoverable to multiple time points, the checkpoints being triggered by a trigger event, the hardware structure comprising: a circular buffer having multiple data positions for storing data elements, the multiple data positions including a data position for each data position of the main shift register, an additional data position for each checkpoint, and an additional data position for each of the multiple time points; a pointer configured to identify multiple active data positions from the multiple data positions of the circular buffer, the active data positions including a first subset of the multiple data positions of the circular buffer representing the main shift register and the additional data positions for each checkpoint; an update history shift register having a data position for each checkpoint, the data position of the update history register storing information indicating whether the circular buffer was updated in the same clock cycle as a specific checkpoint trigger event; and checkpoint generation logic configured to obtain each checkpoint by selecting a subset of the multiple active data positions based on the information stored in the update history shift register.
[0187] In a seventh additional example, the selected subset of the plurality of active data locations for a particular checkpoint can be offset from the first subset of data locations by none, one, or more than one data location.
[0188] The checkpoint generation logic may be configured to determine offsets from a first subset of data locations of a particular checkpoint by evaluating information stored in a plurality of related data locations of the update history shift register.
[0189] Each checkpoint may represent the main shift register prior to a number of checkpoint triggering events; and the number of associated data positions of the update history shift register for a particular checkpoint is equal to the number of checkpoint triggering events for that checkpoint.
[0190] The offset may be equal to a count of the associated data positions of the update history shift register that include information indicating that the circular buffer is updated.
[0191] The checkpoint generation logic may be configured to obtain a first checkpoint of the main shift register representing a period before a most recent checkpoint triggering event by: determining in the checkpoint generation logic whether a first data position of the update history shift register includes information indicating that a circular buffer has been updated; in response to determining that the first data position of the update history shift register includes information indicating that the circular buffer has not been updated, selecting in the checkpoint generation logic a first subset of data positions of the circular buffer; and in response to determining in the checkpoint generation logic that the first data position of the update history shift register includes information indicating that the circular buffer has been updated, selecting in the checkpoint generation logic a subset of multiple active data positions that are offset by one data position from the first subset of data positions.
[0192] Where the number of checkpoints is at least two, the checkpoint generation logic may be configured to obtain a second checkpoint representing the main shift register prior to the two most recent checkpoint triggering events by: counting the number of first two data positions of the update history shift register that includes information indicating that the circular buffer was updated; and selecting a subset of multiple active data positions that are offset from the first subset of data positions by the count.
[0193] A seventh additional example may also include update logic configured to: determine in the update logic whether a checkpoint trigger event occurs; in response to determining that a checkpoint trigger event has occurred, determine in the update logic whether the circular buffer has been updated in the current clock cycle; in response to determining that the circular buffer has been updated in the current clock cycle, move information indicating that the circular buffer has been updated to an update history shift register; and in response to determining that the circular buffer has not been updated in the current clock cycle, move information indicating that the circular buffer has not been updated to the update history shift register.
[0194] A seventh additional example may also include a recovery buffer having a plurality of data locations, each data location of the recovery buffer storing a copy of the information of updating the history shift register and a copy of the pointer at a particular point in time.
[0195] A seventh additional example may further include restore logic configured to restore the update history shift register and the pointer to a specific point in time using the copy stored in the restore buffer in response to receiving an indication that restoration is to be performed.
[0196] The master shift register may be a global history register, and each data element of the global history register indicates a predicted outcome of a conditional branch instruction; and the indication that recovery is to be executed is an indication that the conditional branch instruction was mispredicted.
[0197] The master shift register may be a global history register, and each data element of the global history register indicates a predicted outcome of a conditional branch instruction.
[0198] There may be a processor including the hardware structure of the seventh further example.
[0199] There may be an instruction fetch unit including the hardware structure of a seventh further example.
[0200] An eighth additional example provides a method for obtaining one or more checkpoints of a main shift register having a predetermined number of data positions and recoverable to multiple time periods, the checkpoints being triggered by a trigger event, the method comprising: storing data elements at multiple data positions in a circular buffer; the multiple data positions comprising a data position for each data position of the main shift register, an additional data position for each checkpoint, and an additional data position for each of multiple time points; storing an index to the circular buffer in a pointer, the index identifying multiple active data positions of the multiple data positions of the circular buffer, the multiple active data positions comprising a first subset of the multiple data positions of the circular buffer representing the main shift register and the additional data positions for each checkpoint; storing information indicating whether the circular buffer was updated in the same clock cycle as a particular checkpoint trigger event at a data position of an update history shift register; and obtaining each checkpoint by selecting a subset of the multiple active data positions using hardware logic based on the information stored in the update history shift register.
[0201] The selected subset of the plurality of active data locations for a particular checkpoint may be offset from the first subset of data locations by none, one, or more than one data location.
[0202] The offsets of the first subset of data locations from a particular checkpoint may be determined by hardware logic evaluating information stored in a plurality of related data locations of an update history shift register.
[0203] Each checkpoint may represent the main shift register prior to a number of checkpoint triggering events; and the number of associated data locations of the update history shift register for a particular checkpoint may be equal to the number of checkpoint triggering events for that checkpoint.
[0204] The offset may be equal to a count of the associated data positions of the update history shift register that include information indicating that the circular buffer is updated.
[0205] An eighth additional example may also include storing a copy of the information to update the history shift register and a copy of the pointer at a data location in the restore buffer at a specific point in time.
[0206] The methods described herein may be performed by a computer configured with software in a machine-readable form stored on a tangible storage medium, for example, in the form of a computer program including computer-readable program code for configuring a computer to perform the components of the method, or in the form of a computer program including computer program code modules suitable for performing all steps of any method described herein when the program is run on a computer, and wherein the computer program may be embodied on a computer-readable storage medium. Examples of tangible (or non-temporary) storage media include disks, thumb drives, memory cards, etc., and do not include propagating signals. The software may be suitable for execution on a parallel processor or a serial processor, so that the method steps may be executed in any appropriate order or simultaneously.
[0207] The terms "processor" and "computer" are used herein to refer to any device or part thereof having processing capabilities so that it can execute instructions. The term "processor" may include, for example, a central processing unit (CPU), a graphics processing unit (GPU or VPU), a physical processing unit (PPU), a radio processing unit (RPU), a digital signal processor (DSP), a general-purpose processor (such as a general-purpose GPU), a microprocessor, any processing unit designed to accelerate tasks outside the CPU, etc. Those skilled in the art will recognize that such processing capabilities are incorporated into many different devices, and therefore the term "computer" includes set-top boxes, media players, digital radios, PCs, servers, mobile phones, personal digital assistants, and many other devices.
[0208] Those skilled in the art will recognize that storage devices for storing program instructions can be distributed in the network. For example, a remote computer can store examples of processes described as software. A local or terminal computer can access the remote computer and download a portion or all of the software to run the program. Alternatively, the local computer can download several software as needed or execute some software instructions at the local terminal and some software instructions at the remote computer (or computer network). Those skilled in the art will also recognize that all or part of the software instructions can be implemented by a dedicated circuit (e.g., DSP, programmable logic array, etc.) by utilizing conventional techniques known to those skilled in the art.
[0209] The methods described herein may be performed by a computer configured with software in a machine-readable form stored on a tangible storage medium, for example, in the form of a computer program including computer-readable program code for configuring a computer to perform the components of the method, or in the form of a computer program including computer program code modules suitable for performing all steps of any method described herein when the program is run on a computer, and wherein the computer program may be embodied on a computer-readable storage medium. Examples of tangible (or non-temporary) storage media include disks, thumb drives, memory cards, etc., and do not include propagating signals. The software may be suitable for execution on a parallel processor or a serial processor, so that the method steps may be executed in any appropriate order or simultaneously.
[0210] The hardware components described herein may be produced by a non-transitory computer-readable storage medium having computer-readable program code encoded thereon.
[0211] It is also considered to include software that "describes" or defines the configuration of the hardware that implements the modules, functions, components or logic described above, such as HDL (hardware description language) software, such as used for designing integrated circuits or for configuring programmable chips to achieve the desired functions. That is, a computer-readable storage medium may be provided, which has a computer-readable program code stored thereon for generating a processing unit configured to perform any method described herein or for generating a processing unit including any device described herein. That is, a computer system may be configured to generate a representation of a digital circuit from the definition of circuit elements and data for defining the rules for combining those circuit elements, wherein a non-transitory computer-readable storage medium may have processor-executable instructions stored thereon, which when executed at such a computer system causes the computer system to generate a processing unit as described herein. For example, a non-transitory computer-readable storage medium may have computer-readable instructions stored thereon, which when processed at a computer system for generating a representation of an integrated circuit causes the computer system to generate a representation of a processor of a receiver as described in the examples herein or to generate a representation of a processor configured to perform the methods as described in the examples herein. The representation of a processor may be the processor itself or a representation of a processor (e.g., a mask) that can be used to generate a processor.
[0212] The memory storing the machine executable data used in implementing the disclosed aspects may be a non-transitory medium. The non-transitory medium may be volatile or non-volatile. Examples of volatile non-transitory media include semiconductor-based memories such as SRAM or DRAM. Examples of technologies that can be used to implement non-volatile memory include optical and magnetic memory technologies, flash memory, phase change memory, and persistent RAM.
[0213] A specific reference to "logic" refers to a structure that performs one or more functions. Examples of logic include circuits arranged to perform those functions. For example, such circuits may include transistors and / or other hardware elements available during the manufacturing process. As an example, such transistors and / or other elements may be used to form circuits or structures that implement and / or contain memories such as registers, flip-flops or latches, logic operators such as Boolean operations, mathematical operators such as adders, multipliers or shifters, and interconnect structures. Such elements may be provided as custom circuits or standard cell libraries, macros, or at other abstract levels. Such elements may be interconnected in a specific arrangement. Logic may include fixed-function circuits, and the circuits may be programmed to perform one or more functions; such programming may be provided from firmware or software updates or control mechanisms. Logic identified as performing a function may also include logic that implements constituent functions or subprocesses. In an example, hardware logic has circuits that implement fixed-function operations or multiple operations, state machines, or processes.
[0214] As will be apparent to the skilled artisan, any range or device value given herein may be expanded or altered without losing the effect sought.
[0215] It will be understood that the benefits and advantages described above may relate to one embodiment or may relate to several embodiments. The embodiments are not limited to those that solve any or all of the stated problems or those that have any or all of the stated benefits and advantages.
[0216] Any reference to items refers to one or more of those items. The term "comprising" is used herein to mean including the identified method blocks or elements, but such blocks or elements do not comprise an exclusive list, and the apparatus may include additional blocks or elements, and the method may include additional operations or elements. Furthermore, blocks, elements, and operations themselves are not implicitly closed.
[0217] The steps of the method described herein can be performed in any appropriate order or simultaneously when appropriate. The arrows between the boxes in the accompanying drawings illustrate an example order of method steps, but are not intended to exclude the execution of other orders or parallel multiple steps. In addition, each block can be deleted from any method without departing from the spirit and scope of the subject matter described herein. The aspect of any example described above can be combined with any aspect of the other examples described to form other examples without losing the effect sought. In the case where the elements of the accompanying drawings are shown as being connected by arrows, it is to be understood that these arrows illustrate only an example flow of the communication (including data and control messages) between the elements. The flow between the elements can be in either direction or in two directions.
[0218] It will be understood that the above description of the preferred embodiment is given only as an example, and that various modifications are made by those skilled in the art. Although various embodiments have been described above in a certain degree of detail or with reference to one or more individual embodiments, those skilled in the art may make many changes to the disclosed embodiments without departing from the spirit or scope of the invention.
Claims
1. A hardware structure for obtaining one or more checkpoints of a main shift register, the main shift register having a predetermined number of data positions and capable of being restored to multiple points in time, the hardware structure comprising: a circular buffer comprising a data location for each data location of the main shift register, an additional data location for each checkpoint, and an additional data location for each time point of the plurality of time points, the data locations of the circular buffer storing data elements most recently shifted onto the main shift register; a pointer configured to identify a plurality of active data locations of the circular buffer, the active data locations comprising a subset of the data locations of the circular buffer, the subset storing data elements most recently written to the circular buffer; an update history shift register having a data position for each checkpoint, the data position of the update history shift register storing information indicating whether the circular buffer is updated in the same clock cycle as a particular checkpoint triggering event; as well as Checkpoint generation logic is configured to derive each checkpoint by selecting a subset of the active data locations based on information stored in the update history shift register.
2. A hardware structure as described in claim 1, wherein the active data positions include a first subset of active data positions corresponding to the data positions of the main shift register; and a selected subset of the active data positions with respect to a particular checkpoint is not offset, is offset by one data position, or is offset by more than one data position from the first subset of active data positions.
3. The hardware structure of claim 2, wherein the checkpoint generation logic is configured to determine an offset from the first subset of active data locations for a particular checkpoint by evaluating information stored in a predetermined number of data locations of the update history shift register.
4. A hardware structure as described in claim 3, wherein each checkpoint represents the data element of the main shift register before a predetermined number of checkpoint trigger events; and the predetermined number of data positions regarding a particular checkpoint is equal to the predetermined number of checkpoint trigger events regarding the particular checkpoint.
5. The hardware structure of claim 3 or 4, wherein the offset is equal to a count of the predetermined number of data positions of the update history shift register including information indicating that the circular buffer is updated.
6. The hardware structure of claim 2, wherein the checkpoint generation logic is configured to derive a first checkpoint representing the data elements of the main shift register prior to a most recent checkpoint triggering event by: determining whether a first data position of the update history shift register includes information indicating that the circular buffer is updated; In response to determining that the first data position of the update history shift register includes information indicating that the circular buffer has not been updated, selecting the first subset of active data positions of the circular buffer; and In response to determining that the first data position of the update history shift register includes information indicating that the circular buffer is updated, a subset of the active data positions is selected that is offset from the first subset of active data positions by one data position.
7. The hardware structure of claim 2, wherein the number of checkpoints is at least two, and the checkpoint generation logic is configured to derive a second checkpoint representing the data elements of the main shift register prior to two most recent checkpoint triggering events by: counting the number of first two data positions of the update history shift register that include information indicating that the circular buffer is updated; and The subset of active data positions is selected that is offset from the first subset of active data positions by the counted data positions.
8. The hardware structure of claim 1, further comprising update logic, wherein the update logic is configured to: Determine whether a checkpoint trigger event occurs; In response to determining that a checkpoint triggering event has occurred, determining whether the circular buffer is updated in a current clock cycle; In response to determining that the circular buffer is updated in a current clock cycle, shifting information indicating that the circular buffer has been updated to the update history shift register; and In response to determining that the circular buffer has not been updated in a current clock cycle, information indicating that the circular buffer has not been updated is shifted onto the update history shift register.
9. The hardware structure of claim 1 further comprises a recovery buffer having a plurality of data locations, each data location storing a copy of the information of the update history shift register and a copy of the pointer at a specific point in time.
10. The hardware structure of claim 9, further comprising restore logic configured to restore the update history shift register and the pointer to a specific point in time using the copy stored in the restore buffer in response to receiving an indication that a restore is to be performed.
11. The hardware structure according to claim 10, wherein: The master shift register is a global history register, and each data element of the global history register indicates a predicted result of a conditional branch instruction; And the indication that recovery is to be performed is an indication that the conditional branch instruction was mispredicted.
12. The hardware structure according to claim 1, wherein: The master shift register is a global history register, and each data element of the global history register indicates a predicted outcome of a conditional branch instruction.
13. A method for deriving one or more checkpoints of a master shift register having a predetermined number of data positions and capable of being restored to a plurality of time periods, the method comprising: storing a predetermined number of data elements most recently shifted to the main shift register at a plurality of data locations in a circular buffer; storing additional data elements of each checkpoint at additional data locations of the circular buffer; storing additional data elements during each time period of the plurality of time periods at additional data locations of the circular buffer; storing an index to the circular buffer in a pointer, the index identifying an active data location of the circular buffer, the active data location comprising a subset of the data locations of the circular buffer, the subset storing data elements most recently written to the circular buffer; storing information indicating whether the circular buffer is updated in the same clock cycle as a particular checkpoint triggering event at a data position of an update history shift register, the update history shift register having a data position for each checkpoint; as well as Each checkpoint is derived by selecting a subset of the active data locations based on information stored in the update history shift register.
14. A method as claimed in claim 13, wherein the active data positions include a first subset of active data positions corresponding to data positions of the main shift register; and the selected subset of the active data positions with respect to a particular checkpoint is not offset, is offset by one data position, or is offset by more than one data position from the first subset of active data positions.
15. The method of claim 14, wherein the offset from the first subset of active data locations for a particular checkpoint is determined by evaluating information stored in a predetermined number of data locations of the update history shift register.
16. The method of claim 14 or 15, wherein obtaining a first checkpoint representing the data element before a most recent checkpoint triggering event comprises: determining whether a first data position of the update history shift register includes information indicating that the circular buffer is updated; In response to determining that the first data position of the update history shift register includes information indicating that the circular buffer has not been updated, selecting the first subset of active data positions of the circular buffer; as well as In response to determining that the first data position of the update history shift register includes information indicating that the circular buffer is updated, a subset of the active data positions is selected that is offset from the first subset of active data positions by one data position.
17. The method of claim 14, wherein the number of checkpoints is at least two, and deriving a second checkpoint representing the data element of the main shift register prior to two most recent checkpoint triggering events comprises: counting the number of first two data positions of the update history shift register that include information indicating that the circular buffer is updated; as well as The subset of active data positions is selected that is offset from the first subset of active data positions by the counted data positions.
18. The method of claim 13, further comprising, in each clock cycle: Determine whether a checkpoint trigger event occurs; In response to determining that a checkpoint triggering event has occurred, determining whether the circular buffer is updated in a current clock cycle; In response to determining that the circular buffer is updated in a current clock cycle, shifting information indicating that the circular buffer has been updated to the update history shift register; and In response to determining that the circular buffer has not been updated in a current clock cycle, information indicating that the circular buffer has not been updated is shifted onto the update history shift register.
19. The method of claim 13, further comprising storing a copy of the update history shift register information at a specific point in time and a copy of the pointer at a data location in a restore buffer.
20. The method of claim 19, further comprising restoring the update history shift register and the pointer to a specific point in time using the copy stored in the restore buffer in response to receiving an indication that restoration is to be performed.
