Skip to content

Commit 1f634f3

Browse files
annwojrlubos
authored andcommitted
doc: hpf and softperipherals comparison
added a guide comparing softperipherals and hpf solutions Signed-off-by: Anna Wojdylo <[email protected]>
1 parent 34ed1ec commit 1f634f3

File tree

5 files changed

+202
-8
lines changed

5 files changed

+202
-8
lines changed

doc/nrf/app_dev/device_guides/coprocessors/index.rst

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,70 @@ Developing with coprocessors
77

88
The High-Performance Framework (HPF) support in the |NCS| is :ref:`experimental <software_maturity>` and is limited to the nRF54L15 device.
99

10-
The following pages provide a detailed guide on utilizing coprocessor effectively within the nRF54L15 platform.
10+
You can use the VPR coprocessor (Fast Lightweight Peripheral Processor - FLPR) as follows:
1111

12-
The VPR coprocessor (Fast Lightweight Peripheral Processor - FLPR) can be utilized in two distinct ways:
12+
* As an additional core in a multicore system using Zephyr in multithreaded mode (see the :ref:`nRF54L15<vpr_flpr_nrf54l>` and :ref:`nRF54H20 devices<ug_nrf54h20_flpr>` pages).
13+
* As a peripheral emulator, using one of the following methods depending on the use case:
1314

14-
* As an additional core in a multicore system using Zephyr in multithreaded mode.
15-
See :ref:`vpr_flpr_nrf54l` for more details.
16-
* As a peripheral emulator using the High-Performance Framework (HPF).
17-
For more information, refer to the following documentation.
15+
* :ref:`High-Performance Framework (HPF)<hpf_index>`
16+
* :ref:`nrfxlib:soft_peripherals`
17+
18+
.. note::
19+
20+
In these usage modes, it is important to clearly differentiate between the Soft Peripheral and HPF solutions.
21+
Soft Peripherals serve as a direct replacement for hardware peripherals, offering guaranteed performance.
22+
In contrast, the HPF will allow you to accelerate protocol operations, but performance depends on your implementation.
23+
We recommend using the Soft Peripheral solution if it meets your product's requirements.
24+
25+
The following table outlines the main differences between the usage modes.
26+
For detailed comparison see the :ref:`ug_hpf_softperipherals_comparison` page.
27+
28+
.. list-table:: Main differences between usage modes
29+
:header-rows: 1
30+
31+
* - Comparison category
32+
- Zephyr
33+
- HPF
34+
- Soft Peripherals
35+
* - Overview
36+
- Comprehensive Zephyr application with full feature access.
37+
- Bare-metal build from source featuring real-time I/O capabilities.
38+
- Custom binary that emulates a hardware peripheral.
39+
* - Advantages
40+
- Full access to Zephyr's capabilities including drivers, libraries, and OS primitives.
41+
- Enables custom protocol support with optimized execution latency and minimized code footprint.
42+
- - Pre-validated product, fully compliant with the simulated hardware peripheral specifications.
43+
- Compatible with higher layer driver.
44+
* - Limitations
45+
- Larger code size and higher execution latency.
46+
- Requires development of custom code.
47+
- Provided as a binary making modifications impossible.
48+
* - Build system
49+
- Built from source using Zephyr’s sysbuild.
50+
- Built from source using Zephyr’s sysbuild.
51+
- Custom HEX file loaded by the application core.
52+
VPR is exposed to build system.
53+
Only the GPIO ports and pins utilized by the VPR are configured within an overlay.
54+
* - Inter-processor communication
55+
- Zephyr’s IPC service or mbox API.
56+
- Zephyr’s IPC service or mbox API.
57+
- Managed through the peripheral driver API.
58+
* - Work offloading
59+
- Supports any task, including those requiring Zephyr libraries.
60+
- Handles simple data pre-processing or post-processing based on specific protocol needs.
61+
- Not supported.
62+
* - Maturity level
63+
- Experimental (nRF54L15 and nRF54H20)
64+
- Experimental (nRF54L15)
65+
- Supported (see :ref:`nrfxlib:soft_peripherals` documentation for the list of supported devices)
66+
* - Example use case
67+
- Utilizes VPR as a standard CPU and offloads tasks to VPR.
68+
- Develops custom protocol emulators.
69+
- Replaces conventional hardware peripherals.
1870

1971
.. toctree::
2072
:maxdepth: 1
2173
:caption: Contents
2274

75+
ug_hpf_softperipherals_comparison.rst
2376
hpf.rst
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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.

doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_flpr.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ The primary purpose of this snippet is to enable the transfer of the FLPR code t
4646
When building for the ``nrf54h20dk/nrf54h20/cpuflpr`` target, a minimal sample is automatically loaded onto the application core.
4747
For more details, see :ref:`building_nrf54h_app_flpr_core`.
4848

49+
Peripherals emulation on FLPR
50+
*****************************
51+
52+
The FLPR core can emulate software-defined peripherals using :ref:`nrfxlib:soft_peripherals`.
53+
This setup is useful in scenarios where you need an additional peripheral functionality but do not have access to hardware peripherals.
54+
4955
Memory allocation
5056
*****************
5157

doc/nrf/app_dev/device_guides/nrf54l/vpr_flpr.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ Snippet's primary function is to enable the code that transfers the FLPR code to
3939
When building for the ``nrf54l15dk/nrf54l15/cpuflpr`` target, a minimal sample is automatically loaded onto the application core.
4040
See more information on :ref:`building_nrf54l_app_flpr_core`.
4141

42-
Using MCUboot with FLPR
43-
***********************
42+
Peripherals emulation on FLPR
43+
*****************************
44+
45+
.. note::
46+
47+
The High-Performance Framework (HPF) support in the |NCS| is :ref:`experimental <software_maturity>` and is limited to the nRF54L15 device.
48+
49+
The FLPR core can emulate software peripherals using :ref:`nrfxlib:soft_peripherals` or the :ref:`HPF<hpf_index>`.
50+
This setup is useful in scenarios where you need additional peripheral functionality or want to optimize power consumption and performance.
51+
For detailed comparisons of implementation scenarios and use cases between the Soft Peripherals and the HPF, refer to the :ref:`ug_hpf_softperipherals_comparison` documentation page.
52+
53+
MCUboot FLPR configuration
54+
**************************
4455

4556
To ensure that MCUboot functions correctly with a FLPR-integrated application, several manual configurations are necessary.
4657
For details, see :ref:`nRF54l_signing_app_with_flpr_payload`.

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ Developing with custom boards
110110

111111
|no_changes_yet_note|
112112

113+
Developing with coprocessors
114+
============================
115+
116+
* Added the :ref:`ug_hpf_softperipherals_comparison` documentation page, describing potential use cases and differences between the two solutions.
117+
113118
Security
114119
========
115120

0 commit comments

Comments
 (0)