neorv32

šŸ–„ļø A small, customizable and extensible MCU-class 32-bit RISC-V soft-core CPU and microcontroller-like SoC written in platform-independent VHDL.

https://github.com/stnolting/neorv32

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • ā—‹
    CITATION.cff file
  • āœ“
    codemeta.json file
    Found codemeta.json file
  • āœ“
    .zenodo.json file
    Found .zenodo.json file
  • āœ“
    DOI references
    Found 3 DOI reference(s) in README
  • āœ“
    Academic publication links
    Links to: zenodo.org
  • ā—‹
    Academic email domains
  • ā—‹
    Institutional organization owner
  • ā—‹
    JOSS paper metadata
  • ā—‹
    Scientific vocabulary similarity
    Low similarity (13.6%) to scientific vocabulary

Keywords

asip cpu embedded fpga hdl microcontroller multi-core neorv32 on-chip-debbuger processor risc-v riscv rtos rv32 smp soc soft-core system-on-chip vhdl
Last synced: 6 months ago · JSON representation

Repository

šŸ–„ļø A small, customizable and extensible MCU-class 32-bit RISC-V soft-core CPU and microcontroller-like SoC written in platform-independent VHDL.

Basic Info
Statistics
  • Stars: 1,843
  • Watchers: 52
  • Forks: 279
  • Open Issues: 15
  • Releases: 66
Topics
asip cpu embedded fpga hdl microcontroller multi-core neorv32 on-chip-debbuger processor risc-v riscv rtos rv32 smp soc soft-core system-on-chip vhdl
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct

README.md

The NEORV32 RISC-V Processor

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

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.

neorv32 Overview

Key Features

  • [x] all-in-one package: CPU + SoC + Software Framework + Tooling
  • [x] completely described in behavioral, platform-independent VHDL - no primitives, macros, attributes, etc.
  • [x] extensive CPU & SoC configuration options for adapting to application requirements
  • [x] aims to be as small as possible while being as RISC-V-compliant as possible
  • [x] FPGA friendly (e.g. all internal memories can be mapped to block RAM)
  • [x] optimized for high clock frequencies to ease integration and timing closure
  • [x] from zero to printf("hello world"); - completely open-source and documented
  • [x] easy to use – intended to work out of the box

  • :recycle: Looking for an all-Verilog version? Have a look at neorv32-verilog.

  • :mag: Continuous integration to check for regressions (including RISC-V ISA compatibility check using RISCOF).

  • :openfilefolder: Exemplary setups and community projects targeting various FPGA boards and toolchains to get started.

  • :package: The entire processor is also available as Vivado IP Block.

  • :kite: Support for FreeRTOS, Zephyr OS, MicroPython and LiteX SoC Builder Framework.

  • :desktop_computer: Pre-configured Eclipse project for developing and debugging code using an IDE.

  • :label: The project's change log is available in CHANGELOG.md.

  • :rocket: Check out the quick links below and the User Guide to get started.

  • :books: For detailed information see the online documentation.

Project Status

release commits-since-latest-release

| Task / Subproject | Repository | CI Status | |:------------------|:-----------|:----------| | GitHub pages (docs) | neorv32 | GitHub Pages | | Documentation build | 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 | | MicroPython port | neorv32-micropython | neorv32-micropython |

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 AMD, Intel, Lattice, Microchip, Gowin and Cologne Chip FPGAs. The conversion into a single, plain-Verilog module file is automatically checked by the neorv32-verilog repository.

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

  • RISCV-ARCHID
  • RISC-V 32-bit little-endian pipelined/multi-cycle modified Harvard architecture
  • Single-core or SMP dual-core configuration (including low-latency inter-core communication)
  • configurable instruction sets and extensions: \ RV32 I E M A C B U X Zaamo Zalrsc Zcb Zba Zbb Zbkb Zbkc Zbkx Zbs Zicntr Zicond Zicsr Zifencei Zihpm Zfinx Zkn Zknd Zkne Zknh Zkt Zks Zksed Zksh Zmmul Zxcfu Sdext Sdtrig Smpmp
  • compatible to subsets of the RISC-V "Unprivileged ISA Specification" and "Privileged Architecture Specification"
  • machine and user privilege modes
  • implements all standard RISC-V exceptions and interrupts + 16 fast interrupt request channels as NEORV32-specific extension
  • custom functions unit (CFU as Zxcfu ISA extension) for custom RISC-V instructions;
  • intrinsic libraries for CPU extensions that are not yet supported by GCC

Memories

  • processor-internal data and instruction memories (DMEM & IMEM) and caches (iCACHE & dCACHE)
  • pre-installed bootloader (BOOTLDROM) with serial user interface; allows booting application code via UART, TWI or SPI flash or from an SD card

Timers and Counters

  • core local interruptor (CLINT), RISC-V-compatible
  • 32-bit general purpose timer (GPTMR)
  • watchdog timer (WDT)

Input / Output

  • standard serial interfaces: UART (2x), SPI (SPI host), SDI (SPI device), TWI (I²C host), TWD (I²C device), ONEWIRE (1-wire host)
  • interrupt-capable general purpose IOs (GPIO) and PWM
  • smart LED interface (NEOLED) to directly control NeoPixel(TM) LEDs

SoC Connectivity

  • 32-bit external bus interface - Wishbone-compatible (XBUS); wrapper for AXI4 interfaces
  • stream link interface with independent RX and TX channels - AXI4-Stream compatible (SLINK)

Advanced

  • true-random number generator (TRNG) based on the neoTRNG
  • custom functions subsystem (CFS) for custom tightly-coupled co-processors, accelerators or interfaces
  • direct memory access controller (DMA) for CPU-independent data transfers and conversions

Debugging

  • on-chip debugger (OCD) accessible via standard JTAG interface
  • compatible to the "Minimal RISC-V Debug Specification Version 1.0"
  • compatible with OpenOCD, GDB and Segger Embedded Studio
  • RISC-V trigger module for hardware-assisted break- and watchpoints
  • optional JTAG authentication module to implement custom security mechanisms
  • execution trace buffer (TRACER)

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, fmax from _Slow 1200mV 0C Model).

| CPU Configuration (version 1.7.8.5) | LEs | FFs | Memory bits | DSPs | fmax | |:-----------------------|:----:|:----:|:----:|:-:|:-------:| | `rv32iZicsr| 1223 | 607 | 1024 | 0 | 130 MHz | |rv32iZicsrZicntr| 1578 | 773 | 1024 | 0 | 130 MHz | |rv32imcZicsrZicntr` | 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.

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

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

  • Overview - license, disclaimer, limitation of liability for external links, proprietary notice, etc.
  • Citing - citing information

license DOI

This is an open-source project that is free of charge and provided under an permissive license.


:heart: A big shout-out to the community and all the contributors!

Owner

  • Name: Stephan
  • Login: stnolting
  • Kind: user
  • Location: European Union
  • Company: @Fraunhofer-IMS

"Roads? Where we're going, we don't need roads." - Doc Brown

GitHub Events

Total
  • Create event: 132
  • Release event: 13
  • Issues event: 93
  • Watch event: 243
  • Delete event: 126
  • Member event: 3
  • Issue comment event: 441
  • Push event: 704
  • Pull request review event: 113
  • Pull request review comment event: 94
  • Pull request event: 326
  • Fork event: 52
Last Year
  • Create event: 132
  • Release event: 13
  • Issues event: 93
  • Watch event: 243
  • Delete event: 126
  • Member event: 3
  • Issue comment event: 441
  • Push event: 704
  • Pull request review event: 113
  • Pull request review comment event: 94
  • Pull request event: 326
  • Fork event: 52

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 112
  • Total pull requests: 427
  • Average time to close issues: 25 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 52
  • Total pull request authors: 34
  • Average comments per issue: 4.17
  • Average comments per pull request: 0.89
  • Merged pull requests: 345
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 59
  • Pull requests: 291
  • Average time to close issues: 5 days
  • Average time to close pull requests: 2 days
  • Issue authors: 33
  • Pull request authors: 24
  • Average comments per issue: 2.44
  • Average comments per pull request: 0.99
  • Merged pull requests: 233
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mahdi259 (16)
  • stnolting (14)
  • mikaelsky (7)
  • mmcheraghi (5)
  • Sam-Vervaeck (5)
  • jpf91 (4)
  • Unike267 (3)
  • robhancocksed (3)
  • csantosb (2)
  • NikLeberg (2)
  • lebruu (2)
  • stdefeber (2)
  • fedy0 (2)
  • CyberFox001 (2)
  • henrikbrixandersen (2)
Pull Request Authors
  • stnolting (323)
  • LukasP46 (24)
  • donlon (8)
  • mikaelsky (7)
  • SirBramble (6)
  • henrikbrixandersen (6)
  • NikLeberg (6)
  • umarcor (5)
  • ecstrema (4)
  • pepijndevos (4)
  • biosbob (2)
  • racodond (2)
  • DAR0001 (2)
  • Unike267 (2)
  • josuah (2)
Top Labels
Issue Labels
HW (28) bug (18) troubleshooting (17) enhancement (16) SW (12) question (11) risc-v compliance (10) help wanted (9) DOC (8) customization (5) experimental (2) good first issue (2) stale (2) optimization (1) coding-style (1) cleanup (1)
Pull Request Labels
HW (296) cleanup (94) enhancement (94) SW (76) bug (70) optimization (55) experimental (29) risc-v compliance (27) coding-style (25) DOC (21) CI (8) stale (3) help wanted (3) good first issue (1) customization (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 65
proxy.golang.org: github.com/stnolting/neorv32
  • Versions: 65
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago

Dependencies

.github/workflows/Documentation.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/upload-artifact v2 composite
  • mattnotmitt/doxygen-action v1.2.1 composite
.github/workflows/Processor.yml actions
  • VUnit/vunit_action master composite
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • docker://ghcr.io/stnolting/neorv32/sim * composite