ts-7000
[Top] [All Lists]

[ts-7000] Re: pointer weirdness

To:
Subject: [ts-7000] Re: pointer weirdness
From: "Yan Seiner" <>
Date: Wed, 12 Sep 2007 23:24:12 -0000
--- In  Oliver Martin <> wrote:
>
> David Hawkins schrieb:
> > Hi Yan,
> > 
> >> The one thing that puzzles me is that 32-bit access
> >> on a 16-bit boundary works fine....  I guess I
> >> don't understand the ARM hardware as well as I should.
> > 
> > I think the results of this type of access is
> > device specific, eg. some ARM registers say that
> > only 32-bit access is allowed. I think in general
> > though if you do an unaligned address read, it'll
> > return the right value, even if the hardware hides
> > the fact that it actually had to perform two reads
> > to get the data for you.
> > 
> Unaligned 32-bit reads are rotated right by the number of bytes they are
> unaligned, so if they seem to work, it must be gcc doing some trickery
> (though I can only imagine this if the address is known at compile
> time). The hardware definitely doesn't do any magic for you.
> For unaligend 32-bit stores, the address is truncated by masking the two
> least significant bits away.
>

What I'm seeing is that 32 bit reads work if they're aligned on 16-bit
boundaries, 8 bit reads work if they're on 16-bit boundaries, and 16
reads don't work regardless of boundaries....  (Yes, it makes no sense
to me either.  I'm not discounting the possibility that I am doing
something unbelievably stupid.)

Writes have a bad habit of hard-locking the board; I haven't figured
out the pattern there, since it takes so bloody long to powercycle the
board.

I am trying to read/write registers in the FPGA.

I am going to run a diff between my old version which used unsigned
ints and try to figure out what is going on....

--Yan



 
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