簡易檢索 / 詳目顯示

研究生: 蔡宜穎
Tsai, Yi-Ying
論文名稱: 以軟體實現的動態二進制轉譯系統
A Software Design of Binary Transaltoin System
指導教授: 陳中和
CHEN, CHUNG-HO
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電機工程學系
Department of Electrical Engineering
論文出版年: 2003
畢業學年度: 91
語文別: 中文
論文頁數: 39
中文關鍵詞: 二進制轉譯機制模擬器
外文關鍵詞: binary translation, emulation, interpretor, emulator
相關次數: 點閱:94下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 日益進步的生產技術,使得計算機系統以越來越快的速度進化。但是,無論再新穎的設計、再強大的效能,新的計算機架構總是要面對一個難解的問題,也就是使用者對舊有軟體環境的依賴,如果擁用廣大使用群的軟體不能快速的被移植到新的架構上,那麼再先進的設計也可能因為市場無法擴展而凋零。二進制碼轉譯技術的出現使得這樣局面有了挽回的機會,配合適當的二進制碼轉譯機制,新的硬體設計可以執行原本為其他硬體編譯的二進制碼,因此使用者便能在不同的平台上使用相同的軟體。
    二進制碼轉譯視實現時的軟硬體需求,有很多種設計方法。本論文提出一個使用軟體設計的模型,使得傳統的CISC二進制碼能在不更動的前提下,被載入到RISC平台的記憶體中並完成執行動作。本文的設計引進了轉譯快取的概念,同時提出了一種以Basic Block為單位的轉譯執行機制。對於程式跳躍行為發生時可能產生的目的位址不明確的問題,我們引用一種類似軟體中斷的機制來解決。本論文所提出的方案經過在ARM平台上的實作證實了是可行且有效的,我們並針對程式的特殊遞迴行為對系統效能的影響提出了實驗數據和分析的結果。

    Advancing progress in microelectronic has speeded up the evolution of computer systems. However, new architectures inevitably confront a difficult situation: users are always reluctant to give up existing software and platform. If popular applications cannot be migrated to the newly designed architectures fast enough, these powerful new designs may end in poor market share and extinction. Binary translation technology provides a new solution for such a dilemma. With appropriate binary translation mechanism, newly developed architectures can adopt software compatibility to other existing platforms. Users will be able to continue installing and using their favorite applications on these newly-designed machines.
    Depending on different requirements, binary translation can be implemented with hardware and software support or purely software-based. In this thesis, a software-based design is proposed. A dynamic binary translation system is implemented to execute CISC binaries on a RISC platform without the modification of binary code. Our design introduced the concept of translation cache, and proposed a basic-block based execution model. For branch behaviors that may cause disorder of program flow, we use a mechanism similar to software interrupt of OS to solve the problem. The proposed design is implemented on an ARM platform and verified to be functional and effective. An analysis of recursive program behavior on this binary translation system is also addressed.

    Chapter 1 Introduction 1 1.1 Binary Translation: Origin and Evolution 1 1.2 Contribution of this Thesis 2 1.3 Organization of this Thesis 3 Chapter 2 Binary Translation System Overview 4 2.1 Characteristics of Source and Target Architecture 4 2.1.1 8086 Instruction Set Architecture 5 2.1.2 ARM Instruction Set Architecture 8 2.2 Challenges of Dynamic CISC-to-RISC Binary Translation 11 2.2.1 Insufficient Hardware Resource of Target Architecture 12 2.2.2 Architectural Differences 13 Chapter 3 Implementation of a Software BT system 16 3.1 Assumptions and Conditions 16 3.2 System Architecture Overview 17 3.3 BT Program Structure 20 3.3.1 Initialization 21 3.3.2 Fetch and Decode 23 3.3.3 Target Code Generation and Execution 24 3.3.4 Branch Handlers 25 3.3.5 Translation Cache Management 26 3.4 Complete Program Flow 27 Chapter 4 Simulation and Verification 31 4.1 Simulation Environment 31 4.2 Test Programs 32 4.3 Experimental Result 33 Chapter 5 Conclusion and Future Works 38 5.1 Conclusion 38 5.2 Future Work 38

    [1] E. R. Altman, D. Kaeli, and Y. Sheffer, "Welcome to the Opportunities of Binary Translation," IEEE Computer, March 2000, pp. 40-45.
    [2] Tom R. Halfhill, “Emulation: RISC’s Secret Weapon,” BYTE, April 1994, Special Report.
    [3] John L. Hennessy, and David A. Patterson, “Computer Architecture A Quantitative Approach,” 3rd edition.
    [4] James C. Dehnert, et al., “The Transmeta Code Morphing Software: Using Speculation, Recovery, and Adaptive Retranslation to Address Real-Life Challenges,” Proceedings of the First Annual IEEE/ACM International Symposium on Code Generation and Optimization, March 2003, pp.15-24.
    [5] E. Kelly, R. Cmelik, and M. Wing, “Memory controller for a microprocessor for detecting a failure of speculation on the physical nature of a component being addressed,” U.S. Patent 5832205, Nov .1998.
    [6] Kemal Ebcioglu, Erik R. Altman, Michael Gschwind, and Sumedh Sathaye, “Dynamic Binary Translation and Optimization,” IEEE Trans. on Computers 50 (6), June 2001, pp. 529-548.
    [7] Erik R. Altman, Kemal Ebcioglu, Michael Gschwind, and Sumedh W. Sathaye, "Advances and Future Challenges in Binary Translation and Optimization," Proceedings of the IEEE, Vol. 89, No. 11, Nov. 2001, pp. 1710-1722.
    [8] Bob Cmelik, David Keppel, “Shade: A Fast Instruction-Set Simulator for Execution Profiling,” ACM SIGMETRICS Conference on Measurement and Modeling of Computer Systems, 1994.
    [9] Intel Corporation, “80C186EB/80C188EB Microprocessor User’s Manual,” 1995.
    [10] Leo J. Scanlon, “8086/88 Assembly Language Programming 組合語言,” 松崗電腦圖書資料有限公司
    [11] Runnion , “Structured Programming In Assembly Language for The IBM PC,” 全華科技圖書股份有限公司.
    [12] 黃連進, “8086/8088 組合語言程式設計基礎” 第七版 上冊, 儒林圖書公司
    [13] ARM Limited, “ARM Architecture Reference Manual,” 2000
    [14] Steve Furber, “ARM System Architecture,” Addison-Wesley, 1996, pp. 37-124.
    [15] ARM Limited, “ARM Developer Suite, Assembler Guide,” 2000.

    下載圖示 校內:立即公開
    校外:2003-07-28公開
    QR CODE