|
Prev: A question about using DAT_copy() transfer data between SDRAM and SRAM(L2)
Next: Re-engineering Matlab
From: kkadin on 6 May 2008 02:33 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.
From: kkadin on 7 May 2008 05:45 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. ^^;
From: Brad Griffis on 7 May 2008 08:00
kkadin(a)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 |