Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Chapter 3

Computer Architecture

MICROPROCESSOR
MEMORY ORGANIZATION

Dr. Sahar Ismail

Outline

3.1 Introduction

3.2 Main memory

1
3.1 Introduction

 A memory unit is an integral part of any microcomputer, and

its primary purpose is to hold instructions and data.

 Memory system can be divided into three groups:

1. Microprocessor memory

2. Primary or main memory

3. Secondary memory

3.1 Introduction

 Microprocessor memory is a set of microprocessor


registers, used to hold temporary results

 Main memory is the storage area in which all programs are


executed, include ROM & RAM

 Secondary memory devices such as hard disks, also called


virtual memory.

 The microcomputer cannot execute programs stored in the


secondary memory directly, so to execute these programs
the microcomputer must transfer them to its main memory
by a program called the operating system.

3
3.1 Introduction

Microprocessor main memory Secondary memory


memory

The fastest The slower The slowest

The smallest The Larger The largest

3.2 Main memory

 8-bit microprocessors:

The memory is divided into a number of 8-bit units called

memory words. An 8-bit unit of data is termed a byte.

Therefore, for an 8-bit microprocessor, memory word and

memory byte mean the same thing.

5
3.2 Main memory

 16-bit microprocessors:

 The memory is divided into a word contains 2 bytes (16 bits).


A memory word is identified in the memory by an address.

 For example, the Pentium microprocessor uses 32-bit


addresses for accessing memory words.

 This provides a maximum of 232 = 4,294,964,296 = 4 GB of


memory addresses, ranging from 00000000,, to FFFFFFFF,,
in hexadecimal.

3.2 Main memory

 Intel Pentium microprocessors (1MB):


 The memory is divided into segments
 Segment = 216 =64KB= addressed by16bits

High bits for


address

LOW bit for


segment number

7
3.2 Main memory

No. of segments:
 Segment = 216

 1 MB memory  220 / 216 = 220-16 = 24


 For example, the computer uses 24 address pins to address
224 = 16 MB of memory directly with addresses from
000000,, to FFFFFF,,.

No. of segment =size of memory / size of one segment(216)

3.2 Main memory

 An important characteristic of a memory is whether it is


volatile or nonvolatile.

 The contents of a volatile memory are lost if the power is


turned off. RAM is a volatile memory.

 On the other hand, a nonvolatile memory retains its contents


after power is switched off. ROM is a typical example of
nonvolatile memory.

9
3.2.1 Read-only Memory

 ROMs can only be read, is a nonvolatile memory.

 CMOS technology is used to fabricate it

 ROMs are divided to:

– Mask ROM

– Erasable PROM(EPROM)

– EAROM (electrically alterable ROM) [also called


EEPROM or E2PROM (electrically erasable PROM)]

10

3.2.1 Read-only Memory

11
3.2.1 Read-only Memory

 Mask ROMs are programmed by a masking operation


performed on a chip during the manufacturing process. The
contents of mask ROMs are permanent and cannot be
changed by the user.

 EPROMs can be programmed, and their contents can also


be altered by using special equipment, called an EPROM
programmer.

 When designing a microcomputer for a particular application,


permanent programs are stored in ROMs.

12

3.2.1 Read-only Memory

 EPROMs can be reprogrammed and erased.

 The chip must be removed from the microcomputer system

for programming.

 This memory is erased by exposing the chip to ultraviolet

light

 Typical erase time vary between 10 and 20 min.

13
3.2.1 Read-only Memory
 EAROMs can be programmed without removing the memory from the

ROM’s sockets.

 These memories are also called read-mostly memories (RMMs), because

they have much slower write times than read times. Therefore, these

memories are usually suited for operations when mostly reading rather

that writing will be performed.

 Another type of memory, called Flash memory(nonvolatile), is designed

using a combination of EPROM and E2PROM technologies.

 Flash memory can be reprogrammed electrically while embedded on the

board. An example of flash memory is used in cellular phones and digital

cameras.
14

3.2.2 Random-Access Memory

 There are two types of RAM:


 static RAM (SRAM)
 dynamic RAM (DRAM).
SRAM DRAM
Stores data in Flip-Flops. Stores data in Capacitors.

Memory does not need to be It can hold data for a few


refreshed. milliseconds, need to be refreshed
Have lower densities Have higher densities

DRAMs are inexpensive, occupy less space, and dissipate less power
than SRAMs.

15
3.2.2 Random-Access Memory

 Two enhanced versions of DRAM are ED0 DRAM (extended

data output DRAM) and SDRAM (synchronous DRAM).

 The ED0 DRAM provides fast access by allowing the DRAM

controller to output the next address at the same time the

current data is being read.

 An SDRAM contains multiple DRAMs (typically, four)

internally. SDRAMs utilize the multiplexed addressing of

conventional DRAMs.
16

3.2.3 READ and WRITE Timing Diagrams

 READ timing
1. The microprocessor performs the instruction fetch cycle to
READ the opcode.
2. The microprocessor interprets the op-code as a memory
READ operation.
3. When the clock pin signal goes HIGH, the microprocessor
places the contents of the memory address register MAR on
the address pins A0,-A15,, of the chip.
4. At the same time, the microprocessor raises the READ pin
signal to HIGH.
5. The logic external to the microprocessor gets the contents
of the location in the main ROM/RAM addressed by the
MAR and places it on the data bus.
6. Finally, the microprocessor gets this data from the data
bus via pins D0, - D7, and stores it in an internal register.

17
3.2.3 READ and WRITE Timing Diagrams

 We consider the instruction fetch, memory READ, and memory


WRITE timing diagrams

18

3.2.3 READ and WRITE Timing Diagrams

 Write timing
1. When the clock pin signal goes HIGH, the microprocessor
places the contents of the MAR on the address pins A0,-
A15,, of the chip.

2. At the same time, the microprocessor raises the WRITE pin


signal to HIGH.

3. The microprocessor places data to be stored from the


contents of an internal register onto data pins Do-D7,.

4. The logic external to the microprocessor stores the data


from the register into a RAM location addressed by the
MAR.
19
3.2.3 READ and WRITE Timing Diagrams

20

You might also like