MIPS可字节寻址 [英] MIPS being byte addressable

查看:196
本文介绍了MIPS可字节寻址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在下面的URL上观看有关MIPS ISA的演讲.

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:

对于32位的MIP,主存储器具有32位的地址输入总线,存储器中的每个插槽都具有8位,因此每个地址都可以引用8位的存储器(这就是其字节可寻址的原因);由于寄存器大小为32位,因此主存储器中的字"从第4个字节开始(因此每个字是存储器中的4个连续插槽-4 * 8 = 32).

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).

但是,讲课的讲师(在时间3:40)说:字节可寻址意味着对于MIPS,每个字长为四个字节";他不应该说字节可寻址意味着每个地址都可以引用1个字节吗?

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 ?

有人可以验证吗?

谢谢.

推荐答案

是的,完全正确.可寻址的字节是一个字节一个字节(其中1个字节是8位).

Yes that's Absolutely right. Byte addressable is byte by byte (where 1 byte is 8 bits).

每个字都为4个字节宽,因此两个相邻字之间的地址差为4.您可以将lbu与一个单词的4个地址中的任何一个一起使用.

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.

在可字寻址的机器上(与MIPS不同,在某些现代DSP中不同),相邻的字具有相邻的地址,并且无法对字中的各个字节进行寻址.

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.

这篇关于MIPS可字节寻址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆