Skip to content

Commit 348faba

Browse files
henrikbrixandersenkartben
authored andcommitted
boards: others: neorv32: update documentation
Update the NEORV32 board documentation to list the supported board targets and describe how to customize these to match custom NEORV32 implementations. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent 957ecf3 commit 348faba

File tree

1 file changed

+57
-31
lines changed

1 file changed

+57
-31
lines changed

boards/others/neorv32/doc/index.rst

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,26 @@ For more information about the NEORV32, see the following websites:
1515

1616
The currently supported version is NEORV32 v1.11.2.
1717

18-
Supported Features
19-
==================
18+
Supported Board Targets
19+
=======================
20+
21+
The following NEORV32 board targets are supported by Zephyr:
2022

21-
The ``neorv32`` board target can be used a generic definition for NEORV32
22-
based boards. Customization to fit custom NEORV32 implementations can be done
23-
using :ref:`devicetree overlays <use-dt-overlays>`.
23+
- ``neorv32/neorv32/minimalboot``
24+
- ``neorv32/neorv32/up5kdemo``
25+
26+
Each of these match one of the NEORV32 processor templates provided alongside the NEORV32 RTL.
27+
These board targets can be customized out-of-tree to match custom NEORV32 implementations using
28+
:ref:`board extensions <extend-board>` or :ref:`devicetree overlays <use-dt-overlays>`.
2429

2530
.. zephyr:board-supported-hw::
2631
32+
Supported Features
33+
******************
34+
35+
The following NEORV32 features are supported by Zephyr. These are pre-configured for the supported
36+
board targets, but can be customized to match custom NEORV32 implementations.
37+
2738
System Clock
2839
============
2940

@@ -35,48 +46,63 @@ node.
3546
CPU
3647
===
3748

38-
The default board configuration assumes the NEORV32 CPU implementation has the
39-
following RISC-V ISA extensions enabled:
49+
The SoC configuration assumes the NEORV32 CPU implementation has the following RISC-V ISA extensions
50+
enabled:
4051

41-
- I (Base Integer Instruction Set, 32-bit)
42-
- M (Integer Multiplication and Division)
52+
- Zicntr (Extension for Base Counters and Timers)
4353
- Zicsr (Control and Status Register (CSR) Instructions, always enabled)
4454
- Zifencei (Instruction-fetch fence, always enabled)
4555

56+
Other supported RISC-V ISA extensions must be enabled via Kconfig on the board level, and the
57+
``riscv,isa`` devicetree property of the ``cpu0`` node must be set accordingly.
58+
59+
Core Local Interruptor
60+
======================
61+
62+
The NEORV32 Core Local Interruptor (CLINT) and its machine timer (MTIMER) are supported but disabled
63+
by default. For NEORV32 SoC implementations supporting these, support can be enabled by setting
64+
the ``status`` properties of the ``clint`` and ``mtimer`` devicetree node to ``okay``.
65+
4666
Internal Instruction Memory
4767
===========================
4868

49-
The default board configuration assumes the NEORV32 SoC implementation has a 64k
50-
byte internal instruction memory (IMEM) for code execution. The size of the
51-
instruction memory can be overridden by changing the ``reg`` property of the
52-
``imem`` devicetree node.
69+
The internal instruction memory (IMEM) for code execution is supported but disabled by default. For
70+
NEORV32 SoC implementations supporting IMEM, support can be enabled by setting the size via the
71+
``reg`` property of the ``imem`` devicetree node and setting its ``status`` property to ``okay``.
5372

5473
Internal Data Memory
5574
====================
5675

57-
The default board configuration assumes the NEORV32 SoC implementation has a 64k
58-
byte internal data memory (DMEM). The size of the data memory can be overridden
59-
by changing the ``reg`` property of the ``dmem`` devicetree node.
76+
The internal data memory (DMEM) is supported but disabled by default. For NEORV32 SoC
77+
implementations supporting DMEM, support can be enabled by setting the size via the ``reg`` property
78+
of the ``dmem`` devicetree node and setting its ``status`` property to ``okay``.
6079

6180
Serial Port
6281
===========
6382

64-
The default configuration assumes the NEORV32 SoC implements UART0 for use as
65-
system console.
83+
The NEORV32 serial ports (UART0 and UART1) are supported but disabled by default. For NEORV32 SoC
84+
implementations supporting either of the UARTs, support can be enabled by setting the ``status``
85+
properties of the ``uart0`` and/or ``uart1`` devicetree node to ``okay``.
6686

6787
.. note::
88+
The board targets provide a console on UART0 with a baud rate of 19200 to match that of the
89+
standard NEORV32 bootloader. The baudrate can be changed by modifying the ``current-speed``
90+
property of the ``uart0`` devicetree node.
91+
92+
General Purpose Input/Output
93+
============================
6894

69-
The default configuration uses a baud rate of 19200 to match that of the
70-
standard NEORV32 bootloader. The baudrate can be changed by modifying the
71-
``current-speed`` property of the ``uart0`` devicetree node.
95+
The NEORV32 GPIO port is supported but disabled by default. For NEORV32 SoC implementations
96+
supporting the GPIOs, support can be enabled by setting the ``status`` property of the ``gpio``
97+
devicetree node to ``okay``. The number of supported GPIOs can be set via the ``ngpios`` devicetree
98+
property.
7299

73100
True Random-Number Generator
74101
============================
75102

76-
The True Random-Number Generator (TRNG) of the NEORV32 is supported, but
77-
disabled by default. For NEORV32 SoC implementations supporting the TRNG,
78-
support can be enabled by setting the ``status`` property of the ``trng``
79-
devicetree node to ``okay``.
103+
The True Random-Number Generator (TRNG) of the NEORV32 is supported, but disabled by default. For
104+
NEORV32 SoC implementations supporting the TRNG, support can be enabled by setting the ``status``
105+
property of the ``trng`` devicetree node to ``okay``.
80106

81107
Programming and Debugging
82108
*************************
@@ -112,7 +138,7 @@ implementation with the On-Chip Debugger (OCD) and bootloader enabled.
112138

113139
.. zephyr-app-commands::
114140
:zephyr-app: samples/hello_world
115-
:board: neorv32
141+
:board: neorv32/neorv32/<variant>
116142
:goals: flash
117143

118144
The default board configuration uses an :ref:`openocd-debug-host-tools`
@@ -122,7 +148,7 @@ example for using the Flyswatter JTAG @ 2 kHz:
122148

123149
.. zephyr-app-commands::
124150
:zephyr-app: samples/hello_world
125-
:board: neorv32
151+
:board: neorv32/neorv32/<variant>
126152
:goals: flash
127153
:flash-args: --config interface/ftdi/flyswatter.cfg --config neorv32.cfg --cmd-pre-init 'adapter speed 2000'
128154

@@ -131,7 +157,7 @@ After flashing, you should see message similar to the following in the terminal:
131157
.. code-block:: console
132158
133159
*** Booting Zephyr OS build zephyr-vn.n.nn ***
134-
Hello World! neorv32/neorv32
160+
Hello World! neorv32/neorv32/<variant>
135161
136162
Note, however, that the application was not persisted in flash memory by the
137163
above steps. It was merely written to internal block RAM in the FPGA. It will
@@ -150,7 +176,7 @@ can be passed at build time:
150176

151177
.. zephyr-app-commands::
152178
:zephyr-app: samples/hello_world
153-
:board: neorv32
179+
:board: neorv32/neorv32/<variant>
154180
:goals: build
155181
:gen-args: -DCMAKE_PROGRAM_PATH=<path/to/neorv32/sw/image_gen/>
156182

@@ -169,7 +195,7 @@ Here is an example for the :zephyr:code-sample:`hello_world` application.
169195

170196
.. zephyr-app-commands::
171197
:zephyr-app: samples/hello_world
172-
:board: neorv32
198+
:board: neorv32/neorv32/<variant>
173199
:goals: debug
174200

175201
Step through the application in your debugger, and you should see a message
@@ -178,7 +204,7 @@ similar to the following in the terminal:
178204
.. code-block:: console
179205
180206
*** Booting Zephyr OS build zephyr-vn.n.nn ***
181-
Hello World! neorv32/neorv32
207+
Hello World! neorv32/neorv32/<variant>
182208
183209
.. _The NEORV32 RISC-V Processor GitHub:
184210
https://github.com/stnolting/neorv32

0 commit comments

Comments
 (0)