2 research outputs found

    Branch Behavior Characterization for Multimedia Applications

    No full text
    現代的嵌入式處理器(embedded processor),像是Intel 所發展的XScale 處理器,採用動態分支預測器(dynamic branch redictor)來減少因分支(branch)而產生的效能降低。現存的分支預測器均是針對使用在一般用途的中央處理器(general purpose processor)上的應用程式來設計,像是gcc 及gzip。然而,對智慧型手機等嵌入式系統(embedded system)來說,多媒體及通訊應用程式(multimedia/communication application)才是兩個主要的工作量(workload)。我發現一般常使用的雙模態分支預測器(bimodal branch predictor)在多媒體與通訊應用程式上的預測正確率 (prediction accuracy),比起在一般用途的中央處理器上的應用程式的表現差很多。在這篇論文中,我詳細地分析多媒體與通訊應用程式中分支的行為特性。我發現在這些應用程式中,迴圈(loop)的重複次數非常地固定,且大部分的迴圈均屬於計數迴圈(counted loop)。我同樣發現,在連續的陣列(array)元素比對上,發生許 多分支預測錯誤。最後,我發現許多控制條件分支的變數含有可預測性的數值變化。這些結果對設計嵌入式處理器中的分支預測器來說,是很重要的發現。Modern embedded processors, like Intel's XScale, employ dynamic branch prediction to reduce performance penalty caused by branch instructions. Existing branch predictor de- signs are all based on the behavior of applications on a GPP (general purpose processor), such as gcc and gzip. However, for an embedded system, such as smart phone, multimedia and communication applications are two main workloads. I found that a commonly used bimodal branch predictor actually has lower branch prediction accuracy for multimedia/communication workloads than workloads for GPP. In this thesis, I perform detailed analysis on the branch behavior of multimedia/communication applications. I found that the iteration counts of loop branches in these applications are very regular, and most of them are counted loops. I also found that many mispredictions of if-branches occur on sequential comparisons of array elements. Finally, many of the values of control variables in if-branches have the property of data predictability. The findings of this work are important for branch predictor design for embedded processors.Abstract i 1 Introduction 1 2 Related Work 4 2.1 Branch Predictor Studied . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 MediaBench Studied . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 Simulation Methodology 11 3.1 Processor Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 Branch Predictor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.5 Return Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 MediaBench Branch Characteristics And Behavior 17 4.1 Branch Prediction Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2 Branch Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3 Branch Execution Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 Branch Taken Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5 Mispredicted MediaBench Branch Characteristics And Behavior 27 5.1 Mispredicted Branch Distribution . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 Categories of Mispredicted Backward Branches . . . . . . . . . . . . . . . . . 29 5.2.1 Classi‾cation of Iteration Behaviors . . . . . . . . . . . . . . . . . . . 30 5.2.2 Classi‾cation of Loop Types . . . . . . . . . . . . . . . . . . . . . . . 33 5.3 Categories of Mispredicted Forward Branches . . . . . . . . . . . . . . . . . 36 5.3.1 Classi‾cation of Value Sequences of branch control variables . . . . . 36 5.3.2 Classi‾cation of Sources of Branch Control Variables . . . . . . . . . 38 5.4 Categories of Mispredicted Branches in Libraries . . . . . . . . . . . . . . . . 40 6 Schemes to Improve Accuracy 43 6.1 Improving Accuracy for Counted Loop . . . . . . . . . . . . . . . . . . . . . 43 6.2 Improving Accuracy by Value Prediction . . . . . . . . . . . . . . . . . . . . 45 6.3 Improving Accuracy for Array Structure . . . . . . . . . . . . . . . . . . . . 47 7 Conclusion 4
    corecore