Does writing to part of a write register work sanely?

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Does writing to part of a write register work sanely?

Postby alexrp » Sat Dec 28, 2013 4:20 pm

E.g. if I write to only the upper part of FSTATUS via memory, will this do the sane thing (write to the upper part of STATUS)? Is this the case for all registers that work like this, such as ILATCL, ILATST, etc?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Does writing to part of a write register work sanely?

Postby aolofsson » Thu Jan 02, 2014 3:30 am

All memory mapped registers are 32 bit registers. Trying to do byte/short writes to these memory locations is not supported so there is no way to write to part of a register.
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Does writing to part of a write register work sanely?

Postby alexrp » Thu Jan 02, 2014 3:32 am

Glad to hear that! This simplifies things a lot for me.

Presumably, attempting to do byte/half/double-sized loads and stores from/to these addresses is just undefined behavior?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Does writing to part of a write register work sanely?

Postby aolofsson » Thu Jan 02, 2014 3:39 am

Correct.
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Does writing to part of a write register work sanely?

Postby ysapir » Thu Jan 02, 2014 10:38 pm

Writing/reading to/from MMRs should only be done using MOVTS/MOVFS instructions. These are 32-bit accesses by definition.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 121 guests