Method and apparatus for replacing data in an operand latch...

Electrical computers and digital processing systems: processing – Dynamic instruction dependency checking – monitoring or... – Commitment control or register bypass

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C712S219000

Reexamination Certificate

active

06401195

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates to computer systems and more particularly to stalling a processor pipeline upon register hazard detection.
BACKGROUND OF THE INVENTION
Advanced processors employ pipelining techniques to execute instructions at very high speeds. On such processors, the overall machine is organized as multiple pipelines consisting of several cascaded stages of hardware. Instruction processing is divided into a sequence of operations, and each operation is performed by hardware in a corresponding pipeline stage (“pipe stage” or “stage”). Independent operations from several instructions may be processed simultaneously by different pipe stages, increasing the instruction throughput of the processor.
One challenge faced by processor designers is what to do when the execution of one instruction in a pipeline depends on the execution of one or more previously issued instructions. If data from a first instruction in a pipeline is needed by a second instruction in the pipeline, then the unavailability of the data from the first instruction causes a delay in the execution of the second instruction. In such a case, a portion of the pipeline may need to be halted, or stalled, until the first instruction completes execution so the resulting data can be used by the second instruction. This condition is called a hazard.
For example, consider the following set of instructions:
XOR R
1
, R
2
→R
3
LOAD (R
4
)→R
3
ADD R
3
, R
5
→R
6
Proper calculation of result R
6
requires that the operands of the ADD instruction, R
3
and R
5
, be correct. For most processor architectures, this would require that R
3
contain data resulting from execution of the LOAD instruction rather than execution of the XOR instruction. Unfortunately, the LOAD instruction may take longer to execute than the ADD instruction. Consequently, execution of the ADD instruction must be delayed by stalling the pipeline until the LOAD instruction is completed. This is known as a read after write (RAW) hazard because the ADD instruction must read register R
3
after the LOAD instruction writes to register R
3
.
Hazard detection may be performed in parallel with the reading of the registers while an instruction is in the register read stage (also called the operand read stage) of the pipeline. Unfortunately, in high frequency processors, the hazard may not be detected until after the instruction has completed the register read stage and source data has been presented to the execute stage. For example, referring to the set of instructions presented above, upon detecting a hazard on register R
3
, the pipeline may be stalled after the ADD instruction has already been presented to the execute stage of the pipeline. Consequently, erroneous data is calculated for the ADD instruction using the result of the XOR instruction as the operand value for R
3
rather than the result of the LOAD instruction. If this happens, the pipeline is typically flushed after the LOAD instruction is completed, and the instructions are re-executed beginning with the ADD instruction.
SUMMARY OF THE INVENTION
For one embodiment of the present invention, a hazard on a register is detected based on the register ID from a latch of a first stage of a processor pipeline. The pipeline is stalled after a stale value of the register is stored in a latch of a later stage of the pipeline. The stale value in the latch is then replaced with a fresh value while the pipeline is stalled.
Other features and advantages of the present invention will be apparent from the accompanying figures and the detailed description that follows.


REFERENCES:
patent: 5006980 (1991-04-01), Sanders et al.
patent: 5778208 (1998-07-01), Eickemeyer et al.
patent: 5778248 (1998-07-01), Leung
patent: 5996065 (1999-11-01), Makineni et al.
patent: 6038658 (2000-03-01), Chow

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for replacing data in an operand latch... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and apparatus for replacing data in an operand latch..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for replacing data in an operand latch... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2982389

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.