ts-7000
[Top] [All Lists]

Re: [ts-7000] transferring floating point data from PC to TS7300

To:
Subject: Re: [ts-7000] transferring floating point data from PC to TS7300
From: Jim Jackson <>
Date: Sat, 17 Feb 2007 21:39:41 +0000 (GMT)


On Sat, 17 Feb 2007, Oguz Dilmac wrote:

> Hi all,
>
> I'm trying to pass some data from my pc to ts7300 via Ethernet.
> It seems floating point formats of EP9302 and PC are different from
> each other.
>
> In my program, I have a struct with both floating point and integer
> variables. I simply send this data to ethernet from PC. On the arm
> side, a user program gets the data from socket and put it to a FIFO to
> pass to a kernel module. Then I print them with rt_printk.
>
> When I dmesg, Integer parts are OK. But float parts are garbage.
>
> I also tried to define three float variables in the module. Add them
> to each other and print their values. They are OK too. No problem so
> far with FPU or GCC or rt_printk.
>
> How can I convert from PC float format to ARM float format?
> (A link which describes these formats also would be great :) )
>
> Or am I missing some obvious point?

Yes.

Have you tried googleing for "floating point format"? There is loads of
stuff on the web on this.

Besides different formats, there is the problem of "endian-ness".
This could bite you even if you were transfering "integers" as well.

You either have to specifically code for a known format transfered
between machines - done using a byte structure that both ends convert
to/from, or use well known solutions for this problem - check out RPC and
XDR (again google will give you loads of refs).



 
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