This address space is divided into 4KB blocks (defined by the 4 most significant bits) that the address decoder uses to select and therefore ensure only one device is driving the data bus at a time.
There are multiple devices connected to the data bus including ROM, RAM and IO devices. Typical ROM and RAM chips are much bigger than the 4KB block used and therefore multiple blocks will select the same device. The reason for using 4KB blocks is that using a simple line decoder to implement the address decoder requires all memory blocks to be the same size and 4KB is more than sufficient space for mapping the IO devices into memory.
Memory Block | Dec | Hex | Memory Map | A[15-12] | A[11-0] |
0 | 0 | 0 | ROM | 0000 | xxxxxxxxxxxx |
1 | 4096 | 1000 | 0001 | xxxxxxxxxxxx | |
2 | 8192 | 2000 | 0010 | xxxxxxxxxxxx | |
3 | 12288 | 3000 | 0011 | xxxxxxxxxxxx | |
4 | 16384 | 4000 | 0100 | xxxxxxxxxxxx | |
5 | 20480 | 5000 | 0101 | xxxxxxxxxxxx | |
6 | 24576 | 6000 | 0110 | xxxxxxxxxxxx | |
7 | 28672 | 7000 | I/O | 0111 | xxxxxxxxxxxx |
8 | 32768 | 8000 | RAM | 1000 | xxxxxxxxxxxx |
9 | 36864 | 9000 | 1001 | xxxxxxxxxxxx | |
10 | 40960 | A000 | 1010 | xxxxxxxxxxxx | |
11 | 45056 | B000 | 1011 | xxxxxxxxxxxx | |
12 | 49152 | C000 | 1100 | xxxxxxxxxxxx | |
13 | 53248 | D000 | 1101 | xxxxxxxxxxxx | |
14 | 57344 | E000 | 1110 | xxxxxxxxxxxx | |
15 | 61440 | F000 | 1111 | xxxxxxxxxxxx | |
65536 | 10000 |
NB a memory decoder for the above memory map can be implemented using a 4-to-16 line decoder to select devices e.g. 74HC138
More sophisticated memory decoders can be implemented using a memory device whose content maps addresses to devices allowing for much greater granularity.
Even more sophisticated memory mapping techniques include bank swapping in which an external flag can be set to swap devices that are mapped to a specific part of the memory address space. This technique could be implemented in Juno using a bank swapping device that used IO commands to allow the selection between banks.
Much more sophisticated memory management techniques such as segementation, virtual memory and paging have not been considered.
No comments:
Post a Comment