1 Star 3 Fork 0

胡周大侠 / RISC-V-CPU

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
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

Empty file

About

RISC-V CPU with 5-stage pipeline, implemented in Verilog HDL. expand collapse
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/hu_zhoudaxia/RISC-V-CPU.git
git@gitee.com:hu_zhoudaxia/RISC-V-CPU.git
hu_zhoudaxia
RISC-V-CPU
RISC-V-CPU
master

Search