CS152 / Kubiatowicz Lec18.1 11/9/01©UCB Fall 2001 CS152 Computer Architecture and Engineering Lecture 20 Locality and Memory Technology November 9 th,

Slides:



Advertisements
Similar presentations
1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Advertisements

CMPE 421 Parallel Computer Architecture MEMORY SYSTEM.
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
CS.305 Computer Architecture Memory: Structures Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made.
10/11/2007EECS150 Fa07 - DRAM 1 EECS Components and Design Techniques for Digital Systems Lec 14 – Storage: DRAM, SDRAM David Culler Electrical Engineering.
Memory Subsystem and Cache Adapted from lectures notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
11/29/2004EE 42 fall 2004 lecture 371 Lecture #37: Memory Last lecture: –Transmission line equations –Reflections and termination –High frequency measurements.
EE30332 Ch7 DP.1 °Most of the slides are from Prof. Dave Patterson of University of California at Berkeley °Part of the materials is from Sun Microsystems.
Memory Computer Architecture Lecture 16: Memory Systems.
Now, Review of Memory Hierarchy
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 20 - Memory.
Cache Memory Adapted from lectures notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Nov. 3, 2003 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Memory Hierarchy.1 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output.
331 Lec20.1Fall :332:331 Computer Architecture and Assembly Language Fall 2003 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
SDRAM Memory Controller
CIS629 - Fall 2002 Caches 1 Caches °Why is caching needed? Technological development and Moore’s Law °Why are caches successful? Principle of locality.
CIS °The Five Classic Components of a Computer °Today’s Topics: Memory Hierarchy Cache Basics Cache Exercise (Many of this topic’s slides were.
CS152 / Kubiatowicz Lec19.1 4/3/01©UCB April 3, 2001 CS152 Computer Architecture and Engineering Lecture 19 Finish speculation Locality and Memory Technology.
Computer ArchitectureFall 2007 © November 7th, 2007 Majd F. Sakr CS-447– Computer Architecture.
Ceg3420 L15.1 DAP Fa97,  U.CB CEG3420 Computer Design Locality and Memory Technology.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
EECC550 - Shaaban #1 Lec # 10 Summer Main Memory Main memory generally utilizes Dynamic RAM (DRAM), which use a single transistor to store.
331 Lec20.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
John Kubiatowicz (http.cs.berkeley.edu/~kubitron)
ECE 232 L24.Memory.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 24 Memory.
CS152 / Kubiatowicz Lec /01/99©UCB Fall 1999 CS152 Computer Architecture and Engineering Lecture 18 Locality and Memory Technology November 1, 1999.
EECC551 - Shaaban #1 Lec # 11 Fall Main Memory Main memory generally utilizes Dynamic RAM (DRAM), which use a single transistor to store.
EEM 486 EEM 486: Computer Architecture Lecture 6 Memory Systems and Caches.
CS152 / Kubiatowicz Lec /27/99©UCB Fall 1999 CS152 Computer Architecture and Engineering Lecture 17 Finish speculation Locality and Memory Technology.
DAP Spr.‘98 ©UCB 1 Lecture 11: Memory Hierarchy—Ways to Reduce Misses.
Memory Technology “Non-so-random” Access Technology:
CPE432 Chapter 5A.1Dr. W. Abu-Sufah, UJ Chapter 5A: Exploiting the Memory Hierarchy, Part 1 Adapted from Slides by Prof. Mary Jane Irwin, Penn State University.
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
CS 152 / Fall 02 Lec 19.1 CS 152: Computer Architecture and Engineering Lecture 19 Locality and Memory Technologies Randy H. Katz, Instructor Satrajit.
CpE 442 Memory System Start: X:40.
CS1104: Computer Organisation School of Computing National University of Singapore.
EECS 318 CAD Computer Aided Design LECTURE 10: Improving Memory Access: Direct and Spatial caches Instructor: Francis G. Wolff Case.
1 CSCI 2510 Computer Organization Memory System I Organization.
IT253: Computer Organization Lecture 11: Memory Tonga Institute of Higher Education.
Lecture 14 Memory Hierarchy and Cache Design Prof. Mike Schulte Computer Architecture ECE 201.
Lecture 19 Today’s topics Types of memory Memory hierarchy.
EEE-445 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output Cache Main Memory Secondary Memory (Disk)
Lecture 13 Main Memory Computer Architecture COE 501.
Memory System Unit-IV 4/24/2017 Unit-4 : Memory System.
CPE 442 cache.1 Introduction To Computer Architecture CpE 442 Cache Memory Design.
EEL5708/Bölöni Lec 4.1 Fall 2004 September 10, 2004 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Review: Memory Hierarchy.
CS252/Kubiatowicz Lec 4.1 1/26/01 CS252 Graduate Computer Architecture Lecture 4 Caches and Memory Systems January 26, 2001 Prof. John Kubiatowicz.
The Goal: illusion of large, fast, cheap memory Fact: Large memories are slow, fast memories are small How do we create a memory that is large, cheap and.
Computer Organization & Programming
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
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.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 14: Memory Hierarchy Chapter 5 (4.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
DIGITAL SYSTEMS Read Only– and Random Access Memory ( ROM – RAM) Rudolf Tracht and A.J. Han Vinck.
CS35101 Computer Architecture Spring 2006 Lecture 18: Memory Hierarchy Paul Durand ( ) [Adapted from M Irwin (
CSE431 L18 Memory Hierarchy.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 18: Memory Hierarchy Review Mary Jane Irwin (
CPEG3231 Integration of cache and MIPS Pipeline  Data-path control unit design  Pipeline stalls on cache misses.
CS152 / Kubiatowicz Lec /14/01©UCB Fall 2001 CS152 Computer Architecture and Engineering Lecture 21 Memory Systems (recap) Caches November 11 th,
CS152 / Kubiatowicz Lec17.1 4/5/99©UCB Spring 1999 CS152 Computer Architecture and Engineering Lecture 17 Locality and Memory Technology April 5, 1999.
CS 704 Advanced Computer Architecture
COSC3330 Computer Architecture
Yu-Lun Kuo Computer Sciences and Information Engineering
The Goal: illusion of large, fast, cheap memory
John Kubiatowicz ( CS152 Computer Architecture and Engineering Lecture 20 Locality and Memory Technology April 16, 2003.
John Kubiatowicz ( CS152 Computer Architecture and Engineering Lecture 19 Speculation/ILP (Con’t) Locality and Memory Technology.
Cache Memory Rabi Mahapatra
Presentation transcript:

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 CS152 Computer Architecture and Engineering Lecture 20 Locality and Memory Technology November 9 th, 2001 John Kubiatowicz (http.cs.berkeley.edu/~kubitron) lecture slides:

CS152 / Kubiatowicz Lec /9/01©UCB Fall DIVD ROB2,R(F6) 2 ADDD R(F4),ROB1 Review: Tomasulo With Reorder buffer: To Memory FP adders FP multipliers Reservation Stations FP Op Queue ROB7 ROB6 ROB5 ROB3 ROB2 ROB1 -- F0 ST 0(R3),F0 ADDD F0,F4,F6 Y Y Ex F4 M[10] LD F4,0(R3) Y Y -- BNE F2, N N F2 F10 F0 DIVD F2,F10,F6 ADDD F10,F4,F0 LD F0,10(R2) N N N N N N Done? Dest Oldest Newest from Memory 1 10+R2 Dest Reorder Buffer Registers

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Address of branch index to get prediction AND branch address (if taken) Must check for branch match now, since can’t use wrong branch address Grab predicted PC from table since may take several cycles to compute Branch PCPredicted PC =? PC of instruction FETCH Predict taken or untaken Review: Branch Target Buffer (BTB)

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Review: Branch History Table °BHT is a table of “Predictors” Usually 2-bit, saturating counters Indexed by PC address of Branch – without tags °In Fetch state of branch: BTB identifies branch Predictor from BHT used to make prediction °When branch completes Update corresponding Predictor T NT T T Predictor 0 Predictor 7 Predictor 1 Branch PC

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °The Five Classic Components of a Computer °Today’s Topics: Recap last lecture Locality and Memory Hierarchy Administrivia SRAM Memory Technology DRAM Memory Technology Memory Organization The Big Picture: Where are We Now? Control Datapath Memory Processor Input Output

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Technology Trends (from 1st lecture) DRAM YearSizeCycle Time Kb250 ns Kb220 ns Mb190 ns Mb165 ns Mb145 ns Mb120 ns CapacitySpeed (latency) Logic:2x in 3 years2x in 3 years DRAM:4x in 3 years2x in 10 years Disk:4x in 3 years2x in 10 years 1000:1!2:1!

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 µProc 60%/yr. (2X/1.5yr) DRAM 9%/yr. (2X/10 yrs) DRAM CPU 1982 Processor-Memory Performance Gap: (grows 50% / year) Performance Time “Moore’s Law” Processor-DRAM Memory Gap (latency) Who Cares About the Memory Hierarchy? “Less’ Law?”

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 The Goal: illusion of large, fast, cheap memory °Fact: Large memories are slow Fast memories are small °How do we create a memory that is large, cheap and fast (most of the time)? Hierarchy Parallelism

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Memory Hierarchy of a Modern Computer System °By taking advantage of the principle of locality: Present the user with as much memory as is available in the cheapest technology. Provide access at the speed offered by the fastest technology. Control Datapath Secondary Storage (Disk) Processor Registers Main Memory (DRAM) Second Level Cache (SRAM) On-Chip Cache 1s 10,000,000s (10s ms) Speed (ns): 10s100s GsSize (bytes):KsMs Tertiary Storage (Tape) 10,000,000,000s (10s sec) Ts

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Today’s Situation: Microprocessor °Rely on caches to bridge gap °Microprocessor-DRAM performance gap time of a full cache miss in instructions executed 1st Alpha (7000): 340 ns/5.0 ns = 68 clks x 2 or136 instructions 2nd Alpha (8400):266 ns/3.3 ns = 80 clks x 4 or320 instructions 3rd Alpha (t.b.d.):180 ns/1.7 ns =108 clks x 6 or648 instructions 1/2X latency x 3X clock rate x 3X Instr/clock  ­5X

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Memory Hierarchy: Why Does it Work? Locality! °Temporal Locality (Locality in Time): => Keep most recently accessed data items closer to the processor °Spatial Locality (Locality in Space): => Move blocks consists of contiguous words to the upper levels Lower Level Memory Upper Level Memory To Processor From Processor Blk X Blk Y Address Space 02^n - 1 Probability of reference

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Example: 1 KB Direct Mapped Cache with 32 B Blocks °For a 2 ** N byte cache: The uppermost (32 - N) bits are always the Cache Tag The lowest M bits are the Byte Select (Block Size = 2 ** M) Cache Index : Cache Data Byte : Cache TagExample: 0x50 Ex: 0x01 0x50 Stored as part of the cache “state” Valid Bit : 31 Byte 1Byte 31 : Byte 32Byte 33Byte 63 : Byte 992Byte 1023 : Cache Tag Byte Select Ex: 0x00 9 Block address

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Example: Set Associative Cache °N-way set associative: N entries for each Cache Index N direct mapped caches operates in parallel °Example: Two-way set associative cache Cache Index selects a “set” from the cache The two tags in the set are compared to the input in parallel Data is selected based on the tag result Cache Data Cache Block 0 Cache TagValid ::: Cache Data Cache Block 0 Cache TagValid ::: Cache Index Mux 01 Sel1Sel0 Cache Block Compare Adr Tag Compare OR Hit

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Memory Hierarchy: Terminology °Hit: data appears in some block in the upper level (example: Block X) Hit Rate: the fraction of memory access found in the upper level Hit Time: Time to access the upper level which consists of RAM access time + Time to determine hit/miss °Miss: data needs to be retrieve from a block in the lower level (Block Y) Miss Rate = 1 - (Hit Rate) Miss Penalty: Time to replace a block in the upper level + Time to deliver the block the processor °Hit Time << Miss Penalty Lower Level Memory Upper Level Memory To Processor From Processor Blk X Blk Y

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Recap: Cache Performance °CPU time = (CPU execution clock cycles + Memory stall clock cycles) x clock cycle time °Memory stall clock cycles = (Reads x Read miss rate x Read miss penalty + Writes x Write miss rate x Write miss penalty) °Memory stall clock cycles = Memory accesses x Miss rate x Miss penalty °Different measure: AMAT Average Memory Access time (AMAT) = Hit Time + (Miss Rate x Miss Penalty) °Note: memory hit time is included in execution cycles.

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Recap: Impact on Performance °Suppose a processor executes at Clock Rate = 200 MHz (5 ns per cycle) Base CPI = % arith/logic, 30% ld/st, 20% control °Suppose that 10% of memory operations get 50 cycle miss penalty °Suppose that 1% of instructions get same miss penalty °CPI = Base CPI + average stalls per instruction 1.1(cycles/ins) + [ 0.30 (DataMops/ins) x 0.10 (miss/DataMop) x 50 (cycle/miss)] + [ 1 (InstMop/ins) x 0.01 (miss/InstMop) x 50 (cycle/miss)] = ( ) cycle/ins = 3.1 °58% of the time the proc is stalled waiting for memory! °AMAT=(1/1.3)x[1+0.01x50]+(0.3/1.3)x[1+0.1x50]=2.54

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 How is the hierarchy managed? °Registers Memory by compiler (programmer?) °cache memory by the hardware °memory disks by the hardware and operating system (virtual memory) by the programmer (files)

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Mail problem 0 of Lab 6 to TAs if you haven’t already! Will take off points from your lab if you don’t submit something! °Get moving on Lab 6! Get started now! This is a difficult lab Will be designing DRAM controller  next topic °Should be reading Chapter 7 of your book °Midterm 2 in 2 ½ weeks (Wednesday, November 28th) Pipelining -Hazards, branches, forwarding, CPI calculations -(may include something on dynamic scheduling) Memory Hierarchy -DRAM -Caches Possibly something on I/O (see where we get in lectures) Possibly something on power Administrative Issues

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Memory Hierarchy Technology °Random Access: “Random” is good: access time is the same for all locations DRAM: Dynamic Random Access Memory -High density, low power, cheap, slow -Dynamic: need to be “refreshed” regularly SRAM: Static Random Access Memory -Low density, high power, expensive, fast -Static: content will last “forever”(until lose power) °“Non-so-random” Access Technology: Access time varies from location to location and from time to time Examples: Disk, CDROM, DRAM page-mode access °Sequential Access Technology: access time linear in location (e.g.,Tape) °The next two lectures will concentrate on random access technology The Main Memory: DRAMs + Caches: SRAMs

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Main Memory Background °Performance of Main Memory: Latency: Cache Miss Penalty -Access Time: time between request and word arrives -Cycle Time: time between requests Bandwidth: I/O & Large Block Miss Penalty (L2) °Main Memory is DRAM : Dynamic Random Access Memory Dynamic since needs to be refreshed periodically (8 ms) Addresses divided into 2 halves (Memory as a 2D matrix): -RAS or Row Access Strobe -CAS or Column Access Strobe °Cache uses SRAM : Static Random Access Memory No refresh (6 transistors/bit vs. 1 transistor) Size: DRAM/SRAM ­ 4-8 Cost/Cycle time: SRAM/DRAM ­ 8-16

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Random Access Memory (RAM) Technology °Why do computer designers need to know about RAM technology? Processor performance is usually limited by memory bandwidth As IC densities increase, lots of memory will fit on processor chip -Tailor on-chip memory to specific needs -Instruction cache -Data cache -Write buffer °What makes RAM different from a bunch of flip-flops? Density: RAM is much denser

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Static RAM Cell 6-Transistor SRAM Cell bit word (row select) bit word °Write: 1. Drive bit lines (bit=1, bit=0) 2.. Select row °Read: 1. Precharge bit and bit to Vdd or Vdd/2 => make sure equal! 2.. Select row 3. Cell pulls one line low 4. Sense amp on column detects difference between bit and bit replaced with pullup to save area 10 01

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Typical SRAM Organization: 16-word x 4-bit SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell SRAM Cell -+ Sense Amp :::: Word 0 Word 1 Word 15 Dout 0Dout 1Dout 2Dout 3 -+ Wr Driver & Precharger -+ Wr Driver & Precharger -+ Wr Driver & Precharger -+ Wr Driver & Precharger Address Decoder WrEn Precharge Din 0Din 1Din 2Din 3 A0 A1 A2 A3 Q: Which is longer: word line or bit line?

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Write Enable is usually active low (WE_L) °Din and Dout are combined to save pins: A new control signal, output enable (OE_L) is needed WE_L is asserted (Low), OE_L is disasserted (High) -D serves as the data input pin WE_L is disasserted (High), OE_L is asserted (Low) -D is the data output pin Both WE_L and OE_L are asserted: -Result is unknown. Don’t do that!!! °Although could change VHDL to do what desire, must do the best with what you’ve got (vs. what you need) A DOE_L 2 N words x M bit SRAM N M WE_L Logic Diagram of a Typical SRAM

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Typical SRAM Timing Write Timing: D Read Timing: WE_L A Write Hold Time Write Setup Time A DOE_L 2 N words x M bit SRAM N M WE_L Data In Write Address OE_L High Z Read Address Junk Read Access Time Data Out Read Access Time Data Out Read Address

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Problems with SRAM °Six transistors use up a lot of area °Consider a “Zero” is stored in the cell: Transistor N1 will try to pull “bit” to 0 Transistor P2 will try to pull “bit bar” to 1 °But bit lines are precharged to high: Are P1 and P2 necessary? bit = 1bit = 0 Select = 1 OnOff On N1N2 P1P2 On

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °“Out-of-Core”, “In-Core,” “Core Dump”? °“Core memory”? °Non-volatile, magnetic °Lost to 4 Kbit DRAM (today using 64Mbit DRAM) °Access time 750 ns, cycle time ns Main Memory Deep Background

CS152 / Kubiatowicz Lec /9/01©UCB Fall Transistor Memory Cell (DRAM) °Write: 1. Drive bit line 2.. Select row °Read: 1. Precharge bit line to Vdd/2 2.. Select row 3. Cell and bit line share charges -Very small voltage changes on the bit line 4. Sense (fancy sense amp) -Can detect changes of ~1 million electrons 5. Write: restore the value °Refresh 1. Just do a dummy read to every cell. row select bit

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Classical DRAM Organization (square) rowdecoderrowdecoder row address Column Selector & I/O Circuits Column Address data RAM Cell Array word (row) select bit (data) lines °Row and Column Address together: Select 1 bit a time Each intersection represents a 1-T DRAM Cell

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 DRAM logical organization (4 Mbit) °Square root of bits per RAS/CAS Column Decoder SenseAmps & I/O MemoryArray (2,048 x 2,048) A0…A10 … 11 D Q Word Line Storage Cell

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Block Row Dec. 9 : 512 Row Block Row Dec. 9 : 512 ColumnAddress … Block Row Dec. 9 : 512 Block Row Dec. 9 : 512 … Block 0Block 3 … I/O D Q Address 2 8 I/Os DRAM physical organization (4 Mbit)

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 A D OE_L 256K x 8 DRAM 98 WE_L °Control Signals (RAS_L, CAS_L, WE_L, OE_L) are all active low °Din and Dout are combined (D): WE_L is asserted (Low), OE_L is disasserted (High) -D serves as the data input pin WE_L is disasserted (High), OE_L is asserted (Low) -D is the data output pin °Row and column addresses share the same pins (A) RAS_L goes low: Pins A are latched in as row address CAS_L goes low: Pins A are latched in as column address RAS/CAS edge-sensitive CAS_LRAS_L Logic Diagram of a Typical DRAM

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 A D OE_L 256K x 8 DRAM 98 WE_LCAS_LRAS_L OE_L ARow Address WE_L Junk Read Access Time Output Enable Delay CAS_L RAS_L Col AddressRow AddressJunkCol Address DHigh ZData Out DRAM Read Cycle Time Early Read Cycle: OE_L asserted before CAS_LLate Read Cycle: OE_L asserted after CAS_L °Every DRAM access begins at: The assertion of the RAS_L 2 ways to read: early or late v. CAS JunkData OutHigh Z DRAM Read Timing

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 A D OE_L 256K x 8 DRAM 98 WE_LCAS_LRAS_L WE_L ARow Address OE_L Junk WR Access Time CAS_L RAS_L Col AddressRow AddressJunkCol Address DJunk Data In Junk DRAM WR Cycle Time Early Wr Cycle: WE_L asserted before CAS_LLate Wr Cycle: WE_L asserted after CAS_L °Every DRAM access begins at: The assertion of the RAS_L 2 ways to write: early or late v. CAS DRAM Write Timing

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Key DRAM Timing Parameters °t RAC : minimum time from RAS line falling to the valid data output. Quoted as the speed of a DRAM A fast 4Mb DRAM t RAC = 60 ns °t RC : minimum time from the start of one row access to the start of the next. t RC = 110 ns for a 4Mbit DRAM with a t RAC of 60 ns °t CAC : minimum time from CAS line falling to valid data output. 15 ns for a 4Mbit DRAM with a t RAC of 60 ns °t PC : minimum time from the start of one column access to the start of the next. 35 ns for a 4Mbit DRAM with a t RAC of 60 ns

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 DRAM Performance °A 60 ns (t RAC ) DRAM can perform a row access only every 110 ns (t RC ) perform column access (t CAC ) in 15 ns, but time between column accesses is at least 35 ns (t PC ). -In practice, external address delays and turning around buses make it 40 to 50 ns °These times do not include the time to drive the addresses off the microprocessor nor the memory controller overhead. Drive parallel DRAMs, external memory controller, bus to turn around, SIMM module, pins… 180 ns to 250 ns latency from processor to memory is good for a “60 ns” (t RAC ) DRAM

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Something new: Structure of Tunneling Magnetic Junction °Tunneling Magnetic Junction RAM (TMJ-RAM) Speed of SRAM, density of DRAM, non-volatile (no refresh) “Spintronics”: combination quantum spin and electronics Same technology used in high-density disk-drives

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Simple: CPU, Cache, Bus, Memory same width (32 bits) °Interleaved: CPU, Cache, Bus 1 word: Memory N Modules (4 Modules); example is word interleaved °Wide: CPU/Mux 1 word; Mux/Cache, Bus, Memory N words (Alpha: 64 bits & 256 bits) Main Memory Performance

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °DRAM (Read/Write) Cycle Time >> DRAM (Read/Write) Access Time ­ 2:1; why? °DRAM (Read/Write) Cycle Time : How frequent can you initiate an access? Analogy: A little kid can only ask his father for money on Saturday °DRAM (Read/Write) Access Time: How quickly will you get what you want once you initiate an access? Analogy: As soon as he asks, his father will give him the money °DRAM Bandwidth Limitation analogy: What happens if he runs out of money on Wednesday? Time Access Time Cycle Time Main Memory Performance

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Access Pattern without Interleaving: Start Access for D1 CPUMemory Start Access for D2 D1 available Access Pattern with 4-way Interleaving: Access Bank 0 Access Bank 1 Access Bank 2 Access Bank 3 We can Access Bank 0 again CPU Memory Bank 1 Memory Bank 0 Memory Bank 3 Memory Bank 2 Increasing Bandwidth - Interleaving

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Timing model 1 to send address, 4 for access time, 10 cycle time, 1 to send data Cache Block is 4 words °Simple M.P. = 4 x (1+10+1) = 48 °Wide M.P. = = 12 °Interleaved M.P. = =15 address Bank address Bank address Bank address Bank Main Memory Performance

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °How many banks? number banks  number clocks to access word in bank For sequential accesses, otherwise will return to original bank before it has next word ready °Increasing DRAM => fewer chips => harder to have banks Growth bits/chip DRAM : 50%-60%/yr Nathan Myrvold M/S: mature software growth (33%/yr for NT) ­ growth MB/$ of DRAM (25%-30%/yr) Independent Memory Banks

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Fewer DRAMs/System over Time Minimum PC Memory Size DRAM Generation ‘86 ‘89 ‘92‘96‘99‘02 1 Mb 4 Mb 16 Mb 64 Mb 256 Mb1 Gb 4 MB 8 MB 16 MB 32 MB 64 MB 128 MB 256 MB Memory per System 25%-30% / year Memory per DRAM 60% / year (from Pete MacWilliams, Intel)

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Fast Page Mode Operation °Regular DRAM Organization: N rows x N column x M-bit Read & Write M-bit at a time Each M-bit access requires a RAS / CAS cycle °Fast Page Mode DRAM N x M “SRAM” to save a row °After a row is read into the register Only CAS is needed to access other M-bit blocks on that row RAS_L remains asserted while CAS_L is toggled N rows N cols DRAM Column Address M-bit Output M bits N x M “SRAM” Row Address ARow Address CAS_L RAS_L Col Address 1st M-bit Access Col Address 2nd M-bit3rd M-bit4th M-bit

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °t RAC : minimum time from RAS line falling to the valid data output. Quoted as the speed of a DRAM A fast 4Mb DRAM t RAC = 60 ns °t RC : minimum time from the start of one row access to the start of the next. t RC = 110 ns for a 4Mbit DRAM with a t RAC of 60 ns °t CAC : minimum time from CAS line falling to valid data output. 15 ns for a 4Mbit DRAM with a t RAC of 60 ns °t PC : minimum time from the start of one column access to the start of the next. 35 ns for a 4Mbit DRAM with a t RAC of 60 ns Key DRAM Timing Parameters

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 DRAMs over Time DRAM Generation ‘84 ‘87 ‘90‘93‘96‘99 1 Mb 4 Mb 16 Mb 64 Mb 256 Mb1 Gb (from Kazuhiro Sakashita, Mitsubishi) 1st Gen. Sample Memory Size Die Size (mm 2 ) Memory Area (mm 2 ) Memory Cell Area (µm 2 )

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °DRAMs: capacity +60%/yr, cost –30%/yr 2.5X cells/area, 1.5X die size in ­3 years °‘97 DRAM fab line costs $1B to $2B DRAM only: density, leakage v. speed °Rely on increasing no. of computers & memory per computer (60% market) SIMM or DIMM is replaceable unit => computers use any generation DRAM °Commodity, second source industry => high volume, low profit, conservative Little organization innovation in 20 years page mode, EDO, Synch DRAM °Order of importance: 1) Cost/bit 1a) Capacity RAMBUS: 10X BW, +30% cost => little impact DRAM History

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Standardspinout, package,binary compatibility, refresh rate, IEEE 754, I/O bus capacity,... SourcesMultipleSingle Figures1) capacity, 1a) $/bit1) SPEC speed of Merit2) BW, 3) latency2) cost Improve1) 60%, 1a) 25%,1) 60%, Rate/year2) 20%, 3) 7%2) little change DRAM v. Desktop Microprocessors Cultures

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Reduce cell size 2.5, increase die size 1.5 °Sell 10% of a single DRAM generation 6.25 billion DRAMs sold in 1996 °3 phases: engineering samples, first customer ship(FCS), mass production Fastest to FCS, mass production wins share °Die size, testing time, yield => profit Yield >> 60% (redundant rows/columns to repair flaws) DRAM Design Goals

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °DRAMs: capacity +60%/yr, cost –30%/yr 2.5X cells/area, 1.5X die size in ­3 years °‘97 DRAM fab line costs $1B to $2B DRAM only: density, leakage v. speed °Rely on increasing no. of computers & memory per computer (60% market) SIMM or DIMM is replaceable unit => computers use any generation DRAM °Commodity, second source industry => high volume, low profit, conservative Little organization innovation in 20 years page mode, EDO, Synch DRAM °Order of importance: 1) Cost/bit 1a) Capacity RAMBUS: 10X BW, +30% cost => little impact DRAM History

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Commodity, second source industry  high volume, low profit, conservative Little organization innovation (vs. processors) in 20 years: page mode, EDO, Synch DRAM °DRAM industry at a crossroads: Fewer DRAMs per computer over time -Growth bits/chip DRAM : 50%-60%/yr -Nathan Myrvold M/S: mature software growth (33%/yr for NT) ­ growth MB/$ of DRAM (25%-30%/yr) Starting to question buying larger DRAMs? Today’s Situation: DRAM

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 $16B $7B Intel: 30%/year since 1987; 1/3 income profit Today’s Situation: DRAM

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 °Two Different Types of Locality: Temporal Locality (Locality in Time): If an item is referenced, it will tend to be referenced again soon. Spatial Locality (Locality in Space): If an item is referenced, items whose addresses are close by tend to be referenced soon. °By taking advantage of the principle of locality: Present the user with as much memory as is available in the cheapest technology. Provide access at the speed offered by the fastest technology. °DRAM is slow but cheap and dense: Good choice for presenting the user with a BIG memory system °SRAM is fast but expensive and not very dense: Good choice for providing the user FAST access time. Summary:

CS152 / Kubiatowicz Lec /9/01©UCB Fall 2001 Processor % Area %Transistors (­cost)(­power) °Alpha %77% °StrongArm SA11061%94% °Pentium Pro64%88% 2 dies per package: Proc/I$/D$ + L2$ °Caches have no inherent value, only try to close performance gap Summary: Processor-Memory Performance Gap “Tax”