Main Content

Hardware Profiler

Profiles function-call subsystem using GPIO, ERAD, or Timer measurement modes

Since R2024b

  • Hardware Profiler Block

Libraries:
C2000 Microcontroller Blockset / Scheduling

Description

The Hardware Profiler Block enables you to profile function-call subsystem on target hardware using General Purpose Input Output (GPIO), Embedded Real-time Analysis & Diagnostic (ERAD), and Timer Measurement modes.

  • ERAD: Measure and analyze the execution times of start-to-end downstream function-call subsystems.

  • GPIO: Set and clear GPIO pins before and after the execution of downstream function-call subsystems.

  • Timer: Measure execution time of events by calculating the duration between pre-execution and post-execution timer counts.

These techniques enable you to accurately profile and optimize the performance of your code running on TI C2000 processors.

Hardware Profiler block with Timer and ERAD mode provide output in clock cycles. To convert it into seconds, use the following formula:

Note

The Hardware Profiler block in ERAD measurement mode consistently provides the maximum execution time.

Ports

Output

expand all

Connect a function call subsystem to this port. When the subsystem executes, it is profiled using the selected measurement technique.

Displays the execution time in number of cycles.

Dependencies

To enable this port, set the Measurement mode parameter to either Embedded Real-time Analysis & Diagnostic (ERAD) or Timer.

Data Types: uint32

Parameters

expand all

Select the measurement techniques to profile function-call subsystem on the target hardware.

  • ERAD: Measure and analyze the execution times of start-to-end downstream function-call subsystems.

  • GPIO: Utilize GPIO pins to set and clear signals before and after executing downstream function-call subsystems.

  • Timer Measurement: Use timers to measure execution time by calculating the duration between pre-execution and post-execution timer counts. When you select Time Measurement, Timer 2 is used for timr based profiling.

Specify the ERAD module. The ERAD module consists of ERAD counter and 2 ERAD breakpoints. When you select the ERAD module, the blocks puts breakpoints at function beginning and end and measures clock cycles for execution between two breakpoints.

  • Module 1 - ERAD counter 1 and ERAD breakpoint 1 and 2.

  • Module 2 - ERAD counter 2 and ERAD breakpoint 3 and 4.

  • Module 3 - ERAD counter 3 and ERAD breakpoint 5 and 6.

  • Module 4 - ERAD counter 4 and ERAD breakpoint 7 and 8.

Note

The ERAD module is only available in selected TI processors.

Dependencies

To enable this parameter, set the Measurement mode parameter to Embedded Real-time Analysis & Diagnostic (ERAD).

Specify the GPIO number for the block.

Dependencies

To enable this parameter, set the Measurement mode parameter to General Purpose Input Output (GPIO).

Use this parameter to specify the time interval between samples. To inherit sample time, set this parameter to -1.

Version History

Introduced in R2024b