• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language SystemVerilog
  • License
    Other
  • Created over 4 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is the CORE-V MCU project, hosting CORE-V's embedded-class cores.

License Documentation Status

CORE-V MCU

CORE-V MCU originated from PULPissimo [1], [2], and is now a stand-alone project within OpenHW Group independent from PULPIssimo.

In case you would be interested to join the project please feel free to open an issue, or involve yourself in any open issues/discussions. Contributions are always welcome! First time contributors should review the Contributing guide.

Quick Start Guide

The fastest way to get up and running with the CORE-V MCU is with pre-built bit streams for the Digilent Nexys A7 board. Check out the Quick Start Guide.

Getting Started

Install the required Python tools:

pip3 install --user -r python-requirements.txt

Install fusesoc: https://fusesoc.readthedocs.io/en/stable/user/installation.html#ug-installation

Install Verilator v4.100: https://verilator.org/guide/latest/install.html

Install Xilinx Vivado: see the Quick Start Guide.

Building

The build system uses make to capture the required steps. make with no argments will print a list of the current targets:

$ make
all:            generate build scripts, custom build files, doc and sw header files
bitstream:      generate nexysA7-100T.bit file for emulation
model-lib:      build a Verilator model library
lint:           run Verilator lint check
docs:           generate documentation
sw:             generate C header files (in ./sw)
nexys-emul:     generate bitstream for Nexys-A7-100T emulation)
genesys-emul:   generate bitstream for Genesys2 FPGA board
buildsim:       build for Questa sim
sim:            run Questa sim
downloadn:      Download bitstream to Nexys board
downloadg:      Download bitstream to Genesys2 board

Building an FPGA Image

To target the Nexys-A7-100T board:

$ make nexys-emul

Make sure you have the latest Xilinx board-parts installed. Current image is core_v_nexys_200122.bit

To target Genesys2 board:

$ make genesys-emul

Extra note for building on ubuntu - Vivado tools from Xilinx may require a larger swap size that the system default. The swap size can be increased by searching for "increase swapfile in ubuntu" and add your release.

Building documentation

$ make docs

The resulting documents are accessed using file ./docs/_build/html/index.html

Documentation of the Debug Unit

At present the details of the debug unit are not incorporated in the main documentation. The top level interface is an IEEE 1149.1 compliant JTAG Test Access port. It implements the reference JTAG Debug Transport Module documented in Section 6.1 of the RISC-V Debug Interface, version 0.13.2.

The RISC-V Debug Interface has many optional features. Those enabled for the CORE-V MCU are documented in the PULP Platform Debug Unit.

Building C header files

$ make sw

The resulting header files are located in ./sw

Running Modelsim/Questasim

$ make buildsim sim

The 'make buildsim' creates a work library in build/openhwgroup.org_systems_core-v-mcu_0/sim-modelsim, and then 'make sim' runs the simulation.

The test bench used by the simulation is 'core_v_mcu_tb.sv'

The resulting header files are located in ./sw

Experimental fuseSoC Support

Run Verilator lint target:

fusesoc --cores-root . run --target=lint --setup --build openhwgroup.org:systems:core-v-mcu

To build Verilator as a library which can be linked into other tools (such as the debug server):

fusesoc --cores-root . run --target=model-lib --setup --build openhwgroup.org:systems:core-v-mcu

The library will be in the obj_dir subdirectory of the work root.

Once can sanity check the top-level using QuestaSim:

fusesoc --cores-root . run --target=sim --setup --build --run openhwgroup.org:systems:core-v-mcu

Contributing: Pre-commit checks

If you are submitting a pull-request, it will be subject to pre-commit checks. The two that most likely cause problems are the Verilator Lint check and the Verible format check.

Verilator model library

The system will run

fusesoc --cores-root . run --target=model-lib --setup --build openhwgroup.org:systems:core-v-mcu

If your changes introduce any Verilator errors, you either need to fix these, or, if appropriate, add a rule to ignore them to rtl/core-v-mcu/verilator.waiver.

This will create the Verilator library Vcore_v_mcu_wrapper__ALL.a in build/openhwgroup.org_systems_core-v-mcu_0/model-lib-verilator/obj_dir.

Note that when you use this library to build an application you will need to ensure that the directory build/openhwgroup.org_systems_core-v-mcu_0/model-lib-verilator/mem_init is either symbolically linked or copied to the directory where the application will run. The model will load ROM images from this directory.

Note. The model is compiled at optimization level -O3, since performance is of importance with the likely applications, and with -fPIC, so it is suitable for inclusion in shared object libraries.

Verilator lint check

The system will run

fusesoc --cores-root . run --target=lint --setup --build openhwgroup.org:systems:core-v-mcu

If your changes introduce any more Verilator lint warnings, you either need to fix these, or, if appropriate, add a rule to ignore them to rtl/core-v-mcu/verilator.waiver.

Verible format check

Standard formating is enforced by Verible. The command used is

util/format-verible

at the top level of the repository, which will correct the format of any file. The check will fail if any file is changed.

Two important things to note.

  1. If you do not have Verible installed (which is likely), then util/format-verible will silently do nothing.

  2. You must install the correct version of Verible, currently v0.0-1051-gd4cd328. GitHub has prebuilt versions. The version may change in the future. In the event of the check failing, the details with the failure will tell you which version was used.

References

  1. Schiavone, Pasquale Davide, et al. "Quentin: an ultra-low-power pulpissimo soc in 22nm fdx." 2018 IEEE SOI-3D-Subthreshold Microelectronics Technology Unified Conference (S3S). IEEE, 2018.

  2. Schiavone, Pasquale Davide, et al. "Arnold: An eFPGA-Augmented RISC-V SoC for Flexible and Low-Power IoT End Nodes." IEEE Transactions on Very Large Scale Integration (VLSI) Systems 29.4 (2021): 677-690.

More Repositories

1

cva6

The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
Assembly
2,230
star
2

cv32e40p

CV32E40P is an in-order 4-stage RISC-V RV32IMFCXpulp CPU based on RI5CY from PULP-Platform
SystemVerilog
941
star
3

core-v-verif

Functional verification project for the CORE-V family of RISC-V cores.
Assembly
430
star
4

cvfpu

Parametric floating-point unit with support for standard RISC-V formats and operations as well as transprecision formats.
SystemVerilog
426
star
5

force-riscv

Instruction Set Generator initially contributed by Futurewei
C++
259
star
6

cvw

CORE-V Wally is a configurable RISC-V Processor associated with RISC-V System-on-Chip Design textbook. Contains a 5-stage pipeline, support for A, B, C, D, F, M and Q extensions, and optional caches, BP, FPU, VM/MMU, AHB, RAMs, and peripherals.
SystemVerilog
251
star
7

cv32e40x

4 stage, in-order, compute RISC-V core based on the CV32E40P
SystemVerilog
210
star
8

core-v-cores

CORE-V Family of RISC-V Cores
202
star
9

programs

Documentation for the OpenHW Group's set of CORE-V RISC-V cores
HTML
187
star
10

cv32e40s

4 stage, in-order, secure RISC-V core based on the CV32E40P
SystemVerilog
128
star
11

cva6-sdk

CVA6 SDK containing RISC-V tools and Buildroot
Makefile
59
star
12

core-v-xif

RISC-V eXtension interface that provides a generalized framework suitable to implement custom coprocessors and ISA extensions
SystemVerilog
59
star
13

cva5

The CORE-V CVA5 is an Application class 5-stage RISC-V CPU specifically targetting FPGA implementations.
SystemVerilog
59
star
14

cv-hpdcache

RTL sources of the High-Performance L1 Dcache (HPDcache) for OpenHW CV cores
SystemVerilog
51
star
15

cv32e41p

4 stage, in-order, secure RISC-V core based on the CV32E40P with Zfinx and Zce ISA extentions
SystemVerilog
26
star
16

corev-gcc

C++
22
star
17

core-v-mcu-uvm

CORE-V MCU UVM Environment and Test Bench
SystemVerilog
17
star
18

openhwgroup.org

OpenHW Group is a not-for-profit, global organization driven by its members and individual contributors where hardware and software designers collaborate in the development of open-source cores, related IP, tools and software. OpenHW provides an infrastructure for hosting high quality open-source HW developments in line with industry best practices.
HTML
16
star
19

core-v-sw

Main Repo for the OpenHW Group Software Task Group
15
star
20

riscv_vm

Instructions to import Ubuntu guest Virtual Machine for RISC-V development for the VEGA board
Shell
14
star
21

core-v-sdk

Java
14
star
22

core-v-mcu-devkit

This is the CORE-V MCU DevKit project, hosting the open-source artifacts for the CORE-V MCU Development Kit.
HTML
13
star
23

corev-llvm-project

12
star
24

tristan-isolde-unified-access-page

Unified Access Page for the TRISTAN project
HTML
11
star
25

riscv-ovpsim-corev

11
star
26

cv32e40x-dv

CV32E40X Design-Verification environment
Assembly
11
star
27

corev-binutils-gdb

C
9
star
28

core-v-mcu-cli-test

Eclipse/FreeRTOS/core-v-mcu example program
C
9
star
29

core-v-ide-cdt

Java
9
star
30

cva6-platform

CVA6-platform is a multicore CVA6 with CV-MESH software and regression platform
9
star
31

advanced-riscv-verification-methodologies

Advanced Verification Methodologies for RISC-V and related IP
SystemVerilog
7
star
32

cv-hpdcache-verif

Verification environment for the OpenHW Group's CORE-V High Performance Data Cache controller.
SystemVerilog
5
star
33

obi

Repository that maintain the OpenBus Interface spec
4
star
34

core-v-freertos

C
4
star
35

cv-mesh

3
star
36

u-boot

Unofficial development fork of U-Boot
C
2
star
37

cvw-arch-verif

The purpose of the repo is to support CORE-V Wally architectural verification
SystemVerilog
2
star
38

core-v-freertos-kernel

C
1
star
39

downloads.openhwgroup.org

downloads.openhwgroup.org
SCSS
1
star
40

osdforum.org

The Open Source Developer Forum is a workshop that brings open source software and hardware (chips, boards and systems) developers together to collaborate and learn.
HTML
1
star