Profiler

Description

The Profiler measures the processing time required by the SPARK Wireless Core during packet reception and transmission. It evaluates this time across three scenarios: a unidirectional transmission link, a unidirectional reception link and a bidirectional transmission-reception link, each tested over a range of payload sizes. This provides hardware-specific metrics to help optimize the transfers schedule based on application needs. A margin of 10% is recommended on these measurements since some events could increase processing time on some frames (ex: callback events, instruction cache miss, etc…)

The processing time is measured solely on the DUT (Device Under Test), with the Helper performing only the actions instructed by the DUT in order to measure the desired processing time accurately. For each scenario, the average processing time for each payload size is measured and logged.

  • Scenario 1: The DUT is configured as the transmitter and the Helper as the receiver, transferring a set of payloads of varying sizes.

  • Scenario 2: The DUT is configured as the receiver and the Helper as the transmitter, receiving the same set of payloads with varying sizes.

  • Scenario 3: Both the DUT and the Helper operate in a bidirectional configuration, simultaneously transmitting and receiving payloads of different sizes.

Following the same structure as the example applications, users are required to implement a facade layer specific to their hardware.

Tip

For a better understanding of how to design the application’s schedule based on the measured processing time, refer to the Schedule Design Consideration section.

Using Processing Time to Optimize Timeslot Configuration

For a transmission, the processing time occurs immediately after the entire air time, which includes both the transmitted packet and the received ACK. For a reception, the processing time starts as soon as the packet is received, overlapping with the air time of the ACK transmission. The processing time is primarily determined by the duration of the SPI transfer between the radio and the MCU.

Summary

In other words, for a unidirectional application, the processing time depends on the size of the packet being sent or received, since the packet is transferred or received in each timeslot.

However, in a bidirectional application where the timeslots alternate between transmission and reception, only one out of every two timeslots on the DUT is influenced by the packet size. This is because one SPI transfer includes both receiving the OTA packet and preparing the next transmission, which involves transferring the packet to be sent. This scenario represents the worst case in terms of duration, as it includes both packet reception and transmission preparation, while the other transfer is limited to preparing the next reception, remaining mostly short and constant.

It is important to note that the Helper operates in the opposite sequence to the DUT. When the DUT is in a timeslot with a relatively constant and lower processing time, the Helper is handling the worst-case timeslot.

Note

For some tips on how to optimize the processing time, see Porting Optimizations

Terminal

Here is the Profiler’s output on Quasar, which uses UART to display the average processing times for different payload sizes in a terminal emulator on a PC.

../../_images/profiler_terminal.png

Figure 69: Profiler print output example.

Note

The Profiler outputs processing time formulas that can be used by the user to estimate the processing time for a given payload size. This can be used when designing a schedule. See Schedule Design Consideration.