AnsweredAssumed Answered

About dsp runtime function convolve_fr16 in bf609

Question asked by daxingxing on Jul 2, 2016
Latest reply on Oct 7, 2016 by Kader.M

Hello, all the talent:

I have a question about how to use function convolve_fr16 in bf609.

Here is my code:

 

/*****************************************************************************
 * try_convultion_Core0.c
 *****************************************************************************/
#include <filter.h>
#include <sys/platform.h>
#include <sys/adi_core.h>
#include <ccblkfn.h>
#include "adi_initialize.h"
#include "try_convultion_Core0.h"

/** 
 * If you want to use command program arguments, then place them in the following string. 
 */
char __argv_string[] = "";

int main(int argc, char *argv[])
{
    /**
     * Initialize managed drivers and/or services that have been added to 
     * the project.
     * @return zero on success 
     */

    //adi_initComponents();

    const fract16 input_x[3] = {1,2,3};

    const fract16 input_y[2] = {1,1};

    fract16 Output_z[4];
    
    convolve_fr16(input_y,3,input_x,2,Output_z);
    /**
     * The default startup code does not include any functionality to allow
     * core 0 to enable core 1. A convenient way to enable
     * core 1 is to use the adi_core_enable function. 
     */
    //adi_core_enable(ADI_CORE_1);

    /* Begin adding your custom code here */

        return 0;
}

 

The project is built without any problem. But when run it (I set a break point before line 42 of return 0), I observed that the Output_z result is all 0 elements.... I do not know why? It should be something like [1 3 5 3] as the matlab result.

 

And I do not understand either what does the "domain [-1.0, +1.0)" in the following picture (the description of the function )mean ?

conv.PNG

 

Many thanks !

Outcomes