| With the increase of requirement of micro-processor performance demanded by application, the micro-processor designing technology is continuously advancing and the pipeline is becoming increasingly wider and deeper. The application of the pipeline technology essentially enhances the micro-processor's performance and the pipeline technology has become one basic feature of modem micro-processor. But the uncertainty of instruction flow branch behavior affects the fully development of the pipeline's performance, which is solved with the appearance of branch prediction to great extent. Excellent branch prediction technology, which can effectively improve the efficiency of fetching instruction of micro-processor, is the basic guarantee of the improvement of micro-processor. Therefore, branch prediction technology swiftly becomes the hot spot and the difficult point of the micro-processor research field since 90s of the 20th century. Researchers have been investigating more effective structures of branch prediction in order to reduce the loss of the branch prediction failure.First of all, this paper introduces the situation of branch prediction algorithm at home and abroad. Then the research of static branch prediction, based on software or hardware, the guessing for example, is conducted and with the description of the situation of typical dynamic branch prediction technology prevailed currently, the principle and implementation method of dynamic branch prediction technology is focused on. In this paper, according to the feature of the MIPS processor, the author draws a definite picture on the principle of branch prediction and mechanism of hardware through the introduction of MIPS instructing set and its five-level pipeline structure. Based on that, the author detailedly analyzes the open source super scalar simulator named SimpleScalar, a five-level pipeline RISC architecture CPU model which can be easily extended and modified.Through the analysis of the simulator's architecture, the author deeply researched the technological problems such as the instantiation and optimization in the process of transplanting. The author successfully transplanted the MPIS architecture to the SimpleScalar, implementing the multi-level branch prediction mechanism. The author used bench mark of SPEC95 in the simulating experiments and analyzed the advantage and disadvantage of the branch prediction mechanism by analytical and statistical tool sim-profile. Pointing to the existing problems, the author improved the strategy of branch prediction, and provided the improved branch prediction strategy with high hit rate through comparison analysis.With the description of current hot point problems of research, this paper transplanted the MIPS architecture to SimpleScalar, designed and implemented a high hit rate branch prediction strategy by simulating. Through the method of software testing, the author validated the reasonability and feasibility, which pave way for a further research in this field. |