The invention discloses a prediction and instruction fetching
system based on a
recovery path. The
system comprises a main preceding-stage
assembly line, a
recovery path preceding-stage
assembly line, a rear-end
assembly line and a multi-path
branch system, the invention also discloses a prediction and instruction fetching method based on the
recovery path, and the method comprises the following steps: S1, the main preceding stage pipeline carries out instruction fetching and decoding according to the
branch prediction path, and the recovery path preceding stage pipeline carries out instruction fetching and decoding according to the reverse direction of the
branch prediction path; s2, if the result of the branch prediction path is correct, data in the cache of the recovery path is emptied, and branch information in the multipath branch
reservation station is removed; and S3, if the result of the branch prediction path is wrong, clearing the
instruction stream in the main preceding stage
assembly line and the branch information in the multipath branch
reservation station. According to the method, by widening the predicted instruction fetching width and predicting the main path and the recovery path of instruction fetching in parallel, when the main path is predicted to be wrong, the recovery path is used for filling a rear-end
assembly line, so that the penalty is reduced.