Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University Memory See: P&H Appendix C.8, C.9.

Slides:



Advertisements
Similar presentations
Chapter 5 Internal Memory
Advertisements

Prith Banerjee ECE C03 Advanced Digital Design Spring 1998
Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University See P&H Appendix B.7. B.8, B.10, B.11.
State & Finite State Machines Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H Appendix C.7. C.8, C.10, C.11.
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)
State and Finite State Machines
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Appendix B.7. B.8, B.10, B.11.
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Appendix B.7. B.8, B.10, B.11.
Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C.6.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University State & Finite State Machines See: P&H Appendix C.7. C.8, C.10, C.11.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Memory See: P&H Appendix C.8, C.9.
Hakim Weatherspoon CS 3410, Spring 2011 Computer Science Cornell University Memory See: P&H Appendix C.8, C.9.
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.
Chapter 10. Memory, CPLDs, and FPGAs
11/29/2004EE 42 fall 2004 lecture 371 Lecture #37: Memory Last lecture: –Transmission line equations –Reflections and termination –High frequency measurements.
Memory Interface Dr. Esam Al_Qaralleh CE Department
Overview Memory definitions Random Access Memory (RAM)
Chapter 3 Continued Logic Gates Logic Chips Combinational Logic Sequential Logic Flip Flops Registers Memory Timing State Machines.
Registers  Flip-flops are available in a variety of configurations. A simple one with two independent D flip-flops with clear and preset signals is illustrated.
Chapter 5 Internal Memory
State & Finite State Machines Hakim Weatherspoon CS 3410, Spring 2011 Computer Science Cornell University See P&H Appendix C.7. C.8, C.10, C.11.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
1 EE365 Read-only memories Static read/write memories Dynamic read/write memories.
CS1104-8Memory1 CS1104: Computer Organisation Lecture 8: Memory
MEMORY.
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See: P&H Chapter 2.4, 3.2, B.2, B.5, B.6.
Caches Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H 5.1, 5.2 (except writes)
EKT 221 Digital Electronics II
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Appendix B.8 (register files) and B.9.
ITEC 352 Lecture 24 Memory. Review Questions? Reminder: HW due on Wed. Night Intel 8080 CPU.
1 Random-Access Memory (RAM) Note: We’re skipping Sec 7.5 Today: First Hour: Static RAM –Section 7.6 of Katz’s Textbook –In-class Activity #1 Second Hour:
1 COMP541 Memories - I Montek Singh Feb 29, 2012.
EKT 221 : Digital 2 Memory Basics
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Chapter: , 1.6, Appendix B.
Memory Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University.
Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University Memory See: P&H Appendix C.8, C.9.
Memory and Storage Dr. Rebhi S. Baraka
CPEN Digital System Design
Memory Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University.
Digital Logic Design Instructor: Kasım Sinan YILDIRIM
Numbers and Arithmetic Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See: P&H Chapter , 3.2, C.5 – C.6.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University MIPS Pipeline See P&H Chapter 4.6.
Numbers and Arithmetic Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See: P&H Chapter , 3.2, C.5 – C.6.
Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University See P&H Appendix B.8 (register files) and B.9.
Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University See P&H Appendix B.7. B.8, B.10, B.11.
1 Memory Hierarchy (I). 2 Outline Random-Access Memory (RAM) Nonvolatile Memory Disk Storage Suggested Reading: 6.1.
Memory and Repetitive Arithmetic Machines Prof. Sirer CS 316 Cornell University.
Presentation on Digital Door Lock Digital System Design Presenter: Subash Chandra Pakhrin 072MSI616 MSC in Information and Comm. Engineering Pulchowk Campus.
Lecture 3. Lateches, Flip Flops, and Memory
COMP211 Computer Logic Design
Recap DRAM Read Cycle DRAM Write Cycle FAST Page Access Mode
State & Finite State Machines
Morgan Kaufmann Publishers
Computer Architecture & Operations I
Prof. Hakim Weatherspoon
Hakim Weatherspoon CS 3410 Computer Science Cornell University
Prof. Kavita Bala and Prof. Hakim Weatherspoon
Hakim Weatherspoon CS 3410 Computer Science Cornell University
William Stallings Computer Organization and Architecture 7th Edition
Digital Logic & Design Dr. Waseem Ikram Lecture 40.
MICROPROCESSOR MEMORY ORGANIZATION
Sequential Logic.
Memory and Repetitive Arithmetic Machines
Prof. Hakim Weatherspoon
Hakim Weatherspoon CS 3410 Computer Science Cornell University
MIPS Pipeline Hakim Weatherspoon CS 3410, Spring 2013 Computer Science
Presentation transcript:

Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University Memory See: P&H Appendix C.8, C.9

2 Big Picture: Building a Processor PC imm memory d in d out addr target offset cmp control =? new pc register file inst extend +4 A Single cycle processor alu

3 Goals for today Review Finite State Machines Memory Register Files Tri-state devices SRAM (Static RAM—random access memory) DRAM (Dynamic RAM)

4 Example: Digital Door Lock Digital Door Lock Inputs: keycodes from keypad clock Outputs: “unlock” signal display how many keys pressed so far

5 Door Lock: Inputs Assumptions: signals are synchronized to clock Password is B-A-B K A B KABMeaning 000Ø (no key) 110‘A’ pressed 101‘B’ pressed

6 Door Lock: Outputs Assumptions: High pulse on U unlocks door U D3D2D1D0D3D2D1D0 4 LED dec 8

7 Door Lock: Simplified State Diagram Idle G1 ”0” Ø G2 G3 B1B2 ”1””2” ”3”, U ”1””2” ØØ ØØ “B” “A”“B” else any else B3 ”3” else

8 Door Lock: Simplified State Diagram Idle G1 ”0” Ø G2 G3 B1B2 ”1””2” ”3”, U ”1””2” ØØ ØØ “B” “A”“B” else any else

9 Door Lock: Simplified State Diagram Idle G1 ”0” Ø G2 G3 B1B2 ”1””2” ”3”, U ”1””2” ØØ ØØ “B” “A”“B” else any else Cur. State Output Cur. State Output Idle“0” G1“1” G2“2” G3“3”, U B1“1” B2“2”

10 Door Lock: Simplified State Diagram Idle G1 ”0” Ø G2 G3 B1B2 ”1””2” ”3”, U ”1””2” ØØ ØØ “B” “A”“B” else any else Cur. StateInputNext State Cur. StateInputNext State IdleØ “B”G1 Idle“A”B1 G1Ø “A”G2 G1“B”B2 G2ØB2 G2“B”G3 G2“A”Idle G3anyIdle B1Ø KB2 Ø KIdle

11 Cur. StateInputNext State IdleØ “B”G1 Idle“A”B1 G1Ø “A”G2 G1“B”B2 G2ØB2 G2“B”G3 G2“A”Idle G3anyIdle B1Ø KB2 Ø KIdle State Table Encoding Cur. StateOutput Idle“0” G1“1” G2“2” G3“3”, U B1“1” B2“2” U D3D2D1D0D3D2D1D0 4 dec 8 D3D3 D2D2 D1D1 D0D0 U R P Q KABMeaning 000Ø (no key) 110‘A’ pressed 101‘B’ pressed KAB xxx 000 1xx 000 1xx S2S2 S1S1 S0S StateS2S2 S1S1 S0S0 Idle000 G1001 G2010 G3011 B1100 B2101 S2S2 S1S1 S0S0 S’ 2 S’ 1 S’

12 Door Lock: Implementation 4 dec 3bit Reg clk U D 3-0 S 2-0 S’ 2-0 S 2-0 A B C Strategy: (1) Draw a state diagram (e.g. Moore Machine) (2) Write output and next-state tables (3) Encode states, inputs, and outputs as bits (4) Determine logic equations for next state and outputs

13 Administrivia Make sure partner in same Lab Section this week Lab2 is out Due in one week, next Monday, start early Work alone But, use your resources Lab Section, Piazza.com, Office Hours, Homework Help Session, Class notes, book, Sections, CSUGLab No Homework this week

14 Administrivia Check online syllabus/schedule Slides and Reading for lectures Office Hours Homework and Programming Assignments Prelims (in evenings): Tuesday, February 28 th Thursday, March 29 th Thursday, April 26 th Schedule is subject to change

15 Collaboration, Late, Re-grading Policies “Black Board” Collaboration Policy Can discuss approach together on a “black board” Leave and write up solution independently Do not copy solutions Late Policy Each person has a total of four “slip days” Max of two slip days for any individual assignment Slip days deducted first for any late assignment, cannot selectively apply slip days For projects, slip days are deducted from all partners 20% deducted per day late after slip days are exhausted Regrade policy Submit written request to lead TA, and lead TA will pick a different grader Submit another written request, lead TA will regrade directly Submit yet another written request for professor to regrade.

16 Goals for today Review Finite State Machines Memory Register Files Tri-state devices SRAM (Static RAM—random access memory) DRAM (Dynamic RAM)

17 Register File N read/write registers Indexed by register number Implementation: D flip flops to store bits Decoder for each write port Mux for each read port Dual-Read-Port Single-Write-Port 32 x 32 Register File QAQA QBQB DWDW RWRW RARA RBRB W

18 Register File N read/write registers Indexed by register number Implementation: D flip flops to store bits Decoder for each write port Mux for each read port Dual-Read-Port Single-Write-Port 32 x 32 Register File QAQA QBQB DWDW RWRW RARA RBRB W

19 Register File N read/write registers Indexed by register number Implementation: D flip flops to store bits Decoder for each write port Mux for each read port Dual-Read-Port Single-Write-Port 32 x 32 Register File QAQA QBQB DWDW RWRW RARA RBRB W

20 Tradeoffs Register File tradeoffs +Very fast (a few gate delays for both read and write) +Adding extra ports is straightforward – Doesn’t scale

21 Building Large Memories Need a shared bus (or shared bit line) Many FFs/outputs/etc. connected to single wire Only one output drives the bus at a time

22 Tri-State Devices D Q E E Vdd Gnd EDQ 00 z 01 z DQ D Tri-State Buffers

23 Tri-State Devices D Q E E Vdd Gnd EDQ 00 z 01 z DQ D Tri-State Buffers

24 Shared Bus S0S0 D0D0 shared line S1S1 D1D1 S2S2 D2D2 S3S3 D3D3 S 1023 D 1023

25 SRAM Static RAM (SRAM) Essentially just SR Latches + tri-states buffers

26 SRAM Chip

27 SRAM Chip row decoder A column selector, sense amp, and I/O circuits A 9-0 CS R/W Shared Data Bus

28 SRAM Cell Typical SRAM Cell BB word line bit line Each cell stores one bit, and requires 4 – 8 transistors (6 is typical) Read: pre-charge B and B to Vdd/2 pull word line high cell pulls B or B low, sense amp detects voltage difference Write: pull word line high drive B and B to flip cell

29 SRAM Modules and Arrays A 21-0 Bank 2 Bank 3 Bank 4 1M x 4 SRAM R/W msb lsb CS

30 SRAM A few transistors (~6) per cell Used for working memory (caches) But for even higher density… SRAM Summary

31 Dynamic RAM: DRAM Dynamic-RAM (DRAM) Data values require constant refresh Gnd word line bit line Capacitor

32 Single transistor vs. many gates Denser, cheaper ($30/1GB vs. $30/2MB) But more complicated, and has analog sensing Also needs refresh Read and write back… …every few milliseconds Organized in 2D grid, so can do rows at a time Chip can do refresh internally Hence… slower and energy inefficient DRAM vs. SRAM

33 Memory Register File tradeoffs +Very fast (a few gate delays for both read and write) +Adding extra ports is straightforward – Expensive, doesn’t scale – Volatile Volatile Memory alternatives: SRAM, DRAM, … – Slower +Cheaper, and scales well – Volatile Non-Volatile Memory (NV-RAM): Flash, EEPROM, … +Scales well – Limited lifetime; degrades after to 1M writes

34 Summary We now have enough building blocks to build machines that can perform non-trivial computational tasks Register File: Tens of words of working memory SRAM: Millions of words of working memory DRAM: Billions of words of working memory NVRAM: long term storage (usb fob, solid state disks, BIOS, …) Next time we will build a simple processor!