|
| 1 | +.. _ug_hpf_softperipherals_comparison: |
| 2 | + |
| 3 | +Introduction to Soft Peripherals and High-Performance Framework |
| 4 | +############################################################### |
| 5 | + |
| 6 | +.. contents:: |
| 7 | + :local: |
| 8 | + :depth: 2 |
| 9 | + |
| 10 | +:ref:`nrfxlib:soft_peripherals` are a collection of pre-compiled binaries and API driver code designed to emulate commonly used peripherals. |
| 11 | +These peripherals allow application code to use the API driver to load the pre-compiled binaries onto a specific RAM location, where they are executed by the RISC-V coprocessor, named Fast Lightweight Peripheral Processor (FLPR) (see the :ref:`nRF54L15<vpr_flpr_nrf54l>` and :ref:`nRF54H20 devices<ug_nrf54h20_flpr>` pages). |
| 12 | +The application can then control the soft peripherals using API functions. |
| 13 | + |
| 14 | +The :ref:`High-Performance Framework (HPF)<hpf_index>` is a framework designed to support the development and integration of software peripherals using coprocessors. |
| 15 | +It offers tools such as Hardware Abstraction Layers (HALs) and CMake targets, along with application samples and guidelines on architectural issues like event, fault, and power management. |
| 16 | +These resources will help you create customized software peripherals tailored to specific application needs. |
| 17 | + |
| 18 | +Design rationale and usage |
| 19 | +************************** |
| 20 | + |
| 21 | +Both methods facilitate the creation of software-defined peripherals that emulate the functionality of physical hardware peripherals (IP) through software. |
| 22 | +Choosing between the solutions depends on the specific requirements of your project and the resources available. |
| 23 | + |
| 24 | +.. _nrf54l_hpf_softperi_comparison_use_case: |
| 25 | + |
| 26 | +Implementation and use cases |
| 27 | +============================ |
| 28 | + |
| 29 | +The following comparison details implementation and typical use cases for Soft Peripherals and High Performance Framework: |
| 30 | + |
| 31 | +.. list-table:: |
| 32 | + :header-rows: 1 |
| 33 | + |
| 34 | + * - Comparison aspect |
| 35 | + - Soft Peripherals |
| 36 | + - High Performance Framework |
| 37 | + * - Development |
| 38 | + - Optimized for performance and power consumption. |
| 39 | + - Allows for the creation of specialized or custom peripherals. |
| 40 | + * - Use cases |
| 41 | + - - When an application requires an additional or unavailable peripheral and a corresponding Soft Peripheral is available. |
| 42 | + - Suitable for applications built from pre-compiled sources. |
| 43 | + - - When developing a custom peripheral or when high-degree control is needed. |
| 44 | + - Enhances the main processor's functionality with real-time capabilities in a streamlined, bare metal environment. |
| 45 | + - Integrated with the Zephyr build system. |
| 46 | + - Ideal for applications where the FLPR handles higher layers of the software stack (it allows to offload parts of the protocol stack to the FLPR core). |
| 47 | + |
| 48 | +.. _nrf54l_hpf_softperi_comparison_features: |
| 49 | + |
| 50 | +Features comparison |
| 51 | +=================== |
| 52 | + |
| 53 | +See the following detailed feature comparison between Soft Peripherals and High-Performance Framework: |
| 54 | + |
| 55 | +.. list-table:: |
| 56 | + :header-rows: 1 |
| 57 | + |
| 58 | + * - Feature |
| 59 | + - Soft Peripherals |
| 60 | + - High Performance Framework |
| 61 | + * - Integration |
| 62 | + - Pre-compiled binary for FLPR, driver for the application core |
| 63 | + - Built from source in Zephyr build system |
| 64 | + * - Memory requirements |
| 65 | + - Fixed (~16 K) |
| 66 | + - Adjustable, depends on code and devicetree |
| 67 | + * - Application compatibility |
| 68 | + - Can be used on baremetal or Zephyr applications |
| 69 | + - Uses Zephyr without kernel on FLPR side, full Zephyr on APP side |
| 70 | + * - Integration complexity |
| 71 | + - Minor integration required |
| 72 | + - Samples provided for the start of development |
| 73 | + * - IPC mechanism |
| 74 | + - Register-based |
| 75 | + - ic(b)msg or mbox-based |
| 76 | + * - Compliance and testing |
| 77 | + - Protocol-compliant, verified by Nordic Semiconductor |
| 78 | + - Samples provided as-is, testing is done by the user |
| 79 | + * - Delivery form |
| 80 | + - Binary |
| 81 | + - Source code, modifiable and extendable |
| 82 | + * - API level |
| 83 | + - Exposed at hardware driver level |
| 84 | + - FLPR may handle parts of the software stack above hardware driver level |
| 85 | + |
| 86 | +.. _nrf54l_hpf_softperi_comparison_requirements: |
| 87 | + |
| 88 | +Requirements |
| 89 | +************ |
| 90 | + |
| 91 | +For Soft Peripherals, there is a specific memory size requirement of approximately 16 K, but there is a flexibility in placement within the FLPR execution RAM. |
| 92 | +To enter low power consumption modes, Soft Peripherals require a slot at a specific memory address, which is platform-specific, and the application code must be able to access MEMCONF registers. |
| 93 | +See the requirements in the :ref:`Soft Peripherals section<nrfxlib:soft_peripherals>`. |
| 94 | +It provides essential information for proper integration and optimization. |
| 95 | + |
| 96 | +On the other hand, HPF necessitates that the application core uses the Zephyr operating system. |
| 97 | +The framework allows for a high degree of configurability, which you can tailor according to your needs using Kconfig and devicetree settings. |
| 98 | +This allows you to optimize the memory footprint and functionality of the custom peripherals, ensuring that the peripherals are well-integrated and perform efficiently within their specific application environments. |
| 99 | + |
| 100 | +.. _nrf54l_hpf_softperi_comparison_creating_peripherals: |
| 101 | + |
| 102 | +Creation of software-defined peripherals |
| 103 | +**************************************** |
| 104 | + |
| 105 | +For Soft Peripherals, the integration process primarily involves incorporating glue code to facilitate their use. |
| 106 | +To learn how to use those peripherals, and to see what is currently supported, refer to the :ref:`nrfxlib:soft_peripherals` documentation. |
| 107 | + |
| 108 | +In contrast, HPF provides initial samples that serve as a starting point for development. |
| 109 | +For a detailed guide on creating your own custom peripherals, see the :ref:`hpf_index` page. |
| 110 | + |
| 111 | +.. _nrf54l_hpf_softperi_comparison_limitations: |
| 112 | + |
| 113 | +Performance and limitations |
| 114 | +*************************** |
| 115 | + |
| 116 | +Each Soft Peripheral is unique and comes with its own set of limitations compared to traditional hardware IP. |
| 117 | +These limitations are specific to the functions that the peripheral is designed to emulate and how they integrate with the rest of the system. |
| 118 | + |
| 119 | +HPF, while offering extensive customization and control, is currently in an experimental stage and lacks full power management support. |
0 commit comments