多核心 RISC-V 處理器之原子指令及一致性快取設計
Design of the Atomic Instructions and the Data-Coherent Cache for a Multi-Core RISC-V Processor
摘要
RISC-V是一個基於精簡指令集 (RISC) 的開源指令集架構(Instruction Set Architecture, ISA),最初由加州大學柏克萊分校開發。RISC-V除了後發優勢外與其他精簡指令集相比擁有簡單、模組化的設計、容易擴充與規格穩定等特性,因此受到許多公司與專業人士的關注。另外由於現在許多處理器與應用程式往多核心與多執行緒發展,再加上現有的作業系統(如: Linux)也都依靠原子指令來達成多核心多執行緒的資料同步運算,因此指令集架構與微架構對Hardware Atomic Instruction的支援也越來越重要。
本論文目的是設計與實作一個基於RISC-V指令集架構、支援原子指令及一致性快取的多核心處理器。此處理器將會採用交通大學資訊工程系嵌入式智慧系統實驗室所開發的開源碼RISC-V SoC Aquila作為基礎。Aquila內含有一個RV32IM的RISC-V Core,還有Instruction / Data Cache、UART與TCM等部分。本論文將針對Aquila進行修改以擴增原子指令的支援及一致性快取的設計與實作,並實作一個雙核心版本的Aquila SoC。
在設計與實作完成後,會在Verilator模擬的環境下通過RISC-V官方所提供的測試程式來驗證處理器對原子指令的行為是否符合定義。也會在Xilinx KC-705開發板上執行多核心的測試程式來進一步驗證正確性。除了正確性也會在開發板上執行快取測試程式與原子指令測試程式來分別評估其快取性能與原子指令的效能。
本論文目的是設計與實作一個基於RISC-V指令集架構、支援原子指令及一致性快取的多核心處理器。此處理器將會採用交通大學資訊工程系嵌入式智慧系統實驗室所開發的開源碼RISC-V SoC Aquila作為基礎。Aquila內含有一個RV32IM的RISC-V Core,還有Instruction / Data Cache、UART與TCM等部分。本論文將針對Aquila進行修改以擴增原子指令的支援及一致性快取的設計與實作,並實作一個雙核心版本的Aquila SoC。
在設計與實作完成後,會在Verilator模擬的環境下通過RISC-V官方所提供的測試程式來驗證處理器對原子指令的行為是否符合定義。也會在Xilinx KC-705開發板上執行多核心的測試程式來進一步驗證正確性。除了正確性也會在開發板上執行快取測試程式與原子指令測試程式來分別評估其快取性能與原子指令的效能。
RISC-V is an open standard instruction set architecture (ISA) based on the reduced instruction set computer (RISC) principle and initially developed by the University of California, Berkeley. RISC-V ISA not only has the advantage of learning from previous designs but also a simple and modular architecture, easily expandable, and being a stable open standard. Therefore, it has attracted the attention of many companies and professionals. In addition, nowadays many applications require multi-core/multi-threading support and most modern operating systems (such as Linux) use atomic instructions for synchronization of shared data among threads/processes. The instruction set architecture and the microarchitecture support for hardware atomic instruction are becoming more and more important.
The purpose of this research is to design and implement a multi-core processor that supports the atomic instructions and a coherent data cache based on the open source RISC-V SoC “Aquila”. Aquila contains an RV32IM RISC-V Core, instruction/data cache, UART and TCM. This research will extend the Aquila core to support the atomic instructions and a coherent data cache. Finally, a dual-core version of the Aquila SoC will be implemented for verification of the design.
After the design and implementation, the Verilator simulator and the RISC-V official test program will be used to verify whether the behavior of the atomic instruction implementation meets the RISC-V specifications. We will also run a multi-core test program on the Xilinx KC705 to further verify the correctness. In addition, the cache test programs and the RISC-V standard atomic instruction test programs will be executed on KC705 to evaluate the cache performance and atomic instruction performance, respectively.
The purpose of this research is to design and implement a multi-core processor that supports the atomic instructions and a coherent data cache based on the open source RISC-V SoC “Aquila”. Aquila contains an RV32IM RISC-V Core, instruction/data cache, UART and TCM. This research will extend the Aquila core to support the atomic instructions and a coherent data cache. Finally, a dual-core version of the Aquila SoC will be implemented for verification of the design.
After the design and implementation, the Verilator simulator and the RISC-V official test program will be used to verify whether the behavior of the atomic instruction implementation meets the RISC-V specifications. We will also run a multi-core test program on the Xilinx KC705 to further verify the correctness. In addition, the cache test programs and the RISC-V standard atomic instruction test programs will be executed on KC705 to evaluate the cache performance and atomic instruction performance, respectively.