研究生: |
姚柏佑 Yao, Bo-You |
---|---|
論文名稱: |
商用現貨嵌入式系統模擬框架 Generic Simulation Framework for COTS Embedded System Design |
指導教授: |
周百祥
Chou, Pai H. |
口試委員: |
韓永楷
Hon, Wing-Kai 謝孫源 Hsieh, Sun-Yuan 李皇辰 Lee, Huang-Chen |
學位類別: |
碩士 Master |
系所名稱: |
電機資訊學院 - 資訊工程學系 Computer Science |
論文出版年: | 2024 |
畢業學年度: | 112 |
語文別: | 英文 |
論文頁數: | 39 |
中文關鍵詞: | 模擬 、嵌入式 、慣性感測器 、功能模擬 、功能設置 、離散事件模擬 |
外文關鍵詞: | simulation, COTS, embedded, IMU, functional simulation, discrete event simulation |
相關次數: | 點閱:42 下載:0 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
本論文提出了一個適用於Sysmaker的模擬框架,Sysmaker是一個用於設計基於商用現貨(COTS)嵌入式系統的工具。基於在Sysmaker中創建的電路板級(Board-Level)設計,我們的模擬框架整合了不同的模擬模型,其中包括指令集模擬器(ISS)、感測器和致動器等週邊裝置,以及一個環境模型。環境模型提供目標環境的數值以驅動模擬,並收集元件輸出,以便手動或自動檢查設計正確性。這項工作的挑戰主要在於如何在商用現貨元件之間平衡模擬效率和可觀察細節的程度,同時解決這些模擬模型之間關於時序和事件的不同假設,通常需要進行一定程度的逆向工程。另一個挑戰在於感測器等週邊裝置的資料來源,這些資料最終必須來自環境,並且必須在所有會被這些事件影響的裝置之間做同步。
我們提出的模擬框架允許設計人員選擇所需的抽象等級來進行模擬,目前支持邏輯層(logic-level)和資料交換層(transaction-level)的資料傳輸方式,允許靈活地模擬元件之間的資料傳輸。在構建(elaboration)階段,我們的框架提取相應的模擬模型,並生成模擬所需的程式碼。在編譯階段,這些模型被編譯並鏈結成一個可執行檔案,用於模擬目標系統及目標環境。用戶可以通過環境模型提供輸入或者連接一個物理模擬器作為目標環境的資料來源。我們的框架基於SystemC,它整合了RISC-V VP指令集架構模擬器、為MPU-9250慣性測量裝置(IMU)自行設計的模擬模型及其通訊界面、用於發出硬體命令的裝置暫存器,以及與環境的通訊界面。
最終結果證明了我們的方法在捕捉特定元件行為和實現設計空間探索(design space exploration)方面的有效性。可以捕捉到週邊裝置中的暫存區溢出(overflow)和下溢(underflow)等錯誤,這些錯誤無法使用任何除錯器或現有模擬器檢測出來。本論文為基於商用現貨嵌入式系統的設計和驗證提供了一個寶貴的工具,解決了現有方法的局限性,並為模擬複雜的嵌入式系統提供了一個靈活、高效的模擬平臺。
This thesis proposes a simulation framework for Sysmaker, a design tool for COTS-based embedded systems. Based on a board-level design created in Sysmaker, our simulation framework assembles the simulation models, which may include an instruction-set simulator (ISS), peripheral devices such as sensors and actuators, and an environment model that provides the input to drive the simulation as well as collecting the output for manual or automatic checking of correctness. What makes this work challenging is how to balance simulation efficiency with the level of observable detail among the COTS components, while resolving the diverse assumptions about timing and events of these simulation models, which often need to be reverse-engineered to some extent. Another challenge is with the data source of the peripheral devices such as sensors, which must be ultimately derived from the environment and be synchronized among all devices sensitive to those events.
Our proposed simulation framework allows designers to choose the desired level of abstraction at which to simulate, and it currently supports both logic-level and transaction-level communication, allowing for flexible and efficient simulation of the interactions between components. During the elaboration phase, our framework extracts the corresponding models and generates the necessary code for their integration. During the compilation phase, these models are translated and linked into an executable for the simulator of the target design and its environment. The user can provide input through the environment model or connect a physical world simulator as a data source for the target system.
Our prototype is based on SystemC, which integrates the RISC-V Virtual Prototype (VP) instruction set simulator, our own model of the MPU-9250 inertial measurement unit (IMU) with its bus interface, its device registers for issuing hardware commands, and its interface to the environment.
The results demonstrate the effectiveness of our approach in capturing component-specific behaviors and enabling design space exploration. It can catch bugs such as buffer overflow and underflow conditions in peripheral devices, which otherwise cannot be detected using any debuggers or existing simulators.
This thesis contributes a valuable tool for the design and validation of COTS-based embedded systems, addressing the limitations of existing approaches and providing a flexible, efficient, and accurate platform for simulating complex embedded systems.
[Cha22] Chang-Lin Shih . Tag-Based Modeling for Component Interconnection in Design Automation of Embedded Systems. Master’s thesis, NTHU, 2022.
[Doc20] Simulink Documentation. Simulation and Model-Based Design, 2020.
[EJL+03] Johan Eker, Jorn Janneck, Edward Lee, Jie Liu, Xiaojun Liu, Jozsef Ludvig, Stephen Neuendorffer, Sonia Sachs, and Yuhong Xiong. Taming Heterogeneity - The Ptolemy Approach. Proceedings of the IEEE, 91:127–144, 01 2003.
[Fri24] Fritzing. Fritzing. https://fritzing.org/, 2024. Last Checked June, 2024.
[gtk24] gtkwave. gtkwave. https://gtkwave.sourceforge.net/, 2024. Last Checked June, 2024.
[IP-23] IP-XACT Working Group. IEEE standard for IP-XACT, standard structure for packaging, integrating, and reusing IP within tool flows. IEEE Std 1685-2022 (Revision of IEEE Std 1685-2014), pages 1–750, 2023.
[MAT24a] MATLAB. MATLAB. https://www.mathworks.com/products/matlab.html, 2024. Last Checked June, 2024.
[mat24b] matplotlib. matplotlib. https://matplotlib.org/, 2024. Last Checked June, 2024.
[ME97] Sven Erik Mattsson and Hilding Elmqvist. Modelica - An International Effort to Design the Next Generation Modeling Language. IFAC Proceedings Volumes, 30(4):151–155, 1997. 7th IFAC Symposium on Computer Aided Control Systems Design (CACSD ’97), Gent, Belgium, 28-30 April.
[num24] numpy. numpy. https://numpy.org/, 2024. Last Checked June, 2024.
[OMG12] OMG. OMG Systems Modeling Language (OMG SysML), Version 1.3, 2012. Last Checked June, 2024.
[RAS23] RASPsim. RASPsim. https://github.com/aengelke/raspsim, 2023. Last Checked June, 2024.
[Ren24] Renesas. Renesas. https://www.renesas.com/us/en, 2024. Last Checked June, 2024.
[RNN11] Mario Roederer, Joshua Nozzi, and Martha Nason. SPICE: Exploration and Analysis of Post-Cytometric Complex Multivariate Datasets. Cytometry. Part A : the journal of the International Society for Analytical Cytology, 79:167–74, 02 2011.
[Rog22] James Rogers. Edsim51. http://edsim51.com/index.html, 2022. Last Checked June, 2024.
[Sys24] SystemC. SystemC. https://systemc.org, 2024. Last Checked February, 2024.
[VCD06] VCD. IEEE Standard for Verilog Hardware Description Language. IEEE Std 1364-2005 (Revision of IEEE Std 1364-2001), pages 1–590, 2006.