簡易檢索 / 詳目顯示

研究生: 王證詠
Wang, Cheng-Yung
論文名稱: 可組態之嵌入式軟體發展虛擬平台之設計與實作
The Design and Implementation of a Configurable Virtual Platform for Developing Embedded Software
指導教授: 陳 敬
Chen, Jing
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電腦與通信工程研究所
Institute of Computer & Communication Engineering
論文出版年: 2007
畢業學年度: 95
語文別: 中文
論文頁數: 90
中文關鍵詞: 模擬器虛擬平台嵌入式系統可組態
外文關鍵詞: virtual platform, simulation, emulation, embedded
相關次數: 點閱:85下載:5
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本論文設計並實作一個具有可組態特性之的虛擬平台,用以模擬硬體開發板並使得嵌入式軟體可在這個虛擬平台上執行。此平台主要的特色可以增加虛擬開發板上各個元件在組合上的彈性及元件本身參數化能力(個數、種類、位址、大小等等),使得處理器、記憶體及週邊設備等元件可以用彈性的方式作選擇、參數設定,並加以配置。主要的方法是透過在模擬器裡增加一個中介者的角色,用以協調各模組的溝通,以減少各個模組之間的相依性,使得模組的加入、移除更為容易,藉此達到可組態的能力。
    本虛擬平台主要包含四大部份:第一部份是提供介面組態、組態檔解析及配置等功能之前置處理程式;第二部份是對中央處理器(例如ARM7、ARM9等)、記憶體(ROM、RAM等)及週邊裝置的模擬;第三部份是圖形化使用操作介面(GUI)提供對模擬器的控制以及各種執行資訊的輸出及顯示;第四部份是為達到可組態的目標而設計的「模擬引擎」模組。模擬引擎為一中介者角色,是虛擬平台之架構的核心,用以處理中央處理器與記憶體及週邊之間的溝通。虛擬平台之執行分為三個階段:(1)配置:包含組態的選擇及解析,以解析後所得參數配置初始各個元件組合成虛擬開發板;(2)加載:載入待模擬程式碼至指定之記憶體位址中;(3)運行及除錯:虛擬開發板開始執行被模擬的程式,並可顯示程式被模擬執行的情形。虛擬平台的除錯功能提供中止、暫停、單步執行、斷點執行等控制,並可檢視處理器內部各暫存器、記憶體區塊內容、週邊裝置暫存器之內容變化。
    在本平台所實作的構架下,彈性得到了改善。經由模擬執行許多程式進行測試,包括μCLinux作業系統皆可正常地運作於其上,也證實這個架構的適用性與可行性。

    The subject of this thesis is the design and implementation of a configurable virtual platform for emulating the execution of embedded software. The primary feature of the platform is the improved flexibility in combining components and the parametric ability so that processor, memory blocks and I/O devices can be selected, set up with parameters and then configured to compose a desired virtual platform. The main approach to achieving the flexibility is adding an intermediary to coordinate the communications among the components. The inter-dependency among components is therefore reduced and a device can be added or removed more easily.
    In the virtual platform, there are four parts: (1) the configuration processor which produces the configuration file, parses configuration information and initializes the configured components; (2) the emulation of processors, memory blocks (ROM and RAM) and I/O devices; (3) the GUI which displays the status of emulation and accepts user input; (4) the emulation engine, which is the core of the virtual platform, it handles the communication among the processor, memory blocks, and I/O devices and plays the role of intermediary. The operation is divided into three stages: (1) setting up: includes configuring, parsing, and setting up the virtual platform according to the configuration parameters; (2) loading: loading a file at a specified memory address; (3) execution: emulating the execution of program and display useful information. The virtual platform offers debugging features such as stop, pause, step by step, and break point, etc. User can monitor the processor registers, the content of memories, and the registers of I/O devices.
    The virtual platform is implemented and its functionality is validated. Many programs including the μCLinux operating system can correctly execute via the emulation. The suitability and feasibility of this approach therefore are proved.

    第1章 緒 論 1 1.1 前言 1 1.2 背景知識 1 1.2.1 仿真模擬(Emulation)與模擬(Simulation)的差異 1 1.2.2 模擬目標的分類 2 1.2.3 純軟體模擬與非純軟體模擬 3 1.3 研究動機及目的 4 1.4 研究方法 5 1.5 章節規劃 5 第2章 相關研究 6 2.1 處理器模擬的種類 6 2.1.1 直譯式指令集模擬(Interpreting Emulation) 7 2.1.2 轉譯式二進制碼轉換(Binary Translation) 8 2.2 實例探討 13 2.2.1 GDB/ARMulator 13 2.2.2 SkyEye 14 2.2.3 WuKong 15 第3章 模擬平台之架構與實作 17 3.1 模擬平台架構 17 3.2 開發板模擬器整體架構 18 3.3 系統級模擬執行流程 19 3.4 處理器的模擬 20 3.5 記憶體的模擬 21 3.6 週邊裝置的模擬 25 3.6.1 週邊裝置的硬體行為特性 26 3.6.2 週邊裝置通用結構 27 3.6.3 週邊裝置之諸元 28 3.7 週邊裝置的輔助工具 33 3.8 模擬引擎(Emulation Engine) 37 3.8.1 角色及功能 37 3.8.2 模擬引擎與處理器的溝通介面 40 3.8.3 模擬引擎與記憶體的溝通介面 41 3.8.4 模擬引擎與週邊裝置的溝通介面 41 3.9 同步與時序控制機制 43 3.9.1 處理器與週邊裝置之執行比例 43 3.9.2 週邊裝置週期性工作的安排與執行 44 3.10 系統環境 45 第4章 可組態性及擴充性 46 4.1 組態介面及組態檔 46 4.2 組態解析及配置流程 49 4.3 擴充性 52 4.3.1 處理器的擴充 52 4.3.2 記憶體及週邊裝置的擴充 53 第5章 模擬平台之使用說明及測試程式 55 5.1 功能簡介及使用說明 55 5.1.1 組態設定(Configuration) 56 5.1.2 執行檔載入(File) 60 5.1.3 執行與除錯(Execute and Debug) 60 5.1.4 資訊顯示(View) 62 5.1.5 工具(Utility) 65 5.1.6 記錄(Log) 66 5.2 驗證與測試程式 68 第6章 結論與展望 85 6.1 結論 85 6.2 展望與未來工作 85 參 考 文 獻 87 自述 90

    參 考 文 獻
    [1] μCLinux org, ”μCLinux in the GDB/ARMulator”,
    http://www.uclinux.org/pub/uClinux/utilities/armulator/.
    [2] GDB, ” The GNU Project Debugger”, http://www.gnu.org/software/gdb/.
    [3] Victor Moya del Barrio, Agustin Fernandez, “Study of the techniques
    for emulation Programming”.
    [4] Marat Fayzullin, “How To Write a Computer Emulator”
    http://fms.komkon.org/EMUL8/HOWTO.html.
    [5] “Emulators-FAQ”, http://www.faqs.org/faqs/emulators-faq/.
    [6] ARM, ”ARM architecture reference manual 2nd edition“, ARM Inc.
    [7] ARM, “ARM7DMI(rev4) Technical reference manual”, ARM Inc.
    [8] SimOS, “The Complete Machine Simulator”,
    http://simos.stanford.edu/.
    [9] IBM Austin Research lab, ” SimOs-PPC”,
    http://www.cs.utexas.edu/~cart/simOS/documents.htm.
    [10] IBM tech doc, “Validation of a Full System Simulator”,
    http://www.research.ibm.com/journal/rd/502/peterson.html.
    [11] Bochs project, ”Open source IA-32 (x86) PC emulator”,
    http://bochs.sourceforge.net/.
    [12] DebianWiki, “Bochs How to”,
    http://www.debian.org.tw/index.php/Bochs.
    [13] QEMU project, ”An open source processor emulator which achieves a
    good emulation speed by using dynamic translation.”,
    http://fabrice.bellard.free.fr/qemu/.
    [14] Plex86 project, ”Offer a very lightweight Virtual Machine (VM) for
    running Linux/x86”, http://plex86.sourceforge.net/.
    [15] Virtutech simics project, ”Commercial simulator that can target
    IA32, IA64, Sparc, Alpha, ARM, PowerPC, and MIPS architectures”,
    http://www.virtutech.com/products/.
    [16] VmWare project, ”A commercial virtual PC type system for Linux and
    Windows-based PC's”, http://www.vmware.com/.
    [17] Virtual PC, ”A commercial virtual PC implementation”,
    http://www.microsoft.com/windows/virtualpc/previous/default.mspx.
    [18] MAME, ”Multiple Arcade machine emulator”, http://www.mame.net/.
    [19] SimIt-ARM, ”ARM processor emulator”, http://simit-
    arm.sourceforge.net/.
    [20] SWarm (Soft Ware ARM), ”ARM processor emulator”,
    http://www.swarm.org/wiki/Main_Page.
    [21] SimpleScalar, “A system software infrastructure used to build
    modeling applications for program performance analysis, detailed
    microarchitectural modeling, and hardware-software co-verification”,
    http://www.simplescalar.com/.
    [22] Just-in-time compilation, “A dynamic translation technique”,
    http://en.wikipedia.org/wiki/Just-in-time_compilation.
    [23] Bytecode, “A sort of intermediate code”,
    http://en.wikipedia.org/wiki/Bytecode.
    [24] Hitachi, “HD66750/1(128 x 128-dot Graphics LCD Controller/Driver
    with Four-grayscale Functions) Rev 0.7”, July 26th, 1999.
    [25] Alfred V.Aho, Ravi Sethi, Jeffrey D.Ullman, “Compilers Principles,
    Techniques, and Tools”, ISBN:0-201-10194-7, Addison-Wesley
    publishing company.
    [26] 新華電腦, “ARM內嵌式SOC原理(以ARM7DMI S3C4510B為例)”, ISBN: 957-21-
    4520-7, Jan. 2004,全華科技出版。
    [27] 新華電腦, “ARM內嵌式SOC實作(以ARM7DMI S3C4510B為例)”, ISBN:957-21-
    4524-X, Jan. 2004,全華科技出版。
    [28] 新華電腦, “Embedded uClinux在PreSOCes上實作”, ISBN:957-21-5191-6,
    Jan. 2004,全華科技出版。
    [29] SkyEye, ”Embedded system simulator project”, 北京清華大學計算機系,
    2002, http://www.huihoo.org/mirrors/skyeye/.
    [30] WuKong, ”Embedded system simulator project”, 浙江大學嵌入式
    系統軟件研發中心,杭州,2004, http://embedded.zju.edu.cn/wukong/.

    下載圖示 校內:立即公開
    校外:2007-01-31公開
    QR CODE