Skip to content

open-design/riscv-soc-cores

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riscv-soc-cores

This repo contains core description files for FuseSoC to create a simple RISC-V-based SoC for FPGA. Based on https://github.com/openrisc/orpsoc-cores.

It is intended to implement as fully-featured system as possible, depending on the targeted hardware.

Currently supported FPGA boards:

Board FPGA on-chip RAM external RAM
Cyclone II
Waveshare CoreEP2C5 EP2C5T144C8 8 KiB
Altera DE1 Board EP2C20F484C7 16 KiB 8 MiB SDRAM
Cyclone III
Marsohod2 EP3C10E144C8 16 KiB 8 MiB SDRAM
Cyclone IV
Waveshare CoreEP4CE6 EP4CE6E22C8 16 KiB
Marsohod2bis EP4CE6E22C8 16 KiB 8 MiB SDRAM
Marsohod2RPI EP4CE6E22C8 16 KiB
DE0-Nano EP4CE22F17C6 32 KiB 32 MiB SDRAM
DE2-115 EP4CE115F29C7 32 KiB ?
MAX 10
Marsohod3 10M50SAE144C8GES 64 KiB 8 MiB SDRAM
Marsohod3bis 10M08SAE144C8GES 32 KiB
Cyclone 10 LP
Intel Cyclone 10 LP FPGA Evaluation Kit 10CL025YU256I7G 16 KiB
Artix-7
Digilent Arty A7-35T XC7A35T-L1CSG324I 16 KiB

Preparing

First install fusesoc:

$ sudo apt-get install -y python3-pip
$ git clone https://github.com/olofk/fusesoc
$ cd fusesoc
$ git checkout 1.12.0
$ sudo pip3 install -e .

Simulation

Install Icarus Verilog and GtkWave software:

$ sudo apt-get install iverilog gtkwave

elf-loader needs libelf-dev so install it:

$ sudo apt-get install libelf-dev

Simulation:

$ fusesoc --cores-root cores/ run --target sim picorv32-wb-soc
$ gtkwave build/picorv32-wb-soc_0/sim-icarus/picorv32-wb-soc.vcd

Build

Marsohod2 needs Quartus <= 13.1:

$ export PATH=$PATH:/opt/altera/13.1/quartus/bin
$ fusesoc --cores-root cores/ run --build --tool quartus marsohod3-picorv32-wb-soc

Marsohod3 needs Quartus >= 15.0:

$ export PATH=$PATH:/opt/altera/16.0/quartus/bin
$ fusesoc --cores-root cores/ run --build --tool quartus marsohod3-picorv32-wb-soc

Programmming FPGA

Marsohod2:

$ sudo openocd -f board/marsohod2.cfg -c init -c "svf -tap ep3c10.tap build/marsohod2-picorv32-wb-soc_0/bld-quartus/marsohod2-picorv32-wb-soc_0.svf" -c shutdown

Marsohod3:

$ sudo openocd -f board/marsohod3.cfg -c init -c "svf -tap 10m50.tap build/marsohod3-picorv32-wb-soc_0/bld-quartus/marsohod3-picorv32-wb-soc_0.svf" -c shutdown