Memory Organisation
Memory Organisation
ORGANISATION
IC FAMILY
DTL Diod Transistor Logic
RTL Register Transistor Logic
TTL Transistor Transistor Logic [ Most Popular ]
ECL Emitter Coupled Logic [ High Speed Operation ]
MOS Metal Oxide Semiconductor [ MOSFET ]
CMOS Complementary MOS [ Low Power Consumption ]
I 2L Integrated Injection Logic
• MOS & I2L are used in circuits of High Component Density [ LSI ]
• The Limits on the number of circuits in SSI is the number of PINs
• TTL Series– 5400 and 7400 (Normal) / 9000 & 8000 (Industry Recent)
• TTL works on 5 Volts (Operating Voltage)
• ECL Series – 10000
• CMOS Series – 4000 ( 3 to 5 Volt Operating Voltage )
Positive & Negative Logic
CHARACTERISTICS OF IC
FANOUT
Number of standard loads that the output of a gate can drive without
hampering it’s normal operation. Maximum number of Similar type of
gates can be controlled by the one gate (Loading Rule)
POWER DISSIPATION
Supplied Power required to operate the gate ( mWatt)
PROPAGATION DELAY
Average Transition delay time for a signal to propagate from input to
output. It passes through the series of gates. The Sum of all gates
propagation delay is total propagation f circuit. Propagation delay high
means speed is low.
NOISE MARGIN
Un-wanted signal produce undesirable changes in the output (DC Noise &
AC Noise)
COMPARATIVE STUDY
IC FANOUT POWER PROP. NOISE
TYPE DISSIPATION DELAY MARGIN (Volt)
(mW) (µs)
TTL 10 10 10 0.4
ECL 25 25 2 0.2
CMOS 50 0.1 25 3
CLASSIFICATION OF MEMORY
ACCESS CAPABILITY
• RANDOM ACCESS MEMORY • READ/WRITE MEMORY
• SEQUENTIAL ACCESS MEMORY • READ ONLY MEMORY
• SEMI-RANDOM / DIRECT ACCESS MEMORY
• ASSOCIATIVE ACCESS MEMORY
TECHNOLOGY ROLE
• CORE MEMORY • MAIN MEMORY
• SEMICONDUCTOR MEMORY • SECONDARY MEMORY
• MAGNETIC BUBBLE • CACHE MEMOY
• VIRTUAL MEMORY
MEMORY CLASSIFICATION
STATIC-RAM (SRAM)
Dynamic since
needs to be
refreshed
periodically (8 ms, Destructive
1% time) read-out
DRAM Refresh Cycles and Refresh Rate
Threshold
voltage
10s of ms
0 Stored before needing
Voltage refresh cycle Time
for 0
Fig. 17.5 Variations in the voltage across a DRAM cell capacitor after writing
a 1 and subsequent refresh operations.
SRAM serves as cache memory, interfacing between DRAMs and the CPU.
CLASSIFICATION OF DRAM
1. Synchronous Dynamic RAM (SD RAM)
2. Rambus Dynamic RAM (RD RAM)
Non-Volatile
Chips can be erased and re-programmed on Byte-By-Byte basis
Selective erasing is possible
Differentkindofvoltageforerasing(21Volt),writing(21Volt)
and reading(5Volt)
High Cost, Low reliablility
E.g – BIOS (Basic Input Output System Chip)
Flash Memory
Non-Volatile
Like EEPROM, Reading one cell is possible,
But one Block (set of cells) must be written
Greater Density & Lower Cost per bit and consume Low Power
A flash cell is based on single transistors controlled by charge
E.g – MP3 Player, Cell Phone, Memory Stick, Pen Drive
p subs-
trate
n+
B i t li n e s Drai n
Access Method: Each memory is a collection of various
memory location. Accessing the memory means finding and
reaching desired location and than reading information from
memory location. The information from locations can be accessed
as follows:
1. Random access
2. Sequential access
3. Direct access.
• Random Access: It is the access mode where each
memory location has a unique address. Using these
unique addresses each memory location can be
addressed independently in any order in equal amount
of time. Generally, main memories are random access
memories.
• Sequential Access: If storage locations can be
accessed only in a certain predetermined sequence,
the access method is known as serial or sequential
access. E.g Audio/ Video Cassette films(ribons),
• Direct Access / Semi-Random Access: In this
access information is stored on tracks and each track
has a separate read/write head. This features makes it
a semi random mode which is generally used in
magnetic disks. E.g – Hard-Disk
Memory Hierarchy
MEMORY HIERARCHY
CPU Cache
memory
COST SPEED
Register
Cache
Main Memory
Magnetic Disk
Magnetic Tape
CAPACITY
Main Memory
MAIN MEMORY
RAM and ROM Chips
Typical RAM chip
Chip select 1 CS1
Chip select 2 CS2
Read RD 128 x 8 8-bit data bus
RAM
Write WR
7-bit address AD 7
- The low-order lines in the address bus select the byte within the chips and
other lines in the address bus select a particular chip through its chip select
inputs
CHIPS ALLOCATION IN MEMORY MODULE
HORIZONTALAllocation
VERTICALAllocation
BOTHAllocation
HORIZONTAL ALLOCATION
VERTICAL ALLOCATION
BOTH HORIZONTAL & VERTICAL ALLOCATION
Bottleneck of Von Neumann Architecture
Higherorder8bitsforinternaladdressingforabank
Lowerorder2bitsforselectingparticularbank
Consecutivelocationsaredistributedindifferentbanks
Locality of Reference
TEMPORAL Locality of Reference : Recently executed instruction is likely to be executed
again very soon (So, bring into cache and search in it first)
SPACIAL Locality of Reference : Instructions in close proximity to a recently executed
instruction, are also likely to be executed very soon. It suggest that instead of fetching a
single instruction from main memory, fetch multiple instructions that are resides at
adjacent address as well (block concept & program sequence)
Desktop, Drawer, and File Cabinet Analogy
Once the “working set” is in
the drawer, very few trips to
the file cabinet are needed.
Access cabinet
Access drawer
in 30 s
in 5 s
Register Access
file desktop in 2 s Cache
memory
Main
memory
If total ten(10) number of memory references, then Nine (9) hits and One (1) miss.
Problem : Computer with cache access time = 100 ns , main memory access time =1000 ns
and hit ratio = 0.9. Find….
1. Average memory access time when we use cache (Ans. 200 ns)
2. Average memory access time without use of cache (Ans. 1000ns)
Look-through Cache : Cache is checked first for any memory reference, and main memory
access will be started only if there is a Cache Miss.
Look- Asside Cache : Start cache look-up and main memory access at the same
time(simultaneously) . Once cache hit is established , then the main memory access is
cancelled
Write Miss : Addressed word is not in the cache ie. Location being written to is not in
the cache currently.
Main
Reg Cache
CPU file
(slow)
(fast)
memory
memory
(a) Level 2 between level 1 and main (b) Level 2 connected to “backside” bus
Because Tc is included in the CPI of 1.2, we must account 2 between rest 1 and main
CPI = 1.2 + 1.1(1 – 0.95)[8 + (1 – 0.8)60] = 1.2 + 1.1 0.05 20 = 2.3
Overall: hit rate 99% (95% + 80% of 5%), miss penalty 60 cycles
For every Miss,entire block of 8 words must be transferred from main memory to cache
Larger block will improve the better hit ratio
Disadvantages:When we access the data ofsame index butdifferent tags,the index with
Particular tag may be presented in a cache block.For accessing data with same index with
Another different tag, the previous block must be replaced with newblock
We cannot store with same index with different tags
Accessing a Direct-Mapped Cache
Example 1
Show cache addressing for a byte-addressable memory with 32-bit
addresses. Cache line W = 16 B. Cache size L = 4096 lines (64 KB).
Solution
Byte offset in line is log216 = 4 b. Cache line index is log24096 = 12 b.
This leaves 32 – 12 – 4 = 16 b for the tag.
12-bit line index in cache
32-bit
address
• In the slide, each index address refers to two data words and their associated tags
(2-Way Set Associative Cache )
• Each tag requires six bits and each data word has 12 bits, so the word length is 2*(6+12) = 36
bits
• Set-Associative Mapping is an improvement over the direct-mapping in that each word of
cache can store two or more word of memory under the same index address
Disadvantages : Requires more complex comparison logic if we increase the Set size
Cache initialization with Valid Bits
• After Initialization (after power on), the Cache is considered to be empty.
• But in effect, it contains some Non-Valid data
• Extra bit (field) corresponding each word / block in a cache called “VALID BIT” to indicate
whether or not a word/block contains valid data
• Initially valid bit = 0,
• After first time data loaded from memory to cache, then valid bit set to 1. And stays set
unless the cache has to be initialized again.
• A word in cache is not replaced by another word unless the valid bit set to 1 and mismatch
occurs
• If a valid bit happens to be 0, the new word automatically replaces the invalid data
Accessing a Set-Associative Cache
Example 18.5
Show cache addressing scheme for a byte-addressable memory with
32-bit addresses. Cache line width 2W = 16 B. Set size 2S = 2 lines.
Cache size 2L = 4096 lines (64 KB).
Solution
Byte offset in line is log216 = 4 b. Cache set index is (log24096/2) = 11 b.
This leaves 32 – 11 – 4 = 17 b for the tag.
11-bit set index in cache
32-bit
address
Solution
a. Address (32 b) = 5 b byte offset + 9 b set index + 18 b tag
b. Addresses that have their 9-bit set index equal to 5. These are of the
general form 214a + 255 + b; e.g., 160-191, 16 544-16 575, . . .