Line 25... |
Line 25... |
|
|
## 1. Overview
|
## 1. Overview
|
|
|
![neorv32 Overview](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/figures/neorv32_processor.png)
|
![neorv32 Overview](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/figures/neorv32_processor.png)
|
|
|
The NEORV32 Processor is a **customizable microcontroller-like system on chip (SoC)** that is based on the RISC-V NEORV32 CPU.
|
The NEORV32 Processor is a **customizable microcontroller-like system on chip (SoC)** that is based on the
|
|
[RISC-V](https://riscv.org/) NEORV32 CPU.
|
The project is intended as auxiliary processor in larger SoC designs or as *ready-to-go* stand-alone
|
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.
|
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.
|
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
|
Therefore, the CPU ensures that all memory access are acknowledged and no invalid/malformed instructions
|
Line 40... |
Line 41... |
:books: For detailed information take a look at the [NEORV32 documentation](https://stnolting.github.io/neorv32/) (online at GitHub-pages).
|
:books: For detailed information take a look at the [NEORV32 documentation](https://stnolting.github.io/neorv32/) (online at GitHub-pages).
|
|
|
:label: The project's change log is available in [`CHANGELOG.md`](https://github.com/stnolting/neorv32/blob/master/CHANGELOG.md).
|
:label: The project's change log is available in [`CHANGELOG.md`](https://github.com/stnolting/neorv32/blob/master/CHANGELOG.md).
|
To see the changes between _official releases_ visit the project's [release page](https://github.com/stnolting/neorv32/releases).
|
To see the changes between _official releases_ visit the project's [release page](https://github.com/stnolting/neorv32/releases).
|
|
|
:package: [Exemplary setups](https://github.com/stnolting/neorv32/tree/master/setups) targeting
|
:package: [**Exemplary setups**](https://github.com/stnolting/neorv32-setups) targeting
|
various FPGA boards and toolchains to get you started.
|
various FPGA boards and toolchains to get you started.
|
|
|
:kite: Supported by upstream [Zephyr OS](https://docs.zephyrproject.org/latest/boards/riscv/neorv32/doc/index.html) and FreeRTOS.
|
:kite: Supported by upstream [Zephyr OS](https://docs.zephyrproject.org/latest/boards/riscv/neorv32/doc/index.html) and FreeRTOS.
|
|
|
:bulb: Feel free to open a [new issue](https://github.com/stnolting/neorv32/issues) or start a
|
:bulb: Feel free to open a [new issue](https://github.com/stnolting/neorv32/issues) or start a
|
Line 68... |
Line 69... |
|
|
### Status
|
### Status
|
|
|
[![release](https://img.shields.io/github/v/release/stnolting/neorv32?longCache=true&style=flat-square&logo=GitHub)](https://github.com/stnolting/neorv32/releases)
|
[![release](https://img.shields.io/github/v/release/stnolting/neorv32?longCache=true&style=flat-square&logo=GitHub)](https://github.com/stnolting/neorv32/releases)
|
[![GitHub Pages](https://img.shields.io/website.svg?label=stnolting.github.io%2Fneorv32&longCache=true&style=flat-square&url=http%3A%2F%2Fstnolting.github.io%2Fneorv32%2Findex.html&logo=GitHub)](https://stnolting.github.io/neorv32)
|
[![GitHub Pages](https://img.shields.io/website.svg?label=stnolting.github.io%2Fneorv32&longCache=true&style=flat-square&url=http%3A%2F%2Fstnolting.github.io%2Fneorv32%2Findex.html&logo=GitHub)](https://stnolting.github.io/neorv32)
|
[![Documentation](https://img.shields.io/github/workflow/status/stnolting/neorv32/Documentation/master?longCache=true&style=flat-square&label=Documentation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3ADocumentation)
|
|
\
|
\
|
|
[![Documentation](https://img.shields.io/github/workflow/status/stnolting/neorv32/Documentation/master?longCache=true&style=flat-square&label=Documentation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3ADocumentation)
|
[![riscv-arch-test](https://img.shields.io/github/workflow/status/stnolting/neorv32/riscv-arch-test/master?longCache=true&style=flat-square&label=riscv-arch-test&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3Ariscv-arch-test)
|
[![riscv-arch-test](https://img.shields.io/github/workflow/status/stnolting/neorv32/riscv-arch-test/master?longCache=true&style=flat-square&label=riscv-arch-test&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3Ariscv-arch-test)
|
[![Processor](https://img.shields.io/github/workflow/status/stnolting/neorv32/Processor/master?longCache=true&style=flat-square&label=Processor&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AProcessor)
|
[![Processor](https://img.shields.io/github/workflow/status/stnolting/neorv32/Processor/master?longCache=true&style=flat-square&label=Processor&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AProcessor)
|
[![Implementation](https://img.shields.io/github/workflow/status/stnolting/neorv32/Implementation/master?longCache=true&style=flat-square&label=Implementation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AImplementation)
|
|
[![Windows](https://img.shields.io/github/workflow/status/stnolting/neorv32/Windows/master?longCache=true&style=flat-square&label=Windows&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AWindows)
|
|
|
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
|
|
|
|
## 2. NEORV32 Processor Features
|
## 2. NEORV32 Processor Features
|
Line 139... |
Line 138... |
the configuration of the peripheral modules and some "glue logic".
|
the configuration of the peripheral modules and some "glue logic".
|
Section [_FPGA Implementation Results - Processor Modules_](https://stnolting.github.io/neorv32/#_processor_modules)
|
Section [_FPGA Implementation Results - Processor Modules_](https://stnolting.github.io/neorv32/#_processor_modules)
|
of the online datasheet shows the resource utilization of each optional processor module to allow an
|
of the online datasheet shows the resource utilization of each optional processor module to allow an
|
estimation of the actual setup's hardware requirements.
|
estimation of the actual setup's hardware requirements.
|
|
|
The [`setups`](https://github.com/stnolting/neorv32/tree/master/setups) folder provides exemplary FPGA
|
:bulb: The [`neorv32-setups`](https://github.com/stnolting/neorv32-setups) repository provides exemplary FPGA
|
setups targeting various FPGA boards and toolchains. These setups also provide resource utilization reports for different
|
setups targeting various FPGA boards and toolchains. These setups also provide resource utilization reports for different
|
SoC configurations. The latest utilization reports for those setups can be found in the report of the
|
SoC configurations. The latest utilization reports for those setups can be found in the report of the
|
[Implementation Workflow](https://github.com/stnolting/neorv32/actions/workflows/Implementation.yml).
|
[Implementation Workflow](https://github.com/stnolting/neorv32-setups/actions/workflows/Implementation.yml).
|
|
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
|
|
|
|
|
|
Line 169... |
Line 168... |
|
|
|
|
### Available ISA Extensions
|
### Available ISA Extensions
|
|
|
Currently, the following _optional_ RISC-V-compatible ISA extensions are implemented (linked to the according
|
Currently, the following _optional_ RISC-V-compatible ISA extensions are implemented (linked to the according
|
documentation section). Note that the `X` extension is always enabled.
|
documentation section).
|
|
|
**RV32
|
**RV32
|
[[`I`](https://stnolting.github.io/neorv32/#_i_base_integer_isa)/
|
[[`I`](https://stnolting.github.io/neorv32/#_i_base_integer_isa)/
|
[`E`](https://stnolting.github.io/neorv32/#_e_embedded_cpu)]
|
[`E`](https://stnolting.github.io/neorv32/#_e_embedded_cpu)]
|
[[`A`](https://stnolting.github.io/neorv32/#_a_atomic_memory_access)]
|
[[`A`](https://stnolting.github.io/neorv32/#_a_atomic_memory_access)]
|
Line 189... |
Line 188... |
[[`Zifencei`](https://stnolting.github.io/neorv32/#_zifencei_instruction_stream_synchronization)]
|
[[`Zifencei`](https://stnolting.github.io/neorv32/#_zifencei_instruction_stream_synchronization)]
|
[[`Zmmul`](https://stnolting.github.io/neorv32/#_zmmul_integer_multiplication)]
|
[[`Zmmul`](https://stnolting.github.io/neorv32/#_zmmul_integer_multiplication)]
|
[[`PMP`](https://stnolting.github.io/neorv32/#_pmp_physical_memory_protection)]
|
[[`PMP`](https://stnolting.github.io/neorv32/#_pmp_physical_memory_protection)]
|
[[`DEBUG`](https://stnolting.github.io/neorv32/#_cpu_debug_mode)]**
|
[[`DEBUG`](https://stnolting.github.io/neorv32/#_cpu_debug_mode)]**
|
|
|
:warning: The `B`, `Zfinx` and `Zmmul` RISC-V extensions are frozen but not officially ratified yet. Hence, there is no
|
:warning: The `B`, `Zfinx` and `Zmmul` RISC-V are frozen and officially ratified but there is no
|
upstream gcc support. To circumvent this, the NEORV32 software framework provides _intrinsic libraries_ for these extensions.
|
upstream gcc support yet. To circumvent this, the NEORV32 software framework provides _intrinsic libraries_ for the
|
|
`B` and `Zfinx` extensions.
|
|
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
|
|
|
|
### FPGA Implementation Results - CPU
|
### FPGA Implementation Results - CPU
|
Line 206... |
Line 206... |
|:------------------------|:----:|:----:|:----:|:-:|:-------:|
|
|:------------------------|:----:|:----:|:----:|:-:|:-------:|
|
| `rv32i` | 806 | 359 | 1024 | 0 | 125 MHz |
|
| `rv32i` | 806 | 359 | 1024 | 0 | 125 MHz |
|
| `rv32i_Zicsr_Zicntr` | 1729 | 813 | 1024 | 0 | 124 MHz |
|
| `rv32i_Zicsr_Zicntr` | 1729 | 813 | 1024 | 0 | 124 MHz |
|
| `rv32imac_Zicsr_Zicntr` | 2511 | 1074 | 1024 | 0 | 124 MHz |
|
| `rv32imac_Zicsr_Zicntr` | 2511 | 1074 | 1024 | 0 | 124 MHz |
|
|
|
:information_source: An incremental list of CPU extension's hardware utilization can found in the
|
:bulb: An incremental list of CPU extension's hardware utilization can found in the
|
[_Data Sheet: FPGA Implementation Results - CPU_](https://stnolting.github.io/neorv32/#_cpu).
|
[_Data Sheet: FPGA Implementation Results - CPU_](https://stnolting.github.io/neorv32/#_cpu).
|
|
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
|
|
|
|
Line 218... |
Line 218... |
|
|
The NEORV32 CPU is based on a two-stages pipeline architecture (fetch and execute).
|
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
|
The average CPI (cycles per instruction) depends on the instruction mix of a specific applications and also on the
|
available CPU extensions.
|
available CPU extensions.
|
|
|
The following table shows the performance results (scores and average CPI) for _exemplary_ CPU configurations executing
|
The following table shows the performance results (scores and average CPI) for exemplary CPU configurations executing
|
2000 iterations of the [CoreMark](https://github.com/stnolting/neorv32/blob/master/sw/example/coremark) CPU benchmark.
|
2000 iterations of the [CoreMark](https://github.com/stnolting/neorv32/blob/master/sw/example/coremark) CPU benchmark
|
|
(using plain rv32i built-in libraries only!).
|
|
|
| CPU Configuration (version [1.5.7.10](https://github.com/stnolting/neorv32/blob/master/CHANGELOG.md)) | CoreMark Score | CoreMarks/MHz | Average CPI |
|
| CPU Configuration (version [1.5.7.10](https://github.com/stnolting/neorv32/blob/master/CHANGELOG.md)) | CoreMark Score | CoreMarks/MHz | Average CPI |
|
|:------------------------------------------------|:-----:|:----------:|:--------:|
|
|:------------------------------------------------|:-----:|:----------:|:--------:|
|
| _small_ (`rv32i_Zicsr`) | 33.89 | **0.3389** | **4.04** |
|
| _small_ (`rv32i_Zicsr`) | 33.89 | **0.3389** | **4.04** |
|
| _medium_ (`rv32imc_Zicsr`) | 62.50 | **0.6250** | **5.34** |
|
| _medium_ (`rv32imc_Zicsr`) | 62.50 | **0.6250** | **5.34** |
|
| _performance_ (`rv32imc_Zicsr` + perf. options) | 95.23 | **0.9523** | **3.54** |
|
| _performance_ (`rv32imc_Zicsr` + perf. options) | 95.23 | **0.9523** | **3.54** |
|
|
|
:information_source: More information regarding the CPU performance can be found in the
|
:bulb: More information regarding the CPU performance can be found in the
|
[_Data Sheet: CPU Performance_](https://stnolting.github.io/neorv32/#_cpu_performance).
|
[_Data Sheet: CPU Performance_](https://stnolting.github.io/neorv32/#_cpu_performance).
|
|
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
|
|
|
|
Line 244... |
Line 245... |
* [SVD file](https://github.com/stnolting/neorv32/tree/master/sw/svd) for advanced debugging and IDE integration
|
* [SVD file](https://github.com/stnolting/neorv32/tree/master/sw/svd) for advanced debugging and IDE integration
|
* bootloader with UART interface console
|
* bootloader with UART interface console
|
* runtime environment for handling traps
|
* runtime environment for handling traps
|
* several [example programs](https://github.com/stnolting/neorv32/tree/master/sw/example) to get started including CoreMark, FreeRTOS and Conway's Game of Life
|
* several [example programs](https://github.com/stnolting/neorv32/tree/master/sw/example) to get started including CoreMark, FreeRTOS and Conway's Game of Life
|
* doxygen-based documentation, available on [GitHub pages](https://stnolting.github.io/neorv32/sw/files.html)
|
* doxygen-based documentation, available on [GitHub pages](https://stnolting.github.io/neorv32/sw/files.html)
|
* supports implementation using open source tooling (GHDL, Yosys and nextpnr; in the future: "Verilog-to-Routing") - both, software and hardware can be
|
* supports implementation using open source tooling ([GHDL](https://github.com/ghdl/ghdl), Yosys, nextpnr, ...) - both, software and hardware can be
|
developed and debugged with open source tooling
|
developed and debugged with open source tooling
|
* [continuous integration](https://github.com/stnolting/neorv32/actions) is available for:
|
* [continuous integration](https://github.com/stnolting/neorv32/actions) is available for:
|
* allowing users to see the expected execution/output of the tools
|
* allowing users to see the expected execution/output of the tools
|
* ensuring specification compliance
|
* ensuring specification compliance
|
* catching regressions
|
* catching regressions
|
Line 316... |
Line 317... |
|
|
This is an open-source project that is free of charge. Use this project in any way you like
|
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](https://github.com/stnolting/neorv32/blob/master/LICENSE)).
|
(as long as it complies to the permissive [license](https://github.com/stnolting/neorv32/blob/master/LICENSE)).
|
Please quote it appropriately. :+1:
|
Please quote it appropriately. :+1:
|
|
|
We (the community) and I highly appreciate _any_ kind of feedback! Feel free to start a new "show & tell"
|
|
[discussion](https://github.com/stnolting/neorv32/discussions), write some lines on our [gitter channel](https://gitter.im/neorv32/community)
|
|
or directly get in [contact](mailto:stnolting@gmail.com) with me.
|
|
|
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
[[back to top](#The-NEORV32-RISC-V-Processor)]
|
|
|
|
|
|
---------------------------------------
|
## Acknowledgements
|
|
|
|
**A big shout-out goes to the community and all the [contributors](https://github.com/stnolting/neorv32/graphs/contributors), who helped improving this project! :heart:**
|
**A big shout-out goes to the community and all the [contributors](https://github.com/stnolting/neorv32/graphs/contributors), who helped improving this project! :heart:**
|
|
|
[RISC-V](https://riscv.org/) - Instruction Sets Want To Be Free!
|
|
|
|
Continuous integration provided by [:octocat: GitHub Actions](https://github.com/features/actions) and powered by [GHDL](https://github.com/ghdl/ghdl).
|
|