



behavior when half-word/full-word access the same address?
by nick02 on Feb 14, 2015 |
nick02
Posts: 9 Joined: Oct 21, 2014 Last seen: Dec 22, 2016 |
||
Hi all,
When half-word write to an address and then full-word read back the same address, the data captured by OpenRISC is not correct. e.g half-word write, addr : 0x22c00, data : 0x0004, the behavior on bus : sel_o = 0xc, data_o = 0x00040004 so the data stored would be ox"0004"_xxxx When full-word read addr : 0x22c00, the returned data is 0x0004_xxxx, then the behavior of OpenRISC wouldn't be as expected. Any ideas about this condition? Best Regards. Nick Yan |
RE: behavior when half-word/full-word access the same address?
by olof on Feb 15, 2015 |
olof
Posts: 218 Joined: Feb 10, 2010 Last seen: Dec 17, 2018 |
||
Hi Nick,
There is nothing wrong here As you have noted, you do a half word write and the sel mask is set to 0xc (1100 in binary), which means that you will only touch the top 16 bits in the word. When you read back the word, nothing has ever been written to the bottom 16 bits which is why you get xxxx back for these bits. Hope this helps, Olof |



