Title: ECE 353 Introduction to Microprocessor Systems
1ECE 353Introduction to Microprocessor Systems
Discussion 7
2Topics
- Address decoding and memory maps
- QA
3Memory Map vs. Decoding Problem 1
Suppose a microprocessor system has a device that
appears in the memory space as shown in the
memory map. (Any other devices are omitted for
clarity.) 1. How wide is the processors
address bus? 2. What size is the device,
assuming it is exhaustively decoded? 3. Design
a decoder to generate the chip select for this
device. 4. If the device is actually a 16KB
device, how many address lines are not used in
the decoder?
4Answer
- 1.) From the address at the top of memory, we see
that it has 24 ones, so the address bus is 24
bits wide.
5Answer
- 2.) From the start address and end address, get
the device size - 0x3FFFF
- 1
- 0x40000
- -0x20000
- 0x20000
- 0x20000 217 27 K 128 Kbytes
Address size
6Answer
- 3.) To decode, build address bitmap
- Start 000000100000000000000000
- End 000000111111111111111111
- Decoder should use bits A2317, with the
decoded signal active whenever A23A17 are in the
following logic states - 0000001
7Answer
4.) If the device is actually a 16 KB device, how
many address lines are not used in the decoder
(i.e., how many are not connected to the memory
device or the decode logic) 16 Kbyte 16210
214 bytes The memory requires 14 address lines
If the decoder uses 7 address lines, the device
uses 14 address lines and the address bus has 24
lines, then 3 lines are not used.
Address size
8Memory Map vs. Decoding Problem 2
- Assume a 28-bit address bus. Given the decoder
circuit and memory device as shown below, draw
how it would appear in the memory map. (Assume
it is the only device in the memory map.)
9Answer
- Since the device uses 21 address lines, its size
is 221 2220 2M 2 Mbytes - From simple inspection of the AND gate used for
decoding, /CS will be low when A27A22 are 010101 - The addresses that fulfill this requirement are
- Start 0101010000000000000000000000 0x5400000
- End 0101011111111111111111111111 0x57FFFFF
- Consider that the bit A21 is not being used.
Therefore, the memory will be mirrored 21 2
times. Also, because the unused bits are between
the ones used by the encoder and the memory, the
images will be contiguous.
Address size
10Answer
- We will have to calculate the starting and ending
address for each memory mirror location in order
to display them in the memory map. - From start location and size, we calculate the
end location (221 20000h)
11Answer
- We draw each mirror of the memory device in the
memory map - Remember there are no other devices shown in the
memory map!
12Questions?
13Address bits to Size
8-bit 256 10-bit 1K 12-bit 4K 16-bit
64K 20-bit 1M 24-bit 16M 28-bit 256M 32-bit
4G