0% found this document useful (0 votes)
23 views35 pages

COA Module4

This document provides information about the memory system module of a computer organization and architecture course. It defines key concepts like addressing mode, memory access time, and memory cycle time. It describes different types of memory like RAM, ROM, cache memory, and virtual memory. It provides details on the internal organization and working of static RAM, asynchronous DRAM, and synchronous DRAM memory chips.

Uploaded by

puse1223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views35 pages

COA Module4

This document provides information about the memory system module of a computer organization and architecture course. It defines key concepts like addressing mode, memory access time, and memory cycle time. It describes different types of memory like RAM, ROM, cache memory, and virtual memory. It provides details on the internal organization and working of static RAM, asynchronous DRAM, and synchronous DRAM memory chips.

Uploaded by

puse1223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Title of the Course: COMPUTER ORGANIZATION AND ARCHITECTURE

Course Code:18EC35
Semester: 3rd ,B.E
Department: Electronics and Communication
Name and designation of the faculty:Mangala S Jolad,Asst Prof

1
MODULE 4
Memory System

2
BASIC CONCEPTS

Maximum size of memory that can be used in any computer is determined by


addressing mode.

3
 If MAR is k-bits long then
→ memory may contain upto 2K addressable-
locations
 If MDR is n-bits long, then
→n-bits of data are transferred between the
memory and processor.
 Thedata-transfer takes place over the processor-
bus as shown in Fig.
 The processor-bus has
Address-Line , Data-line & Control-Line (R/W, MFC –
Memory Function Completed).
 The Control-Line is used for coordinating data-
transfer.
 The processor reads the data from the memory by
→ loading the address of the required memory-
location into MAR and
→ setting the R/W line to 1.

4
The memory responds by
→ placing the data from the addressed-
location onto the data-lines and
→ confirms this action by asserting MFC
signal.
Upon receipt of MFC signal, the processor
loads the data from the data-lines into MDR.
The processor writes the data into the
memory-location by
→ loading the address of this location into
MAR &
→ setting the R/W line to 0.

5
Memory Access Time: It is the time that elapses between
→ initiation of an operation(RD) & completion of that
operation(MFC).

Memory Cycle Time: It is the minimum time delay that required


between the initiation of the two successive memory-operations.

6
RAM (Random Access Memory)
In RAM, any location can be accessed for a Read/Write-
operation in fixed amount of time.
The technology used for implementing such memory is
semiconductor integrated circuits.

Cache Memory
It is a small, fast memory that is inserted between
larger slower main-memory and processor.
It holds the currently active segments of a program
and their data.

7
Virtual Memory
The address generated by the processor is referred to as a
virtual/logical address.

The virtual-address-space is mapped onto the physical-memory


where data are actually stored.

The mapping-function is implemented by MMU. (MMU = memory


management unit)

Only the active portion of the address-space is mapped into


locations in the physical-memory.

The remaining virtual-addresses are mapped onto the bulk


storage devices such as magnetic disk. 8
As the active portion of the virtual-address-space changes
during program execution, the MMU
→ changes the mapping-function &
→ transfers the data between disk and memory.

During every memory-cycle, MMU determines whether the


addressed-page is in the memory.

 If the page is in the memory then, the proper word is accessed


and execution proceeds.

Otherwise, a page containing desired word is transferred from


disk to memory.
9
Memory can be classified as follows:
•RAM which can be further classified as follows:
 Static RAM
 Dynamic RAM (DRAM) which can be further classified as
synchronous & asynchronous DRAM.

•ROM which can be further classified as follows:


 PROM
 EPROM
 EEPROM &
 Flash Memory which can be further classified as Flash Cards &
Flash Drives.

1
0
SEMI CONDUCTOR RAM MEMORIES
INTERNAL ORGANIZATION OF MEMORY-CHIPS
Memory-cells are organized in the form of array.
Each cell is capable of storing 1-bit of information.
Each row of cells forms a memory-word.
All cells of a row are connected to a common line called as Word-Line.
The cells in each column are connected to Sense/Write circuit by 2-bit-lines.
The Sense/Write circuits are connected to data-input or output lines of the
chip.

11
During a write-operation, the sense/write
circuit
→ receive input information &
→ store input info in the cells of the selected
word.
The data-input and data-output of each
Sense/Write circuit are connected to a single
bidirectional data-line.

Data-line can be connected to a data-bus of the


computer.
Following 2 control lines are also used:

->R/W = Specifies the required operation.

->CS = Chip Select input selects a given chip in


the multi-chip memory-system.
12
1k memory (1024) cells can be organized as 128 X 8 requires 19
external connections.
 1k X 1 format needs 10 address lines, 1 data line, total 15 lines
needed.
 4M- bit chip of 512k X 8 organization needs 19 address lines and
8 data lines

13
14
STATIC RAM
Memories consist of circuits capable of retaining their state as long as power
is applied .
Two inverters are cross connected to form a latch as shown in Figure.
The latch is connected to 2-bit-lines by transistors T1 and T2.
The transistors act as switches that can be opened/closed under the control
of the word-line.
When the word-line is at ground level, the transistors are turned off and the
latch retain its state.

15
Read Operation
To read the state of the cell, the word-line is activated to close switches T1
and T2.
If the cell is in state 1, the signal on bit-line b is high and the signal on the
bit-line b’ is low.
Thus, b and b’ are complement of each other.
Sense/Write circuit
→ monitors the state of b & b’ and
→ sets the output accordingly.

Write Operation
The state of the cell is set by
→ placing the appropriate value on bit-line b and its complement on b’and
→ then activating the word-line. This forces the cell into the corresponding
state.
The required signal on the bit-lines is generated by Sense/Write circuit.

16
CMOS Cell
Transistor pairs (T3, T5) and (T4, T6) form the inverters in the latch (Figure 8.5).
In state 1, the voltage at point X is high by having T3, T6 ON and T4, T5 are OFF.
Thus, T1 and T2 returned ON (Closed), bit-line b and b’ will have high and low signals
respectively.
Advantages:
It has low power consumption ,the current flows in the cell only when the cell is
active.
Static RAM’s can be accessed quickly. It’s access time is few nanoseconds.
Disadvantage: SRAMs are said to be volatile memories , their contents are lost when
power is interrupted.

17
ASYNCHRONOUS DRAM

Less expensive RAMs can be implemented if simple cells are used.


Such cells cannot retain their state indefinitely. Hence they are called
Dynamic RAM (DRAM).
The information stored in a dynamic memory-cell in the form of a charge on
a capacitor.
This charge can be maintained only for tens of milliseconds.
The contents must be periodically refreshed by restoring this capacitor
charge to its full value.

18
CONTD…
In order to store the information in the cell, the transistor T is turned ON.
The appropriate voltage is applied to the bit-line which charges the capacitor.
After the transistor is turned off, the capacitor begins to discharge.
Hence, information stored in cell can be retrieved correctly before threshold
value of capacitor drops down.
During a read-operation,
→ transistor is turned ON
→ a sense amplifier detects whether the charge on the capacitor is above the
threshold value.
If (charge on capacitor) > (threshold value) à Bit-line will have logic value ‘1’.
If (charge on capacitor) < (threshold value) à Bit-line will set to logic value
‘0’.

19
CONTD…
The 16-megabit DRAM chip , configured as 2Mx 8 as shown below
The cells are organized in the form of 4K x 4K array.
The 4096 cells in each row are divided into 512 groups of 8 as in Figure, so
that a row can store 512 bytes of data.
21 bit address is needed to access a byte in the memory.

20
 21 bits are divided as follows:
Higher order 12-bit address bits A20-9 are
needed to select a row.
Lower order 9 bits A8-0 specifies column-
address of a byte.
During Read/Write-operation,
→ row-address is applied first.
→ row-address is loaded into row-latch
in response to a signal pulse on RAS’
input of chip. (RAS = Row-address Strobe
CAS = Column-address Strobe)
When a Read-operation is initiated, all
cells on the selected row are read and
refreshed.
Shortly after the row-address is loaded,
the column-address is
→ applied to the address pins &
→ loaded into CAS’.
The information in the latch is decoded. 21
 The appropriate group of 8 Sense/Write
circuits is selected.
R/W’=1(read-operation)->Output values of
selected circuits are transferred to data-
lines D0-D7.
R/W’=0(write-operation)->Information on
D0-D7 are transferred to the selected circuits.
RAS‟ & CAS‟ are active-low so that they
cause latching of address when they change
from high to low.
To ensure that the contents of DRAMs are
maintained, each row of cells is accessed
periodically.
A special memory-circuit provides the
necessary control signals RAS‟ & CAS‟ that
govern the timing.
The processor must take into account the
delay in the response of the memory.
22
Fast Page Mode
Transferring the bytes in sequential order is achieved by applying the
consecutive sequence of column-address under the control of successive CAS’
signals.
This scheme allows transferring a block of data at a faster rate.
The block of transfer capability is called as fast page mode.

23
READ ONLY MEMORY (ROM)
Both SRAM and DRAM chips are volatile, i.e. They lose the stored information
if power is turned off.
Many application requires non-volatile memory which retains the stored
information if power is turned off.
For ex: OS software has to be loaded from disk to memory i.e. it requires
non-volatile memory.
Non-volatile memory is used in embedded system.
Since the normal operation involves only reading of stored data, a memory of
this type is called ROM.
At Logic value ‘0’ -> Transistor(T) is connected
to the ground point (P).Transistor switch is closed
& voltage on bit-line nearly drops to zero as in Fig.

At Logic value ‘1’ -> Transistor switch is open.


The bit-line remains at high voltage.
To read the state of the cell, the word-line
is activated. A Sense circuit at the end of the bit-line generates the proper
output value. 24
TYPES OF ROM
Different types of non-volatile memory are
PROM
EPROM
EEPROM &
Flash Memory (Flash Cards & Flash Drives)

PROM (PROGRAMMABLE ROM)


PROM allows the data to be loaded by the user.
Programmability is achieved by inserting a „fuse‟ at point P in a ROM cell.
Before PROM is programmed, the memory contains all 0‟s.
User can insert 1‟s at required location by burning-out fuse using high
current-pulse.
This process is irreversible.

Advantages:
It provides flexibility.
It is faster.
It is less expensive because they can be programmed directly by the user. 25
EPROM (ERASABLE REPROGRAMMABLE ROM)
EPROM allows
→ stored data to be erased and new data to be loaded.
In cell, a connection to ground is always made at „P‟ and a special transistor
is used.
The transistor has the ability to function as
→ a normal transistor or a disabled transistor that is always turned „off ‟.
Transistor can be programmed to behave as a permanently open switch, by
injecting charge into it.
Erasure requires dissipating the charges trapped in the transistor of memory-
cells. This can be done by exposing the chip to ultra-violet light.

Advantages:
It provides flexibility during the development-phase of digital-system.
It is capable of retaining the stored information for a long time.

Disadvantages:
The chip must be physically removed from the circuit for reprogramming.
The entire contents need to be erased by UV light. 26
EEPROM (ELECTRICALLY ERASABLE ROM)
Advantages:
It can be both programmed and erased electrically.
It allows the erasing of all cell contents selectively.
Disadvantage:
It requires different voltage for erasing, writing and reading the stored data.

FLASH MEMORY
In EEPROM, it is possible to read & write the contents of a single cell.
In Flash device, it is possible to read contents of a single cell & write entire contents
of a block.
Prior to writing, the previous contents of the block are erased.
Eg. In MP3 player, the flash memory stores the data that represents sound.
Single flash chips cannot provide sufficient storage capacity for embedded-system.

Advantages:
Flash drives have greater density which leads to higher capacity & low cost per bit.
It requires single power supply voltage & consumes less power.
There are 2 methods for implementing larger memory:
1) Flash Cards & 2) Flash Drives
27
Flash Cards
 One way of constructing larger module is to mount flash-chips on a small
card.
 Such flash-card have standard interface.
 The card is simply plugged into a conveniently accessible slot.
 Memory-size of the card can be 8, 32 or 64MB.
 Eg: A minute of music can be stored in 1MB of memory. Hence 64MB flash
cards can store an hour of music.
Flash Drives
 Larger flash memory can be developed by replacing the hard disk-drive.
 The flash drives are designed to fully emulate the hard disk.
 The flash drives are solid state electronic devices that have no movable
parts.

28
Advantages:
 They have shorter seek & access time which results in faster response.
 They have low power consumption. .‟. they are attractive for battery driven
 application.
 They are insensitive to vibration.

Disadvantages:
The capacity of flash drive (<1GB) is less than hard disk (>1GB).
It leads to higher cost per bit.
Flash memory will weaken after it has been written a number of times
(typically at least 1 million times).

29
SPEED, SIZE COST

30
CACHE MEMORIES
The effectiveness of cache mechanism is based on the property of „Locality of
Reference’.
Locality of Reference
Many instructions in the localized areas of program are executed repeatedly during
some time period
Remainder of the program is accessed relatively infrequently as in Fig.
There are 2 types:
Temporal
The recently executed instructions are likely to be executed again very soon.

Spatial
Instructions in close proximity to recently executed instruction are also likely to be
executed soon.
If active segment of program is placed in cache-memory, then total execution time
can be reduced.
Block refers to the set of contiguous address locations of some size.
The cache-line is used to refer to the cache-block.

31
The Cache-memory stores a reasonable number of blocks at a given time.
This number of blocks is small compared to the total number of blocks available in
main-memory.
Correspondence b/w main-memory-block & cache-memory-block is specified by
mapping-function.
Cache control hardware decides which block should be removed to create space for the
new block.
The collection of rule for making this decision is called the Replacement Algorithm.
The cache control-circuit determines whether the requested-word currently exists in
the cache.
The write-operation is done in 2 ways: 1) Write-through protocol & 2) Write-back
protocol. 32
Write-Through Protocol
→ Here the cache-location and the main-memory-locations are updated
simultaneously.
Write-Back Protocol
This technique is to
→ update only the cache-location &
→ mark the cache-location with associated flag bit called Dirty/Modified Bit.
The word in memory will be updated later, when the marked-block is removed from
cache.
During Read-operation
→ If the requested-word currently not exists in the cache, then read-miss will occur.
→ To overcome the read miss, Load–through/Early restart protocol is used.
Load–Through Protocol
→ The block of words that contains the requested-word is copied from the memory
into cache.
→ After entire block is loaded into cache, the requested-word is forwarded to
processor.
During Write-operation
→ If the requested-word not exists in the cache, then write-miss will occur.
→ If Write Through Protocol is used, the information is written directly into main-
memory. 33
If Write Back Protocol is used,
→ then block containing the addressed word is first brought into the cache &
→ then the desired word in the cache is over-written with the new information.
 MAPPING-FUNCTION
Here we discuss about 3 different mapping-function:
Direct Mapping
Associative Mapping
Set-Associative Mapping

DIRECT MAPPING
The block-j of the main-memory maps onto block-j modulo-128 of the cache
(Figure 8.16).
When the memory-blocks 0, 128, & 256 are loaded into cache, the block is
stored in cache-block 0. Similarly, memory-blocks 1, 129, 257 are stored in
cache-block 1.
The contention may arise when
When the cache is full.
When more than one memory-block is mapped onto a given cache-block
position.
The contention is resolved by
allowing the new blocks to overwrite the currently resident-block.
Memory-address determines placement of block in the cache. 34
The memory-address is divided into 3 fields:
Low Order 4 bit field
Selects one of 16 words in a block.
7 bit cache-block field
7-bits determine the cache-position in which new block must be stored.
5 bit Tag field
5-bits memory-address of block is stored in 5 tag-bits associated with cache-
location.

35

You might also like