This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is it a bug in NE10 library function "ne10_fir_float_neon"?

Hi,

I make a short test of NE10 library function ne10_fir_float_neon. I find that the first filter output data is always '1' for a simple impulse FIR (coefficients: 1, 0, 0, 0, 0). It is expected to be a 4 unit delay of input data.

const ne10_fir_instance_f32_t *S;
ne10_uint16_t     numTaps=5;   // Length of the filter.
ne10_float32_t pState[5]={1,0,0,0,0};   //   Points to the state variable array.
ne10_float32_t pCoeffs[5]={1,0,0,0,0};
ne10_fir_instance_f32_t tempS = {numTaps, pState, pCoeffs};
//tempS = {numTaps, pState, pCoeffs};
S = &tempS;
for (i = 0; i < 15; i++)
{
     printf ("neonfir1: thesrc[%d]= %f.\n", i, thesrc[i]);
     thedst1[i] = 0;
    printf ("neonfir1: thedst[%d]= %f.\n", i, thedst1[i]);
}
ne10_fir_float_neon (S, thesrc, thedst1, blockSize);
for (i = 0; i < 15; i++)
{
     printf ("neonfir2: thesrc[%d]= %f.\n", i, thesrc[i]);
    printf ("neonfir2: thedst[%d]= %f.\n", i, thedst1[i]);
}
ne10_fir_float_neon0 (S, thesrc, thedst1, blockSize);

Here is the printf output:

neonfir1: thesrc[0]= 1.676114.
neonfir1: thedst[0]= 0.000000.
neonfir1: thesrc[1]= 3.841148.
neonfir1: thedst[1]= 0.000000.
neonfir1: thesrc[2]= 1.388874.
neonfir1: thedst[2]= 0.000000.
neonfir1: thesrc[3]= 2.769850.
neonfir1: thedst[3]= 0.000000.
neonfir1: thesrc[4]= 2.386985.
neonfir1: thedst[4]= 0.000000.
neonfir1: thesrc[5]= 0.000000.
neonfir1: thedst[5]= 0.000000.
neonfir1: thesrc[6]= 0.000000.
neonfir1: thedst[6]= 0.000000.
neonfir1: thesrc[7]= 0.000000.
neonfir1: thedst[7]= 0.000000.
neonfir1: thesrc[8]= 0.000000.
neonfir1: thedst[8]= 0.000000.
neonfir1: thesrc[9]= 0.000000.
neonfir1: thedst[9]= 0.000000.
neonfir1: thesrc[10]= 0.000000.
neonfir1: thedst[10]= 0.000000.
neonfir1: thesrc[11]= 0.000000.
neonfir1: thedst[11]= 0.000000.
neonfir1: thesrc[12]= 0.000000.
neonfir1: thedst[12]= 0.000000.
neonfir1: thesrc[13]= 0.000000.
neonfir1: thedst[13]= 0.000000.
neonfir1: thesrc[14]= 0.000000.
neonfir1: thedst[14]= 0.000000.
neonfir2: thesrc[0]= 1.676114.
neonfir2: thedst[0]= 1.000000.
neonfir2: thesrc[1]= 3.841148.
neonfir2: thedst[1]= 0.000000.
neonfir2: thesrc[2]= 1.388874.
neonfir2: thedst[2]= 0.000000.
neonfir2: thesrc[3]= 2.769850.
neonfir2: thedst[3]= 0.000000.
neonfir2: thesrc[4]= 2.386985.
neonfir2: thedst[4]= 1.676114.
neonfir2: thesrc[5]= 0.000000.
neonfir2: thedst[5]= 3.841148.
neonfir2: thesrc[6]= 0.000000.
neonfir2: thedst[6]= 1.388874.
neonfir2: thesrc[7]= 0.000000.
neonfir2: thedst[7]= 2.769850.
neonfir2: thesrc[8]= 0.000000.
neonfir2: thedst[8]= 0.000000.
neonfir2: thesrc[9]= 0.000000.
neonfir2: thedst[9]= 0.000000.
neonfir2: thesrc[10]= 0.000000.
neonfir2: thedst[10]= 0.000000.
neonfir2: thesrc[11]= 0.000000.
neonfir2: thedst[11]= 0.000000.
neonfir2: thesrc[12]= 0.000000.
neonfir2: thedst[12]= 0.000000.
neonfir2: thesrc[13]= 0.000000.
neonfir2: thedst[13]= 0.000000.
neonfir2: thesrc[14]= 0.000000.
neonfir2: thedst[14]= 0.000000.

'thedst[0] should be 0, not 1.

Parents Reply Children
No data