// This example uses the ADSP-CM40X Enablement Software, available as a free download
/*============= D A T A =============*/
volatile Uint32_t data_a, data_b, data_c, data_d, data_e, data_f; // Data variables
/*============= C O D E =============*/
CYCLES_INIT // Initialize and enable system tick counter
CYCLES_CLR // Clear system tick counter
data_a = CYCLES_GET; // Get counter value
data_b = CYCLES_GET; // Get counter value
// Code of interest
. . .
. . .
// End of code of interest
data_c = CYCLES_GET; // Get counter value
data_d = data_b - data_a; // Calculate over head of read routines
data_e = data_c - data_b - data_d; // Calculate system ticks or cycles to execute code of interest
// data_e is the number of cycles to execute code of interest