簡易檢索 / 詳目顯示

研究生: 許鈺章
Hsu, Yu-Chang
論文名稱: 結合SystemC TLM與使用者模式QEMU進行快速協同模擬的異質整合架構
A Heterogeneous Framework for Fast Co-Simulation Using SystemC TLM and User-Mode QEMU
指導教授: 郭致宏
Kuo, Chih-Hung
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電機工程學系
Department of Electrical Engineering
論文出版年: 2009
畢業學年度: 97
語文別: 英文
論文頁數: 75
中文關鍵詞: 快速共同模擬
外文關鍵詞: TLM, SystemC, Co-Simulation, QEMU
相關次數: 點閱:61下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本論文主要是實作一個可以簡單被實現的模擬平台來達到SystemC模擬器與現成的CPU模組之間進行快速共同模擬的需求,其中在SystemC模擬器與CPU模擬器之間的資料傳遞問題,我們採用了Berkeley Socket的技術來實現。為了能夠對整個平台進行快速的模擬,在CPU的部份我們採用了使用者模式的QEMU來負責軟體部份的執行。在我們所提出的共同模擬系統環境裡,有三個主要的部份必須要被實現出來;其一,由於我們希望QEMU能夠跟SystemC之間做資料的互相傳送,必須在QEMU內部利用Socket的API來實現一套Transaction的轉換機制;其次,對於使用SystemC為開發語言所實現的模組,我們也要為它們設計一對Master與Slave的Wrapper來建立起SystemC Transaction與Socket Transaction之間界面轉換的橋樑;最後,針對SoC的系統設計而言,為了實現讓每個模組(模擬器)之間的資料傳送有固定先後順序與管理模式,在我們所提出的虛擬平台裡還包含了一個結合SystemC與Socket API所實作的系統匯流排(System Bus)。在實驗的部份,我們採用了過去由成功大學電機所CAD組利用SystemC語言所開發的H.264編碼器為例子,將這個編碼器的界面包裝成我們的平台可以使用的模型,進而驗證一套完整的H.264編碼系統的功能,其中編碼器的編碼流程是由QEMU來控制,且彼此之間資料的傳送也將是由Socket的界面來完成。

    In this thesis, we present an easy-to-use SystemC simulator framework in order to implement a co-simulation platform for an emulated CPU. The proposed method integrates SystemC models and the emulated CPU using Berkeley sockets technology. For rapid co-simulation, we select the user-mode QEMU to be the CPU emulator in the proposed framework. The system has three major parts: one for adding the socket API into QEMU in order to let the CPU emulator transmit data to the SystemC simulator, one for developing the master and slave wrappers to emulate a bridge between the socket’s transaction and the TLM SystemC models, and one for designing a system bus model to connect and arbitrate all requests and data sent from any simulator or emulator. We verify the proposed platform using an advanced H.264 encoder SystemC model from NCKU. The model is controlled by a QEMU emulated ARM CPU, and the data transaction was performed using BSD sockets.

    口試合格證明 I 中文摘要 II ABSTRACT III 致謝 IV LIST OF TABLES VIII LIST OF FIGURES IX LIST OF ABBREVIATIONS X Chapter 1 Introduction 1 1.1 Motivation 1 1.2 Virtual Platform Design Approach 2 1.3 Fast CPU Emulator 2 1.4 Communication between Various Simulators 3 1.5 Contribution 4 1.6 Organization of Thesis 6 Chapter 2 Research Background 7 2.1 System Level Design Overview 7 2.1.1 System Architecture Concept 8 2.1.2 SystemC Description Language 9 2.2 SystemC Communication Modeling 9 2.2.1 Transaction Level Modeling 10 2.2.1.1 Use Cases 10 2.2.1.2 Abstraction Levels 12 2.2.2 Generic Communication Modeling 14 2.2.2.1 Architect’s View Framework (AVF) 15 2.2.3 Generic TLM Simulation Modules 16 2.2.3.1 PV Models 16 2.2.3.2 The simple_Bus Library 17 2.2.3.3 OCP TL-2 and TL-3 Models 18 2.3 Fast CPU Emulator - QEMU 18 2.3.1 Features 19 2.3.2 Emulation Mode 20 2.3.2.1 User Mode Emulation 20 2.3.2.2 Complete Computer System Mode Emulation 21 2.4 Interporcess Communication 22 2.4.1 Berkeley Socket Interface 23 2.4.2 Socket API Functions 23 2.4.3 Blocking vs. Non-blocking Mode 24 2.4.4 Cleaning Up 25 2.4.5 Client-Server Example using TCP 25 2.5 QEMU-SystemC 28 2.5.1 Co-Simulation Framework 29 2.5.2 Start of Co-Simulation 30 2.5.3 Simulation Results and Performance 34 Chapter 3 Integration of User-Mode QEMU and SystemC TLM for HW/SW Co-Simulation 35 3.1 Overview 35 3.2 Modification of QEMU ARM Emulator 36 3.2.1 Memory Mapping Technology 36 3.2.2 Original Memory Access Operation 36 3.2.3 Modified Memory Access Operation 37 3.3 Co-Simulation Architecture 42 3.3.1 System Bus Model 43 3.3.2 Master and Slave Wrappers 48 3.4 Integrating Socket API for High-Level Transaction 51 3.5 Simulation Framework Refinement 55 3.5.1 Scheduled Modeling Issues 55 3.5.2 Modifications of Wrappers 58 Chapter 4 Experimental Results 62 4.1 Bus Exploration Example 62 4.2 H.264 Encoder System 64 4.3 Case Study – H.264 Rate Control 68 Chapter 5 Conclusion and Future Work 72 Reference 74

    [1]The Open SystemC Initiative (OSCI), "The SystemC TLM 2.0 documentation," May 2007, Available: http://www.systemc.org/home.
    [2]M. Caldari, M. Conti, M. Coppola, S. Curaba, L. Pieralisi, and C. Turchetti, "Transaction-level models for AMBA bus architecture using SystemC 2.0," in Proc. Design, Automation and Test in Europe Conference and Exhibition, 2003, 2003, pp. 26-31.
    [3]QEMU-open source processor emulator. 2005. QEMU webpage, Available: http://www.nongnu.org/qemu/.
    [4]M. Monton, A. Portero, M. Moreno, B. Martinez, and J. Carrabina, "Mixed SW/SystemC SoC Emulation Framework," in Industrial Electronics, 2007. ISIE 2007. IEEE International Symposium on, 2007, pp. 2338-2341.
    [5]L. Formaggio, F. Fummi, and G. Pravadelli, "A timing-accurate HW/SW cosimulation of an ISS with SystemC," in Proc. Hardware/Software Codesign and System Synthesis, 2004. CODES + ISSS 2004. International Conference on, 2004, pp. 152-157.
    [6]L. Benini, D. Bertozzi, D. Bruni, N. Drago, F. Fummi, and M. Poncino, "SystemC cosimulation and emulation of multiprocessor SoC designs," in Computer. vol. 36, 2003, pp. 53-59.
    [7]Y. T. Hsu, Y. J. Wen, and S. D. Wang, "Embedded Hardware/Software Design and Cosimulation using User Mode Linux and SystemC," in Proc. Parallel Processing Workshops, 2007. ICPPW 2007. International Conference on, 2007, pp. 17-17.
    [8]D. Bausum, "Book Review: UNIX Network Programming, Volume 1, Second Edition," Linux J., vol. 1998, p. 14, 1998.
    [9]OCP-IP, "OCP 2.2 Specification," February 2007, Available: http://www.ocpip.org/home.
    [10]GTK+ toolkit, 2007. Available: http://www.gtk.org/
    [11]ARM - The Architecture for the Digital World, 2004, ARM webpage, Available: http://www.arm.com/
    [12]CoWare: Electronic System Virtualization Solutions, 2005, Available: http://www.coware.com/
    [13]M. Bauer, “VMware workstation 5.5 for Linux hosts,” Linux J., vol. 2006, no. 145, pp. 17, 2006.
    [14]Windows: Virtual PC Home Page. 2003, Available: http://www.microsoft.com/windows/virtual-pc/.
    [15]MojoPac, 2008, Available: http://www.mojopac.com/.
    [16]G. Kane and J. Heinrich, MIPS RISC Architecture, Prentice Hall, 1992
    [17]J. D. Impson, “VNC, transparently,” Linux J., vol. 2002, no. 93, pp. 3, 2002.
    [18]B. Amstadt, and M. K. Johnson, “Wine,” Linux J., vol. 1994, no. 4es, pp. 3, 1994.
    [19]D. Oisboid, “Novice to Novice: DOS Emulation with dosemu,” Linux J., vol. 1995, no. 13es, pp. 12, 1995.
    [20]Solaris Operating System, 1994, Available: http://www.sun.com/software/solaris/.
    [21]Berkeley Software Distribution (BSD), 2006. Available: http://www.bsd.org/.
    [22]PCI-SIG – Home, 2009, Available: http://www.pcisig.com/home.
    [23]I. Richardson, “H.264 and MPEG-4 Video Compression,” John Wiley & Sons Ltd, 2003.
    [24]A. Wieferink, H. Meyr, and R. Leupers, Retargetable Processor System Integration into Multi-Processor System-on-Chip Platforms: Springer Publishing Company, Incorporated, 2008.
    [25]B. Dobing, and J. Parsons, "The role of use cases in the UML: a review and research agenda," Advanced topics in database research vol. 1, pp. 367-382: IGI Publishing, 2002.
    [26]W. W. Gay, Linux Socket Programming: By Example: Que Corp., 2000.

    下載圖示 校內:2011-08-11公開
    校外:2011-08-11公開
    QR CODE