Floating Point With Xilinx EDK (PPC)?

D

Dave

Guest
I'm having trouble using floats with the PPC compiler. Any inclusion
of floats produces a pretty indecipherable (to me) linker error. I
tried -lm but that doesn't help. Any ideas? Thanks.

-Dave
 
apple2ebeige@yahoo.com (Dave) wrote in message news:<d4aa8e8a.0405091311.76c6a81c@posting.google.com>...
I'm having trouble using floats with the PPC compiler. Any inclusion
of floats produces a pretty indecipherable (to me) linker error. I
tried -lm but that doesn't help. Any ideas? Thanks.

-Dave
Posting the error message might help..

Cheers,
JonB
 
jon@beniston.com (Jon Beniston) wrote in message news:<e87b9ce8.0405100033.5813aa55@posting.google.com>...
apple2ebeige@yahoo.com (Dave) wrote in message news:<d4aa8e8a.0405091311.76c6a81c@posting.google.com>...
I'm having trouble using floats with the PPC compiler. Any inclusion
of floats produces a pretty indecipherable (to me) linker error. I
tried -lm but that doesn't help. Any ideas? Thanks.

-Dave

Posting the error message might help..

Cheers,
JonB
Jon-

So many messages spew out of the build process it's hard to tell what
might be relevant. Below is the tail end. Also, the project is the
Memec/Insight ultracontroller "Time of Day" design, which I believe
derives from a Xilinx example. Thanks.

.comment 0x00000104 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(exit.o)
.comment 0x00000138 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(impure.o)
.comment 0x0000016c 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(strcpy.o)
.comment 0x000001a0 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(strlen.o)
.comment 0x000001d4 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/libgcc.a(dp-bit.o)
.comment 0x00000208 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/libgcc.a(fp-bit.o)
.comment 0x0000023c 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/libgcc.a(_lshrdi3.o)
collect2: ld returned 1 exit status
make: *** [ppc405_1/code/executable.elf] Error 1
Done.
 
Hi Dave:

Have you tried using the -lc -lm -lc instead of -lm ? If this does not
fix your problem, could you send the entire error log instead of just a
snippet.

Thanks
Sid

Dave wrote:
jon@beniston.com (Jon Beniston) wrote in message news:<e87b9ce8.0405100033.5813aa55@posting.google.com>...

apple2ebeige@yahoo.com (Dave) wrote in message news:<d4aa8e8a.0405091311.76c6a81c@posting.google.com>...

I'm having trouble using floats with the PPC compiler. Any inclusion
of floats produces a pretty indecipherable (to me) linker error. I
tried -lm but that doesn't help. Any ideas? Thanks.

-Dave

Posting the error message might help..

Cheers,
JonB


Jon-

So many messages spew out of the build process it's hard to tell what
might be relevant. Below is the tail end. Also, the project is the
Memec/Insight ultracontroller "Time of Day" design, which I believe
derives from a Xilinx example. Thanks.

.comment 0x00000104 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(exit.o)
.comment 0x00000138 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(impure.o)
.comment 0x0000016c 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(strcpy.o)
.comment 0x000001a0 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/../../../../powerpc-eabi/lib/libc.a(strlen.o)
.comment 0x000001d4 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/libgcc.a(dp-bit.o)
.comment 0x00000208 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/libgcc.a(fp-bit.o)
.comment 0x0000023c 0x34
/xygdrive/c/EDK/gnu/powerpc-eabi/nt/bin/../lib/gcc-lib/powerpc-eabi/2.95.3-4/libgcc.a(_lshrdi3.o)
collect2: ld returned 1 exit status
make: *** [ppc405_1/code/executable.elf] Error 1
Done.
 
Siddharth Rele <siddharth.rele@xilinx.com> wrote in message news:<40A01D4E.3040203@xilinx.com>...
Hi Dave:

Have you tried using the -lc -lm -lc instead of -lm ? If this does not
fix your problem, could you send the entire error log instead of just a
snippet.
Usually the first error is of most interest.

Cheers,
JonB
 
jon@beniston.com (Jon Beniston) wrote in message news:<e87b9ce8.0405110618.2b68ef83@posting.google.com>...
Siddharth Rele <siddharth.rele@xilinx.com> wrote in message news:<40A01D4E.3040203@xilinx.com>...
Hi Dave:

Have you tried using the -lc -lm -lc instead of -lm ? If this does not
fix your problem, could you send the entire error log instead of just a
snippet.


Usually the first error is of most interest.

Cheers,
JonB
That's the only error or warning message. However, scrutinizing the
build output I think what's happening is adding a float operation
(just f = 1.0/f) pulls in all sorts of libs and is overflowing the
available instruction space, which is set to 2048 (bytes? words?).

Thanks to all who tried to help.

-Dave
 
Dave wrote:

That's the only error or warning message. However, scrutinizing the
build output I think what's happening is adding a float operation
(just f = 1.0/f) pulls in all sorts of libs and is overflowing the
available instruction space, which is set to 2048 (bytes? words?).
Then just make it bigger. :) You probably have some sort of
BRAM-controller in your design... attached to the PLB, OPB, or
OCM-controller. Usually the smallest size available is 8kB, which is too
little in most cases, especially when you need a bunch of extra libs.

To get more instruction-side memory, all you have to to is change the
address range of the BRAM-controller, EDK takes care of the rest. The
size has to be a power of 2 though (8kb, 16kb, 32kb, 64kb...), and you
have to make sure you don't use more BRAMs than you have available in
your FPGA.. For example, in an xc2vp7 there are 44 BRAMs of 2kb each, so
the biggest memory size for your PPC is 64kb.

For example: a base address of 0xFFFF0000 and a high address of
0xFFFFFFFF for your BRAM-controller wuld give you 64kb of memory for
your program.

Note that 0xFFFFFFFC must always be included in the address space, since
that is the address the PPC starts program execution from.

cu,
Sean
 
Sean Durkin <smd@despammed.com> wrote in message news:<2geoclF1v5s3U1@uni-berlin.de>...
....
Then just make it bigger. :) You probably have some sort of
BRAM-controller in your design... attached to the PLB, OPB, or
OCM-controller. Usually the smallest size available is 8kB, which is too
little in most cases, especially when you need a bunch of extra libs.

To get more instruction-side memory, all you have to to is change the
address range of the BRAM-controller, EDK takes care of the rest. The
size has to be a power of 2 though (8kb, 16kb, 32kb, 64kb...), and you
have to make sure you don't use more BRAMs than you have available in
your FPGA.. For example, in an xc2vp7 there are 44 BRAMs of 2kb each, so
the biggest memory size for your PPC is 64kb.

For example: a base address of 0xFFFF0000 and a high address of
0xFFFFFFFF for your BRAM-controller wuld give you 64kb of memory for
your program.

Note that 0xFFFFFFFC must always be included in the address space, since
that is the address the PPC starts program execution from.

cu,
Sean
Thanks, Sean. But, the base address and length seem to be specified
multiple places. The base address shows up once in the linker script
and the length shows up twice (!) in the linker script. Also, the
base is in the .pbd file as well. Is there one centralized place to
set these parameters?
 
Dave wrote:

Thanks, Sean. But, the base address and length seem to be specified
multiple places. The base address shows up once in the linker script
and the length shows up twice (!) in the linker script. Also, the
base is in the .pbd file as well. Is there one centralized place to
set these parameters?
I don't think so. EDK, at least in version 3.2, does not handle linker
scripts at all. That is, you can specify one, but changes you make to
the design will not be ported to the linker script. So the linker script
you'd have to change yourself.

The information in the .pbd is mostly irrelevant, since that is
regenerated every time you reopen the project. Important is what's in
the .MHS-file, that's the basis for generating the .pbd.

So, you'd have to change the MHS and the linker script, I guess.

cu,
Sean
 

Welcome to EDABoard.com

Sponsor

Back
Top