An example of using Ne10's vanilla FIR function.
#include <stdio.h>
#include <stdlib.h>
#define NUMTAPS 4
#define NUMBLOCKS 2
#define BLOCKSIZE 8
#define BUFFSIZE (NUMBLOCKS * BLOCKSIZE)
{
{
fprintf(stderr, "Failed to initialise Ne10.\n");
return 1;
}
{
fprintf(stderr, "Failed to initialise FIR instance structure.\n");
return 1;
}
{
}
{
}
{
}
printf("Coefficients:\n");
for (int i = NUMTAPS - 1; i >= 0; i--)
{
printf("\tb[%d] = %5.4f\n", NUMTAPS - (i + 1), coeffs[i]);
}
{
printf( "IN[%2d]: %9.4f\t", i, src[i]);
printf("OUT[%2d]: %9.4f\n", i, dst[i]);
}
return 0;
}