The invention relates to the technical field of
branch prediction circuits, in particular to an efficient and low-cost
branch prediction circuit implementation method and
system.
Branch target information and a physical Tag value are extracted from an SRAM (
Static Random Access Memory) with a multi-
bank structure by taking a low-order part of a PC (
Personal Computer)
program counter as an index, and the Tag bit width is reduced by adopting a Hash compression mode, so that rapid fuzzy matching prediction is realized, and the comparison
logic complexity and the storage occupation of the SRAM are remarkably reduced. A multi-
bank interleaving storage structure is utilized, physical
bank partitions of update writing and prediction reading are judged by accessing coding bits, parallel operation is achieved, the read-write conflict rate is reduced, and the continuity of instruction fetching flow is improved. Meanwhile, a renaming conflict detection and redirection mechanism is introduced in an instruction decoding stage, consistency
verification is carried out on predicted and real
branch types, and the
correctness of instruction fetching is redirected. Under the condition of not reducing the prediction performance, the circuit working frequency is obviously improved, the
chip area and
power consumption are reduced, the implementation is simple, the cost is low, and the
circuit performance can be obviously improved.