Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for detecting branch prediction and processor

A branch prediction and processor technology, applied in the direction of electrical digital data processing, instruments, machine execution devices, etc., can solve the problems of expanding pipeline delay and consuming pipeline resources, and achieve the effect of reducing pipeline resource consumption and delay

Active Publication Date: 2019-07-30
CHENGDU HAIGUANG MICROELECTRONICS TECH CO LTD
View PDF5 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, branch prediction also has the possibility of misprediction. When a branch prediction error occurs, it is necessary to clear the wrongly fetched instruction caused by the branch prediction error in the pipeline to correct the branch prediction error, which consumes a lot of pipeline resources and expands the pipeline delay.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for detecting branch prediction and processor
  • Method for detecting branch prediction and processor
  • Method for detecting branch prediction and processor

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] In the branch prediction scenario based on BTB (Branch Target Buffer, branch target buffer), the embodiment of the present invention can store branch information in the cache, so as to judge whether the branch prediction result is correct by using the branch information stored in the cache during the instruction fetching phase; When judging the branch prediction error, it is possible to correct the branch prediction error in the fetching stage, thereby reducing the filling of the pipeline with instructions caused by the branch prediction error and the corresponding execution results, and reducing the resource consumption and delay of the pipeline.

[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention.

[0040] As a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a method for detecting branch prediction and a processor, and the method comprises the steps: predicting a branch prediction result according to first branch information stored in a branch prediction buffer, the branch prediction result at least comprising a current fetch address; at the stage of fetching fingers from a cache according to the current fingerfetching address, if second branch information matched with the current finger fetching address is found in a cached instruction cache block, reading the matched second branch information, wherein second branch information is stored in the cached instruction cache block; and detecting whether the branch prediction is correct or not according to the matched second branch information. The embodiment of the invention can provide possibility for correcting the branch prediction error in advance in the fetch stage when the branch prediction error is found in the fetch stage based on the detectionresult whether the branch prediction is correct or not, so that the pipeline resource consumption and delay caused by the branch prediction error can be greatly reduced.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of processors, and in particular to a method for detecting branch predictions and a processor. Background technique [0002] Modern processors generally use pipeline technology to process instructions in parallel to speed up instruction processing efficiency; when processing branch instructions, in order to avoid waiting for the execution result of the branch instruction to determine the branch direction, most modern processors use branch prediction (Branch Prediction) technology. [0003] The branch prediction can predict the branch direction and other results of the branch instruction, so as to push the processor to fetch the next instruction, avoiding the pipeline delay caused by waiting for the execution result of the branch instruction. However, branch prediction also has the possibility of misprediction. When a branch prediction error occurs, it is necessary to clear the wrongly ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/38
CPCG06F9/3804
Inventor 崔泽汉
Owner CHENGDU HAIGUANG MICROELECTRONICS TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products