FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2004, 11:11 PM
Dave
Guest
 
Posts: n/a
Default Floating Point With Xilinx EDK (PPC)?

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
Reply With Quote
  #2 (permalink)  
Old 05-10-2004, 10:33 AM
Jon Beniston
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

[email protected] (Dave) wrote in message news:<d4aa8e8a.0405091311.[email protected] 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
Reply With Quote
  #3 (permalink)  
Old 05-10-2004, 07:38 PM
Dave
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

[email protected] (Jon Beniston) wrote in message news:<[email protected] com>...
> [email protected] (Dave) wrote in message news:<[email protected] 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.
Reply With Quote
  #4 (permalink)  
Old 05-11-2004, 02:24 AM
Siddharth Rele
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

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:
> [email protected] (Jon Beniston) wrote in message news:<[email protected] com>...
>
>>[email protected] (Dave) wrote in message news:<[email protected] 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.


Reply With Quote
  #5 (permalink)  
Old 05-11-2004, 04:18 PM
Jon Beniston
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

Siddharth Rele <[email protected]> wrote in message news:<[email protected]>...
> 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
Reply With Quote
  #6 (permalink)  
Old 05-12-2004, 04:43 AM
Dave
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

[email protected] (Jon Beniston) wrote in message news:<[email protected] com>...
> Siddharth Rele <[email protected]> wrote in message news:<[email protected]>...
> > 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
Reply With Quote
  #7 (permalink)  
Old 05-12-2004, 03:50 PM
Sean Durkin
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

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
Reply With Quote
  #8 (permalink)  
Old 05-13-2004, 02:46 AM
Dave
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

Sean Durkin <[email protected]> wrote in message news:<[email protected]>...
....
> 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?
Reply With Quote
  #9 (permalink)  
Old 05-13-2004, 04:19 PM
Sean Durkin
Guest
 
Posts: n/a
Default Re: Floating Point With Xilinx EDK (PPC)?

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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating Point in Verilog Marek Verilog 0 04-15-2004 12:51 AM
V2Pro floating point Bruce Warkentin FPGA 1 01-07-2004 11:30 AM
Floating Point support Ed J FPGA 5 11-14-2003 11:18 PM


All times are GMT +1. The time now is 02:30 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved