DSPRelated.com
Forums

5416 device error while debugging an acoustic model

Started by megha daga April 19, 2006
Hi Everyone
I am using PEP5416 to run an acoustic model. Right now I am testing/debugging just on the simulator C5416 and not on the actual device.
I am doing AGC/DRC for processing and for that I have to calculate the dB gain value. For that I am using following code:

for(i = 32768; i > 0;i--)
{
//determine the dB value of current point
logx = (float)20.0*(float)log10((float)i/(float)32768);
//now see if the current value is between the two
//points that we are now using
//if we are less than the first point, read
//in the next point from the file
if(logx < logx1)
{
//save previous values
logx2 = logx1;
logy2 = logy1;

//Read in the next point
fgets(temp, 250, fileid);
sscanf(temp, "%f%f", &logx1, &logy1);
}

//now interpolate logy from logx
logy = logy1+(logx-logx1)/(logx2-logx1)*(logy2-logy1);

//now convert to an actual gain
//gain = (desired ouput)/input
drctable[i] = (float)32768*(float)pow(10,logy/(float)20.0)/(float)i;
}

This command is taking a lot of time while debugging. I waited almost for 6 min and the counter ("i") just reached almost to 19000 and after that it gave an error as:
Trouble running Target CPU
What should I do for the speed and for this error?
Kindly reply.
Thanking You
Megha Daga