Skip to content

Commit

Permalink
NMSIS/Core: clean and optimize header files comments
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Oct 19, 2023
1 parent e96376b commit e7f8277
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
6 changes: 6 additions & 0 deletions NMSIS/Core/Include/core_feature_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
* @file core_feature_base.h
* @brief Base core feature API for Nuclei N/NX Core
*/
/*
* Core Base Feature Configuration Macro:
* 1. __HARTID_OFFSET: Optional, define this macro when your cpu system first hart hartid and hart index is different.
* eg. If your cpu system, first hart hartid is 2, hart index is 0, then set this macro to 2
*
*/
#include <stdint.h>

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions NMSIS/Core/Include/core_feature_bitmanip.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
*
* API header file can be found in lib/gcc/riscv-nuclei-elf/<gcc_ver>/include/rvintrin.h
*
* For Nuclei GCC 13/Clang 17, this intrinsic header no longer existed, please take care.
*
* @{
*/
/** @} */ /* End of Doxygen Group NMSIS_Core_Bitmanip_Intrinsic */
Expand Down
5 changes: 4 additions & 1 deletion NMSIS/Core/Include/core_feature_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
* 1. __ICACHE_PRESENT: Define whether I-Cache Unit is present or not.
* * 0: Not present
* * 1: Present
* 1. __DCACHE_PRESENT: Define whether D-Cache Unit is present or not.
* 2. __DCACHE_PRESENT: Define whether D-Cache Unit is present or not.
* * 0: Not present
* * 1: Present
* 3. __CCM_PRESENT: Define whether Nuclei Cache Control and Maintainence(CCM) Unit is present or not.
* * 0: Not present
* * 1: Present
*/
Expand Down
7 changes: 5 additions & 2 deletions NMSIS/Core/Include/core_feature_eclic.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
* * 0: Not present
* * 1: Present
* 2. __ECLIC_BASEADDR: Base address of the ECLIC unit.
* 3. ECLIC_GetInfoCtlbits(): Define the number of hardware bits are actually implemented in the clicintctl registers.
* 3. __ECLIC_INTCTLBITS: Optional, if defined, it should set to the value of ECLIC_GetInfoCtlbits(), define the number of hardware bits are actually implemented in the clicintctl registers.
* Valid number is 1 - 8.
* 4. __ECLIC_INTNUM : Define the external interrupt number of ECLIC Unit
* 4. __ECLIC_INTNUM: Define the external interrupt number of ECLIC Unit
* 5. __TEE_PRESENT: Define whether TEE feature present, if present, ECLIC will present with S-Mode ECLIC feature
* * 0: Not present
* * 1: Present
*
*/
#ifdef __cplusplus
Expand Down
5 changes: 3 additions & 2 deletions NMSIS/Core/Include/core_feature_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
*/
/*
* System Timer Feature Configuration Macro:
* 1. __SYSTIMER_PRESENT: Define whether Private System Timer is present or not.
* 1. __SYSTIMER_PRESENT: Must, Define whether Private System Timer is present or not.
* * 0: Not present
* * 1: Present
* 2. __SYSTIMER_BASEADDR: Define the base address of the System Timer.
* 2. __SYSTIMER_BASEADDR: Must, Define the base address of the System Timer.
* 3. __SYSTIMER_HARTID: Optional, Define the system timer hart index of the cpu, important for case when cpu hartid and cpu hart index are different, only set it if your cpu is single core.
*/
#ifdef __cplusplus
extern "C" {
Expand Down
9 changes: 5 additions & 4 deletions NMSIS/Core/Include/core_feature_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@
*
* RISC-V Vector Intrinsic APIs are provided directly through compiler generated intrinsic function.
*
* This intrinsic function support in compiler is introduced in nuclei riscv gcc 10.2.
* This intrinsic function support by compiler:
*
* API header file can be found in lib/gcc/riscv-nuclei-elf/<gcc_ver>/include/riscv_vector.h
* For Nuclei RISC-V GCC 10.2, it is an very old and not ratified version(no longer supported).
*
* API Reference Manual can be found here:
* - API header file can be found in lib/gcc/riscv-nuclei-elf/<gcc_ver>/include/riscv_vector.h
*
* - https://github.com/riscv-non-isa/rvv-intrinsic-doc/blob/master/rvv-intrinsic-api.md
* For Nuclei RISC-V GCC 13/Clang 17, the intrinsic API supported is v0.12 version, see
* https://github.com/riscv-non-isa/rvv-intrinsic-doc/releases/tag/v0.12.0
*
* @{
*/
Expand Down
2 changes: 1 addition & 1 deletion NMSIS/Core/Include/nmsis_bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
*
* If you want to disable the benchmark calculation, you can place `#define DISABLE_NMSIS_BENCH`
* before include `nmsis_bench.h`
*
*
* If in your c test source code, you can add `NMSIS_TEST_PASS();` and `NMSIS_TEST_FAIL();` to mark c test
* is pass or fail.
*
Expand Down

0 comments on commit e7f8277

Please sign in to comment.