OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [README.md] - Diff between revs 63 and 64

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 63 Rev 64
Line 18... Line 18...
[![datasheet (html)](https://img.shields.io/badge/-HTML-ffbd00?longCache=true&style=flat-square)](https://stnolting.github.io/neorv32)
[![datasheet (html)](https://img.shields.io/badge/-HTML-ffbd00?longCache=true&style=flat-square)](https://stnolting.github.io/neorv32)
[![userguide (pdf)](https://img.shields.io/badge/user%20guide-PDF-ffbd00?longCache=true&style=flat-square&logo=asciidoctor)](https://github.com/stnolting/neorv32/releases/tag/nightly)
[![userguide (pdf)](https://img.shields.io/badge/user%20guide-PDF-ffbd00?longCache=true&style=flat-square&logo=asciidoctor)](https://github.com/stnolting/neorv32/releases/tag/nightly)
[![userguide (html)](https://img.shields.io/badge/-HTML-ffbd00?longCache=true&style=flat-square)](https://stnolting.github.io/neorv32/ug)
[![userguide (html)](https://img.shields.io/badge/-HTML-ffbd00?longCache=true&style=flat-square)](https://stnolting.github.io/neorv32/ug)
[![doxygen](https://img.shields.io/badge/doxygen-HTML-ffbd00?longCache=true&style=flat-square&logo=Doxygen)](https://stnolting.github.io/neorv32/sw/files.html)
[![doxygen](https://img.shields.io/badge/doxygen-HTML-ffbd00?longCache=true&style=flat-square&logo=Doxygen)](https://stnolting.github.io/neorv32/sw/files.html)
 
 
* [Overview](#Overview)
1. [Overview](#1-Overview)
* [Processor/SoC Features](#NEORV32-Processor-Features)
   1. [Key Features](#Project-Key-Features)
  * [FPGA Implementation Results](#FPGA-Implementation-Results---Processor)
2. [Processor/SoC Features](#2-NEORV32-Processor-Features)
* [CPU Features](#NEORV32-CPU-Features)
   1. [FPGA Implementation Results](#FPGA-Implementation-Results---Processor)
  * [Available ISA Extensions](#Available-ISA-Extensions)
3. [CPU Features](#3-NEORV32-CPU-Features)
  * [FPGA Implementation Results](#FPGA-Implementation-Results---CPU)
   1. [Available ISA Extensions](#Available-ISA-Extensions)
  * [Performance](#Performance)
   2. [FPGA Implementation Results](#FPGA-Implementation-Results---CPU)
* [Software Framework & Tooling](#Software-Framework-and-Tooling)
   3. [Performance](#Performance)
* [**Getting Started**](#Getting-Started) :rocket:
4. [Software Framework & Tooling](#4-Software-Framework-and-Tooling)
 
5. [**Getting Started**](#5-Getting-Started) :rocket:
 
 
 
 
 
 
## 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 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
Line 66... Line 67...
setting up your NEORV32 setup!
setting up your NEORV32 setup!
 
 
 
 
### Project Key Features
### Project Key Features
 
 
* [CPU](#NEORV32-CPU-Features) plus [Processor/SoC](#NEORV32-Processor-Features) plus [Software Framework & Tooling](#Software-Framework-and-Tooling)
- [x] all-in-one: [CPU](#NEORV32-CPU-Features) plus [Processor/SoC](#NEORV32-Processor-Features) plus [Software Framework & Tooling](#Software-Framework-and-Tooling)
* completely described in behavioral, platform-independent VHDL - no primitives, macros, etc.
- [x] completely described in behavioral, platform-independent VHDL - no primitives, macros, etc.
* fully synchronous design, no latches, no gated clocks
- [x] fully synchronous design, no latches, no gated clocks
* be as small as possible (while being as RISC-V-compliant as possible) – but with a reasonable size-performance trade-off
- [x] be as small as possible (while being as RISC-V-compliant as possible) – but with a reasonable size-performance trade-off
(the processor has to fit in a Lattice iCE40 UltraPlus 5k low-power FPGA running at 22+ MHz)
(the processor has to fit in a Lattice iCE40 UltraPlus 5k low-power FPGA running at 22+ MHz)
* from zero to `printf("hello world!");` - completely open source and documented
- [x] from zero to `printf("hello world!");` - completely open source and documented
* easy to use even for FPGA/RISC-V starters – intended to work *out of the box*
- [x] easy to use even for FPGA/RISC-V starters – intended to work *out of the box*
 
 
[[back to top](#The-NEORV32-RISC-V-Processor)]
[[back to top](#The-NEORV32-RISC-V-Processor)]
 
 
 
 
 
 
## NEORV32 Processor Features
## 2. NEORV32 Processor Features
 
 
The NEORV32 Processor (top entity: [`rtl/core/neorv32_top.vhd`](https://github.com/stnolting/neorv32/blob/master/rtl/core/neorv32_top.vhd))
The NEORV32 Processor (top entity: [`rtl/core/neorv32_top.vhd`](https://github.com/stnolting/neorv32/blob/master/rtl/core/neorv32_top.vhd))
provides a full-featured SoC build around the NEORV32 CPU. It is highly configurable via generics
provides a full-featured SoC build around the NEORV32 CPU. It is highly configurable via generics
to allow a flexible customization according to your needs. Note that all modules listed below are _optional_.
to allow a flexible customization according to your needs. Note that all modules listed below are _optional_.
In-depth detailed information regarding the processor/SoC can be found in the :books:
In-depth detailed information regarding the processor/SoC can be found in the :books:
Line 114... Line 115...
**SoC Connectivity and Integration**
**SoC Connectivity and Integration**
 
 
* 32-bit external bus interface, Wishbone b4 compatible
* 32-bit external bus interface, Wishbone b4 compatible
([WISHBONE](https://stnolting.github.io/neorv32/#_processor_external_memory_interface_wishbone_axi4_lite))
([WISHBONE](https://stnolting.github.io/neorv32/#_processor_external_memory_interface_wishbone_axi4_lite))
  * [wrapper](https://github.com/stnolting/neorv32/blob/master/rtl/system_integration/neorv32_SystemTop_axi4lite.vhd) for AXI4-Lite master interface
  * [wrapper](https://github.com/stnolting/neorv32/blob/master/rtl/system_integration/neorv32_SystemTop_axi4lite.vhd) for AXI4-Lite master interface
* 32-bit stram link interface with up to 8 independent RX and TX links
* 32-bit stream link interface with up to 8 independent RX and TX links
([SLINK](https://stnolting.github.io/neorv32/#_stream_link_interface_slink))
([SLINK](https://stnolting.github.io/neorv32/#_stream_link_interface_slink))
  * AXI4-Stream compatible
  * AXI4-Stream compatible
* external interrupt controller with up to 32 channels
* external interrupt controller with up to 32 channels
([XIRQ](https://stnolting.github.io/neorv32/#_external_interrupt_controller_xirq))
([XIRQ](https://stnolting.github.io/neorv32/#_external_interrupt_controller_xirq))
* custom functions subsystem ([CFS](https://stnolting.github.io/neorv32/#_custom_functions_subsystem_cfs))
* custom functions subsystem ([CFS](https://stnolting.github.io/neorv32/#_custom_functions_subsystem_cfs))
Line 139... Line 140...
[[back to top](#The-NEORV32-RISC-V-Processor)]
[[back to top](#The-NEORV32-RISC-V-Processor)]
 
 
 
 
### FPGA Implementation Results - Processor
### FPGA Implementation Results - Processor
 
 
The hardware resources used by a specifc processor setup is defined by the implemented CPU extensions
The hardware resources used by a specific processor setup is defined by the implemented CPU extensions
([see below](#FPGA-Implementation-Results---CPU)), the configuration of the peripheral modules and some "glue logic".
([see below](#FPGA-Implementation-Results---CPU)), 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 ressource 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.
 
 
:information_source: The [`setups`](https://github.com/stnolting/neorv32/tree/master/setups) folder provides exemplary FPGA
:information_source: The [`setups`](https://github.com/stnolting/neorv32/tree/master/setups) folder provides exemplary FPGA
setups targeting various FPGA boards and toolchains. These setups also provide ressource utilization reports for different
setups targeting various FPGA boards and toolchains. These setups also provide resource utilization reports for different
SoC configurations
SoC configurations
 
 
[[back to top](#The-NEORV32-RISC-V-Processor)]
[[back to top](#The-NEORV32-RISC-V-Processor)]
 
 
 
 
 
 
## NEORV32 CPU Features
## 3. NEORV32 CPU Features
 
 
:books: In-depth detailed information regarding the CPU can be found in the
:books: In-depth detailed information regarding the CPU can be found in the
[online documentation - _"NEORV32 Central Processing Unit"_](https://stnolting.github.io/neorv32/#_neorv32_central_processing_unit_cpu).
[online documentation - _"NEORV32 Central Processing Unit"_](https://stnolting.github.io/neorv32/#_neorv32_central_processing_unit_cpu).
 
 
The CPU (top entity: [`rtl/core/neorv32_cpu.vhd`](https://github.com/stnolting/neorv32/blob/master/rtl/core/neorv32_cpu.vhd))
The CPU (top entity: [`rtl/core/neorv32_cpu.vhd`](https://github.com/stnolting/neorv32/blob/master/rtl/core/neorv32_cpu.vhd))
implements the RISC-V 32-bit `rv32` ISA with optional extensions (see below). It is compatible to a subset of the
implements the RISC-V 32-bit `rv32` ISA with optional extensions (see below). It is compatible to subsets of the
*Unprivileged ISA Specification* [(Version 2.2)](https://github.com/stnolting/neorv32/blob/master/docs/references/riscv-spec.pdf)
*Unprivileged ISA Specification* [(Version 2.2)](https://github.com/stnolting/neorv32/blob/master/docs/references/riscv-spec.pdf)
and a subset of the *Privileged Architecture Specification* [(Version 1.12-draft)](https://github.com/stnolting/neorv32/blob/master/docs/references/riscv-privileged.pdf).
and the *Privileged Architecture Specification* [(Version 1.12-draft)](https://github.com/stnolting/neorv32/blob/master/docs/references/riscv-privileged.pdf).
Compatiility is checked by passing the [official RISC-V architecture tests](https://github.com/riscv/riscv-arch-test)
Compatibility is checked by passing the [official RISC-V architecture tests](https://github.com/riscv/riscv-arch-test)
(see [`sim/README`](sim/README.md)).
(see [`sim/README`](sim/README.md)).
 
 
The core implements a little-endian von-Neumann architecture using two pipeline stages. Each stage uses a multi-cycle processing
The core implements a little-endian Von-Neumann architecture using two pipeline stages, where each stage can operate in a multi-cycle processing
scheme. The CPU supports three privilege levels (`machine` and optional `user` and `debug_mode`), three standard RISC-V machine
scheme. The CPU supports three privilege levels (`machine` and optional `user` and `debug_mode`), the three standard RISC-V machine
interrupts (`MTI`, `MEI`, `MSI`), a single non-maskable interrupt plus 16 _fast interrupt requests_ as custom extensions.
interrupts (`MTI`, `MEI`, `MSI`) plus 16 _fast interrupt requests_ as custom extensions.
It also supports **all** standard RISC-V exceptions (instruction/load/store misaligned address & bus access fault, illegal
It also supports **all** standard RISC-V exceptions (instruction/load/store misaligned address & bus access fault, illegal
instruction, breakpoint, environment call)
instruction, breakpoint, environment calls). See :books: [_"Full Virtualization"_](https://stnolting.github.io/neorv32/#_full_virtualization)
(see :books: [_"Full Virtualization"_](https://stnolting.github.io/neorv32/#_full_virtualization)).
for more information.
 
 
 
 
### 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
Line 196... Line 197...
[[`PMP`](https://stnolting.github.io/neorv32/#_pmp_physical_memory_protection)]
[[`PMP`](https://stnolting.github.io/neorv32/#_pmp_physical_memory_protection)]
[[`HPM`](https://stnolting.github.io/neorv32/#_hpm_hardware_performance_monitors)]
[[`HPM`](https://stnolting.github.io/neorv32/#_hpm_hardware_performance_monitors)]
[[`DEBUG`](https://stnolting.github.io/neorv32/#_cpu_debug_mode)]**
[[`DEBUG`](https://stnolting.github.io/neorv32/#_cpu_debug_mode)]**
 
 
:warning: The `Zbb`, `Zfinx` and `Zmmul` RISC-V extensions are frozen but not officially ratified yet. Hence, there is no
:warning: The `Zbb`, `Zfinx` and `Zmmul` RISC-V extensions are frozen but not officially ratified yet. Hence, there is no
upstream gcc support. To circumvence this, the NEORV32 software framework provides _intrinsic_ libraries for these extensions.
upstream gcc support. To circumvent this, the NEORV32 software framework provides _intrinsic_ libraries for these 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 215... Line 216...
|:--------------------------------------------------|:----:|:----:|:-----------:|:------------:|:-------:|
|:--------------------------------------------------|:----:|:----:|:-----------:|:------------:|:-------:|
| `rv32i`                                           |  806 |  359 |        1024 |            0 | 125 MHz |
| `rv32i`                                           |  806 |  359 |        1024 |            0 | 125 MHz |
| `rv32i_Zicsr`                                     | 1729 |  813 |        1024 |            0 | 124 MHz |
| `rv32i_Zicsr`                                     | 1729 |  813 |        1024 |            0 | 124 MHz |
| `rv32imac_Zicsr`                                  | 2511 | 1074 |        1024 |            0 | 124 MHz |
| `rv32imac_Zicsr`                                  | 2511 | 1074 |        1024 |            0 | 124 MHz |
 
 
:information_source: An incremental list of CPU exntension's hardware utilization can found in
:information_source: An incremental list of CPU extension's hardware utilization can found in
[online documentation - _"FPGA Implementation Results - CPU"_](https://stnolting.github.io/neorv32/#_cpu).
[online documentation - _"FPGA Implementation Results - CPU"_](https://stnolting.github.io/neorv32/#_cpu).
 
 
:information_source: The CPU provides options to further reduce the footprint (for example by constraining
:information_source: The CPU provides options to further reduce the footprint (for example by constraining
the CPU-internal counters). See the [online data](https://stnolting.github.io/neorv32) sheet for more information.
the CPU-internal counters). See the [online data](https://stnolting.github.io/neorv32) sheet for more information.
 
 
[[back to top](#The-NEORV32-RISC-V-Processor)]
[[back to top](#The-NEORV32-RISC-V-Processor)]
 
 
 
 
### Performance
### Performance
 
 
The NEORV32 CPU is based on a two-stages pipelined architecutre. Since both stage use a multi-cycle processing scheme,
The NEORV32 CPU is based on a two-stages pipelined architecture. Since both stage use a multi-cycle processing scheme,
each instruction requires several clock cycles to execute (2 cycles for ALU operations, up to 40 cycles for divisions).
each instruction requires several clock cycles to execute (2 cycles for ALU operations, up to 40 cycles for divisions).
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 (relative CoreMark score and average cycles per instruction) for
The following table shows the performance results (relative CoreMark score and average cycles per instruction) for
Line 261... Line 262...
 
 
[[back to top](#The-NEORV32-RISC-V-Processor)]
[[back to top](#The-NEORV32-RISC-V-Processor)]
 
 
 
 
 
 
## Software Framework and Tooling
## 4. Software Framework and Tooling
 
 
:books: In-depth detailed information regarding the software framework can be found in the
:books: In-depth detailed information regarding the software framework can be found in the
[online documentation - _"Software Framework"_](https://stnolting.github.io/neorv32/#_software_framework).
[online documentation - _"Software Framework"_](https://stnolting.github.io/neorv32/#_software_framework).
 
 
* [core libraries](https://github.com/stnolting/neorv32/tree/master/sw/lib) for high-level usage of the provided functions and peripherals
* [core libraries](https://github.com/stnolting/neorv32/tree/master/sw/lib) for high-level usage of the provided functions and peripherals
Line 285... Line 286...
 
 
[[back to top](#The-NEORV32-RISC-V-Processor)]
[[back to top](#The-NEORV32-RISC-V-Processor)]
 
 
 
 
 
 
## Getting Started
## 5. Getting Started
 
 
This overview provides some *quick links* to the most important sections of the
This overview provides some *quick links* to the most important sections of the
[online Data Sheet](https://stnolting.github.io/neorv32) and the
[online Data Sheet](https://stnolting.github.io/neorv32) and the
[online User Guide](https://stnolting.github.io/neorv32/ug).
[online User Guide](https://stnolting.github.io/neorv32/ug).
 
 
Line 323... Line 324...
* [General Hardware Setup](https://stnolting.github.io/neorv32/ug/#_general_hardware_setup) - setup a new NEORV32 EDA project
* [General Hardware Setup](https://stnolting.github.io/neorv32/ug/#_general_hardware_setup) - setup a new NEORV32 EDA project
* [General Software Setup](https://stnolting.github.io/neorv32/ug/#_general_software_framework_setup) - configure the software framework
* [General Software Setup](https://stnolting.github.io/neorv32/ug/#_general_software_framework_setup) - configure the software framework
* [Application Compilation](https://stnolting.github.io/neorv32/ug/#_application_program_compilation) - compile an application using `make`
* [Application Compilation](https://stnolting.github.io/neorv32/ug/#_application_program_compilation) - compile an application using `make`
* [Upload via Bootloader](https://stnolting.github.io/neorv32/ug/#_uploading_and_starting_of_a_binary_executable_image_via_uart) - upload and execute executables
* [Upload via Bootloader](https://stnolting.github.io/neorv32/ug/#_uploading_and_starting_of_a_binary_executable_image_via_uart) - upload and execute executables
* [Application-Specific Processor Configuration](https://stnolting.github.io/neorv32/ug/#_application_specific_processor_configuration) - tailor the processor to your needs
* [Application-Specific Processor Configuration](https://stnolting.github.io/neorv32/ug/#_application_specific_processor_configuration) - tailor the processor to your needs
 
* [Adding Custom Hardware Modules](https://stnolting.github.io/neorv32/ug/#_adding_custom_hardware_modules) - add _your_ custom hardware
* [Debugging via the On-Chip Debugger](https://stnolting.github.io/neorv32/ug/#_debugging_using_the_on_chip_debugger) - step through code *online* and *in-system*
* [Debugging via the On-Chip Debugger](https://stnolting.github.io/neorv32/ug/#_debugging_using_the_on_chip_debugger) - step through code *online* and *in-system*
* [Simulation](https://stnolting.github.io/neorv32/ug/#_simulating_the_processor) - simulate the whole SoC
* [Simulation](https://stnolting.github.io/neorv32/ug/#_simulating_the_processor) - simulate the whole SoC
  * [Hello World!](https://stnolting.github.io/neorv32/ug/index.html#_hello_world) - run a quick _"hello world"_ simulation
  * [Hello World!](https://stnolting.github.io/neorv32/ug/index.html#_hello_world) - run a quick _"hello world"_ simulation
 
 
### :copyright: Legal
### :copyright: Legal
Line 347... Line 349...
 
 
Continous integration provided by [:octocat: GitHub Actions](https://github.com/features/actions) and powered by [GHDL](https://github.com/ghdl/ghdl).
Continous integration provided by [:octocat: GitHub Actions](https://github.com/features/actions) and powered by [GHDL](https://github.com/ghdl/ghdl).
 
 
--------
--------
 
 
Made with :coffee: in Hannover, Germany :eu:
Made with :coffee: in Hanover, Germany :eu:
Made with :coffee: in Hanover, Germany :eu:
Made with :coffee: in Hanover, Germany :eu:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.