Skip to content

Commit

Permalink
doc: do small edits in tools doc
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jan 5, 2024
1 parent 8faacc6 commit ebc20c7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
15 changes: 12 additions & 3 deletions source/openocd/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Repository and Doc

- gitee openflashloader: https://gitee.com/riscv-mcu/openflashloader

**openocd doc path**: ``openocd\doc\pdf\openocd.pdf``
**openocd doc path**: ``openocd/doc/pdf/openocd.pdf``

How to Use
==========
Expand Down Expand Up @@ -104,6 +104,10 @@ Nuclei released openocd supports a number of nuclei customized CSRs, please chec

.. rubric:: Nuclei embedded trace

.. note::

Still in experiment stage, not for production usage.

Some Nuclei cpus are equipped with trace support, which permits examination of the instruction activity. Trace
activity is controlled through an Embedded Trace(Etrace) Module on the core's scan chains. The following
commands are for etrace.
Expand Down Expand Up @@ -157,8 +161,8 @@ Enable or disable Nuclei CJTAG mode. Usage is the same as ftdi oscan1_mode.
About the configuration file
============================

The openocd configuration file is used to configure how to connect to the development board's window
through the Debug interface. nuclei provides an example of the openocd configuration file, which can
The openocd configuration file is used to configure how to connect to the development board's window
through the Debug interface. nuclei provides an example of the openocd configuration file, which can
be modified based on the example.

.. rubric:: Modify debugger rate
Expand Down Expand Up @@ -308,7 +312,12 @@ Frequently asked questions

There are a few more FAQs please see: https://github.com/riscv-mcu/riscv-openocd/wiki

And more detailed information about how to use openocd, please check the ``openocd.pdf`` distributed in openocd release.

Low-cost debugger solution
==========================

We also provided a low cost mcu solution to debug RISC-V CPU, which support JTAG and cJTAG, please check the following
repo to learn more about it.

Nuclei Dlink: https://github.com/Nuclei-Software/nuclei-dlink
28 changes: 15 additions & 13 deletions source/toolchain/gnu/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Extensions Support

i, m, a, f, d, c, h, q(Assembly only), zicsr, zifencei, zicond, zawrs, zfh, zfhmin, zmmul, svinval, svnapot.

- Z*INX Extensions
- Z*Inx Extensions

zfinx, zdinx, zhinx, zhinxmin.

Expand All @@ -35,25 +35,25 @@ Extensions Support

zve32x, zve32f, zve64x, zve64f, zve64d, zvfh, zvfhmin, v.

- ZC Extensions
- Zc Extensions

zca, zcb, zce, zcf, zcd, zcmp, zcmt(Assembly only).

- zce = zca + zcb + zcmp + zcmt
- f + zce = zca + zcb + zcf + zcmp + zcmt
- f + d + zce = zca + zcb + zcf + zcd + zcmp + zcmt

- ZVB Extensions
- Zvb Extensions

zvbb, zvbc

- ZVK Extensions
- Zvk Extensions

zvkg, zvkned, zvknha, zvknhb, zvksed, zvksh, zvkn, zvknc, zvkng, zvks, zvksc, zvksg, zvkt.

.. rubric:: Nuclei Custom Extensions

- Packed SIMD Extensions
- Packed SIMD Extension 0.5.4

xxldsp, xxldspn1x, xxldspn2x, xxldspn3x.

Expand All @@ -62,7 +62,7 @@ Extensions Support
- xxldspn2x: xxldsp + Nuclei Custom N1 & N2
- xxldspn3x: xxldsp + Nuclei Custom N1 & N2 & N3

- XLCZ Extensions
- Xxlcz Extensions

xxlczpstinc, xxlczbmrk, xxlczbitop, xxlczslet, xxlczabs, xxlczmac, xxlczbri, xxlczbitrev, xxlczgp.

Expand Down Expand Up @@ -154,19 +154,21 @@ Libraries
Significant Changes Brought by GCC13 Compared to GCC10
======================================================

- Instead of using single-letter ``bkp`` to enable these extensions as we did on gcc10, we split them all into corresponding sub-extensions, for example, ``_zba_zkr_zve32f``.
- Instead of using single-letter ``bkp`` to enable these extensions as we did on gcc10, we split them all into corresponding sub-extensions, for example, ``_zba_zkr_zve32f``, please check https://doc.nucleisys.com/nuclei_sdk/develop/buildsystem.html#arch-ext to learn about how to adapt Nuclei SDK to support gcc13 upgraded from gcc10.

- Implement new style of architecture extension test macros: each architecture extension has a corresponding feature test macro, which can be used to test its existence and version information. In addition, we add several custom macros, ``__riscv_dsp``, ``__riscv_bitmanip``.

- Add new option ``-misa-spec=*`` to control ISA spec version. This controls the default version of each extensions. The official version is 20191213, but it defaults to 2.2 in Nuclei toolchain. The difference between them is that in 20191213 version, Zicsr and Zifenci are separated from the 'i' extension into two independent extensions, and using ``-misa-spec=2.2`` can avoid incompatible errors when the 'Zicsr' and 'Zifenci' are not passed to ``-march=``. See for details at https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1315
- Add new option ``-misa-spec=*`` to control ISA spec version. This controls the default version of each extensions. The official version is ``20191213``, but it is set to ``2.2`` when configuring nuclei toolchain.
The difference between them is that in ``20191213`` version, ``Zicsr`` and ``Zifencei`` are separated from the ``i`` extension into two independent extensions, and using ``-misa-spec=2.2`` can avoid incompatible errors when the ``Zicsr`` and ``Zifencei`` are not passed to ``-march=``. See for details at https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1315

- Support for vector intrinsics as specified in version 0.12 of the RISC-V vector intrinsic specification.

- The toolchain component prefix is ``riscv-nuclei-elf-`` on gcc10, but is ``riscv64-unknown-elf-`` on gcc13.

- On gcc10, RISCV intrinsic api heads contain ``riscv_vector.h``, ``riscv_vector_itr.h``, ``rvintrin.h``, ``rvp_intrinsic.h``, but they are ``riscv_vector.h``, ``rvp_intrinsic.h``, ``riscv_nuclei_xlcz.h`` on gcc13.
- On gcc10, RISCV intrinsic api heads contain ``riscv_vector.h``, ``riscv_vector_itr.h``, ``rvintrin.h``, ``rvp_intrinsic.h``, but now only ``riscv_vector.h``, ``rvp_intrinsic.h``, ``riscv_nuclei_xlcz.h`` are provided in gcc13, if you want to find ``b`` or ``k`` intrinsic API, please check https://github.com/riscv/riscv-crypto/blob/main/benchmarks/share/rvintrin.h and https://github.com/riscv/riscv-crypto/blob/main/benchmarks/share/riscv-crypto-intrinsics.h , and for RVV intrinsic API, we
support 0.12 in gcc13 now, see https://github.com/riscv-non-isa/rvv-intrinsic-doc/releases/tag/v1.0-rc0

- The version of the libncrt was changed from v1.0.0 to v3.0.0, and libncrt is now split into three parts, 'libncrt', 'heapops' and 'fileops'.
- The version of the libncrt was changed from v2.0.0 to v3.0.0, and libncrt is now split into three parts, 'libncrt', 'heapops' and 'fileops', click https://doc.nucleisys.com/nuclei_sdk/develop/buildsystem.html#stdclib to learn about how the newlib/libncrt are used in Nuclei SDK with gcc13.

Install and Setup
=================
Expand All @@ -181,9 +183,9 @@ The process of user compilation and development can see from https://github.com/

.. rubric:: Examples

1.If you choose a core of Nuclei N300FD, then the parameter you pass to 'march' should be ``rv32*fd*``, and 'mabi' should choose ``ilp32d``.
1. If you choose a core of Nuclei N300FD, then the parameter you pass to 'march' should be ``rv32*fd*``, and 'mabi' should choose ``ilp32d``.

2.If you want to bring the full ``B/K/P`` extension, then you also need to bring all the subsets of them in the 'march'. For example, for the ``B`` extension, the parameter you pass to 'march' is ``_zba_zbb_zbc_zbs``.
2. If you want to bring the full ``B/K/P`` extension, then you also need to bring all the subsets of them in the 'march'. For example, for the ``B`` extension, the parameter you pass to 'march' is ``_zba_zbb_zbc_zbs``.

3.When using a library, we can tell the linker which library we need to link by using the '-l', for example, ``-lc`` for newlib-full, ``-lc_nano`` for newlib-nano. For libncrt, you should pass ``--specs=libncrt_xxx.specs`` when using gcc. In addition, you need to link extra 'fileops' and 'heapops' static libraries during the linking phase by using the '-l', and for the 'fileops', you must select one of the three options: 'uart', 'semi' or 'rtt',
3. When using a library, we can tell the linker which library we need to link by using the '-l', for example, ``-lc`` for newlib-full, ``-lc_nano`` for newlib-nano. For libncrt, you should pass ``--specs=libncrt_xxx.specs`` when using gcc. In addition, you need to link extra 'fileops' and 'heapops' static libraries during the linking phase by using the '-l', and for the 'fileops', you must select one of the three options: 'uart', 'semi' or 'rtt',
and for the 'heapops', you must select one of the three options: 'basic', 'realtime' or 'minimal'.
8 changes: 4 additions & 4 deletions source/toolchain/llvm/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Extensions Support

i, m, a, f, d, c, h(Assembly only), zicsr, zifencei, zihintpause(Assembly only), zicond, zawrs(Assembly only), zfh, zfhmin, zmmul, svinval(Assembly only), svnapot(Assembly only), svpbmt.

- Z*INX Extensions
- Z*inx Extensions

zfinx, zdinx, zhinx, zhinxmin.

Expand All @@ -34,15 +34,15 @@ Extensions Support

zve32x, zve32f, zve64x, zve64f, zve64d, zvfh, zvfhmin, v.

- ZC Extensions
- Zc Extensions

zca, zcb, zce, zcf, zcd, zcmp(Assembly only), zcmt(Assembly only).

- ZVB Extensions
- Zvb Extensions

zvbb, zvbc

- ZVK Extensions
- Zvk Extensions

zvkg, zvkned, zvknha, zvknhb, zvksed, zvksh, zvkn, zvknc, zvkng, zvks, zvksc, zvksg, zvkt.

Expand Down

0 comments on commit ebc20c7

Please sign in to comment.