簡易檢索 / 詳目顯示

研究生: 姚姵安
Pei-An Yao
論文名稱: 設計與實現一個基於EMNIST資料集之CNN加速器
Design and Implementation of a CNN Accelerator Based on the EMNIST Database
指導教授: 林銘波
Ming-Bo Lin
口試委員: 蔡政鴻
林書彥
林銘波
陳郁堂
學位類別: 碩士
Master
系所名稱: 電資學院 - 電子工程系
Department of Electronic and Computer Engineering
論文出版年: 2024
畢業學年度: 112
語文別: 中文
論文頁數: 61
中文關鍵詞: 深度學習卷積神經網路( CNN )加速器現場可程式邏輯陣列( FPGA )應用專用積體電路( ASIC )
外文關鍵詞: deep learning, Convolutional Neural Network( CNN ), accelerators, Field-Programmable Gate Arrays (FPGA), Application-Specific Integrated Circuits (ASIC)
相關次數: 點閱:183下載:5
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

近年來,深度學習( Deep Learning )作為人工智慧( Artificial Intelligence )及機
器學習( Machine Learning )的一個分支,已經在各個領域展現其強大的影響力。特
別是卷積神經網路( Convolutional Neural Network, CNN )在圖像處理及辨識物體上的
應用,皆有優異的表現。然而要將卷積神經網路實踐在硬體上,則需要考量如何在
有限的硬體資源環境下,降低大量的權重資料讀取,並且同時維持高效率運算。
為了達到上述目的,本論文設計與實現一個基於 EMNIST 資料集之 CNN 加
速器。本論文採用 line buffer 架構,以降低大量的權重資料讀取。為了取得高準確
度並同時保有低參數量的模型,本論文針對幾個常見的卷積神經網路做訓練測試。
最終選擇以 LeNet 為基礎之模型,其準確度達 91.06%,參數量 5810 個。此外為了
更進一步地降低資源使用,運算上以 8 位元整數取代 32 位元浮點數。最後再針對
整體架構做管線化處理,以提升整體工作頻率。
本論文已在 FPGA 及 ASIC 標準元件庫上完成驗證。兩者最大工作頻率皆可
達到 100 MHz,且在 EMNIST 資料集上的測試準確度可達到 90.7%。FPGA 是在
ZYNQ-7000系列的 XC7Z020CLG400-3器件上實現,LUT使用 24196個,LUTRAM
使用 1578 個,FF 使用 28524 個,DSP 使用 220 個。ASIC 部分則是使用 tsmc 0.18
µm 標準元件庫,晶片尺寸為 4828.18 µm x 4824.4 µm,等效邏輯閘數量為 1144076
個。


In recent years, deep learning, a branch of Artificial Intelligence and machine
learning, has demonstrated significant influences on various fields. In particular,
Convolutional Neural Network ( CNN ) has excelled in image processing and object
recognition tasks. However, the hardware implementation on CNN requires addressing
how to reduce the extensive weight data read in a constrained hardware environment while
maintaining high computational efficiency.
To achieve this goal, this thesis designs and implements a CNN accelerator based on
the EMNIST dataset. The design adopts the architecture of the line buffer to reduce the
number of weight data reads. To achieve high accuracy with low parameter models, several
common CNN architectures are trained and evaluated. Ultimately, a model based on LeNet
is selected, achieving an accuracy of 91.06% with 5810 parameters. Furthermore, to further
reduce resource usage, computations are performed using 8-bit integers instead of 32-bit
floating-point numbers. Finally, the overall architecture is implemented by the pipeline
technique to enhance the overall operating frequency.
This thesis has been validated on both FPGA and ASIC standard cell libraries. Both
platforms achieve a maximum operating frequency of 100 MHz, with a test accuracy of
90.7% on the EMNIST dataset. The FPGA implementation is carried out on the
XC7Z020CLG400-3 device from the ZYNQ-7000 series, utilizing 24196 LUTs, 1578
LUTRAMs, 28524 FFs, and 220 DSPs. The ASIC implementation employs the tsmc 0.18
µm standard cell library, with a chip size of 4828.18 µm x 4824.4 µm and an equivalent of
1144076 logic gates.

摘要 i Abstract ii 誌謝 iii 圖目錄 vii 表目錄 ix 第一章 緒論 1 1.1 研究動機 1 1.2 章節介紹 2 第二章 背景介紹 3 2.1 卷積神經網路 3 2.2 卷積神經網路架構介紹 4 2.2.1 卷積層 4 2.2.2 卷積核 5 2.2.3 步伐 6 2.2.4 填充 7 2.2.5 偏差值 8 2.2.6 參數共享 9 2.2.7 激活函數 9 2.2.8 池化層 12 2.2.9 平坦化層 13 2.2.10 全連接層 13 2.4 常見卷積神經網路模型 15 2.4.1 LeNet 15 2.4.2 AlexNet 16 2.4.3 VGG(16)Net 17 2.5 資料集介紹 18 2.5.1 MNIST資料集 18 2.5.2 EMNIST資料集 19 第三章 卷積神經網路模型架構分析 21 3.1 模型建立 21 3.1.1 以VGG6為基礎建立之模型 21 3.1.2 以LeNet為基礎建立之模型 23 3.1.3 以AlexNet為基礎建立之模型 27 3.1.4 模型選擇與比較 28 3.2 權重縮放比較 29 第四章 CNN加速器設計與實現 30 4.1 腳位定義 30 4.2 整體架構 31 4.3 各層模組介紹 32 4.3.1 卷積模組 32 4.3.2 ReLU模組 36 4.3.3 最大池化( Maxpooling )模組 37 4.3.4 全連接層( Fully-Connected )模組 39 4.3.5 分類模組 42 4.4 管線化處理 44 4.4.1 第一層管線化架構 44 4.4.2 第二層管線化架構 45 4.4.3 第三層管線化架構 46 4.5 控制路徑 47 4.5.1 卷積控制器 47 4.5.2 最大池化控制器 48 第五章 FPGA設計實現與結果分析 49 5.1 測試與驗證 49 5.2 FPGA設計與實現流程 50 5.2.1 FPGA佈局結果 51 5.2.2 FPGA Post-Implementation模擬 51 5.3 ASIC設計與實現流程 52 5.3.1 ASIC佈局結果 53 5.3.2 ASIC Post-Implementation模擬圖 55 5.4 實作結果分析 56 第六章 結論與未來展望 59 參考文獻 60

[1] R. Dogaru and I. Dogaru, “V-CNN: A Versatile Light CNN Structure for Image
Recognition on Resources Constrained Platforms,” in Proceedings of the 2023 8th
International Symposium on Electrical and Electronics Engineering (ISEEE), Galati,
Romania, pp. 44–47, Oct. 2023, doi: 10.1109/ISEEE58596.2023.1031033
[2] P. Ghadekar, S. Ingole, and D. Sonone, “Handwritten Digit and Letter Recognition
Using Hybrid DWT-DCT with KNN and SVM Classifier,” in Proceedings of the 4th
International Conference on Computing Communication Control and Automation,
Pune, India, pp. 16–18, Aug. 2018.
[3] M. Molina, J. Mendez, D. P. Morales et al, “Power-Efficient Implementation of Ternary
Neural Networks in Edge Devices,” IEEE Internet of Things Journal, vol. 9, no. 20, pp.
20111–20121, Oct 2022, doi: 10.1109/JIOT.2022.3172843.
[4] H. Irmak, D. Ziener and N. Alachiotis, “Increasing Flexibility of FPGA-based CNN
Accelerators with Dynamic Partial Reconfiguration,” in Proceedings of the 2021 31st
International Conference on Field-Programmable Logic and Applications (FPL),
Dresden, Germany, 2021, pp. 306-311, doi: 10.1109/FPL53798.2021.00061.
[5] W. Cui, X. Deng and Z. Zhang, “Improved Convolutional Neural Network Based on
Multi-head Attention Mechanism for Industrial Process Fault Classification,” in
Proceedings of the 2020 IEEE 9th Data Driven Control and Learning Systems
Conference (DDCLS), Liuzhou, China, 2020, pp. 918–922, doi:
10.1109/DDCLS49620.2020.9275107.
[6] A. Ajit, K. Acharya, and A. Samanta, “A Review of Convolutional Neural Networks,”
in Proceedings of the 2020 International Conference on Emerging Trends in
Information Technology and Engineering (ic-ETITE), Vellore, India, pp. 1–5, Feb.
2020, doi: 10.1109/ic-ETITE47903.2020.049.
[7] Y. LeCun et al., “Gradient-Based Learning Applied to Document Recognition,” in
Proceedings of the IEEE, vol. 86, no.11, pp. 2278-2324, Nov. 1998.
61
[8] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet Classification with Deep
Convolutional Neural Networks,” Neural Information Processing Systems 25, pp. 1–9,
Jan. 2012. doi:10.1145/3065386.
[9] A. Baldominos, Y. Saez, and P. Isasi, “A Survey of Handwritten Character Recognition
with MNIST and EMNIST,” Applied Sciences vol. 9, no. 15, pp. 1–16, Aug. 2019.
[10] G. Cohen, S. Afshar, J. Tapson et al, “EMNIST: An Extension of MNIST to
Handwritten Letters,” arXiv 2017, arXiv:1702.05373.
[11] S. K. Dana, “Incremental Learning of Handwritten Characters in EMNIST
Dataset,” in Proceedings of the 2023 International Conference for Advancement in
Technology (ICONAT), Goa, India, pp. 1–5, Jan. 2023, doi:
10.1109/ICONAT57137.2023.10080724 .
[12] A. Rahaf, B. Francesca, E. Mohamed et al, “Memory Aware Synapses: Learning What
(not) to Forget,” in Proceedings of the 2018 European Conference on Computer
Vision, Munich, Germany, pp. 139–154, Sept. 2018.
[13] S.S. Mor, S. Solanki, S, Gupta et al, “Handwritten Text Recognition: with Deep
Learning and Android,” Int. J. Eng. Adv. Technol., pp. 172–178, Aug. 2019.
[14] Z. Li, J. Chen, L. Wang et al, “CNN Weight Parameter Quantization Method for
FPGA,” in Proceedings of the 2020 IEEE 6th International Conference on Computer
and Communications (ICCC), Chengdu, China, pp. 1548–1553, Dec. 2020, doi:
10.1109/ICCC51575.2020.9345248.
[15] 鄭又瑄,設計與實現一個植基於 FPGA 的列固定資料流 CNN 加速器,碩士論
文,國立台灣科技大學電子工程系,2020 年 7 月。
[16] 張薏萱,設計與實現一個植基於 FPGA 之手寫數字辨識系統之 CNN 加速器,
碩士論文,國立台灣科技大學電子工程系,2020 年 7 月。
[17] 戴崇光,設計與實現一個卷積神經網路手寫數字辨識加速器,碩士論文,國立
台灣科技大學電子工程系,2023 年 7 月。

無法下載圖示
全文公開日期 2029/08/14 (校外網路)
全文公開日期 2029/08/14 (國家圖書館:臺灣博碩士論文系統)
QR CODE