ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Math functions on the TS?

To:
Subject: Re: [ts-7000] Re: Math functions on the TS?
From: Ciaccia <>
Date: Fri, 13 Apr 2007 00:32:37 -0700 (PDT)
Hi all,
It's a while I'm playing with the Maverick crunch
floating-point co-processor, here is what I found out:

1. if you want to use the co-processor, you must
either use a new 2.6 kernel (I use the 2.6.19) and
enable the Crunch in the menuconfig or you must
manually patch the 2.4 (or any other) kernel using the
patches found here:
http://arm.cirrus.com/files/index.php?path=linux%2Fcrunch%2Fcrunch_OS_functions/
(this code is needed in order to preserve the floating
point registers when the scheduler switches context)

* My advice is to use the 2.6 kernel

2. in order to compile maverick C programs, you must
either use a patched 3.4.3 gcc crunch aware
(http://arm.cirrus.com/files/index.php?path=linux%2Fcrunch%2Fcrunch-gcc/)
or use a gcc 4 compiler which natively supports crunch
instructions. Furthermore, you need to patch glibc
(the patch is just a minor thing) and binutils (if you
use 2.15. If I'm not wrong, 2.16 already supports
crunch without patches). 

REMEMBER: when you compile crunch applications, you
must always set the correct CFLAGS (depending on the
gcc version), otherwise the program will not compile
or link.

* I use the cirrus 3.4.3 gcc / 2.3.3 glibc which works
fine for my needs (I think it should/could be possible
to use uclibc, but I have never tried this)

3. when you want to run crunch binaries on the
TS-7400, you must either have a static binary, or
include all the needed libs in the /lib folder. Static
binaries work automatically, shared ones should be
more complex (I have never tried them, I always use
the static version). Remember that the standard shared
objects in the standard distro can not be dynamically
linked to a crunch executable, this because of the
different ABI. I think you could have both libs in
your distro, for standard and for cruch binaries,
depending on your needs.

Finally, I must say that crunch is really-really fast.
Floating-point operations run equally (if not faster)
that integer ones, and you have an advantage against
fixed point path: you don't have to shift/merge the
two 32 bit registers after the operation completion,
which uses lots of clocks...

TS always says they don't support 2.6 kernels because
they are old-school engineers and don't want to change
a working system unless for a real need. I think
crunch is a real need, and this could trigger the
change...

I agree that this would require a new crunch-aware
distro (the standard debian currently used would not
work), but with another distro (for example gentoo
which uses source files instead of binaries)
everything should be easier...

Best regards
Andrea

--- charliem_1216 <> wrote:

> Hi Jon -
> 
> More info about crunch compiling, linking, library
> requirements and
> performance is at:
> http://arm.cirrus.com/files/linux/crunch/
> (Also in a tar archive, same directory).
> 
> Basically you have to statically link any executable
> that uses crunch,
> unless you use EABI.  But EABI is a big step,
> needing a complete new
> (2.6) kernel and runtime environment.  Can be
> daunting if you are not
> familiar with linux development.  See
> http://wiki.debian.org/ArmEabiPort
> for more info about EABI, especially the section on
> floating point.
> 
> More (pre-EABI) FP background info, and why it is so
> slow on ARM w/o
> softfloat, is at:
> http://www.arm.linux.org.uk/mailinglists/faq.php#f3
> 
> I'd be happy to benchmark any of your code for you
> under EABI, if you
> want any comparison data.
> 
> Regards, ......... Charlie
> 
> --- In  "Jonathan"
> <> wrote:
> >
> > 
> > Thanks for the magic compiler flags. Where can I
> learn about the
> > various  ways to enhance floating-point
> performance? I've seen several
> > things mentioned on the group: Maverick, "crunch,"
> EABI. Are there
> > solutions available that don't require too much
> kernel hacking?
> > 
> > Thanks again,
> > 
> > Jon
> >
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU