帳號:guest(18.223.195.115)          離開系統
字體大小: 字級放大   字級縮小   預設字形  

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):程政罡
作者(外文):Cheng, Cheng Gang
論文名稱(中文):LLVM Compiler Infrastructure Support of an IoT Microprocessor
論文名稱(外文):LLVM編譯器架構支援物聯網微處理器
指導教授(中文):李政崑
指導教授(外文):Lee, Jenq Kuen
口試委員(中文):黃慶育
蘇泓萌
學位類別:碩士
校院名稱:國立清華大學
系所名稱:資訊系統與應用研究所
學號:103065504
出版年(民國):105
畢業學年度:104
語文別:英文
論文頁數:26
中文關鍵詞:物聯網編譯器微處理器
外文關鍵詞:LLVMIoTcompilermicroprocessor
相關次數:
  • 推薦推薦:0
  • 點閱點閱:275
  • 評分評分:*****
  • 下載下載:0
  • 收藏收藏:0
物聯網是一個允許讓物品彼此透過網路互聯,而不假借人為協助的網路。物聯網裡頭的裝置至少擁有一個微處理器或是微控制器,此篇論文中使用到的微處理器為晶心科技所開發的AndeStar,其包含了以下特性:

可混合使用的32位元及16位元精簡指令集
32或16個32位元的暫存器
三個版本的基礎指令集,v1, v2以及v3

為了能夠在AndeStar上執行C程式,編譯器扮演著不可或缺的角色。我們選擇使用LLVM編譯器來實作一個新的後端,產生出需要的程式。
實作的過程中會碰到一些問題。首先是部份在LLVM SelectionDAG裡頭的指令沒辦法直接對應到AndeStar指令,因此只能使用既有的指令來達到相同的功能。再來,如果程式含有呼叫函式,則我們必須對LLVM SelectionDAG做合適的降階。最後,在某些特定用途下,我們必須在指令選擇之後,藉由呼叫LLVM應用程式介面來插入指令。
為了確保每個C程式都能夠正確執行,編譯器需要盡可能的完善。我們透過效評程式EEMBC以及DSPStone來證明編譯器的可靠程度。,
IoT is the abbreviation of Internet of Things. It allows objects to communicate with each other through the Internet, without the interference of human. Every IoT device contains at least one microprocessor or microcontroller. In our thesis, we choose AndeStar as our target microprocessor architecture. It contains the following features:

1. RISC-style 32-bit and 16-bit register-based mixable instructions.
2. 32 or 16 32-bit general purpose registers.
3. Three versions of the baseline instruction set v1, v2, and v3.

To execute a C program on AndeStar architecture, a compiler plays an important role. We use Low Level Virtual Machine (LLVM) and implement a new back-end to generate code.

During the process of implementation, there are some problems to deal with. First, some instructions in LLVM SelectionDAG can not be mapped directly to the AndeStar instructions. Therefore, we need to use existing AndeStar instructions to achieve the same functionality. Second, if the program contains function calls, we have to lower LLVM SelectionDAG correctly. Third, some instructions for the specific purposes are inserted by calling LLVM API after instruction selection, such as prologue and epilogue.

In order to make sure that every C program can be executed correctly without any error, the compiler should be as strong as possible. We run several test cases to prove the reliability of the compiler. There are many benchmarks for compiler testing. EEMBC and DSPStone are selected as our testing benchmark.
1 Introduction 1
2 Background 5
2.1 Compiler Overview 5
2.2 LLVM Overview 6
3 Design Issues 11
3.1 How to Implement a New Back-end for AndeStar 11
3.2 Target-dependent Issues 15
3.2.1 Instruction Matching 15
3.2.2 Lower SelectionDAG 17
3.2.3 Insert Instructions 19
4 Verification Results 20
5 Conclusion 23
5.1 Summary 23
5.2 Future Work 24
[1] ABI Research, "More than 30 billion devices will be
wirelessly connected to the Internet of Things in 2020"
https://www.abiresearch.com/press/more-than-30-billion-devices-will-wirelessly-conne/, 2013

[2] Gartner, Inc., "Gartner, Inc. forecasts that 6.4 billion connected things will be in use worldwide in 2016, up 30 percent from 2015, and will reach to 20.8 billion by 2020" http://www.gartner.com/newsroom/id/3165317, 2013

[3] Pew Research Center, "Main report: An in-depth look at expert responces." http://www.pewinternet.org/2014/05/14/main-report-an-in-depth-look-at-expert-responses/, 2014

[4] Chris Lattner, "Introduction to the LLVM Compiler Infrastructure" 2006 Itanium Conference and Expo, San Jose, California, April 2006

[5] LLVM, "The LLVM Compiler Infrastructure" http://llvm.org/, 2016

[6] Chris Lattner and Vikram Adve, "LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation" International Symposium on Code Generation and Optimization, 2004

[7] Chung-Shu Chen, "Tutorial: Creating an LLVM Backend for
the Cpu0 Architecture" http://jonathan2251.github.io/lbd/index.html, 2015

[8] Chris Lattner, "LLVM" http://www.aosabook.org/en/llvm.html

[9] LLVM, "Writing an LLVM Backend" http://llvm.org/docs/WritingAnLLVMBackend.html#instruction-set, 2016

[10] LLVM, "The LLVM Target-Independent Code Generator"
http://llvm.org/docs/CodeGenerator.html#using-tablegen-for-target-description, 2016
(此全文未開放授權)
電子全文
摘要
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *