Harness: Power harness documentation
Add documentation for power harness. Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
This commit is contained in:
parent
75e7d0eeae
commit
8be92f86cc
1 changed files with 39 additions and 0 deletions
|
@ -561,6 +561,7 @@ harness: <string>
|
||||||
- robot
|
- robot
|
||||||
- ctest
|
- ctest
|
||||||
- shell
|
- shell
|
||||||
|
- power
|
||||||
|
|
||||||
See :ref:`twister_harnesses` for more information.
|
See :ref:`twister_harnesses` for more information.
|
||||||
|
|
||||||
|
@ -972,6 +973,44 @@ robot_testsuite: <robot file path> (default empty)
|
||||||
robot_option: <robot option> (default empty)
|
robot_option: <robot option> (default empty)
|
||||||
One or more options to be send to robotframework.
|
One or more options to be send to robotframework.
|
||||||
|
|
||||||
|
Power
|
||||||
|
=====
|
||||||
|
The ``power`` harness is used to measure and validate the current consumption.
|
||||||
|
It integrates with 'pytest' to perform automated data collection and analysis using a hardware power monitor.
|
||||||
|
|
||||||
|
The harness executes the following steps:
|
||||||
|
|
||||||
|
1. Initializes a power monitoring device (e.g., ``stm_powershield``) via the ``PowerMonitor`` abstract interface.
|
||||||
|
#. Starts current measurement for a defined ``measurement_duration``.
|
||||||
|
#. Collects raw current waveform data.
|
||||||
|
#. Uses a peak detection algorithm to segment data into defined execution phases based on power transitions.
|
||||||
|
#. Computes RMS current values for each phase using a utility function.
|
||||||
|
#. Compares the computed values with user-defined expected RMS values.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
harness: power
|
||||||
|
harness_config:
|
||||||
|
fixture: pm_probe
|
||||||
|
power_measurements:
|
||||||
|
element_to_trim: 100
|
||||||
|
min_peak_distance: 40
|
||||||
|
min_peak_height: 0.008
|
||||||
|
peak_padding: 40
|
||||||
|
measurement_duration: 6
|
||||||
|
num_of_transitions: 4
|
||||||
|
expected_rms_values: [56.0, 4.0, 1.2, 0.26, 140]
|
||||||
|
tolerance_percentage: 20
|
||||||
|
|
||||||
|
- **elements_to_trim** – Number of samples to discard at the start of measurement to eliminate noise.
|
||||||
|
- **min_peak_distance** – Minimum distance between detected current peaks (helps detect distinct transitions).
|
||||||
|
- **min_peak_height** – Minimum current threshold to qualify as a peak (in amps).
|
||||||
|
- **peak_padding** – Number of samples to extend around each detected peak.
|
||||||
|
- **measurement_duration** – Total time (in seconds) to record current data.
|
||||||
|
- **num_of_transitions** – Expected number of power state transitions in the DUT during test execution.
|
||||||
|
- **expected_rms_values** – Target RMS values for each identified execution phase (in milliamps).
|
||||||
|
- **tolerance_percentage** – Allowed deviation percentage from the expected RMS values.
|
||||||
|
|
||||||
Bsim
|
Bsim
|
||||||
====
|
====
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue