| 研究生: |
洪聖洋 Hung, Sheng-Yang |
|---|---|
| 論文名稱: |
基於RISC-V架構搭配CASLAB-GPU之虛擬平台系統設計 Virtual Platform Design of Acceleration based on RISC-V Architecture with CASLab-GPU |
| 指導教授: |
陳中和
Chen, Chung-Ho |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 電腦與通信工程研究所 Institute of Computer & Communication Engineering |
| 論文出版年: | 2021 |
| 畢業學年度: | 109 |
| 語文別: | 中文 |
| 論文頁數: | 89 |
| 中文關鍵詞: | ESL設計 、通用繪圖處理器 、驅動裝置 、開源指令 、虛擬機 |
| 外文關鍵詞: | ESL Design, GPGPU, Linux Device Driver, Open Source ISA, Virtual Machine |
| 相關次數: | 點閱:237 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
隨著近年來AI人工智慧的熱潮興起,越來越多為了加速運算所用的裝置也跟著出現,例如通用型繪圖處理器(GPGPU),將GPU原本具備的平行運算能力用來達到加速運算的目的。本實驗室也自行設計一通用型繪圖處理器,目標作為終端AI加速處理器使用。傳統的晶片系統開發流程中,往往是晶片的硬體部分設計先行完成,而後再對軟體部分進行開發,最後整合在一起。分別針對軟體、硬體進行設計開發,常常在整合階段才會發現許多的問題,導致整合失敗。電子系統層級設計技術(Electronic System Level, ESL)被提出作為設計與驗證的方法。採用此設計方案,系統設計者可快速達成系統架構設計與軟硬體介面規格制定整合等目的,以加快晶片設計的開發流程。
本論文以ESL的設計方案,打造一個目標作為終端運算(Edge Computing)裝置的虛擬平台,ESL方案的設計概念是在硬體開發初期,提供能讓軟體開發者進行軟硬體模擬的平台,以加速設計時程。在本論文的ESL系統中,以QEMU虛擬機模擬開源指令架構RISC-V CPU,並搭配本實驗室以SystemC高階硬體描述語言開發的通用型繪圖處理器CASLab GPU。除此之外,本論文打造可運行在RISC-V架構的Linux作業系統,並替CASLab GPU開發Linux作業系統上的裝置驅動程式,以及新增GPU硬體的驅動模組,讓GPU能運行在此系統中做運算。本論文藉由此系統模擬作為加速運算應用的終端裝置,在CASLab GPU硬體尚未定案之前,提供開發者能及早做軟硬體共同開發及除錯。
In this thesis, a full system simulation ESL virtual platform is designed. This platform is built based on RISC-V CPU architecture, with CASLab GPU, a general purpose graphics processing unit(GPGPU). To build this platform, a virtual machine that supports RISC-V processor simulation is necessary, which is realized by QEMU, a famous open source machine emulator and virtualizer. Besides the RISC-V processor simulation, an operating system (OS) based on RISC-V is also needed. With an operating system, users don’t have to deal with issues like hardware resources management by themselves. Instead, those issues are handled by operating sytem, which makes users save plenty of time and efforts. Debian, a Linux OS distribution which supports RISC-V, is adopted in this thesis. As for CASLab GPU, it’s seen as a real hardware device in this system. Hence, a Linux device driver for CASLab GPU is implemented, with the corresponding hardware module designed in CASLab GPU. After CASLab GPU is added on this platform, software runtime, including OpenCL and HSA, is also ported to the RISC-V Linux system. With software supporting, users can run their OpenCL programs by using OpenCL and HSA APIs provided by CASLab.
[1] J. X.Chen, “The Evolution of Computing: AlphaGo,” Comput. Sci. Eng., vol. 18, no. 4, pp. 4–7, 2016.
[2] S. Cass, "Taking AI to the edge: Google's TPU now comes in a maker-friendly package," in IEEE Spectrum, vol. 56, no. 5, pp. 16-17, May 2019.
[3] RISC-V Foundation, “RISC-V: The Free and Open RISC Instruction Set Architecture”, https://riscv.org/
[4] H. Karaki and H. Akkary, "Multiple instruction sets architecture (MISA)," 2011 International Conference on Energy Aware Computing, Istanbul, 2011, pp. 1-6.
[5] A. Raveendran, V. B. Patil, D. Selvakumar and V. Desalphine, "A RISC-V instruction set processor-micro-architecture design and analysis," 2016 International Conference on VLSI Systems, Architectures, Technology and Applications (VLSI-SATA), Bangalore, 2016, pp. 1-7.
[6] Fedora WIKI, “Architectures/RISC-V”, https://fedoraproject.org/wiki/Architectures/RISC-V
[7] Debian WIKI, “RISC-V”, https://wiki.debian.org/RISC-V
[8] J. E. Smith and Ravi Nair, "The architecture of virtual machines," in Computer, vol. 38, no. 5, pp. 32-38, May 2005.
[9] Bellard, F.. “QEMU, a Fast and Portable Dynamic Translator,” USENIX Annual Technical Conference, FREENIX Track (2005).
[10] A. Gerstlauer, C. Haubelt, A. D. Pimentel, T. P. Stefanov, D. D. Gajski and J. Teich, "Electronic System-Level Synthesis Methodologies," in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 28, no. 10, pp. 1517-1530, Oct. 2009.
[11] HSA Foundation. “Heterogeneous System Architecture,” http://www.hsafoundation.com/.
[12] A.Bakhoda, G. L.Yuan, W. W. L.Fung, H.Wong, andT. M.Aamodt, “Analyzing CUDA workloads using a detailed GPU simulator,” ISPASS 2009 - Int. Symp. Perform. Anal. Syst. Softw., pp. 163–174, 2009.
[13] M.Abadi et al., “TensorFlow: A System for Large-Scale Machine Learning,” 12th USENIX Symp. Oper. Syst. Des. Implement. (OSDI ’16), pp. 265–284, 2016.
[14] Khronos OpenCL Working Group, “The OpenCL Specification,”
https://www.khronos.org/registry/OpenCL/specs/opencl-1.2.pdf
[15] Dun-Jie Chen, “LLVM-based OpenCL Compiler for CASLab-GPU,” the thesis for Master of Science. National Cheng Kung University, Tainan, Taiwan. 2019.
[16] V. Herdt, D. Große and R. Drechsler, "Fast and Accurate Performance Evaluation for RISC-V using Virtual Prototypes*," 2020 Design, Automation & Test in Europe Conference & Exhibition (DATE), Grenoble, France, 2020, pp. 618-621.
[17] “The Linux Kernel Archives” [Online]. Available: https://www.kernel.org/
[18] “Das U-Boot -- the Universal Boot Loader” [Online]. Available: https://www.denx.de/wiki/U-Boot/
[19] T. Yeh and M. Chiang, "On the interface between QEMU and SystemC for hardware modeling," 2010 International Symposium on Next Generation Electronics, Kaohsiung, 2010.
[20] M. Chiang, T. Yeh and G. Tseng, "A QEMU and SystemC-Based Cycle-Accurate ISS for Performance Estimation on SoC Development," in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 30, no. 4, pp. 593-606, April 2011.
[21] “OpenCL Offline Compiler.” [Online]. Available: https://github.com/HSAFoundation/CLOC.