Responsive image
博碩士論文 etd-0719115-133931 詳細資訊
Title page for etd-0719115-133931
論文名稱
Title
針對特殊嵌入式系統繪圖處理器設計之著色語言編譯器暨模擬器
GPU Compilation and Simulation for a Specialized Embedded System GPU
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
68
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2015-07-01
繳交日期
Date of Submission
2015-08-20
關鍵字
Keywords
圖形處理器、OpenGLES 2.0、著色編譯器、中山大學圖形處理器計畫、LLVM
GPU, NSYSU’s GPU project, OpenGLES 2.0, LLVM, shader compiler
統計
Statistics
本論文已被瀏覽 5760 次,被下載 464
The thesis/dissertation has been browsed 5760 times, has been downloaded 464 times.
中文摘要
本篇論文介紹了一個著色語言編譯器,有針對性地在中山大學所開發的圖形處理器。中山大學圖形處理器計畫已經在晶片上開發了一個完整系統,目的是在嵌入式系統中支持OpenGLES 2.0。這個計畫涵蓋了硬體與軟體開發。因此,對於在圖形處理器上的裝置驅動程式也必須開發。在這些驅動程式裡,最大規模的是執行在圖形處理器上面的著色器程式(使用著色器語言編寫的程式)。
以前在我們實驗室的研究人員修改了一個開放原始碼編譯器(LLVM PowerPC 後端)去產生早期中山大學圖形處理器的指令。雖然早期的工作解決了重要的問題,最終也只能編譯一些簡單的著色器程式。為了解決這些問題,本人修改了編譯器裡大範圍的程式碼。本人也使用這個計畫所開發的圖形處理模擬器去驗證成果。在使用模擬器的過程中,不幸的遇到很多錯誤,因為這個模擬器從未測試過大量使用在指令集裡複雜的指令。
這篇論文的貢獻在於呈獻了一個擁有大部分功能的編譯器和一個改進後的模擬器。這個編譯器可以通過90%的Kronos Group提供的一致性測試基準。此外我們還測試了GLbenchmark 所提供的埃及基準,以及一些內部團隊所提供的基準。
Abstract
This thesis presents a compiler for a GLSL programs targeted to a novel Graphics Processor Unit (GPU)developed at NSYSU. The NSYSU GPU project has developed a full system on a chip solution aimed at supporting OpenGLES 2.0 in embedded systems. The project covers both hardware and software development. Thus, the device drivers for the GPU must also be developed. Among these driver functions, the largest is the function to compile the shader programs (which are written in GLSL) that are to be run on the GPU.
Previous researchers in our laboratory had modified an open source compiler (the LLVM PowerPC backed) to produce code for an earlier version of the NSYSU GPU. Although these previous works solved important compiler problems, they ultimately were only able to a few simple shader programs. To address these problems, I made extensive coding changes to the compiler. I also verified the compiled code using the GPU simulator developed in the project. In the process of using the simulator, I unfortunately encountered many bugs in the simulator coding, because it had never been tested on large codes using some of the more complex instructions in the instruction set.
The contribution of this present thesis, therefore is to present a largely-functional compiler, and to also present an improved simulator. The compiler is presently able to pass the 90% of the conformance test benchmark provided by the Kronos Group. In addition, we have tested the compiler on longer shader programs obtained from the Egypt benchmark provided inGLbenchmark2.5, and on some in-house benchmarks created by project team members.
目次 Table of Contents
論文審定書……………………………………………………………………….....……i
論文公開授權書…………………………………………………………………....……ii
中文摘要………………………………………………………………………........……iii
英文摘要…………………………………………………………………………….....…iv
1. Introduction…………………………....………………………………………………1
1.1 The OpenGLES 2.0 infrastructure……………………………………….……….1
1.2 An OpenGLES 2.0 infrastructure………………………………………………..3
1.3 An Overview of the GLSL Compiler Developed for This Project………………5
1.4 The SystemC simulator………………………………...……………..…………9
1.5 My contribution to the compiler………………………………...……………….9
1.6 My contribution to the SystemC simulator……………………………..………10
2. Related Work…………………………………………………………...…….………12
2.1 LLVM……………………………………………………………….…………........13
2.2 Kuo-An Huang’s job…………………………………………………………….....13
2.3 Kuo-Chuan Lu’s job….………………………………………………………........15
2.4 Sheng-Chih Tseng’s job………………………………………………………......16
3. Methodology………………………………………………....…………………..……17
3.1 Fix the IR for the virtual register…………………………………...………….....17
3.2 Support local variables…………………………………………………………....18
3.3 Fix the if-else condition problem…………………………………...…………....20
3.4 Support to access element of array………………………………………..……21
3.5 Fix the reserved variable from OpenGL normal version to OpenGLES………22
3.6 Support to access the elements of a matrix…………………………………...25
3.7 Simulator challenges and solutions………………………………………….….28
3.8 User-defined functions……………………………………………………….…...30
3.9 Conformance benchmark………………………………………….……………...34
4. Results…………………………………………………………………………….......42
4.1 Five benchmarks from API team………………………………………………...42
4.2 Result of conformance benchmark……………………………………………....49
5. Conclusions……………………………………………………………………......….55
6. Reference………………………………………………………………….................56
參考文獻 References
[1] Dan Ginsburg, Budirijanto. “OpenGLES™ 3.0 Programming Guide”, Second Edition. 2014
[2] LLVM language reference manual. http://llvm.org/docs/LangRef.html
[3] John R. Levine, Tony Mason, Doug Brown. “Lex & yacc”, 1992
[4] Kuo-chuan Lu, “Compiler Development to Support OpenGL 2.0 ES on a Novel 3D Graphics Processor”, National Sun Yat-sen University Master Thesis, 2010
[5] Kuo-An Huang, “Compiler Support for Vector Processing on OpenGL ES 2.0 Programs”, National Sun Yat-sen University Master Thesis, 2010
[6] Sheng-Chih Tseng, “Compiler/Hardware Codesign and Memory Management for a Novel 3D Graphics Processor”, National Sun Yat-sen University Master Thesis, 2010
[7] The OpenGLES 2.0 information. https://www.khronos.org/opengles/2_X/
[8] Robert J. Simpson. The OpenGL ES Shading Language, Language Version 1.00,
Document Revision 17. https://www.khronos.org/files/opengles_shading_language.pdf
[9] LLVM documentation. http://llvm.org/docs/index.html
[10] Tutorial for modern OpenGL. http://www.opengl-tutorial.org/
[11] Introduce to OpenGL transformation. http://www.songho.ca/opengl/gl_transform.html
[12] Dave Shreiner, Graham Sellers, John Kessenich, Bill Licea-Kane. “OpenGL Programming Guide: The Official Guide to Learning OpenGL", Version 4.3( 8th Edition), 2013
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:自定論文開放時間 user define
開放時間 Available:
校內 Campus: 已公開 available
校外 Off-campus: 已公開 available


紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code