Reply by nayakam January 18, 20032003-01-18
DSK used : TMS320VC5416 DSK
software version: code composer studio 'c5416 ver 2.10.05

Hello everybody,
I would be grateful if somebody can suggest about the convol function
in dsplib used for the convolution process. The convol function
syntax given in the examples provided by CCS(code composer studio), is
convol(x_np,h,r,nh,nr)
where x_np is of length nr+nh-1, h of length nh and r of length nr.

(this doesnt make any sense, cause if a[nx] and h[nh] are the
elements, the result is r[nx+nh-1]);

Here is a portion of my code,which i developed based on the above
given example.

iarray[48],
*iparray (pointer to iarray),
filter[31],
*filterp (pointer to filter),
I_Waveforms[78] (output of the convolution),
*iwaveforms (pointer to I_Waveforms),
N1 & lengthH are all defined in the main function.

void newconv(float *iparray, float *filterp, int N, int length, float
*iwaveforms)
{
float i_wave[78],*i_wavep;
short iTx_wave[78],h_ta[31],a_ifilt[108];
int i;

i_wavep=i_wave;

///*****This is how the example defines the values of x_np, the first
///***** N-1 values are 0,like a zero padding.

for(i=0;i<N-1;i++)
*(i_wavep+i)=0;
for(i=N-1;i<(length+N-1);i++)
*(i_wavep+i)=*(iparray+i-N+1);///***** 48+31-1x

fltoq15(i_wavep,iTx_wave,78); ///******Do i need to do this?
fltoq15(filterp,h_ta,31);
convol(iTx_wave,h_ta,a_ifilt,N,length);
q15tofl(a_ifilt,iwaveforms,78);
return;

}

This gives me a wrong computed value for iwaveforms, (compared by
matlab). hope some of you can give me a possible way out of this mess.
thanks

amit j.