簡易檢索 / 詳目顯示

研究生: 温良愷
Wen, Liang-Kai
論文名稱: 以FPGA實作一具L1快取之相容MIPS架構CPU
Implementing a MIPS architecture CPU with L1 cache in FPGA
指導教授: 黃吉川
Hwang, Chi-Chuan
學位類別: 碩士
Master
系所名稱: 工學院 - 工程科學系
Department of Engineering Science
論文出版年: 2019
畢業學年度: 107
語文別: 中文
論文頁數: 52
中文關鍵詞: 微處理器RISC快取記憶體
外文關鍵詞: microprocessor, RISC, cache memory
相關次數: 點閱:63下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著今時今日的科技高速的發展,FPGA以其強大的可編程能力和高性價比,已經可以廣泛地應用在日常生活中的各個方面。其半客制化的特性讓設計者可以依照自己的需求任意更動內部的電路設計,讓FPGA在設計的彈性和簡易程度上勝於ASIC。
    本論文是以研究MIPS指令集架構作為初始點,在FPGA的平台上設計一個具有五級流水線,與MIPS指令集架構兼容的32位元RISC微處理器,該處理器採用哈佛架構、數據提前單元與延遲槽指令來解決流水線架構內會產生的數據相依問題。並且額外設計一4路組映射之快取,採用LRU演算法設計,是現今絕大部分快取所使用的演算法,並連結一內部為先進先出(FIFO)構造之載入緩存區,而後再透過Wishbone匯流排與主記憶體RAM做溝通,形成一個完整的電路架構。
    最後,本文對設計的微處理器做出驗證,透過Vivado對其進行一個全面的仿真驗證,確保其在各指令功能皆能夠正確運行。而最終結果也證實本論文所設計之RTL級代碼是正確可運行的。

    With the rapid development of technology today, The FPGA can be widely used in all aspects of daily life with its powerful programmability and cost-effectiveness, and with the flexibility of FPGA design, we plan to design a RISC microprocessor.
    In this paper, we focus on the 32-bit MIPS microprocessor architecture. On the basis of microprocessor core design, the ways of the Harvard architecture, the data forward and the delay slot instruction are used to solve the structure hazards, the data hazards and the control hazards of the pipeline, and we will design a 4 set associative mapping cache to shorten the effective memory access time by using least recently used (LRU) algorithm. connected to a store buffer that is internally FIFO structure, and then they communicate with the main memory RAM through the Wishbone bus to form a complete circuit architecture.
    Finally, this paper verifies the designed microprocessor and performs a comprehensive simulation verification through Vivado to ensure that it can operate correctly in each command function. The verification results show that the microprocessor can correctly complete the operation of the instruction.

    中文摘要 I ABSTRACT II 致謝 V 目錄 VI 表目錄 IX 圖目錄 X 符號說明 XII 第1章 緒論 1 1.1 論文背景 1 1.1 相關文獻回顧 4 1.2 研究動機和目的 5 1.3 本文架構 5 第2章 知識背景與相關研究 7 2.1 複雜指令集 7 2.2 簡單指令集 7 2.2.1 單周期CPU (Single-Cycle CPU) 7 2.2.2 多周期CPU (Multiple-Cycle CPU) 8 2.2.3 流水線/管線化CPU (Pipeline CPU) 8 2.3 MIPS架構 10 2.4 MIPS指令格式與定址方式 12 2.4.1 R型指令 12 2.4.2 I型指令 12 2.4.3 J型指令 14 2.5 流水線風險 (PIPELINE HAZARD) 14 2.5.1 數據風險 (Data Hazard): 14 2.5.2 結構風險 (Structural Hazard): 17 2.5.3 控制/分支風險 (Control/Branch Hazard): 18 2.6 異常與中斷 (PRECISE INTERRUPTS AND EXCEPTIONS) 18 2.7 32位元指令集及其編碼 20 2.8 記憶體架構 23 2.9 CPU快取與載入緩衝區 25 2.9.1 直接映射 (Direct Mapping) 25 2.9.2 N路組映射 (Set Associative Mapping) 26 2.9.3 完全映射 (Fully Associative Mapping) 26 第3章 硬體實作架構 28 3.1 VIVADO軟體應用 29 3.2 記憶體設計 30 3.3 流水線暫存器設計 31 3.4 ID階段控制單元設計 32 3.5 流水線風險之處理 34 3.6 暫存器組相關設計 36 3.7 EXE階段之算術邏輯單元之設計 37 3.8 中斷與異常處理設計 39 3.9 快取與緩衝區設計 40 第4章 實驗結果 44 4.1 硬體設備介紹 44 4.2 驗證方案 45 第5章 結果討論 50 5.1 結論 50 5.2 未來展望 50 參考文獻 51

    1. Dasgupta, S., It Began with Babbage: The Genesis of Computer Science. 2014: Oxford University Press.p 22.
    2. Kuck, D.J., The structure of computers and computations. 1978: Wiley.p 12.
    3. Li, Y., Computer principles and design in Verilog HDL. [electronic resource]. [Wiley Online Library]. 2015: John Wiley and Sons.p 7-9.
    4. Sequin, C.H. and D.A. Patterson, Design and Implementation of RISC I. 1982, University of California at Berkeley.
    5. Kane, G., MIPS RISC architecture. 1988: Prentice-Hall, Inc.
    6. Osman, W.S. and S.M. Hashim. FPGA-Based Pipelined Microprocessor. in 2018 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE). 2018.
    7. 林佳諺, MIPS軟核心之開發與評量, in 電子工程系. 2015, 國立雲林科技大學: 雲林縣.
    8. 张立学 and 尹东辉, 流水线技术在FPGA设计中的运用. 计算机时代, 2016(02).
    9. Ma, H. and D. Wang. The design of five-stage pipeline CPU based on MIPS. in 2011 International Conference on Electrical and Control Engineering. 2011.
    10. 李宝平, 一种兼容MIPS32指令集的32位软核处理器设计. 2017, 东南大学.
    11. Mahmood, H.S. and S.S. Omran. Pipelined MIPS processor with cache controller using VHDL implementation for educational purposes. in 2013 International Conference on Electrical Communication, Computer, Power, and Control Engineering (ICECCPCE). 2013.
    12. Sweetman, D., See MIPS Run. 2005: Morgan Kaufmann Publishers Inc.p 19.
    13. Patterson, D.A. and J.L. Hennessy, Computer architecture: a quantitative approach. 1990: Morgan Kaufmann Publishers Inc.p B–12.
    14. Chauan, P., G. Singh, and G. Singh, Cache Controller for 4-way Set-Associative Cache Memory. International Journal of Computer Applications, 2015. 129: p. 1-8.
    15. Silc, J., B. Robic, and T. Ungerer, Processor architecture : from dataflow to superscalar and beyond. 1999: Springer.p 15-18.

    無法下載圖示 校內:2024-07-30公開
    校外:不公開
    電子論文尚未授權公開,紙本請查館藏目錄
    QR CODE