The NEORV32 Processor is a customizable microcontroller-like system on chip (SoC) that is based on the RISC-V NEORV32 CPU. The project is intended as auxiliary processor in larger SoC designs or as ready-to-go stand-alone custom microcontroller that even fits into a Lattice iCE40 UltraPlus 5k low-power FPGA running at 24 MHz.
Special focus is paid on execution safety to provide defined and predictable behavior at any time. Therefore, the CPU ensures that all memory access are acknowledged and no invalid/malformed instructions are executed. Whenever an unexpected situation occurs the application code is informed via precise and resumable hardware exceptions.
:interrobang: Want to know more? Check out the project's rationale.
:books: For detailed information take a look at the NEORV32 online documentation. The latest pdf versions can be found here.
:label: The project's change log is available in CHANGELOG.md
.
To see the changes between official releases visit the project's release page.
:package: Exemplary setups targeting various FPGA boards and toolchains to get you started.
:kite: Supported by upstream Zephyr OS and FreeRTOS.
:bulb: Feel free to open a new issue or start a new discussion if you have questions, comments, ideas or if something is not working as expected. Or have a chat on our gitter channel. See how to contribute.
:rocket: Check out the quick links below or directly jump to the User Guide to get started setting up your NEORV32 setup!
printf("hello world!");
- completely open source and documentedThe NEORV32 is fully operational.
The processor passes the official RISC-V architecture tests, which are checked by the
neorv32-verif repository. It can successfully run any C program
(for example from the sw/example
folder) including CoreMark
and can be synthesized for any target technology - tested on Intel, Xilinx and Lattice FPGAs.
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. The following list shows all available SoC module. Note that all those modules are optional.
CPU
machine
and user
modesMemory
Timers
Input / Output
SoC Connectivity
Advanced
Debugging
:warning: The B
, Zfinx
and Zmmul
RISC-V ISA extensions are frozen and officially ratified but there is no
upstream gcc support yet (will be available with GCC12). To circumvent this, the NEORV32 software framework provides
intrinsic libraries for the B
and Zfinx
extensions.
Implementation results for exemplary CPU-only configuration generated for an Intel Cyclone IV E EP4CE22F17C6
FPGA
using Intel Quartus Prime Lite 21.1 (no timing constrains, balanced optimization, fmax from _Slow 1200mV 0C Model).
CPU Configuration (version 1.6.9.8) | LEs | FFs | Memory bits | DSPs | f_max |
---|---|---|---|---|---|
rv32i_Zicsr | 1328 | 678 | 1024 | 0 | 128 MHz |
rv32i_Zicsr_Zicntr | 1614 | 808 | 1024 | 0 | 128 MHz |
rv32imac_Zicsr_Zicntr | 2338 | 992 | 1024 | 0 | 128 MHz |
:bulb: An incremental list of the CPUs ISA extension's hardware utilization can found in the Data Sheet: FPGA Implementation Results - CPU.
The hardware resources used by a specific full-processor setup is defined by the implemented CPU extensions, the configuration of the peripheral modules and some "glue logic". Section FPGA Implementation Results - Processor Modules of the online datasheet shows the resource utilization of each optional processor module to allow an estimation of the actual setup's hardware requirements.
:bulb: The neorv32-setups
repository provides exemplary FPGA
setups targeting various FPGA boards and toolchains. The latest bitstreams and utilization reports for those setups
can be found in the assets of the Implementation Workflow.
:bulb: The CPU & SoC provide further "tuning" options to optimize the design for maximum performance, maximum clock speed, minimal area or minimal power consumption: UG: Application-Specific Processor Configuration
The NEORV32 CPU is based on a two-stages pipeline architecture (fetch and execute). The average CPI (cycles per instruction) depends on the instruction mix of a specific applications and also on the available CPU extensions.
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 | CoreMarks/MHz | Average CPI |
---|---|---|---|
small (rv32i_Zicsr ) | 33.89 | 0.3389 | 4.04 |
medium (rv32imc_Zicsr ) | 62.50 | 0.6250 | 5.34 |
performance (rv32imc_Zicsr + perf. options) | 95.23 | 0.9523 | 3.54 |
:bulb: More information regarding the CPU performance can be found in the Data Sheet: CPU Performance.
:books: Want to know more? Check out Data Sheet: Software Framework.
This overview provides some quick links to the most important sections of the online Data Sheet and the online User Guide.
Rationale - NEORV32: why? how come? what for?
NEORV32 Processor - the SoC
NEORV32 CPU - the CPU
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 quote it appropriately. :+1:
:heart: A big shout-out goes to the community and all the contributors, who helped improving this project!