Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calint/riscv
experiments implementing a risc-v cpu to gain experience with verilog and minimalistic cpu design
https://github.com/calint/riscv
cmod-s7 cpu fpga iverilog risc-v riscv32i verilog vivado
Last synced: 3 days ago
JSON representation
experiments implementing a risc-v cpu to gain experience with verilog and minimalistic cpu design
- Host: GitHub
- URL: https://github.com/calint/riscv
- Owner: calint
- Created: 2023-06-11T06:36:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-10T09:15:01.000Z (8 months ago)
- Last Synced: 2024-03-11T09:35:19.791Z (8 months ago)
- Topics: cmod-s7, cpu, fpga, iverilog, risc-v, riscv32i, verilog, vivado
- Language: Verilog
- Homepage:
- Size: 920 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# riscv
next experiment after ["zen-one"](https://github.com/calint/zen-one)a risc-v cpu to gain experience with verilog and minimalistic cpu design
implements the rv32i instructions with the exception for: fence, ecall, ebreak and counters which are irrelevant for the intended use
most of the implementation is in an `always @(*)` block for the sake of simplicity and overview (["SoC.v"](https://github.com/calint/riscv/blob/main/riscv.srcs/sources_1/new/SoC.v))
ad-hoc 2-stage pipeline where a new instruction is fetched while previous executes
implemented on cmod s7 from digilent.com
128 KB dual port block ram for instructions and data
50 MHz with most instructions executing in one cycle except branches which use two cycles due to creating "bubble" in the pipeline
implements uart to send and receive text (see ["notes/os.c"](https://github.com/calint/riscv/blob/main/notes/os.c) for example)
how-to with vivado v2023.2:
* (optional) edit path to ram file in ["riscv.srcs/sources_1/new/Top.v"](https://github.com/calint/riscv/blob/main/riscv.srcs/sources_1/new/Top.v)
* connect fpga board, run synthesis, run implementation, generate bitstream, program device
* find out which tty is on the usb connected to the card (e.g. /dev/ttyUSB1)
* connect with serial terminal at 9600 baud, 8 bits, 1 stop bit, no parity
* button 0 is reset, click it to restart and display the prompt (does not reset ram)
* "welcome to adventure #3" is the prompt