stnolting / neorv32

:desktop_computer: A small, customizable and extensible MCU-class 32-bit RISC-V soft-core CPU and microcontroller-like SoC written in platform-independent VHDL.
https://neorv32.org
BSD 3-Clause "New" or "Revised" License
1.49k stars 206 forks source link
asip axi cpu embedded fpga microcontroller neorv32 on-chip-debbuger processor risc-v riscv rtl rtos rv32 safety soc soft-core system-on-chip verilog vhdl

NEORV32

The NEORV32 RISC-V Processor

datasheet (pdf) datasheet (html) userguide (pdf) userguide (html) doxygen

  1. Overview
  2. Features
  3. FPGA Implementation Results
  4. Performance
  5. Getting Started :rocket:

1. Overview

neorv32 Overview

The NEORV32 Processor is a customizable microcontroller-like system on chip (SoC) built around the NEORV32 RISC-V CPU that is written in platform-independent VHDL. The processor is intended as auxiliary controller in larger SoC designs or as tiny and customized microcontroller that even fits into a Lattice iCE40 UltraPlus low-power & low-density FPGA. The project is intended to work out of the box and targets FPGA / RISC-V beginners as well as advanced users.

Special focus is paid on execution safety to provide defined and predictable behavior at any time. For example, the CPU ensures all memory accesses are properly acknowledged and all invalid/malformed instructions are always detected as such. Whenever an unexpected state occurs the application software is informed via precise and resumable hardware exceptions.

Feel free to open a new issue or start a new discussion if you have questions, comments, ideas, feedback or if something is not working as expected. See how to contribute.

Key Features

Project Status

release commits-since-latest-release

Task / Subproject Repository CI Status
GitHub pages (docs) neorv32 GitHub Pages
Build documentation neorv32 Documentation
Processor verification neorv32 Processor
RISCOF core verification neorv32-riscof neorv32-riscof
FPGA implementations neorv32-setups Implementation
All-Verilog version neorv32-verilog neorv32-verilog
FreeRTOS port neorv32-freertos neorv32-freertos
Prebuilt GCC toolchains riscv-gcc-prebuilt Prebuilt_Toolchains

The processor passes the official RISC-V architecture tests to ensure compatibility with the RISC-V ISA specs., which is checked by the neorv32-riscof repository. It can successfully run any C program (for example from the sw/example folder) including CoreMark and FreeRTOS and can be synthesized for any target technology - tested on Intel, AMD and Lattice FPGAs. The conversion into a plain-Verilog netlist module is automatically checked by the neorv32-verilog repository.

2. Features

The NEORV32 Processor provides a full-featured microcontroller-like SoC build around the NEORV32 CPU. By using generics the design is highly configurable and allows a flexible customization to tailor the setup according to your needs. Note that all of the following SoC modules are entirely optional.

CPU Core

Memories

Timers and Counters

Input / Output

SoC Connectivity

Advanced

Debugging

3. FPGA Implementation Results

Implementation results for exemplary CPU configurations generated for an Intel Cyclone IV EP4CE22F17C6 FPGA using Intel Quartus Prime Lite 21.1 (no timing constrains, balanced optimization, f_max from Slow 1200mV 0C Model).

CPU Configuration (version 1.7.8.5) LEs FFs Memory bits DSPs f_max
rv32i_Zicsr 1223 607 1024 0 130 MHz
rv32i_Zicsr_Zicntr 1578 773 1024 0 130 MHz
rv32imc_Zicsr_Zicntr 2338 992 1024 0 130 MHz

An incremental list of CPU extensions and processor modules can be found in the Data Sheet: FPGA Implementation Results.

4. Performance

The NEORV32 CPU is based on a two-stages pipelined/multi-cycle architecture (fetch and execute). The following table shows the performance results (scores and average CPI) for exemplary CPU configurations (no caches) executing 2000 iterations of the CoreMark CPU benchmark (using plain GCC10 rv32i built-in libraries only!).

CPU Configuration (version 1.5.7.10) CoreMark Score
small (rv32i_Zicsr_Zifencei) 33.89
medium (rv32imc_Zicsr_Zifencei) 62.50
performance (rv32imc_Zicsr_Zifencei + perf. options) 95.23

More information regarding the CPU performance can be found in the Data Sheet: CPU Performance. The CPU & SoC provide further "tuning" options to optimize the design for maximum performance, maximum clock speed, minimal area or minimal power consumption: User Guide: Application-Specific Processor Configuration

5. Getting Started

This overview provides some quick links to the most important sections of the online Data Sheet and the online User Guide.

:mag: NEORV32 Project - An Introduction

:desktop_computer: NEORV32 Processor - The SoC

:abacus: NEORV32 CPU - The Core

:floppy_disk: Software Framework - The Software Ecosystem

:rocket: User Guide - Getting Started!

:copyright: Legal

license DOI

This is an open-source project that is free of charge. Use this project in any way you like (as long as it complies to the permissive license). Please cite it appropriately. :+1:

:email: Contact

Please use GitHub Issues and Discussions for all kind of requests, issues, ideas, questions, etc. If you would like to contact me directly check out the About section.


:heart: A big shout-out to the community and all the contributors! This project would not be where it is without them.