Other Parts Discussed in Thread: TMS320C6657
Hi,
I'm struggling to get the DSP_fir_cplx() function to produce any reasonable output. I'm currently testing it with a real, symmetric filter and with a very basic input signal:
short h[32] =
{
-57, 0, -32, 0, 289, 0, 251, 0,
-827, 0, -969, 0, 2488, 0, 7049, 0,
7049, 0, 2488, 0, -969, 0, -827, 0,
251, 0, 289, 0, -32, 0, -57, 0,
};
short x[48] =
{
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
1, 1,
};
short result[16] = {0};
Here's the way I used to call the function (`old way', DSPLIB 3.1.0.0):
DSP_fir_cplx(&x[30], &h[0], &result[0], 16, 8);
And here's the output that I get:
result =
{
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
};
This is not symmetric so clearly it's wrong. I noticed that in the latest header file (DSP_fir_cplx.h) the API has changed and that now I should be calling DSP_fir_cplx() like this:
DSP_fir_cplx(&x[30], &h[32], &result[16], 16, 8);
In this case, however, I get the following:
result =
{
0, 0,
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
1, 0,
};
which is also non-symmetric, hence wrong. Moreover, according to the reference C files (DSP_fir_cplx.c and DSP_fir_cplx_cn.c) the API hasn't changed! This is all getting a bit confusing.
Does anyone anyone know the right way of calling DSP_fir_cplx() for my simplified input data? Otherwise I'm not able to use in more realistic settings.
I am testing it with a TMS320C6657 board, but this seems only mildly relevant. I also made sure that all the input is properly aligned.
Thanks!