簡易檢索 / 詳目顯示

研究生: 吳鳴真
Ng, Meng-Chan
論文名稱: Novella-NPU之跨抽象層級除錯與驗證機制設計與實作
Design of a Cross-Abstraction-Level Debugging and Verification Framework for Novella-NPU
指導教授: 陳中和
Chen, Chung-Ho
學位類別: 碩士
Master
系所名稱: 智慧半導體及永續製造學院 - 晶片設計學位學程
Program on Integrated Circuit Design
論文出版年: 2026
畢業學年度: 114
語文別: 中文
論文頁數: 86
中文關鍵詞: NPU 、除錯器 、ISS 、ESL設計 、Verilator
外文關鍵詞: NPU, debugger, ISS, ESL, Verilator
相關次數: 點閱:51  下載:3 
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 近年來人工智慧應用快速發展,許多研究開始研發針對AI模型運算的加速器,本實驗室開發之Novella-NPU[1][2][3][4]為支援通用卷積與矩陣運算的人工智慧加速器,其開發流程包含AI compiler、Instruction Set Simulator (ISS)、Electronic System Level (ESL) simulation與Register Transfer Level (RTL)等不同抽象層級。在開發期間,當模擬結果出現錯誤時,開發人員需要查看大量log、dump file與波形圖進行人工比對,難以快速定位錯誤來源。為降低跨抽象層級驗證的除錯成本,本研究以Novella-NPU為對象,設計並實作ISS debugger、ESL debugger,以及基於ISS golden reference的除錯機制。
    本研究的debugger以Macro-Op作為主要除錯單位,於ISS 與ESL simulator中提供一致的command interface,支援以多種breakpoint控制模擬進度,並提供多個指令用於觀察或修改NPU內部狀態。ISS debugger可支援Novella-NPU現有的兩個版本架構,並於各Macro-Op完成後產生供後續跨層級狀態比對使用的golden reference。ESL debugger除了支援以ESL實作的NPU model外,亦可使用Verilator 將RTL NPU轉換為SystemC模組並整合至ESL,使RTL NPU亦可使用ESL debugger進行除錯。
    經過功能驗證結果顯示,先以ISS debugger產生golden reference,再以ESL debugger自動於各Macro-Op完成後與golden reference進行比對,可以快速定位至第一個發生錯誤的Macro-Op。而在debugger對模擬時間造成的額外耗時方面,以未啟用debugger的模擬時間為基準,在只啟用debugger而不執行額外除錯指令時,ISS與ESL的模擬時間僅增加至1.01倍,而ESL模擬若要輸出完整NPU內部資訊檔案,模擬時間會大幅增加至47倍,顯示本研究的debugger透過避免開發人員在多次除錯中反覆輸出完整內部資料檔案,以此降低整體除錯所需的時間成本。

    Recent advances in artificial intelligence have driven the development of specialized accelerators for AI workloads. Novella-NPU, developed by our laboratory, supports convolution and matrix operations, and its development flow spans multiple abstraction levels, including the AI compiler, Instruction Set Simulator (ISS), Electronic System Level (ESL) simulation, and Register Transfer Level (RTL). When simulation errors occur, developers often need to manually inspect and compare large amounts of logs, dump files, and waveforms across different abstraction levels. To reduce this debugging effort, this thesis designs and implements an ISS debugger, an ESL debugger, and a verification mechanism based on ISS-generated golden references.
    The proposed debugger uses Macro-Op as the primary debugging unit and provides a consistent command interface for ISS and ESL simulators. It supports multiple types of breakpoints, execution control, and commands for inspecting or modifying internal NPU states. The ISS debugger supports both existing generations of Novella-NPU and automatically generates golden references after each Macro-Op. The ESL debugger supports both ESL-implemented NPU models and RTL NPU models converted into SystemC modules using Verilator and integrated into the existing ESL platform.
    Functional verification shows that the ESL debugger can automatically compare internal states with the corresponding ISS golden reference after each Macro-Op and quickly identify the first Macro-Op at which a mismatch occurs. When the debugger is enabled without additional debugging commands, the execution times of both ISS and ESL simulations increase to only approximately 1.01 times the baseline. In contrast, generating complete internal-state dump files during ESL simulation increases execution time to approximately 47 times the baseline. These results demonstrate that the proposed framework can reduce debugging effort by enabling targeted state inspection and avoiding repeated generation and manual comparison of complete dump files.

    摘要 i 英文延伸摘要 ii 誌謝 xv 目錄 xvi 表目錄 xviii 圖目錄 xix 第一章 緒論 1 1.1 論文動機 1 1.2 論文貢獻 2 1.3 論文架構 2 第二章 背景知識與相關研究 3 2.1 Novella-NPU Architecture 3 2.1.1 Andersen 3 2.1.2 Brown 6 2.2 Novella Compiler 8 2.3 Novella-NPU Simulation Environment 9 2.3.1 ISS Simulator 10 2.3.2 ESL Simulator 10 2.3.3 ISS, ESL and RTL Roles 13 2.4 Verilator 14 第三章 設計與實作方法 16 3.1 系統架構與驗證流程 16 3.2 Debugger Command Design 18 3.2.1 Breakpoint Command 19 3.2.2 Execution Control Command 20 3.2.3 Inspection Command 22 3.2.4 Modification Command 23 3.2.5 ISS/ESL Command Support 25 3.3 Debugger Implementation 26 3.3.1 ISS Debugger 26 3.3.2 ESL Debugger 29 3.4 Integration of Verilator RTL NPU into ESL Platform 32 3.5 Golden File Format 36 3.6 Extensibility for Future NPU Generations 39 第四章 實驗結果與分析 42 4.1 Experiment Environment 42 4.2 Debugger Functional Test 44 4.3 Golden-based Regression Test 50 4.4 Simulation Overhead 52 4.5 Case Study 56 第五章 結論及未來展望 60 5.1 結論 60 5.2 未來展望 61 參考文獻 62

    [1] W.-L. Lo. Compiler-Hardware Co-optimization and MSFP-Supported Compute Core Design for Novella-NPU, NCKU Master Thesis, 2025.
    [2] P.-C. Chang. General Sparse Model Support in Novella-NPU: Co-Design of Software Compression and Hardware Decompression, NCKU Master Thesis, 2025
    [3] C.-H. Wang. Custom Compiler Instruction Generation and Scheduling Optimization for Novella-NPU with N:M Sparse Matrix Operations Support, NCKU Master Thesis, 2025
    [4] E.-Y. Pong. Non-linear Function Approximations and their NPU Operator Legalization in TVM Compiler, NCKU Master Thesis, 2025
    [5] Y.-T. Chu. Design of debugger framework for CASLab-GPU platform, NCKU Master Thesis, 2021.
    [6] G. Berlstein, R. Nigam, C. Gyurgyik, and A. Sampson. Stepwise debugging for hardware accelerators, in Proc. 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2023.
    [7] Daniel Große, Markus Groß, Ulrich Kühne, and Rolf Drechsler. Simulation-based Equivalence Checking between SystemC Models at Different Levels of Abstraction, Proc. 21st Edition of the Great Lakes Symposium on Great Lakes Symposium on VLSI (GLSVLSI), 2011.
    [8] Marcela Zachariasova, Lubos Moravec, John Stickley, Hans van der Schoot, and Shakeel Jeeawoody. UVM-based Verification of a RISC-V Processor Core Using a Golden Predictor Model and a Configuration Layer, in DVCon United States, 2018.
    [9] V. Herdt, D. Große, E. Jentzsch, and R. Drechsler. Efficient cross-level testing for processor verification: A RISC-V case-study, in 2020 Forum for Specification and Design Languages (FDL), 2020.
    [10] T. Chen, T. Moreau, Z. Jiang, L. Zheng, E. Yan, M. Cowan, H. Shen, L. Wang, Y. Hu, L. Ceze, C. Guestrin, and A. Krishnamurthy, TVM: An automated end-to-end optimizing compiler for deep learning, in Proc. 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18), 2018.
    [11] John Aynsley, OSCI TLM-2.0 Language Reference Manual, Open SystemC Initiative, 2009. [Online]. Available: https://www.accellera.org/images/downloads/standards/systemc/TLM_2_0_LRM.pdf.
    [12] IEEE Computer Society, IEEE Standard for Standard SystemC Language Reference Manual, IEEE Std. 1666-2023, New York, NY, USA: IEEE, 2023.
    [13] G. López-Paradís, A. Armejach, and M. Moretó. gem5 + rtl: A framework to enable RTL models inside a full-system simulator, in Proc. 50th International Conference on Parallel Processing (ICPP), 2021.
    [14] Verilator Project, Verilator User’s Guide, Verilator Documentation, [Online]. Available: https://verilator.org/guide/latest/
    [15] J. Sanwald, A. Mauderer, M. Badawi, J. Castillo, JH. Oetjens, A. Wieferink, M. Keeley and T. Kogel. Efficient Workflow using Verilator for Processor Benchmarking in SystemC-based Automotive SoC Platforms, in DVCon Europe, 2024.

    下載圖示
    校外:立即公開
    QR CODE