Hi all. I need to place a large buffer in external RAM, let's say: int buffer[40000]; I declare it this way and it perfectly fits in memory. But when I want to make a reference to any element of this array above 32767th, for example: buffer[32768] = 0, the linker states an error: "Symbol Fbuffer referenced ... is to far away for a R_56800_WORD relocation ..." I use CodeWarrior 5.0.4 & DSP56F805 with 64k external RAM. Does anybody know how to avoid this error? Thank you. |
|
large buffer
Hello, I only know about the 563xx series, but with those parts you can't access a modular buffer larger than 32768 because of the restricted range of the pointer register (rn) and/or the modulus (m) register. It makes things awkward for those of us who want a large buffer. Chris Moore On Mon, 26 Jul 2004 11:45:16 -0000, Andrey Gusev wrote: Hi all. I need to place a large buffer in external RAM, let's say: int buffer[40000]; I declare it this way and it perfectly fits in memory. But when I want to make a reference to any element of this array above 32767th, for example: buffer[32768] = 0, the linker states an error: "Symbol Fbuffer referenced ... is to far away for a R_56800_WORD relocation ..." I use CodeWarrior 5.0.4 & DSP56F805 with 64k external RAM. Does anybody know how to avoid this error? Thank you. ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/PNArlB/TM --------------------------------~- > _____________________________________ 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: To Post: To Leave: Archives: http://www.yahoogroups.com/group/motoroladsp More Groups: http://www.dsprelated.com/groups.php3 Yahoo! Groups Links ----------------------------------- Seven Woods Audio, Inc. Christopher Moore Concepts, Products, Circuits for Audio Analog/Digital http://www.SevenWoodsAudio.com |
This doesn't make much sense. The 563xx is a 24 bit processor, so
a long instruction should support up to 2^23 offsets to a pointer register.
I suspect that it is some kind of compiler related limitation, likely
since the tools were likely ported from a 16 bit processor.
Howard
|
|
Moin, Ebersman, Howard wrote: > This doesn't make much sense. The 563xx is a 24 bit processor, so a long > instruction should support up to 2^23 offsets to a pointer register. The 56000 familiy had only 16 bit addresses, and I think they kept the modulo addressing this way for code compatibility, perhaps it was pure lazyness. Surely quite annoying nowadays. > I suspect that it is some kind of compiler related limitation, likely > since the tools were likely ported from a 16 bit processor. I think it has been the other way, the 16-bit DSP are a descendant of the 24-bit ones. Stefan |
I have tried this with the latest CW and received the same error. This looks like CW bug. You should file a bug report with Metrowerks: www.metrowerks.com/support
Leonard
-----Original Message-----
Hi all. I need to place a large buffer in external RAM, let's say: int buffer[40000]; I declare it this way and it perfectly fits in memory. But when I want to make a reference to any element of this array above 32767th, for example: buffer[32768] = 0, the linker states an error: "Symbol Fbuffer referenced ... is to far away for a R_56800_WORD relocation ..." I use CodeWarrior 5.0.4 & DSP56F805 with 64k external RAM. Does anybody know how to avoid this error? Thank you.
------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/PNArlB/TM --------------------------------~->
_____________________________________ 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: m...@yahoogroups.com
To Post: m...@yahoogroups.com
To Leave: m...@yahoogroups.com
Archives: http://www.yahoogroups.com/group/motoroladsp
More Groups: http://www.dsprelated.com/groups.php3
Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/motoroladsp/
<*> To unsubscribe from this group, send an email to: m...@yahoogroups.com
<*>
|
>From the Motorola DSP56300 Family Manual, pages 4-12 to 4-13: "4.5.3 Modulo Modifier (Mn = Modulus-1) Address modification is performed using modulo M, where M ranges from 2 to 32,768. 4.5.4 Multiple Wrap-Around Modulo Modifier "....The address modification is performed using modulo M, where M is a power of 2 in the range from 2^1 to 2^14." Maybe there are other addressing modes that will work with a larger buffer, but I don't think the classic modular buffer larger than 32768 can be implemented with the AGU facilities. If there is a way, I'd like to know. I do notice that there is a Linear Modifier address mode (section 4.5.1) that seems to work modulo 16,777,216, but I haven't tried it. Chris Moore On Mon, 26 Jul 2004 11:46:51 -0400, Ebersman, Howard wrote: This doesn't make much sense. The 563xx is a 24 bit processor, so a long instruction should support up to 2^23 offsets to a pointer register. I suspect that it is some kind of compiler related limitation, likely since the tools were likely ported from a 16 bit processor. Howard -----Original Message----- From: Christopher Moore [mailto:] Sent: Monday, July 26, 2004 11:26 AM To: ; Subject: Re: [motoroladsp] large buffer Hello, I only know about the 563xx series, but with those parts you can't access a modular buffer larger than 32768 because of the restricted range of the pointer register (rn) and/or the modulus (m) register. It makes things awkward for those of us who want a large buffer. Chris Moore On Mon, 26 Jul 2004 11:45:16 -0000, Andrey Gusev wrote: Hi all. I need to place a large buffer in external RAM, let's say: int buffer[40000]; I declare it this way and it perfectly fits in memory. But when I want to make a reference to any element of this array above 32767th, for example: buffer[32768] = 0, the linker states an error: "Symbol Fbuffer referenced ... is to far away for a R_56800_WORD relocation ..." I use CodeWarrior 5.0.4 & DSP56F805 with 64k external RAM. Does anybody know how to avoid this error? Thank you. ------------------------ Yahoo! Groups Links To ---------------------------------- - Seven Woods Audio, Inc. Christopher Moore Concepts, Products, Circuits for Audio Analog/Digital http://www.SevenWoodsAudio.com |
You do not need a modulo buffer to handle an array in "C". You can
just use a long displacement or a 24 bit linear modifier. See sections 4.4.3 and 4.5.1. Obviously, you can also do direct math instead of using the address pointers and offsets. Howard -----Original Message----- From: Christopher Moore [mailto:] Sent: Monday, July 26, 2004 2:09 PM To: ; ; Subject: RE: [motoroladsp] large buffer >From the Motorola DSP56300 Family Manual, pages 4-12 to 4-13: "4.5.3 Modulo Modifier (Mn = Modulus-1) Address modification is performed using modulo M, where M ranges from 2 to 32,768. 4.5.4 Multiple Wrap-Around Modulo Modifier "....The address modification is performed using modulo M, where M is a power of 2 in the range from 2^1 to 2^14." Maybe there are other addressing modes that will work with a larger buffer, but I don't think the classic modular buffer larger than 32768 can be implemented with the AGU facilities. If there is a way, I'd like to know. I do notice that there is a Linear Modifier address mode (section 4.5.1) that seems to work modulo 16,777,216, but I haven't tried it. Chris Moore On Mon, 26 Jul 2004 11:46:51 -0400, Ebersman, Howard wrote: This doesn't make much sense. The 563xx is a 24 bit processor, so a long instruction should support up to 2^23 offsets to a pointer register. I suspect that it is some kind of compiler related limitation, likely since the tools were likely ported from a 16 bit processor. Howard -----Original Message----- From: Christopher Moore [mailto:] Sent: Monday, July 26, 2004 11:26 AM To: ; Subject: Re: [motoroladsp] large buffer Hello, I only know about the 563xx series, but with those parts you can't access a modular buffer larger than 32768 because of the restricted range of the pointer register (rn) and/or the modulus (m) register. It makes things awkward for those of us who want a large buffer. Chris Moore On Mon, 26 Jul 2004 11:45:16 -0000, Andrey Gusev wrote: Hi all. I need to place a large buffer in external RAM, let's say: int buffer[40000]; I declare it this way and it perfectly fits in memory. But when I want to make a reference to any element of this array above 32767th, for example: buffer[32768] = 0, the linker states an error: "Symbol Fbuffer referenced ... is to far away for a R_56800_WORD relocation ..." I use CodeWarrior 5.0.4 & DSP56F805 with 64k external RAM. Does anybody know how to avoid this error? Thank you. ------------------------ Yahoo! Groups Links To ---------------------------------- - Seven Woods Audio, Inc. Christopher Moore Concepts, Products, Circuits for Audio Analog/Digital http://www.SevenWoodsAudio.com |