I'm developing an ANC with CodeComposer v. 2.10 on a tms320c6711
DSK. I'm using DSP/BIOS, fastrts67x library v. 1.03. Well if i compile the project in Debug i've no problems, if i compile in release, i've noticed a very strange behavior. If i select file(-o3) or function(- 02) optimization level, calling a my computation function (with some sin cos instructions on double args), the computation result is a lot mistaken! If i select Local (-01) optimization level, the result differs from that obtained in debub just for an error of 10^-15 order. I know that Code Composer has got a long BugList... is that a known problem? |
|
Optimization Level problem!
Started by ●July 19, 2003
Reply by ●July 19, 20032003-07-19
Hi, We've noticed this problem in our project since its beginning. This problem was solved only when we migrated to CC 2.2. Despite this, we was forced to change the compilation options of some modules to compile them with debug code. If not, the project didn't work. regards, Alexandre -----Original Message----- From: puffoinkazzato [mailto:] Sent: Saturday, July 19, 2003 8:06 AM To: Subject: [c6x] Optimization Level problem! I'm developing an ANC with CodeComposer v. 2.10 on a tms320c6711 DSK. I'm using DSP/BIOS, fastrts67x library v. 1.03. Well if i compile the project in Debug i've no problems, if i compile in release, i've noticed a very strange behavior. If i select file(-o3) or function(- 02) optimization level, calling a my computation function (with some sin cos instructions on double args), the computation result is a lot mistaken! If i select Local (-01) optimization level, the result differs from that obtained in debub just for an error of 10^-15 order. I know that Code Composer has got a long BugList... is that a known problem? _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: Send an email to To Post: Send an email to To Leave: Send an email to Archives: http://www.yahoogroups.com/group/c6x Other Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/ |
Reply by ●July 19, 20032003-07-19
Hi, I guess during the course of optimizing the file, the compiler is screwing up something more pronounced if you have any floating point operations. Try looking into the compiler generated code and You should get your bug. Try placing file by file from lower to -o3 level. Thanks and Regards, Ganesh Original Message: ----------------- From: puffoinkazzato Date: Sat, 19 Jul 2003 11:06:09 -0000 To: Subject: [c6x] Optimization Level problem! I'm developing an ANC with CodeComposer v. 2.10 on a tms320c6711 DSK. I'm using DSP/BIOS, fastrts67x library v. 1.03. Well if i compile the project in Debug i've no problems, if i compile in release, i've noticed a very strange behavior. If i select file(-o3) or function(- 02) optimization level, calling a my computation function (with some sin cos instructions on double args), the computation result is a lot mistaken! If i select Local (-01) optimization level, the result differs from that obtained in debub just for an error of 10^-15 order. I know that Code Composer has got a long BugList... is that a known problem? _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: Send an email to To Post: Send an email to To Leave: Send an email to Archives: http://www.yahoogroups.com/group/c6x Other Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/ -------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . |
|
Reply by ●July 19, 20032003-07-19
I agree with Ganesh. Once you identify the particular file that is
causing problems, try moving some of the functions to other files to see IF you
can identify which ones [it will be more than one] are causing the
problem.
Also a comment regarding "looking at the assembly code" when using file or
program level optimization - you might not even recognize it! It appears
that TI's optimization is very aggressive for these cases and the compiler
generates some very bizzare looking code when trying to correlate it to your
original program.
Good Luck,
mikedunn
"g...@emuzed.com" <g...@emuzed.com> wrote: Hi, |
|
Reply by ●July 20, 20032003-07-20
Hi, You can generate the assembly file with C code inlined too. Also I personally don't think it us immpossible. Only a little bit of time invested 'smartly'would solve your problem. A easy approach which I can propose is try to apply file level optimizations in debug mode itself and reach the max. optimization levels. You can even debug by single stepping. Then revert to assembly mode. Only you need to localize the source of the problem initially. Thanks and Regards, Ganesh Original Message: ----------------- From: Mike Dunn Subject: RE: [c6x] Optimization Level problem! I agree with Ganesh. Once you identify the particular file that is causing problems, try moving some of the functions to other files to see IF you can identify which ones [it will be more than one] are causing the problem. Also a comment regarding "looking at the assembly code" when using file or program level optimization - you might not even recognize it! It appears that TI's optimization is very aggressive for these cases and the compiler generates some very bizzare looking code when trying to correlate it to your original program. Good Luck, mikedunn -------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . |
Reply by ●July 21, 20032003-07-21
Hi !
Even we are working on ANC. As,
weI had programming in assembly previously, I've used mixed C/assembly
coding. I am able to implement a 8 channel ANC on 6201 processor. I think you
should consider this as an alternative option. Our program has been tested in
real experimental setup and we are getting promising
results.
-Veena
|
Reply by ●July 21, 20032003-07-21
Hi Veena,
I guess to obtain good performance on any DSP
regardless of the architecture one needs to use both C and assembly coding.
But the problem arises when you place some file
with C code more so with floating point operations in a particular optimization
level (-o2 or -o3).
When faced with such a situation, you
need to workaround that problem which was the point of discussion.
I am sorry but I don't get your view about
the same. Can you correct me ? BTW are you in NAL ?
With Warm Regards,
Ganesh
|