--- 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/
|