Dear Everybody. I'm using CCStudio v3.3 with the DM642 EVM and XDS560R debugger. I coded my algorithm with ANSI c library, But It didn't give me enough performance. So I have been trying to apply IQMath library and found two odd situations. FIRST. when I ran the codes below, iq_c was 0.0001xx. Wasn't iq_c supposed to be 2 ? iq_a = _IQ13(1); iq_b = _IQ13(2); iq_c = _IQ13mpy(iq_a,iq_b); SECOND. whenever I called _IQsqrt(), the system was down. All calls with individual line below made the system goes down. #define GLOBAL_Q 13 q_r = _IQsqrt(100); q_r = _IQsqrt(-200000); q_r = _IQsqrt(200000); _IQsqrt(100); _IQsqrt(_IQ(100)); Thanks.
Problems with IQMath library
Started by ●May 6, 2008
Reply by ●May 6, 20082008-05-06
Un bel giorno kkadin@gmail.com digit�:> All calls with individual line below made the system goes down.Have you included the custom .cmd file into your project? IQmath uses some DSP ROM-encoded tables, therefore you need to instruct the linker to put certain sections in specific memory locations. -- emboliaschizoide.splinder.com
Reply by ●May 7, 20082008-05-07
thanks for the reply. but I think I have a long way to go. After I included a custom .cmd file, the modified project well compiled. But the functions in IQMath library don't work the same as before. I have tried to include custom .cmd file which has below sentenses. MEMORY { ERAM_01 : o = 0x81000000, l = 0x00100000 } SECTIONS { .data:IQmathTables : > ERAM_01 .text:IQmath : > ERAM_01 } Because I'm modifying one of video example in Evaluation board package which have a cmd file configured MEMORY { ISRAM : origin = 0x0, len = 0x20000 SDRAM : origin = 0x80000000, len = 0x2000000 } so I changed memory configuration in DSP/BIOS GUI config menu, then the cmd file was updated automatically. MEMORY { ISRAM : origin = 0x0, len = 0x20000 SDRAM : origin = 0x80000000, len = 0x1f00000 SDRAM_IQMATH : origin = 0x81f00000, len = 0x0100000 } Then I tried to add new sections in GUI configuration tool. But I was not able to find where I can add SECTIONS, So I just added a new cmd file which has SECTIONS { .data:IQmathTables : > SDRAM_IQMATH .text:IQmath : > SDRAM_IQMATH } This is all I did today. Thanks for any reply you will post. ^^;
Reply by ●May 7, 20082008-05-07
kkadin@gmail.com wrote:> Dear Everybody. > > > > I'm using CCStudio v3.3 with the DM642 EVM and XDS560R debugger. > > I coded my algorithm with ANSI c library, But It didn't give me enough > performance. > > So I have been trying to apply IQMath library and found two odd > situations. > > > > FIRST. > > when I ran the codes below, iq_c was 0.0001xx. > > Wasn't iq_c supposed to be 2 ? > > > > iq_a = _IQ13(1); > > iq_b = _IQ13(2); > > iq_c = _IQ13mpy(iq_a,iq_b); > > > > > > SECOND. > > whenever I called _IQsqrt(), the system was down. > > All calls with individual line below made the system goes down. > > > > #define GLOBAL_Q 13 > > > > q_r = _IQsqrt(100); > > q_r = _IQsqrt(-200000); > > q_r = _IQsqrt(200000); > > _IQsqrt(100); > > _IQsqrt(_IQ(100)); > > > > Thanks.Where did you get the IQmath library, ie what is the lit number? I see one for the 28x and one for the 64x+. The DM642 is a 64x device so I wouldn't expect this to work unless of course you found a version for 64x. Brad
Reply by ●May 8, 20082008-05-08
On 5��7��, ����9��00��, Brad Griffis <bradgrif...@hotmail.com> wrote:> kka...@gmail.com wrote: > > Dear Everybody. > > > I'm using CCStudio v3.3 with the DM642 EVM and XDS560R debugger. > > > I coded my algorithm with ANSI c library, But It didn't give me enough > > performance. > > > So I have been trying to apply IQMath library and found two odd > > situations. > > > FIRST. > > > when I ran the codes below, iq_c was 0.0001xx. > > > Wasn't iq_c supposed to be 2 ? > > > iq_a = _IQ13(1); > > > iq_b = _IQ13(2); > > > iq_c = _IQ13mpy(iq_a,iq_b); > > > SECOND. > > > whenever I called _IQsqrt(), the system was down. > > > All calls with individual line below made the system goes down. > > > #define GLOBAL_Q 13 > > > q_r = _IQsqrt(100); > > > q_r = _IQsqrt(-200000); > > > q_r = _IQsqrt(200000); > > > _IQsqrt(100); > > > _IQsqrt(_IQ(100)); > > > Thanks. > > Where did you get the IQmath library, ie what is the lit number? I see > one for the 28x and one for the 64x+. The DM642 is a 64x device so I > wouldn't expect this to work unless of course you found a version for 64x. > > Brad- ���� �ؽ�Ʈ ����� - > > - ���� �ؽ�Ʈ ���� -I found there are some differnces between c64x and c64x+. Then how could I speed up my algorithm? I'd like to undistort sequence of images that have barrel distortion with enough speed. I think I should use a table which has all calculation results.