Hi,
I'm using TCI6486, and I'm trying to obtain the cycle count of the ChannelFilter() function described in the following lines, though a benchmark, but the number of cycle obtained seems to be too much (8038cycles),
This number of cycles is pretty equal to two time of the expected value. Moreover, this value doesn’t must the value (4112 cycles)given by the generated assembly code of ChannelFilter()
By the way, for obtaining the same value as the assembly code I should do a call of ChannelFilter() twice consecutively, In this case CPU cycles count are: 8038 for the first call; and 4121 for the second call
So, my staff is not working properly.
This is a part of this assembly code:
;* Mem bank conflicts/iter(est.) : { min 0.000, est 0.000, max 0.000 }
;* Mem bank perf. penalty (est.) : 0.0%
;* Total cycles (est.) : 16 + min_trip_cnt * 4 = 4112
This is ChannelFilter() C code:
void ChannelFilter( _iq * restrict dataIn_p, _iq * restrict TF_p, _iq * restrict dataOut_p){
int16_t i;
#pragma MUST_ITERATE(FFT_SIZE, FFT_SIZE , FFT_SIZE ); // FFT_SIZE = 1024
for (i = 0; i < 2 * FFT_SIZE; i += 2)
{
//real part of dataOut_p
dataOut_p[i] = _IQmpy(dataIn_p[i],TF_p[i]) - _IQmpy(dataIn_p[i+1],TF_p[i+1]);
// imag part of dataOut_p
dataOut_p[i+1] = _IQmpy(dataIn_p[i],TF_p[i+1]) + _IQmpy(dataIn_p[i+1],TF_p[i]);
}
}
Finally this is a part of main test bench of ChannelFilter() function
t_start = clock();
ChannelFilter( ChFilter_in, ChCoef, ChFilter_out);
t_stop = clock();
t_chFilter = t_stop - t_start - t_overhead;
LOG_printf(&LOG_Debug,"Channel filter Cycles for N= %d samples= %d", FFT_SIZE, (int32_t)t_chFilter);
For your information all used pointer are defined as restrict and are double-word aligned, and the assembly code above shows that there is no Mem bank conflicts, and no Mem bank perf. Penalty.
By the way, I’m using CCS V3-3, and IQmath_inline_all.h and IQmath Tables.c are added to project for optimization.
Can you give me pointers on how to solve this echo?
thanks.