Reply by Grant Edwards June 8, 20042004-06-08
On 2004-06-08, tom <xxx@xx.ve> wrote:

> I am using the gnu gcc compiler for the powerpc405.
You can probably do it in two ways: 1) Use __attribute__((section("secname"))) to place the function in a specific memory section. 2) Use -ffunction-sections to place all functions in their own sections. Then add another output section to your linker file that contains the specified section name "secname" or the function you're worried about ".text.funcname". -- Grant Edwards grante Yow! I want the presidency at so bad I can already taste visi.com the hors d'oeuvres.
Reply by Grant Edwards June 8, 20042004-06-08
On 2004-06-08, Tom <t_t_1232000@yahoo.com> wrote:

> I was wondering if it is possible to put a certain method in > your program in a specific memory?
Probably.
> I have a slow sdram and a fast ddr ram available. I want the > ddr ram to contain a fft method, all other code should be > stored in the sdram... Can this be done with linker scripts ?
It's probably easiest in combination with a Pragma or other compiler directive that places the function in a certain section. -- Grant Edwards grante Yow! I am having a at pleasant time!! visi.com
Reply by tom June 8, 20042004-06-08
"Hans-Bernhard Broeker" <broeker@physik.rwth-aachen.de> wrote in message
news:2ilvvnFo3nvjU1@uni-berlin.de...
> tom <xxx@xx.ve> wrote: > > [...] > > > Did I mention a loader ? > > Well, you originally called it 'locator'... > > > At the moment I am using a xilinx development board with a virtex II pro > > fpga with a powerpc405 on it. I am using the ise and the embedded > > development kit to configure the system. I am not using a OS, just > > developing a simple system with a powerpc, some memory and peripherals.
More
> > info needed ? > > Probably not. > > > > That said: if it can be done at all, then yes, a modification to the > > > linker script would have to be part of the trick. And some pretty > > > nasty pragmas or __attribute__(()) settings, too, to control it. > > > Ok, that's what I want to know... can it be done ? > > Quite probably. If you can control that locator, that is.
I'll check out the linker script manual...again..
> > Others who know that particular platform will be able to help. As > might a look into the manual.
Ok, thanks for your reply. Tom
> > -- > Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) > Even if all the snow were burnt, ashes would remain.
Reply by Hans-Bernhard Broeker June 8, 20042004-06-08
tom <xxx@xx.ve> wrote:

[...]

> Did I mention a loader ?
Well, you originally called it 'locator'...
> At the moment I am using a xilinx development board with a virtex II pro > fpga with a powerpc405 on it. I am using the ise and the embedded > development kit to configure the system. I am not using a OS, just > developing a simple system with a powerpc, some memory and peripherals. More > info needed ?
Probably not.
> > That said: if it can be done at all, then yes, a modification to the > > linker script would have to be part of the trick. And some pretty > > nasty pragmas or __attribute__(()) settings, too, to control it.
> Ok, that's what I want to know... can it be done ?
Quite probably. If you can control that locator, that is. Others who know that particular platform will be able to help. As might a look into the manual. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by tom June 8, 20042004-06-08
"Hans-Bernhard Broeker" <broeker@physik.rwth-aachen.de> wrote in message
news:2ilsdjFocjm3U1@uni-berlin.de...
> tom <xxx@xx.ve> wrote: > > > I am using the gnu gcc compiler for the powerpc405. > > Still nowhere near precise enough. GCC is not the entire toolchain, > nor is 'powerpc405' a self-sufficient moniker of a platform. What > binutils? What OS (if any)? What is that 'loader' you mentioned?
Did I mention a loader ? At the moment I am using a xilinx development board with a virtex II pro fpga with a powerpc405 on it. I am using the ise and the embedded development kit to configure the system. I am not using a OS, just developing a simple system with a powerpc, some memory and peripherals. More info needed ?
> > That said: if it can be done at all, then yes, a modification to the > linker script would have to be part of the trick. And some pretty > nasty pragmas or __attribute__(()) settings, too, to control it.
Ok, that's what I want to know... can it be done ?
> > But, again: you probably are worrying about the wrong end of the > problem. Code memory speed is hardly the bottleneck in any modern > CPU, and quite certainly not for a an application as heavy on data > bandwidth usage and number-crunching as an FFT.
Yes, probably I am but I was just wondering if it was possible..
> > -- > Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) > Even if all the snow were burnt, ashes would remain.
Reply by Hans-Bernhard Broeker June 8, 20042004-06-08
tom <xxx@xx.ve> wrote:

> I am using the gnu gcc compiler for the powerpc405.
Still nowhere near precise enough. GCC is not the entire toolchain, nor is 'powerpc405' a self-sufficient moniker of a platform. What binutils? What OS (if any)? What is that 'loader' you mentioned? That said: if it can be done at all, then yes, a modification to the linker script would have to be part of the trick. And some pretty nasty pragmas or __attribute__(()) settings, too, to control it. But, again: you probably are worrying about the wrong end of the problem. Code memory speed is hardly the bottleneck in any modern CPU, and quite certainly not for a an application as heavy on data bandwidth usage and number-crunching as an FFT. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by tom June 8, 20042004-06-08
"Hans-Bernhard Broeker" <broeker@physik.rwth-aachen.de> wrote in message
news:2ilpjkFn15s5U1@uni-berlin.de...
> Tom <t_t_1232000@yahoo.com> wrote: > > Hi, > > > I was wondering if it is possible to put a certain method in your
program in
> > a specific memory ? > > That depends entirely on the toolchain you're using, and your platform. > Neither of which you remembered telling us what they are. > > > I have a slow sdram and a fast ddr ram available. > > I want the ddr ram to contain a fft method, all other code should be
stored
> > in the sdram... Can this be done with linker scripts ? > > Where you store the "method", i.e. the code, is quite probably > irrelevant, because it'll be negligibly small compared to the amount > of data it's going through. You should worry about where you keep the > *data*. And even that only if they're consistently larger that your > CPU's cache. > > -- > Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) > Even if all the snow were burnt, ashes would remain.
I am using the gnu gcc compiler for the powerpc405. I was wondering if it could be done because the linker takes all the object files as input and produces one big object file with for example a text section which contains your code. The locator takes the text section and places it in the memory section that you defined in your linker script. This means that your code (text section in your relocatable) can only be redirected to one specific memory and that it cannot be distributed to different memories (because it is one section)... Tom
Reply by Hans-Bernhard Broeker June 8, 20042004-06-08
Tom <t_t_1232000@yahoo.com> wrote:
> Hi,
> I was wondering if it is possible to put a certain method in your program in > a specific memory ?
That depends entirely on the toolchain you're using, and your platform. Neither of which you remembered telling us what they are.
> I have a slow sdram and a fast ddr ram available. > I want the ddr ram to contain a fft method, all other code should be stored > in the sdram... Can this be done with linker scripts ?
Where you store the "method", i.e. the code, is quite probably irrelevant, because it'll be negligibly small compared to the amount of data it's going through. You should worry about where you keep the *data*. And even that only if they're consistently larger that your CPU's cache. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by Tom June 8, 20042004-06-08
Hi,

I was wondering if it is possible to put a certain method in your program in
a specific memory ?

For example,

I have a slow sdram and a fast ddr ram available.
I want the ddr ram to contain a fft method, all other code should be stored
in the sdram... Can this be done with linker scripts ?


Thanks,

Tom