问题
I have been watching a lecture at the following URL explaining MIPS ISA.
http://www.youtube.com/watch?v=DVFwXvxyC38&list=PLD8AF625E53B0691F&index=4
According to my understanding so far:
for MIPs 32-bit, the main memory has a 32-bit address input bus, each slot in memory holds 8-bit, so each address can refer to 8-bits of memory (which is why its byte addressable); since register size is 32-bit, "words" in main memory start at every 4th byte (so that each word is 4 consecutive slots in memory - 4 * 8 = 32).
But, the instructor in the lecture said (at time 3:40) that "Byte addressable means that for MIPS, each word size is four bytes"; shouldn't he say byte-addressable means each address can refer to 1 byte ?
Can someone please verify this ?
Thanks.
回答1:
Yes that's Absolutely right. Byte addressable is byte by byte (where 1 byte is 8 bits).
Every word is 4 bytes wide, so the address difference between two adjacent words is 4
. You can use lbu
with any of the 4 addresses that are part of a word.
On a word-addressable machine (unlike MIPS, like some modern DSPs), adjacent words have adjacent addresses and there's no way to address the individual bytes within a word.
回答2:
He meant that mips is word-addressable so 4 bytes equal one Address so the next address is 4 bytes after (4 bytes = 1 word) and one byte equals 8 bits.
来源:https://stackoverflow.com/questions/18433027/mips-being-byte-addressable