黃鐘揚Huang, Chung-Yang臺灣大學:電機工程學研究所李沅龍Li, Yuan-LungYuan-LungLi2010-07-012018-07-062010-07-012018-07-062009U0001-2201200914375100http://ntur.lib.ntu.edu.tw//handle/246246/188074本篇論文中,我們成功地將嵌入式作業系統uCLinux移植到本實驗室自行開發的虛擬平台QuteVP上執行。針對此作業系統我們在QuteVP上面進行了必要的虛擬模組建置,例如增強的傳輸階層模組(TLM)系統匯流排、向量中斷控制器以及計時器等;另外,在模擬效能上,我們也針對指令模擬(ISS)階層的中央處理單元(CPU),QuteCore,進行運作核心改寫、修正例外處理程序、增加內部記憶體以及指令快取記憶體以達到嵌入式作業系統運行的需求。除此之外,因應QuteVP虛擬平台,我們調整了uCLinux內部與硬體相關的控制程序,而為了達到移植的目的,我們也針對虛擬輸出的部分撰寫了驅動程式讓uCLinux系統核心可以控制系統訊息的輸出。我們的模擬結果顯示uCLinux在QuteVP上面的開機時間僅需47秒即可完成,這樣的效能對本實驗室的虛擬平台在未來進行其他嵌入式作業系統進行開發時將有極大的幫助,並且藉由uCLinux系統核心的支援,得以讓其他嵌入式應用的研究可以有更加便利的平台,在軟硬體共同驗證的課題上也可以有更加緊密的結合。In this thesis, we present our porting of an embedded operation system (OS), uCLinux, to a virtual platform developed from our lab, the Qute Virtual Platform (QuteVP). To equip the virtual platform for the OS porting, we constructed several essential virtual modules, such as enhanced TLM bus, vector interrupt controller and timer modules. In addition, we modified the processor model of QuteVP, QuteCore, to elevate the simulation performance. Our modifications include the re-modeling of the CPU operation engine, revision of the exception handling process, implementation of the internal SRAM, and creation of the instruction cache to fulfill the execution requirement of the embedded OS. On the other hand, in the software side of uClinux, we also adjusted its hardware-related controlling procedure to satisfy the architecture of QuteVP. With the implementations of the required software drivers and the virtual display module, the uCLinux kernel can output the system message in the booting process. The simulation result shows that the booting time of uCLinux takes only 47 seconds. With such performance, we can easily conduct more researches on embedded system development. Moreover, with the full Linux API supports of uCLinux, we can conduct more application researches on varied embedded systems. In short, our porting of OS on SoC virtual platform has opened the door for the exploration of the challenging hardware/software co-verification problems.Acknowledgements(致謝) i要 iibstract iiiable of Contents vist of Figures viiiist of Tables xhapter 1 Introduction 1ection 1.1 HW/SW Co-Design in ESL Design Flow 1ection 1.2 Our Previous Work on SoC Virtual Platform 3ection 1.3 Our Work for uCLinux Support on QuteVP 3ection 1.4 Organization of the Thesis 4hapter 2 System Overview 5ection 2.1 Previous Architecture of QuteVP 5ection 2.2 Current Architecture of QuteVP 6ection 2.3 QuteVP Operation Flow 7hapter 3 Hardware Modeling 10ection 3.1 Enhancements on QuteCore 10ection 3.1.1 Efficient Instruction Execution by New Operation Engine 11ection 3.1.2 Precise Exception Handling Implementation 13ection 3.1.3 Instruction Fetch Cache Implementation 14ection 3.1.4 Fast Access in High Memory for ISR by Internal SRAM Implementation 16ection 3.2 Enhancements on Bus Communication 16ection 3.2.1 Transaction Level Modeling (TLM) 17ection 3.2.2 Enhancement of Communication Flow 18ection 3.3 Implementation of the Interrupt Controller 19ection 3.3.1 Implementation Method 19ection 3.3.2 Software Testing and Debugging 21ection 3.4 Implementation of the Timer Module 23ection 3.4.1 Implementation Method 23ection 3.4.2 Software Testing and Debugging 24ection 3.5 Implementation of the Virtual Display Device 26ection 3.5.1 Implementation Method 26ection 3.5.2 Software Testing and Debugging 27ection 3.6 Implementation of the Virtual Input Device 28ection 3.6.1 Implementation Method 28ection 3.6.2 Software Testing and Debugging 29ection 3.7 Re-Configuration of System Memory Map 29hapter 4 Software Integration 31ection 4.1 Choice of Operation Systems 31ection 4.2 Cross-compilation Tool Chain 32ection 4.3 Building uCLinux Kernel 34ection 4.4 Execution Method for Simulation 37ection 4.4.1 Kernel Image Extraction 38ection 4.4.2 Image Loading before Simulation 38hapter 5 uCLinux Porting on QuteVP 41ection 5.1 Hardware part—QuteVP 41ection 5.1.1 Program Counter Auditing 41ection 5.1.2 Invalid Address Access Prevention 43ection 5.2Software Part—uCLinux Kernel Image 44ection 5.2.1 Entry Stage 44ection 5.2.2 Kernel Start Stage 45ection 5.2.3 User Land Stage 47ection 5.2.4 Output Method Implementation 49ection 5.2.5 Kernel Source Modifications for QuteVP 52hapter 6 Experimental Results 58ection 6.1 Simulation Performance 58ection 6.2 Cache Performance Tuning 60ection 6.3 Adding the Test Applications 61hapter 7 Conclusion and Future Works 62eference & Bibliography 64ppendices 66ppendix I uCLinux Vendor Configuration 66ppendix II uCLinux Kernel Configuration 68ppendix III uCLinux User Land Configuration 73ppendix IV User Manual of QuteVP 82ppendix V uCLinux Kernel Build Method 83655266 bytesapplication/pdfen-USQuteVPuCLinuxSystemCESLTLMARM基於SoC軟硬體共同設計與驗證之虛擬平台上的Linux作業系統支援實作Linux OS Support on Virtual Platform for SoC HW/SW Co-Design and Verificationthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/188074/1/ntu-98-P95921007-1.pdf