1 |
71 |
zero_gravi |
:sectnums:
|
2 |
|
|
=== Rationale
|
3 |
|
|
|
4 |
|
|
**Why did you make this?**
|
5 |
|
|
|
6 |
|
|
Processor and CPU architecture designs are fascinating things: they are the magic frontier where software meets hardware.
|
7 |
|
|
This project started as something like a _journey_ into this magic realm to understand how things actually work
|
8 |
|
|
down on this very low level and evolved over time to a capable system on chip.
|
9 |
|
|
|
10 |
|
|
But there is more: when I started to dive into the emerging RISC-V ecosystem I felt overwhelmed by the complexity.
|
11 |
|
|
As a beginner it is hard to get an overview - especially when you want to setup a minimal platform to tinker with...
|
12 |
|
|
Which core to use? How to get the right toolchain? What features do I need? How does booting work? How do I
|
13 |
|
|
create an actual executable? How to get that into the hardware? How to customize things? **_Where to start???_**
|
14 |
|
|
|
15 |
|
|
This project aims to provide a _simple to understand_ and _easy to use_ yet _powerful_ and _flexible_ platform
|
16 |
|
|
that targets FPGA and RISC-V beginners as well as advanced users.
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
**Why a _soft-core_ processor?**
|
20 |
|
|
|
21 |
|
|
As a matter of fact soft-core processors _cannot_ compete with discrete (like FPGA hard-macro) processors in terms
|
22 |
|
|
of performance, energy efficiency and size. But they do fill a niche in FPGA design space: for example, soft-core processors
|
23 |
|
|
allow to implement the _control flow part_ of certain applications (e.g. communication protocol handling) using
|
24 |
|
|
software like plain C. This provides high flexibility as software can be easily changed, re-compiled and
|
25 |
|
|
re-uploaded again.
|
26 |
|
|
|
27 |
|
|
Furthermore, the concept of flexibility applies to all aspects of a soft-core processor. The user can add
|
28 |
|
|
_exactly_ the features that are required by the application: additional memories, custom interfaces, specialized
|
29 |
|
|
co-processors and even user-defined instructions.
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
**Why RISC-V?**
|
33 |
|
|
|
34 |
72 |
zero_gravi |
image::riscv_logo.png[width=250,align=left]
|
35 |
|
|
|
36 |
71 |
zero_gravi |
[quote, RISC-V International, https://riscv.org/about/]
|
37 |
|
|
____
|
38 |
|
|
RISC-V is a free and open ISA enabling a new era of processor innovation through open standard collaboration.
|
39 |
|
|
____
|
40 |
|
|
|
41 |
|
|
Open-source is a great thing!
|
42 |
|
|
While open-source has already become quite popular in _software_, hardware-focused projects still need to catch up.
|
43 |
|
|
Admittedly, there has been quite a development, but mainly in terms of _platforms_ and _applications_ (so
|
44 |
|
|
schematics, PCBs, etc.). Although processors and CPUs are the heart of almost every digital system, having a true
|
45 |
|
|
open-source silicon is still a rarity. RISC-V aims to change that - and even it is _just one approach_, it helps paving
|
46 |
|
|
the road for future development.
|
47 |
|
|
|
48 |
|
|
Furthermore, I highly appreciate the community aspect of RISC-V. The ISA and everything beyond is developed in direct
|
49 |
|
|
contact with the community: this includes businesses and professionals but also hobbyist, amateurs and people
|
50 |
|
|
that are just curious. Everyone can join discussions and contribute to RISC-V in their very own way.
|
51 |
|
|
|
52 |
|
|
Finally, I really like the RISC-V ISA itself. It aims to be a clean, orthogonal and "intuitive" ISA that
|
53 |
|
|
resembles with the basic concepts of _RISC_: simple yet effective.
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
**Yet another RISC-V core? What makes it special?**
|
57 |
|
|
|
58 |
|
|
The NEORV32 is not based on another RISC-V core. It was build entirely from ground up (just following the official
|
59 |
|
|
ISA specs). The project does not intend to replace certain RISC-V cores or
|
60 |
|
|
just beat existing ones like https://github.com/SpinalHDL/VexRiscv[VexRISC] in terms of performance or
|
61 |
|
|
https://github.com/olofk/serv[SERV] in terms of size. It was build having a different design goal in mind.
|
62 |
|
|
|
63 |
|
|
The project aims to provide _another option_ in the RISC-V / soft-core design space with a different performance
|
64 |
|
|
vs. size trade-off and a different focus: _embrace_ concepts like documentation, platform-independence / portability,
|
65 |
72 |
zero_gravi |
RISC-V compatibility, _ extensibility & customization_ and _ease of use_ (see the <<_project_key_features>> below).
|
66 |
71 |
zero_gravi |
|
67 |
|
|
Furthermore, the NEORV32 pays special focus on _execution safety_ using <<_full_virtualization>>. The CPU aims to
|
68 |
|
|
provide fall-backs for _everything that could go wrong_. This includes malformed instruction words, privilege escalations
|
69 |
|
|
and even memory accesses that are checked for address space holes and deterministic response times of memory-mapped
|
70 |
|
|
devices. Precise exceptions allow a defined and fully-synchronized state of the CPU at every time an in every situation.
|