nuclei.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. .. _design_nuclei:
  2. Nuclei Processor
  3. ================
  4. Nuclei processor core are following and compatible to RISC-V standard architecture,
  5. but there might be some additions and enhancements to the original standard spec.
  6. Click `Nuclei Spec`_ to learn more about Nuclei RISC-V Instruction Set Architecture.
  7. .. _design_nuclei_intro:
  8. Introduction
  9. ------------
  10. Nuclei provides the following `RISC-V IP Products`_ for AIoT:
  11. * **N100 series:** Designed for mixed digital and analog, IoT or
  12. other extremely low-power and small area scenarios, which
  13. is the perfect replacement of traditional 8051 cores, you need
  14. to use it with `Nuclei N100 SDK`_ .
  15. * **N200 series:** Designed for ultra-low power consumption and
  16. embedded scenarios, perfectly replaces the arm Cortex-M series cores.
  17. * **N300 series:** Designed for extreme energy efficiency ratio,
  18. requiring DSP and FPU features, as IoT and industrial control scenarios.
  19. * **600 series and 900 series:** Fully support Linux for high-performance
  20. edge computing and smart AIoT.
  21. * **1000 series:** The UX1000 Series have three different variants: UX1030, UX1040 and UX1060.
  22. UX1030 is a 3-wide processor with good performance and smaller power & area;
  23. UX1040 is a 4-wide processor with better performance and balanced power & area;
  24. UX1060 is a 6-wide processor with even higher performance targeting high-end applications.
  25. .. note::
  26. * **N100 series** is not supported by **NMSIS** and **Nuclei SDK**
  27. .. _design_nuclei_nmsis:
  28. NMSIS in Nuclei SDK
  29. -------------------
  30. This Nuclei SDK is built based on the |NMSIS| framework,
  31. user can access `NMSIS Core API`_, `NMSIS DSP API`_ and `NMSIS NN API`_
  32. provided by |NMSIS|.
  33. These NMSIS APIs are mainly responsible for accessing Nuclei RISC-V Processor
  34. Core.
  35. The prebuilt NMSIS-DSP and NMSIS-NN libraries are also provided in Nuclei SDK,
  36. see ``NMSIS/Library/`` folder.
  37. .. note::
  38. * To support RT-Thread in Nuclei-SDK, we have to modify the **startup_<device>.S**,
  39. to use macro ``RTOS_RTTHREAD`` defined when using RT-Thread as below:
  40. .. code-block:: c
  41. #ifdef RTOS_RTTHREAD
  42. // Call entry function when using RT-Thread
  43. call entry
  44. #else
  45. call main
  46. #endif
  47. * In order to support RT-Thread initialization macros ``INIT_XXX_EXPORT``, we also need
  48. to modify the link script files, add lines after `` *(.rodata .rodata.*)`` as below:
  49. .. code-block::
  50. . = ALIGN(4);
  51. *(.rdata)
  52. *(.rodata .rodata.*)
  53. /* RT-Thread added lines begin */
  54. /* section information for initial. */
  55. . = ALIGN(4);
  56. __rt_init_start = .;
  57. KEEP(*(SORT(.rti_fn*)))
  58. __rt_init_end = .;
  59. /* section information for finsh shell */
  60. . = ALIGN(4);
  61. __fsymtab_start = .;
  62. KEEP(*(FSymTab))
  63. __fsymtab_end = .;
  64. . = ALIGN(4);
  65. __vsymtab_start = .;
  66. KEEP(*(VSymTab))
  67. __vsymtab_end = .;
  68. /* RT-Thread added lines end */
  69. *(.gnu.linkonce.r.*)
  70. .. _design_nuclei_soc:
  71. SoC Resource
  72. ------------
  73. Regarding the SoC Resource exclude the Nuclei RISC-V Processor Core,
  74. it mainly consists of different peripherals such UART, GPIO, I2C, SPI,
  75. CAN, PWM, DMA, USB and etc.
  76. The APIs to access to the SoC resources are usually defined by the SoC
  77. Firmware Library Package provided by SoC Vendor.
  78. In Nuclei SDK, currently we just required developer to provide the following
  79. common resources:
  80. * A UART used to implement several stub functions for ``printf`` function
  81. - When using newlib library, please check stub functions list in ``SoC/evalsoc/Common/Stubs/newlib``
  82. - When using libncrt library, please check stub functions list in ``SoC/evalsoc/Common/Stubs/libncrt``
  83. - When using iar dlib library, please check stub functions list in ``SoC/evalsoc/Common/Stubs/iardlib``
  84. * Common initialization code defined in **System_<Device>.c/h** in each
  85. SoC support package in Nuclei SDK.
  86. * Before enter to main function, these resources must be initialized:
  87. - The UART used to print must be initialized as
  88. ``115200 bps, 8bit data, none parity check, 1 stop bit``
  89. - ECLIC MTH set to 0 using ``ECLIC_SetMth``, means don't mask any interrupt
  90. - ECLIC NLBits set to ``__ECLIC_INTCTLBITS``, means all the nlbits are for level
  91. - Global interrupt is disabled
  92. .. note::
  93. * If you want to learn more about SoC, please click :ref:`design_soc`
  94. * If you want to learn more about Board, please click :ref:`design_board`
  95. * If you want to learn more about Peripheral, please click :ref:`design_peripheral`
  96. .. _Nuclei Spec: https://doc.nucleisys.com/nuclei_spec/
  97. .. _RISC-V IP Products: https://nucleisys.com/product.php
  98. .. _NMSIS Core API: https://doc.nucleisys.com/nmsis/core/api/index.html
  99. .. _NMSIS DSP API: https://doc.nucleisys.com/nmsis/dsp/api/index.html
  100. .. _NMSIS NN API: https://doc.nucleisys.com/nmsis/nn/api/index.html
  101. .. _Nuclei N100 SDK: https://doc.nucleisys.com/nuclei_n100_sdk