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

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):李若瑜
作者(外文):Lee, Jo-Yu
論文名稱(中文):物聯網之微控制器編譯器設計
論文名稱(外文):Compiler for IoT Microcontrollers
指導教授(中文):李政崑
指導教授(外文):Lee, Jenq-Kuen
口試委員(中文):陳呈瑋
關啟邦
口試委員(外文):Cheng-Wei Chen
Chi-Bang Kuan
學位類別:碩士
校院名稱:國立清華大學
系所名稱:資訊工程學系
學號:101062605
出版年(民國):103
畢業學年度:102
語文別:英文
論文頁數:30
中文關鍵詞:編譯器微控制器物聯網
外文關鍵詞:IoTMicrocontrollerGCCCompiler System
相關次數:
  • 推薦推薦:0
  • 點閱點閱:599
  • 評分評分:*****
  • 下載下載:0
  • 收藏收藏:0
物聯網是一個基於網際網路,讓能夠被獨立定址的設備實現互聯的網路,不再只是人對人或人對物品的溝通。
許多物聯網設備具有微控制器,在此論文中,此微控制器有以下特點:一、類精簡指令集,有16及32位元的指令。二、有16個16位元的暫存器。三、有兩種不同的硬體架構,分別擁有64個字節的數據記憶體和4096字節程序記憶體。

根據這些特點,尤其是記憶體有限的形況下,我們的目標讓此編譯器編譯出的程式碼能盡量減少。
為了實現這目標,我們專注於幾個問題。
一、暫存器的分配。
二、移植除法運算。
三、左和右移運算的設計。

我們使用 GCC 來當作為我們移植的編譯器系統。
在我們的實驗中,可以顯示兩種微控制器不同的代碼大小。
以及和愛特梅爾 (Atmel) AVR比較,顯示我們所使用的 Code Size 較小。
IoT refers to Internet of Things. It represents an evolution in which objects are ability to interacting with other objects and without requiring human-to-human or human-to-machine interaction. Each IoT device has the microcontroller. The microcontroller plays an important in the whole device. In this work, our architectures have the following feature:
1. RISC-like and with 16-bit and 32-bit instructions.
2. With 16 general purpose registers and each of them is 16-bit. All of the registers can separate to 8-bit and totally has 32 8-bit registers.
3. With two type of architectures, one is OTP-based and the other is SRAM-based.
4. OTP-based with 64 bytes data memory and 4096 bytes program memory.
5. SRAM-based with 1024 bytes data memory and 8192 words program memory.

According to these features, especially the little program memory size, we pay attention to compiler for IoT microcontrollers with code size reduction in this work.
To achieve this goal, we focus on several issue.
First, we give an alternative way to register allocation without temporary register. Second, the divide operation need to be porting. Third, the shift operation need to be arrangement concisely.

We use GNU Compiler Collection (GCC) for the environment of code generation.

In our experiment, we show the code size of both OTP-based and SRAM-based microcontroller in different optimization options. We compare our targets' code size to Atmel AVR and shows the result has reduced in average.
Abstract i
Contents iii
List of Figures v
List of Tables vi
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Overview of the Thesis . . . . . . . . . . . . . . . . . . . . . . 2
2 Background 4
2.1 Overview of Compiler System . . . . . . . . . . . . . . . . . . 4
2.2 The GNU Compiler Collection . . . . . . . . . . . . . . . . . . 5
2.2.1 The Components for GCC . . . . . . . . . . . . . . . . 6
2.2.2 The Main Compiler(cc1) . . . . . . . . . . . . . . . . . 7
2.3 Porting Mechanism of GCC . . . . . . . . . . . . . . . . . . . 10
2.3.1 Instruction Patterns - target.md . . . . . . . . . . . . . 11
2.3.2 Target Macros - target.h, target.c . . . . . . . . . . . . 11
3 Issue of Porting IoT Microcontrollers 15
3.1 IoT Microcontroller Features . . . . . . . . . . . . . . . . . . . 15
3.1.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.1.2 OTP-based and SRAM-based Architecture . . . . . . . 16
3.2 The Porting Issues of IoT Microcontrollers . . . . . . . . . . . 17
3.2.1 Registers Usage . . . . . . . . . . . . . . . . . . . . . . 17
3.2.2 Libgcc of divide operation . . . . . . . . . . . . . . . . 18
3.2.3 The shiht operation . . . . . . . . . . . . . . . . . . . . 18
4 Experiment Results 24
4.1 Benchmark . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . 25
5 Conclusion 28
5.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
[1] "More than 30 billion devices will wirelessly connect to the internet of everything in 2020." https://www.abiresearch.com/press/more-than-30-billion-devices-will-wirelessly-conne, 2013.
[2] "Gartner says the internet of things installed base will grow to 26 billion units by 2020." http://www.gartner.com/newsroom/id/2636073, 2013.
[3] L. R. Janna Anderson, "Main report: An in-depth look at expert responses." http://www.pewinternet.org/2014/05/14/
main-report-an-in-depth-look-at-expert-responses/, 2014.
[4] GNU, "Gcc front ends." http://gcc.gnu.org/frontends.html, 2014.
[5] GNU, "The c preprocessor." http://gcc.gnu.org/onlinedocs/
gcc-4.7.3/cpp/, 2011.
[6] H.-P. Nilsson, "Porting gcc for dunces", 2000.
[7] GNU, "Gnu compiler collection internals." https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gccint/, 4 2013.
[8] C. S. V. Zivojnovic, J. Martinez and H. Meyr, "Dspstone: A dsp-oriented benchmarking methodology", in Proc. of ICSPAT'94 - Dallas, oct 1994.
[9] G.-R. Chen, "Compiler for sensor processors", Master's thesis, National Tsing Hua University, 2011.
[10] C.-J. Wu, "Compilers for configurable dsp processors", Master's thesis, National Tsing Hua University, 2003.
(此全文未開放授權)
電子全文
摘要檔
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *