1 Star 1 Fork 0

RV少年 (RV4Kids) / RISC-V-CPU

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

RISC-V CPU

Zhou Fan (范舟)

This project is a RISC-V CPU with 5-stage pipeline implemented in Verilog HDL, which is a course project of Computer Architecture, ACM Class @ SJTU.

Documents

Design

Feature RISC-V CPU
ISA RISC-V (RV32I subset)
Pipelining 5 stages
Data forwarding
Cache N-way set associate I-cache and D-cache [1]
UART module passed simulation [2]
Security perfect proof against Meltdown and Spectre attack [3]
  • [1] The cache is based on Zhekai Zhang's code
  • [2] UART module has not passed test on FPGA yet for the limited time. I re-designed part of CPU code to avoid hidden danger on FPGA, and it may need some more debugging.
  • [3] Just kidding ;-) That's because the CPU is not with branch prediction or out-of-order execution.

This CPU project has a five stage pipeline with data forwarding. In the picture below, red paths show stall control flow, while orange ones show data forwarding path. cpu-pipeline-graph

For program test on FPGA without capable memory, this CPU uses UART protocol to communicate with PC, where runs a memory simulator. uart-simulate-memory

Simulation

This CPU is simulated with UART communication module in Xilinx vivado. test-bench-wave

Implementation

Implementation on Basys3 FPGA, using Xilinx vivado. implementation-graph Scematic Overview implementation-circuit-overview CPU Module Scematic implementation-circuit-cpu

References

空文件

简介

Zhou Fan (范舟) This project is a RISC-V CPU with 5-stage pipeline implemented in Verilog HDL, which is a course project of Computer Architecture, ACM Class @ SJTU. 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/RV4Kids/RISC-V-CPU.git
git@gitee.com:RV4Kids/RISC-V-CPU.git
RV4Kids
RISC-V-CPU
RISC-V-CPU
master

搜索帮助