ECE/CS 552: Main Memory and ECC © Prof. Mikko Lipasti Lecture notes based in part on slides created by Mark Hill, David Wood, Guri Sohi, John Shen and.

Slides:



Advertisements
Similar presentations
Main MemoryCS510 Computer ArchitecturesLecture Lecture 15 Main Memory.
Advertisements

Computer Organization and Architecture
Computer Organization and Architecture
Prith Banerjee ECE C03 Advanced Digital Design Spring 1998
+ CS 325: CS Hardware and Software Organization and Architecture Internal Memory.
5-1 Memory System. Logical Memory Map. Each location size is one byte (Byte Addressable) Logical Memory Map. Each location size is one byte (Byte Addressable)
COEN 180 DRAM. Dynamic Random Access Memory Dynamic: Periodically refresh information in a bit cell. Else it is lost. Small footprint: transistor + capacitor.
EKT 221 : DIGITAL 2. Today’s Outline  Dynamic RAM (DRAM)  DRAM Cell – The Hydraulic Analogy  DRAM Block Diagram  Types of DRAM.
Main Mem.. CSE 471 Autumn 011 Main Memory The last level in the cache – main memory hierarchy is the main memory made of DRAM chips DRAM parameters (memory.
CS.305 Computer Architecture Memory: Structures Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made.
ECE/CS 552: Memory Hierarchy Instructor: Mikko H Lipasti Fall 2010 University of Wisconsin-Madison Lecture notes based on notes by Mark Hill Updated by.
1 The Basic Memory Element - The Flip-Flop Up until know we have looked upon memory elements as black boxes. The basic memory element is called the flip-flop.
Lecture 12: DRAM Basics Today: DRAM terminology and basics, energy innovations.
1 Lecture 15: DRAM Design Today: DRAM basics, DRAM innovations (Section 5.3)
Memory Hierarchy.1 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Computer Organization and Architecture
Memory Technology “Non-so-random” Access Technology:
Memory and Programmable Logic
CPE232 Memory Hierarchy1 CPE 232 Computer Organization Spring 2006 Memory Hierarchy Dr. Gheith Abandah [Adapted from the slides of Professor Mary Irwin.
CSIE30300 Computer Architecture Unit 07: Main Memory Hsin-Chou Chi [Adapted from material by and
Main Memory -Victor Frandsen. Overview Types of Memory The CPU & Main Memory Types of RAM Properties of DRAM Types of DRAM & Enhanced DRAM Error Detection.
ECE 4100/6100 Advanced Computer Architecture Lecture 11 DRAM and Storage Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia.
Chapter 5 Internal Memory. Semiconductor Memory Types.
Systems Overview Computer is composed of three main components: CPU Main memory IO devices Refers to page
MODULE 5: Main Memory.
Main Memory CS448.
Memory Intro Computer Organization 1 Computer Science Dept Va Tech March 2006 ©2006 McQuain & Ribbens Built using D flip-flops: 4-Bit Register Clock input.
Chapter 4: MEMORY Internal Memory.
L/O/G/O Computer Memory Chapter 3 (a) CS.216 Computer Architecture and Organization.
Memory Cell Operation.
Computer Architecture Lecture 24 Fasih ur Rehman.
Physical Memory and Physical Addressing By Alex Ames.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
CS/EE 5810 CS/EE 6810 F00: 1 Main Memory. CS/EE 5810 CS/EE 6810 F00: 2 Main Memory Bottom Rung of the Memory Hierarchy 3 important issues –capacity »BellÕs.
Digital Circuits Introduction Memory information storage a collection of cells store binary information RAM – Random-Access Memory read operation.
COMP541 Memories II: DRAMs
1 Adapted from UC Berkeley CS252 S01 Lecture 18: Reducing Cache Hit Time and Main Memory Design Virtucal Cache, pipelined cache, cache summary, main memory.
1 Lecture: DRAM Main Memory Topics: DRAM intro and basics (Section 2.3)
CS35101 Computer Architecture Spring 2006 Lecture 18: Memory Hierarchy Paul Durand ( ) [Adapted from M Irwin (
ECE/CS 552: Cache Concepts © Prof. Mikko Lipasti Lecture notes based in part on slides created by Mark Hill, David Wood, Guri Sohi, John Shen and Jim Smith.
Gunjeet Kaur Dronacharya Group of Institutions. Outline I Random-Access Memory Memory Decoding Error Detection and Correction Read-Only Memory Programmable.
Types of RAM (Random Access Memory) Information Technology.
1 Lecture: Memory Basics and Innovations Topics: memory organization basics, schedulers, refresh,
CS 704 Advanced Computer Architecture
William Stallings Computer Organization and Architecture 7th Edition
Types of RAM (Random Access Memory)
Vladimir Stojanovic & Nicholas Weaver
ECE/CS 552: Virtual Memory
William Stallings Computer Organization and Architecture 7th Edition
Lecture 15: DRAM Main Memory Systems
William Stallings Computer Organization and Architecture 8th Edition
Lecture 14 - Dynamic Memory
Computer Architecture
William Stallings Computer Organization and Architecture 7th Edition
William Stallings Computer Organization and Architecture 8th Edition
BIC 10503: COMPUTER ARCHITECTURE
RAID Redundant Array of Inexpensive (Independent) Disks
Chapter 4: MEMORY.
AKT211 – CAO 07 – Computer Memory
William Stallings Computer Organization and Architecture 8th Edition
Bob Reese Micro II ECE, MSU
4-Bit Register Built using D flip-flops:
Presentation transcript:

ECE/CS 552: Main Memory and ECC © Prof. Mikko Lipasti Lecture notes based in part on slides created by Mark Hill, David Wood, Guri Sohi, John Shen and Jim Smith

Memory Hierarchy 2 Registers On-Chip SRAM Off-Chip SRAM DRAM Disk CAPACITY SPEED and COST

Main Memory Design Commodity DRAM chips Wide design space for – Minimizing cost, latency – Maximizing bandwidth, storage Susceptible to soft errors – Protect with ECC (SECDED) – ECC also widely used in on-chip memories, busses 3

DRAM Chip Organization Optimized for density, not speed Data stored as charge in capacitor Discharge on reads => destructive reads Charge leaks over time – refresh every 64ms 4 Read entire row at once (RAS, page open) Read word from row (CAS) Burst mode (sequential words) Write row back (precharge, page close)

Main Memory Design 5 Single DRAM chip has multiple internal banks

Main Memory Access Each memory access (DRAM bus clocks, 10x CPU cycle time) – 5 cycles to send row address (page open or RAS) – 1 cycle to send column address – 3 cycle DRAM access latency – 1 cycle to send data (CAS latency = = 5) – 5 cycles to send precharge (page close) – 4 word cache block One word wide: (r=row addr, c= col addr, d=delay, b=bus, p=precharge) rrrrrcdddbcdddbcdddbcdddbppppp – * ( ) = 25 cycles delay – 5 more busy cycles (precharge) till next command 6

Main Memory Access One word wide, burst mode (pipelined) rrrrrcdddb b bppppp – = 13 cycles – Interleaving is similar, but words can be from different rows, each open in a different bank Four word wide memory: rrrrrcdddbppppp – = 9 cycles 7

Error Detection and Correction Main memory stores a huge number of bits – Probability of bit flip becomes nontrivial – Bit flips (called soft errors) caused by Slight manufacturing defects Gamma rays and alpha particles Electrical interference Etc. – Getting worse with smaller feature sizes Reliable systems must be protected from soft errors via ECC (error correction codes) – Even PCs support ECC these days 8

Error Correcting Codes Probabilities: P(1 word no errors) > P(single error) > P(two errors) >> P(>2 errors) Detection - signal a problem Correction - restore data to correct value Most common – Parity - single error detection – SECDED - single error correction; double error detection Supplemental reading on course web page! 9

ECC Codes for One Bit 10 PowerCorrect#bitsComments Nothing0,11 SED00,11201,10 detect errors SEC000, ,010,100 => 0 110,101,011 => 1 SECDED0000,11114One 1 => 0 Two 1’s => error Three 1’s => 1

ECC Hamming distance – No. of bit flips to convert one valid code to another – All legal SECDED codes are at Hamming distance of 4 I.e. in single-bit SECDED, all 4 bits flip to go from representation for ‘0’ (0000) to representation for ‘1’ (1111) 11 # 1’s01234 Result00Err11

ECC Reduce overhead by applying codes to a word, not a bit – Larger word means higher p(>=2 errors) 12 # bitsSED overheadSECDED overhead 11 (100%)3 (300%) 321 (3%)7 (22%) 641 (1.6%)8 (13%) n1 (1/n)1 + log 2 n + a little

64-bit ECC 64 bits data with 8 check bits dddd…..dccccccccc DIMM with 9x8-bit-wide DRAM chips = 72 bits Intuition – One check bit is parity – Other check bits point to Error in data, or Error in all check bits, or No error 13

ECC To store (write) – Use data 0 to compute check 0 – Store data 0 and check 0 To load – Read data 1 and check 1 – Use data 1 to compute check 2 – Syndrome = check 1 xor check 2 I.e. make sure check bits are equal 14

ECC Syndrome 15 SyndromeParityImplications 0OKdata 1 ==data 0 n != 0Not OK Flip bit n of data 1 to get data 0 n != 0OKSignals uncorrectable error

4-bit SECDED Code C n parity bits chosen specifically to: – Identify errors in bits where bit n of the index is 1 – C 1 checks all odd bit positions (where LSB=1) – C 2 checks all positions where middle bit=1 – C 3 checks all positions where MSB=1 Hence, nonzero syndrome points to faulty bit 16 Bit Position CodewordC1C1 C2C2 b1b1 C3C3 b2b2 b3b3 b4b4 P C1C1 XXXX C2C2 XXXX C3C3 XXXX PXXXXXXXX

4-bit SECDED Example 4 data bits, 3 check bits, 1 parity bit Syndrome is xor of check bits C 1-3 – If (syndrome==0) and (parity OK) => no error – If (syndrome != 0) and (parity !OK) => flip bit position pointed to by syndrome – If (syndrome != 0) and (parity OK) => double-bit error 17 Bit Position CodewordC1C1 C2C2 b1b1 C3C3 b2b2 b3b3 b4b4 P Original data Syndrome No corruption , P ok 1 bit corrupted , P !ok 2 bits corrupted , P ok

Summary Commodity DRAM chips Wide design space for – Minimizing cost, latency – Maximizing bandwidth, storage Susceptible to soft errors – Protect with ECC (SECDED) – ECC also widely used in on-chip memories, busses 18