//! The main function int main(int argc, char *argv[]) { unsigned int cycle_count; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // Get the actual cycle count cycle_count = Get_sys_count(); // Perform a 25-taps FIR dsp16_filt_iirpart(vect1, vect2, SIZE, num, NUM_SIZE, den, DEN_SIZE, 0, 0); // Calculate the number of cycles cycle_count = Get_sys_count() - cycle_count; // Print the number of cycles dsp16_debug_printf("Cycle count: %d\n", cycle_count); // Print the output signal dsp16_debug_print_vect(vect1, SIZE - NUM_SIZE + 1); while(1); }
//! The main function int main(int argc, char *argv[]) { unsigned int cycle_count; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // Get the actual cycle count cycle_count = Get_sys_count(); // Perform a convolution dsp32_vect_conv(vect1, vect2, VECT2_SIZE, vect3, VECT3_SIZE); // Calculate the number of cycles cycle_count = Get_sys_count() - cycle_count; // Print the number of cycles dsp32_debug_printf("Cycle count: %d\n", cycle_count); // Print the output signal dsp32_debug_print_vect(vect1, VECT2_SIZE + VECT3_SIZE - 1); while(1); }
//! The main function int main(int argc, char *argv[]) { dsp16_t sample_x,sample_d; dsp16_t y, e; int i; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // Initialization of the buffers for(i=0; i<FIR_COEF_SIZE; i++) { w[i] = 0; x[i] = 0; } for(i=0; i<SIZE; i++) { // Compute a new sample sample_x = input_x[i]; sample_d = input_d[i]; // Compute the LMS filter dsp16_filt_nlms(x, w, FIR_COEF_SIZE, sample_x, sample_d, &y, &e); } // Print the output signal dsp16_debug_print_vect(&w[0], FIR_COEF_SIZE); while(1); }
//! The main function int main(int argc, char *argv[]) { int i; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // Number of recursions for(i=0; i<1000; i++) { // Perform a IIR filter dsp16_filt_iir(&y[DEN_SIZE], &x[NUM_SIZE-1], SIZE, num, NUM_SIZE, den, DEN_SIZE, NUM_PREDIV, DEN_PREDIV); // Update the output signal memmove(y, &y[SIZE], (DEN_SIZE)*sizeof(dsp16_t)); } // Print the output signal dsp16_debug_print_vect(&y[DEN_SIZE], SIZE); while(1); }
//! The main function int main(int argc, char *argv[]) { unsigned int cycle_count; volatile dsp32_t fft32_max; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // Get the actual cycle count cycle_count = Get_sys_count(); // Perform a 64-point complex FFT dsp32_trans_realcomplexfft(vect1, vect2, NLOG); // Perform the absolute value of a complex vector dsp32_vect_complex_abs(fft_real, vect1, SIZE); // Retrieves the maximum of a vector fft32_max = dsp32_vect_max(fft_real, SIZE); // Calculate the number of cycles the FFT took cycle_count = Get_sys_count() - cycle_count; // Print the number of cycles dsp32_debug_printf("Cycle count: %d\n", cycle_count); // Print the complex FFT output signal dsp32_debug_print_complex_vect(vect1, SIZE); while(1); }
//! The main function int main(int argc, char *argv[]) { dsp32_t vect1[SIZE]; int cycle_count; int frequency, sample_rate; dsp32_t phase, amplitude; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // 1 KHz frequency = 1000; // 10 KHz sample_rate = 100000; // phase = PI/2 phase = DSP32_Q(0.5); // amplitude amplitude = DSP32_Q(1.); dsp32_debug_printf("32-bit signal generation program test\n"); // Compute the signal to generate switch(SIGNAL_TO_USE) { // Sinusoidal case SIGNAL_SIN: dsp32_debug_printf("Sine\n"); dsp32_debug_printf("Frequency: %d, Fs: %d, Phase: %f\n", frequency, sample_rate, phase); cycle_count = Get_sys_count(); dsp32_gen_sin(vect1, SIZE, frequency, sample_rate, phase); cycle_count = Get_sys_count() - cycle_count; break; // Cosinusoidal case SIGNAL_COS: dsp32_debug_printf("Cosine\n"); dsp32_debug_printf("Frequency: %d, Fs: %d, Phase: %f\n", frequency, sample_rate, phase); cycle_count = Get_sys_count(); dsp32_gen_cos(vect1, SIZE, frequency, sample_rate, phase); cycle_count = Get_sys_count() - cycle_count; break; // Noise case SIGNAL_NOISE: dsp32_debug_printf("Noise\n"); dsp32_debug_printf("Amplitude: %d\n", amplitude); cycle_count = Get_sys_count(); dsp32_gen_noise(vect1, SIZE, amplitude); cycle_count = Get_sys_count() - cycle_count; break; } // Print the number of cycles dsp32_debug_printf("Cycle count: %d\n", cycle_count); // Print the signal dsp32_debug_print_vect(vect1, SIZE); while(1); }
//! The main function int main(int argc, char *argv[]) { A_ALIGNED static dsp16_t s_input[N/NB_CUTS]; int f; dsp_resampling_t *resampling; dsp16_t *output; U32 temp; dsp16_resampling_options_t options; // Initialize options memset(&options, 0, sizeof(options)); options.coefficients_generation = DSP16_RESAMPLING_OPTIONS_USE_DYNAMIC; options.dynamic.coefficients_normalization = true; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); dsp16_debug_printf("16-bit fixed point signal resampling\n"); dsp16_debug_printf("Input Fs: %iHz\n", F_INPUT); dsp16_debug_printf("Output Fs: %iHz\n", F_OUTPUT); dsp16_debug_printf("%i samples to process cut into %i buffers\n", N, NB_CUTS); dsp16_debug_printf("Filter order used: %i\n", FILTER_ORDER); if (!(resampling = dsp16_resampling_setup(F_INPUT, F_OUTPUT, N/NB_CUTS, FILTER_ORDER, 1, (malloc_fct_t) malloc, &options))) { dsp16_debug_printf("Unable to allocate enough memory\n"); return -1; } if (!(output = (dsp16_t *) malloc(dsp16_resampling_get_output_max_buffer_size(resampling)*sizeof(dsp16_t) + 4))) { dsp16_debug_printf("Unable to allocate enough memory for the output buffer\n"); return -1; } for(f=0; f<NB_CUTS; f++) { memcpy(s_input, &s[N/NB_CUTS*f], (N/NB_CUTS)*sizeof(dsp16_t)); temp = Get_sys_count(); dsp16_resampling_compute(resampling, output, s_input, 0); temp = Get_sys_count() - temp; dsp16_debug_print_vect(output, dsp16_resampling_get_output_current_buffer_size(resampling)); } dsp16_debug_printf( "Cycle count per iteration: %i\n in total (to compute %i samples): %i\n", temp, dsp16_resampling_get_output_current_buffer_size(resampling)*NB_CUTS, temp*NB_CUTS); dsp16_resampling_free(resampling, (free_fct_t) free); while(1); }
// The main function int main(int argc, char *argv[]) { unsigned int cycle_count, i; volatile dsp32_t fft32_max; char *temp = " +"; char complex_vect_result[SIZE][31]; /** * \note the call to sysclk_init() will disable all non-vital * peripheral clocks, except for the peripheral clocks explicitly * enabled in conf_clock.h. */ sysclk_init(); // Initialize the DSP debug USART module when running in external board #if BOARD != AVR_SIMULATOR_UC3 dsp_debug_initialization(FOSC0); #endif // Get the actual cycle count cycle_count = Get_sys_count(); // Perform a 64-point complex FFT dsp32_trans_realcomplexfft(vect1, vect2, NLOG); // Perform the absolute value of a complex vector dsp32_vect_complex_abs(fft_real, vect1, SIZE); // Retrieves the maximum of a vector fft32_max = dsp32_vect_max(fft_real, SIZE); // Calculate the number of cycles the FFT took cycle_count = Get_sys_count() - cycle_count; // Print the output signal for (i = 0; i < SIZE; i++) { if (vect1[i].imag >= 0) { temp = " +"; } else { temp = " "; } dsp32_debug_sprintf(complex_vect_result[i],"%f%s%f", vect1[i].real, temp,vect1[i].imag); } /* * Place a breakpoint here and check ASCII output in complex_vect_result * in Memory Window. * Note: Find the variable address in Watch Window and enter it in * Memory Window */ while (1) { // Intentionally left blank. } }
//! The main function int main(int argc, char *argv[]) { int cycle_count, size; int i; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); dsp16_debug_printf("16-bit fixed point vectors program test\n"); dsp16_debug_printf("Output vector 1 (size %i)\n", VECT1_SIZE); dsp16_debug_printf("Input vector 2 (size %i)\n", VECT2_SIZE); dsp16_debug_printf("Input vector 3 (size %i)\n", VECT3_SIZE); while(1) { // Print the menu dsp16_debug_printf("***** Menu *****\n"); for(i=0; i<sizeof(item_menu)/sizeof(s_item_menu); i++) dsp16_debug_printf("%i:\t%s\n", i, item_menu[i].title); // Prompt dsp16_debug_printf("> "); i = dsp_debug_read_ui(); if (i >= 0 && i < sizeof(item_menu)/sizeof(s_item_menu)) { // Print the title dsp16_debug_printf("%s\n", item_menu[i].title); // Call the function to execute cycle_count = item_menu[i].action(&size); if (cycle_count != -1) { // Print the number of cycles dsp16_debug_printf("Cycle count: %d\n", cycle_count); // Print the result dsp16_debug_print_vect(vect1, size); } } else dsp16_debug_printf("!Invalid item!\n"); dsp16_debug_printf("<Press any key to continue>\n"); dsp_debug_read_fct(); } }
// The main function int main(int argc, char *argv[]) { dsp32_t sample_x,sample_d; dsp32_t y, e; int i; char lms_vect_result[FIR_COEF_SIZE][15]; /** * \note the call to sysclk_init() will disable all non-vital * peripheral clocks, except for the peripheral clocks explicitly * enabled in conf_clock.h. */ sysclk_init(); // Initialize the DSP debug USART module when running in external board #if BOARD != AVR_SIMULATOR_UC3 dsp_debug_initialization(FOSC0); #endif // Initialization of the buffers for (i = 0; i < FIR_COEF_SIZE; i++) { w[i] = 0; x[i] = 0; } for (i = 0; i < SIZE; i++) { // Compute a new sample sample_x = input_x[i]; sample_d = input_d[i]; // Compute the LMS filter dsp32_filt_lms(x, w, FIR_COEF_SIZE, sample_x, sample_d, &y, &e); } // Print the output signal for (i = 0; i < FIR_COEF_SIZE; i++) { dsp32_debug_sprintf(lms_vect_result[i],"%f", w[i]); } /* * Place a breakpoint here and check the ASCII output in lms_vect_result * in Memory Window. * Note: Find the variable address in Watch Window and enter it in * Memory Window */ while (1) { // Intentionally left blank. } }
//! \brief Main Function int main(int argc, char *argv[]) { int cycle_count, size; int i; struct { char menu[25]; char result[VECT1_SIZE][15]; } vectors_result; /** * \note the call to sysclk_init() will disable all non-vital * peripheral clocks, except for the peripheral clocks explicitly * enabled in conf_clock.h. */ sysclk_init(); // Initialize the DSP debug USART module when running in external board #if BOARD != AVR_SIMULATOR_UC3 dsp_debug_initialization(FOSC0); #endif for (i = 0; i >= 0 && i < (sizeof(item_menu) / sizeof(s_item_menu)); i++) { // Call the function to execute cycle_count = item_menu[i].action(&size); dsp32_debug_sprintf(vectors_result.menu, "%s", item_menu[i].title); if (cycle_count != -1) { // Print the result for (i = 0; i < size; i++) { dsp32_debug_sprintf(vectors_result.result[i],"%f", vect1[i]); } /* * Place a breakpoint here and check the ASCII output in * vectors_result in Memory Window. * Note: Find the variable address in Watch Window and enter it in * Memory Window */ asm("nop"); } } while (1) { // Intentionally left blank. } }
//! The main function int main(int argc, char *argv[]) { unsigned int cycle_count; int i; short predicted_value, step_index; int diff; dsp16_t ratio; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); // Get the actual cycle count cycle_count = Get_sys_count(); predicted_value = 0; step_index = 0; // Encode dsp_adpcm_ima_encode(cbuf, sbuf, NSAMPLES, &step_index, &predicted_value); predicted_value = 0; step_index = 0; // Decode dsp_adpcm_ima_decode(new_sbuf, cbuf, NSAMPLES, &step_index, &predicted_value); // Calculate the number of cycles cycle_count = Get_sys_count() - cycle_count; // Error calculation diff = 0; for(i=0; i<NSAMPLES; i++) diff += ((new_sbuf[i]-sbuf[i]) > 0)?(new_sbuf[i]-sbuf[i]):(sbuf[i]-new_sbuf[i]); ratio = DSP16_Q((diff/NSAMPLES)/(((float) (1 << 15)))); // Print the number of cycles dsp16_debug_printf("Cycle count: %d\n", cycle_count); // Print the error average dsp16_debug_printf("Error average ratio: %f\n", ratio); while(1); }
//! The main function int main(int argc, char *argv[]) { unsigned int cycle_count, i; char fir_vect_result[SIZE][15]; /** * \note the call to sysclk_init() will disable all non-vital * peripheral clocks, except for the peripheral clocks explicitly * enabled in conf_clock.h. */ sysclk_init(); // Initialize the DSP debug USART module when running in external board #if BOARD != AVR_SIMULATOR_UC3 dsp_debug_initialization(FOSC0); #endif // Get the actual cycle count cycle_count = Get_sys_count(); // Perform a 25-taps FIR dsp32_filt_fir(y, x, SIZE, fir_coef, FIR_COEF_SIZE); // Calculate the number of cycles cycle_count = Get_sys_count() - cycle_count; // Print the output signal for (i = 0; i < SIZE; i++) { dsp32_debug_sprintf(fir_vect_result[i],"%f", y[i]); } /* * Place a breakpoint here and check the ASCII output in fir_vect_result * in Memory Window. * Note: Find the variable address in Watch Window and enter it in * Memory Window */ while (1) { // Intentionally left blank. } }
//! The main function int main(int argc, char *argv[]) { int i; char iir_vect_result[SIZE][15]; /** * \note the call to sysclk_init() will disable all non-vital * peripheral clocks, except for the peripheral clocks explicitly * enabled in conf_clock.h. */ sysclk_init(); // Initialize the DSP debug USART module when running in external board #if BOARD != AVR_SIMULATOR_UC3 dsp_debug_initialization(FOSC0); #endif // Number of recursions - Reduced to 5 decrease the time in Simulator for (i = 0; i < 5; i++) { // Perform a IIR filter dsp32_filt_iir(&y[DEN_SIZE], &x[NUM_SIZE - 1], SIZE, num, NUM_SIZE, den, DEN_SIZE, NUM_PREDIV, DEN_PREDIV); // Update the output signal memmove(y, &y[SIZE], (DEN_SIZE)*sizeof(dsp32_t)); } // Print the output signal for (i = 0; i < SIZE; i++) { dsp32_debug_sprintf(iir_vect_result[i],"%f", y[i]); } /* * Place a breakpoint here and check the ASCII output in iir_vect_result * in Memory Window. * Note: Find the variable address in Watch Window and enter it in * Memory Window */ while (1) { // Intentionally left blank. } }
//! The main function int main(int argc, char *argv[]) { dsp32_t number, result; int cycle_count; char sin_result[50], cos_result[50], asin_result[50], acos_result[50], rand_result[50], sqrt_result[50], abs_result[50], ln_result[50], log2_result[50], log10_result[50], exp_result[50], pow_result[50]; /** * \note the call to sysclk_init() will disable all non-vital * peripheral clocks, except for the peripheral clocks explicitly * enabled in conf_clock.h. */ sysclk_init(); // Initialize the DSP debug USART module when running in external board #if BOARD != AVR_SIMULATOR_UC3 dsp_debug_initialization(FOSC0); #endif number = DSP32_Q(NUMBER_TO_COMPUTE); /* * Place a breakpoint on sprintf and check the ASCII output in * %operator%_result in Watch Window or Memory Window. * Note: Edit the variable name in Watch Window and append * "&" at the start and ",s" at the end for displaying string. * Read Watch Window Format Specifiers for more info. */ // 32-bit fixed point cosine cycle_count = Get_sys_count(); result = dsp32_op_cos(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(cos_result, "cos(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point sine cycle_count = Get_sys_count(); result = dsp32_op_sin(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(sin_result, "sin(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point arc cosine cycle_count = Get_sys_count(); result = dsp32_op_acos(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(acos_result, "acos(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point arc sine cycle_count = Get_sys_count(); result = dsp32_op_asin(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(asin_result, "asin(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point random dsp_op_srand(number); cycle_count = Get_sys_count(); result = dsp32_op_rand(); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(rand_result, "rand() %f (%i cycles)\n", result, cycle_count); // 32-bit fixed point square root cycle_count = Get_sys_count(); result = dsp32_op_sqrt(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(sqrt_result, "sqrt(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point absolute cycle_count = Get_sys_count(); result = dsp32_op_abs(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(abs_result, "abs(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point natural logarithm cycle_count = Get_sys_count(); result = dsp32_op_ln(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(ln_result, "ln(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point binary logarithm cycle_count = Get_sys_count(); result = dsp32_op_log2(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(log2_result, "log2(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point common logarithm cycle_count = Get_sys_count(); result = dsp32_op_log10(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(log10_result, "log10(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point exponential cycle_count = Get_sys_count(); result = dsp32_op_exp(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(exp_result, "exp(%f) %f (%i cycles)\n", number, result, cycle_count); // 32-bit fixed point power cycle_count = Get_sys_count(); result = dsp32_op_pow(DSP32_Q(0.), number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_sprintf(pow_result, "pow(0.5, %f) %f (%i cycles)\n", number, result, cycle_count); while (1) { // Intentionally left blank. } }
//! The main function int main(int argc, char *argv[]) { dsp32_t number, result; int cycle_count; // Switch to external Oscillator 0. pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); // Initialize the DSP debug module dsp_debug_initialization(FOSC0); dsp32_debug_printf("32-bit fixed point operators program test\n"); dsp32_debug_printf("Type a number: "); number = dsp_debug_read_q(DSP32_QA, DSP32_QB); dsp32_debug_printf("Number to compute: %f\n", number); // 32-bit fixed point cosine cycle_count = Get_sys_count(); result = dsp32_op_cos(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("cos(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point sine cycle_count = Get_sys_count(); result = dsp32_op_sin(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("sin(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point arc cosine cycle_count = Get_sys_count(); result = dsp32_op_acos(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("acos(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point arc sine cycle_count = Get_sys_count(); result = dsp32_op_asin(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("asin(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point random dsp_op_srand(number); cycle_count = Get_sys_count(); result = dsp32_op_rand(); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("rand()\t\t\t\t%f\t(%i cycles)\n", result, cycle_count); // 32-bit fixed point square root cycle_count = Get_sys_count(); result = dsp32_op_sqrt(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("sqrt(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point absolute cycle_count = Get_sys_count(); result = dsp32_op_abs(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("abs(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point natural logarithm cycle_count = Get_sys_count(); result = dsp32_op_ln(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("ln(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point binary logarithm cycle_count = Get_sys_count(); result = dsp32_op_log2(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("log2(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point common logarithm cycle_count = Get_sys_count(); result = dsp32_op_log10(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("log10(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point exponential cycle_count = Get_sys_count(); result = dsp32_op_exp(number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("exp(%f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); // 32-bit fixed point power cycle_count = Get_sys_count(); result = dsp32_op_pow(DSP32_Q(0.), number); cycle_count = Get_sys_count() - cycle_count; dsp32_debug_printf("pow(0.5, %f)\t\t%f\t(%i cycles)\n", number, result, cycle_count); while(1); }