开发者

address space and byte adressability

A microprocessor is byte addressable with 24bit address bus and 16bit data bus and one word contains two bytes. I was asked a question regarding attaching peripherals, adding memory, and address space and there's a few general concepts I don't see why they work.

Why is i开发者_C百科t that to calculate the address space you use the address bus not the data bus? Is the address space a function of the address bus or does it have to do with the microprocessor? How is it relevant that one word contains two bytes?


Why is it that to calculate the address space you use the address bus not the data bus?

Because it's the address bits that go out to the memory subsystem to tell them which memory location you want to read or write. The data bits just carry the data being read or written.

Is the address space a function of the address bus or does it have to do with the microprocessor?

Yes, the address space is a function of the address bus though there are tricks you can use to expand how much memory you can use.

An example of that is bank switching which gives you more accessible memory but no more address space (multiple blocks of memory co-exist at the same address, one at a time).

Another example is shown below where you can effectively double the usable memory, provided you're willing to only read and write words.

How is it relevant that one word contains two bytes?

The data bus size generally dictates the size of a memory cell. Larger memory cells can mean you can have more memory available to you but not more memory cells.

With your example, assuming you can only access words, you could get 16 megawords which is 32 megabytes.

This depends, of course, on how the memory is put together. It may be that you are able to access memory on individual byte boundaries (e.g., bytes 0/1 or 1/2 or 2/3) rather than just word boundaries, which would mean you don't actually get that full 32MB but only 16MB plus maybe one extra byte when you read the word at address FFFFFF).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜