hello engineers
I was assigned to implement an Fir decimating filter (with decimation 5 and 10),
the input is 160 audio frames with length 16bit, I am working on C674x platform.
please provide me with help.
best regards
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello engineers
I was assigned to implement an Fir decimating filter (with decimation 5 and 10),
the input is 160 audio frames with length 16bit, I am working on C674x platform.
please provide me with help.
best regards
Mohammed Alzain,
Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.
Have you tried searching those resources, or this forum, or the internet, for information on decimation filters? There is a lot of information that will be helpful to you.
"C674x platform" does not tell us which device you are using. If you are only simulating right now, that is understandable. If you have a device in mind, that may help in the discussion.
Regards,
RandyP
thanks mr. RandyP for your concern,
I am brand new to DSP world, and I have been thrown in the middle of it all of a sudden.
I have been through TI.com as well as TI Wiki pages but I didn't find what I was after, I know that a decimating filter consists of a filter part and a "throw away" part. theoretically it was easy to understand, but to implement on a C6748 processor it was headache specifically the circular delay buffer part.
My acquaintance and I wrote some code in C, but it consumed manyt cycles (about 29000) which was inefficient.
while there is no decimation function in the C64x DSPlib, I had to make my way through but I am stuck.
thanks and I appreciate your help
Does your C code decimation filter function correctly? Do you get the correct output from the input you supply to it?
Assuming the answer is yes, then your question is how to optimize your program.
Please go to the Wiki and search for "C6000 training" (no quotes) and click the Category link that you find. There is an optimization workshop that you should study and work through the labs, treating it as a self-paced class.
Once you have applied many optimization techniques, you will have better performance. At this point, there is no way we can tell you more to do with no more information than you have supplied above.
The easiest optimization is to use the Release Configuration in CCS. But this assumes you were using the Debug Configuration to get the 29000 number. But this is one example of the techniques you will learn from the training material.
Regards,
RandyP
Optimal way of implementing filters on C674x is to compute the FIR filter co-efficents using tools provided in matlab or manually based on requirement. Then convert the filter co-efficents in the correct Q point format required in the C64x DSPLIB fir functions and use those functions to compute the filtered output. Generally the optimized implementation of this function in the library will take about 1/2* nr * (1/2* nh + 9) + 26 where nr is number of output samples and nh is the number of co-efficients which should be significantly lower than the natural C code implementation.
As for the circular delay buffer part, Randy has made some good suggestions on the post here:
http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/112/t/83162.aspx
Hope this helps. Good luck
Regards,
Rahul
Thanks Mr. RandyP and Mr. Rahul Prabhu for clarifying the matter.
I found a code at dsprelated.com that implements the circular Buffer using the C function (memcpy) instead of shifting using for loop, I tried it and it works perfectly.
here is the page: http://www.dsprelated.com/groups/c6x/show/6340.php and I hope every one can make use of it.
as for the decimation a (for loop) like the following can do, x= filtered samples array ,nx=number of samples, y=output decimated flitered samples, df=decimation factor;
y should be size of nx/df;
for (i=0;i<nx;i++)
y[i]=x[i*df];
regards