Hello,

I'm a beginer in programing on DSP boards. And I have a problem. I am using example from visualdsp++ BlockBasedTalkThru(C) example. I applied a some porcessing in finction processBlock. And it is not working. By using debuger i get that proccesing is to long. How can I solve this problem?

Below I put my code:

#include "tt.h"

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <complex.h>

#include <filter.h>

// Place the audio processing algorith here. The input and output are given

// as unsigned integer pointers.

void processBlock(unsigned int *block_ptr,complex_float *x,complex_float *X,complex_float *x1,complex_float *X1,complex_float *c,complex_float *C,complex_float alfa,complex_float delta,complex_float delta_pier,complex_float new_C, int N)

{

int i;

float temp_out,sample;

int n;

//Clear the Block Ready Semaphore

blockReady = 0;

//Set the Processing Active Semaphore before starting processing

isProcessing = 1;

for(i=0;i<NUM_SAMPLES;i=i+2){

n = i/2;

x[n].re = (float)(int)((*(block_ptr+i)) << 8);

// x[n].re = 0;

x1[n].re = (float)(int)((*(block_ptr+i+1)) << 8);

}

cfft512(x,X);

cfft512(x1,X1);

for(i=0;i<NUM_SAMPLES/2;i++)

{

if((sqrt((X[i].re*X[i].re)+(X[i].im*X[i].im)) !=0) && (sqrt((X1[i].re*X1[i].re)+(X1[i].im*X1[i].im)) !=0)) {

C[i].re = (X[i].re/sqrt((X[i].re*X[i].re)+(X[i].im*X[i].im)) + X1[i].re/sqrt((X1[i].re*X1[i].re)+(X1[i].im*X1[i].im)));

C[i].im = (X[i].im/sqrt((X[i].re*X[i].re)+(X[i].im*X[i].im)) + X1[i].im/sqrt((X1[i].re*X1[i].re)+(X1[i].im*X1[i].im)));

}

else

{

C[i].re = 0;

C[i].im = 0;

}

..............................

SOMETHING MORE

............................

new_C = cmlt(alfa,C[i]);

C[i] = new_C;

}** ifft512(C,c); **

for(i=0;i<NUM_SAMPLES;i=i+2)

{

n=i/2;

*(block_ptr+i) = (unsigned)(((int)c[n].re) >> 8);

*(block_ptr+i+1) = (unsigned)(((int)c[n].re) >> 8);

}

//Clear the Processing Active Semaphore after processing is complete

isProcessing = 0;

}

Hi,

this thread has been moved from the Embedded Processing and DSP category to the SHARC sub-category. Please continue the discussion here.

Regards,

Craig.