在當代的計算機架構中,投機執行是一種普遍而且有效的方法來處理有關於分支的問題,而那就是使用一個分支預測機制來預測出分支指令的結果。其中預測的準確度的高低將直接影響使用投機執行所能得到的效能改善程度。然而在同步多序處理架構中預測的行為可能會跟在傳統架構中有相當的不同。這裡所謂的同歩多序處理架構是一種結合了超純量以及多序處理架構兩者硬體特性的計算機架構,也因此每一個週期此架構可以執行不同線程的指令。在這個架構中,藉由動態分享硬體資來同時開發指令間與線程間的平行度。因此我們將針對同歩多序處理架構的特性與在這個架構中的分支預測作更深入的研究。 在本論文中,我們提出了一個包含了偏向分支過濾以及信任程度評估的分支預測機制用以減少線程間對於分支預測器的競爭,此外還將有條件的分支指令依照偏向以及可信任程度進行分類。接下來在同時多序處理架構中扮演一個很重要角色的提取單元會根據分支預測機制提供的資料還決定從哪些線程中提取指令。最後我們的模擬結果中顯示了,我們所提出的方法可以減少最多達到51%的錯誤路徑指令的提取,另外平均的預測準確度也提升到至少91%左右。
In the present computer architecture, speculation execution is the general and effective way to handle the branch problem that using a branch prediction mechanism predicts the result of the branch instructions. The performance improvement from the speculation execution relies on the prediction accuracy. However, it may have different prediction behavior in the simultaneous multithreading (SMT) architecture. The SMT is the computer architecture that combines hardware features of wide-issue superscalar and multithreaded architecture. Thus SMT can issue instructions from multiple threads each cycle. Both the instructions-level and thread-level parallelism are exploited by dynamically sharing the hardware resource in this architecture. The features of SMT architecture and branch prediction on the architecture are the primary focus of this study. In this thesis, we propose a branch prediction mechanism with biased branch filter and confidence estimator to reduce the competition for branch predictor between thread and classify conditional branches as biased or confident branches. And then fetch unit that plays an important role in the SMT architecture decides which threads to fetch instructions from each cycle according to the information from our proposed branch prediction mechanism. Simulation shows that our proposed scheme reduces about 51% fetched instructions from wrong path at most and raises the average prediction accuracy over 91%.