| 研究生: |
王證詠 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] μ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/.