Hardware Reference
In-Depth Information
Microprocessor
Memory system
Address
RD
OE
WR
WE
Data
Figure 1.2 Block diagram of a simplified memory system
called a nibble . A 16-bit quantity is called a word . To simplify the quantification of memory,
the units kilobyte (kB), megabyte (MB), and gigabyte (GB) are often used. The value of k is given
by the following formula:
k 5 2 10 5 1024
M is given by the following formula:
M 5 k 2 5 2 20 5 1024 3 1024 5 1,048,576
G is given by the following formula:
G 5 k 3 5 2 30 5 1024 3 1024 3 1024 5 1,073,741,824
In this topic, we will use the notation [addr] and [reg] to refer to the contents of a memory
location at addr and the contents of register reg , respectively. We will use the notation m[addr] to
refer to the memory location at addr . For example,
[$40]
refers to the contents of the memory location at $40 and [A] refers to the contents of accumula-
tor A. The notation m [$40] â [A] refers to saving the contents of accumulator A in the memory
location at $40. Registers are referred to by their names whereas memory locations are referred
to by their addresses.
The memory chip or memory system can only be accessed (read or written) one location at
a time. This is enforced by implementing a decoder on the memory chip to select one and only
one location to be accessed. There are two types of memory accesses: read and write .
1.5.1 Read Operation
Whenever the processor wants to read a memory, it sends out the address of the location
it intends to read. Since the memory access can be a read or a write, the processor needs to use
a control signal to inform the memory of the type of access. In Figure 1.2, the RD signal from
the processor indicates a read access whereas the WR signal indicates a write operation. The
memory chip also has control signals to control the read or write operation. The OE signal in
Figure 1.2 means output enable and is connected to the RD signal from the processor whereas
the WE signal means write enable and is connected to the WR signal from the processor. For
digital systems, there are three logic states for each signal: high, low, and high impedance
(no current flows). When the OE input to the memory chip is low, the data pins are in a high-
impedance state.
The processor uses a set of signals, referred to as address signals, to specify a memory loca-
tion to access. The number of address signals needed for selecting a memory location is log 2 m ,
 
 
Search WWH ::




Custom Search