Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Memory Basics.

Similar presentations


Presentation on theme: "Chapter 3 Memory Basics."— Presentation transcript:

1 Chapter 3 Memory Basics

2 Memory ??? A major component of a digital computer and many digital systems. Stores binary data, either permanently or temporarily. Consists of arrays of elements: latches, capacitors or MOS transistors.

3 Overview Memory definitions Random Access Memory (RAM)
Static RAM (SRAM) integrated circuits Cells and slices Cell arrays and coincident selection Arrays of SRAM integrated circuits Dynamic RAM (DRAM) integrated circuits DRAM Types Synchronous (SDRAM) Double-Data Rate (DDR SRAM) RAMBUS DRAM (RDRAM) Arrays of DRAM integrated circuits

4 Memory Definitions Collection of cells capable of storing binary information. Contains electronic circuits for storing & retrieving information. Used to provide temporary or permanent storage capability. Semiconductor memories consists of arrays of elements that are generally latches, capacitors or MOS transistors.

5 A 64-cell memory array organized in 3 different ways
Thomas L. Floyd Digital Fundamentals, 8e Copyright ©2003 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

6 Memory Address and Capacity
Each memory location needs an address. If the memory is addressed to a cell, then one bit is addressed. But, if the memory is addressed to the Byte or Word than that is the smallest amount of data that can be addressed.

7 Examples of memory address
Bit/Cell Addressing Byte/Word/ Row Addressing Thomas L. Floyd Digital Fundamentals, 8e Copyright ©2003 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

8 Example of memory address in 3-D array

9 Memory Units Bit : a single binary digit.
Nibble : a group of 4 bits accessed together. Byte : a group of 8 bits accessed together. Word : a group of binary bits whose size is a typical unit of access for the memory. (e.g., 1 byte, 2 bytes, 4 bytes, 8 bytes, etc.)

10 Memory data elements Memory Data Memory Operations
A bit or a group of bits to be stored into or accessed from memory cells. Memory Operations Operations on memory data supported by the memory unit. Typically, read and write operations over some data element (bit, byte, word, etc.).

11 Basic Memory Operations
Write operation Puts data into a specified address in memory. Read Operation Takes data out of a specified address in memory.

12 Block Diagram of a Memory Unit
Bidirectional

13 3-D Memory Array Note the separate Row and Column address decoders…

14 The ‘Write’ operation

15 The ‘Read’ operation

16 Types of Memories Random Access Memory (RAM) Read Only Memory (ROM)
Write operation – stores new info. Read operation – transfer the stored info out of memory. Read Only Memory (ROM) Performs the Read operation only ?

17 Memory Basic Process Info/content from memory is sent to h/w (usually consists of registers & combinational logic) to be processed. The processed info is then returned to the same or different memory address. Input and Output devices may also interact with memory. Printers Mouse Keyboard Monitor Digital Camera Scanners Plotters Thumb Drive External Memory I/O Memory Hardware for processing

18 Calculator Exercise 2 8 2 12 2 16 2 24 2 32 256 4,096 65,536 16,777,216 4,294,967,296

19 Memory Organization Organized as an indexed array of words. Value of the index for each word is the memory address. Often organized to fit the needs of a particular computer architecture. Some historically significant computer architectures and their associated memory organization: Digital Equipment Corporation PDP-8 (DEC Alpha) used a 12-bit address to address bit words. IBM 360 used a 24-bit address to address 16,777, bit words, or 4,194, bit words. Intel 8080 (8-bit predecessor to the 8086 and the current Intel processors) used a 16-bit address to address 65,536 8-bit (bytes).

20 Address bus width vs No. of Memory words
Address bus width No. of memory words 12 bits 4,096 bits 16 bits 65,536 bits 24 bits 16,777,216

21 Memory Block Diagram A basic memory system is shown here:
k address lines are decoded to address 2k words of memory. Each word is n bits. Read and Write are single control lines defining the simplest of memory operations. (Refer to next slide for example)

22 Memory Organization Example of memory contents above:
No. of data bits = 8; n = 8 No. of address bits = 3; k = 3 Therefore the number of address lines = m = (2k); 23 = 8 Address range: 0 to 2k -1; therefore 0 to 23 – 1, Add. Range: 0 to 7 1 word is the size of the memory content; so the memory above has 8 words of 8-bit data

23 The ‘Write’ operation m = 2k = 8 k = 3 n = 8 No. of add. Rows
No. of columns = No. of Data bits n = No. of Data input & ouput lines k = 3 n = 8 No. of add. Rows (locations) m = 2k = 8 n-bits per word

24 Memory Size No. of words x Data width No. of bits per word
No. of address lines

25 Memory Size Units K (Kilo) = 210 M (Mega) = 220 G (Giga) = 230
Examples : 64K = 216 = (26 * 210) 2M = = (21 * 220) 4G = = (22 * 230)

26 Memory Organization Example
Address bits = k = 10. Address lines = (2k) 210 = 1024 or 1K, labeled 0 to 1023. Data bits =16; n = 16. Memory content = 16-bit. Memory Capacity is 1K words of 16-bits each, or “1K x 16-bits”.

27 Memory Operations Memory operations require the following:
Data Address An operation ─ Typical operations are READ and WRITE. (RAM) Read Memory ─ an operation that reads a data value stored in memory: (takes from memory) Place a valid address on the address lines Activate the Read input. Note : the content of the selected word are not changed by reading them Write Memory ─ an operation that writes a data value to memory: Apply data on the data lines Activate the Write input Other than Read/Write (R/W) Chip Select is used to enable a particular RAM. It is sometimes called Memory Enable.

28 Memory Enable

29 Exercise Questions 1. How many address lines and data lines are needed for each of the following memories? 16K x 8 256K x 16 64M x 32 2G x 8

30 … Exercise Questions 2. Sketch the memory organisation for each of the following memories. 16K x 8 256K x 16 64M x 32 2G x 8

31 … Exercise Questions 3. Give the no. of bytes stored in each of the following memories. 16K x 8 256K x 16 64M x 32 2G x 8

32 ROM Read Only Memory

33 The ROM family Thomas L. Floyd Digital Fundamentals, 9e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

34 ROM cells Thomas L. Floyd Digital Fundamentals, 9e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

35 A representation of a 16 x 8-bit ROM array
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

36 MOS PROM array with fusible links
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

37 Ultraviolet erasable PROM (EPROM) package
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

38 The storage cell in a flash memory
Uses “Foating Gate” MOS transistor Example Application: MEMORY STICKs Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

39 RAM Random Access Memory

40 RAM Integrated Circuit
Types of random access memory (RAM) Static – information stored in latches Dynamic – information stored as electrical charges on capacitors Charge “leaks” off Periodic refresh of charge required Dependence on Power Supply Volatile – loses stored information when power turned off (example : FPGA – Flex10K) Non-volatile – retains information when power turned off (example : CPLD – MAX)

41

42 SRAM ICs SRAM = Static RAM

43 Static RAM  Cell Array of storage cells used to implement static RAM
SR Latch Select input for control Dual Rail Data Inputs B and B Dual Rail Data Outputs C and C Select B C S Q C R Q B RAM cell

44 Static RAM  Bit Slice Represents all circuitry that is required for 2n 1-bit words Multiple RAM cells Control Lines: Word select i – one for each word Bit Select Data Lines: Data in Data out Word Select select B C S Q X C Word B R Q X select RAM cell RAM cell Word select 1 RAM cell Word Select select 2 n  1 S Q X Word select 2 n  1 X RAM cell R Q RAM cell Read/Write logic Data in S Q Data out Data in Read/ Bit Write select R Q (b) Symbol Write logic Read logic Data out Read/ Bit Write select (a) Logic diagram

45 2n-Word  1-Bit RAM IC To build a RAM IC from a RAM slice, we need: Decoder  decodes the n address lines to 2n word select lines A 3-state buffer  on the data output permits RAM ICs to be combined into a RAM with c  2n words 4-to-16 Word select Decoder A A 2 3 3 3 1 2 RAM cell A 2 A 2 2 2 3 4 A 1 A 1 2 1 5 6 RAM cel l A A 2 7 16 x 1 8 RAM 9 10 Data Data 11 input output 12 13 14 Read/ 15 Write Memory RAM cell enable (a) Symbol Read/Write logic Data input Data in Data Data out output Read/ Bit Write select Read/Write Chip select (b) Block diagram

46 RAM : Cell Arrays and Coincident Selection
Memory arrays can be very large => Large decoders Large fanouts for the bit lines However, the decoder size and fanouts (outputs) can be reduced by using a coincident selection in a 2-dimensional array: Uses two decoders, one for words and one for bits Word select becomes Row select Bit select becomes Column select

47 Coincident… ??

48 Previous 16 x 1 RAM

49 A3 and A2 used for Row select
Coincident Selection Approach 16 X 1 RAM Chip 16 = 24 = 4 bit add.[A3..A0] The column decoder is enabled with the CS input When CS =0, column decoder is disabled and all o/p are 0 and NONE of the cells are selected A3 and A2 used for Row select A1 and A0 for Column select Figure : 9.7 Morris Mano, pg 410

50 Coincident Selection Approach
If Address is 1001: A3, A2 = 10, row decoder line 2 active Activating RAM 8,9,10 & 11 A1, A0 = 01, column decoder line 1 active Activating RAM 1,5,9,13 The intersect RAM is RAM 9 is activated. Other RAM cells not selected are disabled. Then it depends on the operation functions (Read or Write) Read : Data out thru OR gate and tri-state buffer Write : Data available on the Data input line is transferred into the selected RAM cell. Figure : 9.7 Morris Mano, pg 410

51 Constructing RAM Previously : Block Diagram of a 16 X 1 RAM using 4 X 4 RAM Cell Array. How to create 8 X 2 RAM using 4 X 4 RAM Cell Array? Number of Address bits = 8 = 23 = 3-bits Number of Data bits = 2-bits

52 3-bits addressing 2-bits at Row Decoder 1-bit at Column Decoder Since 2 bits at a time are to be written or read: 2 input lines Data input 0 Data input 1 2 output lines Data output 0 Data output 1 Example: If Address is = 011 Row Decoder = line 1 RAM = 4,5,6 & 7 Column Decoder = line 1 RAM = 2,6,10,14 and 3,7,11,15 Therefore : Cell 6 & 7 are activated Figure 9.8 : Morris Mano, pg 411

53 Constructing RAM … How about 32K X 8 bit? Address bit = 32 x 210
= 25 x 210= 15-bits Data bit = 8-bit Without Coincident selection a single decoder would have 15 inputs and 32,768 outputs. (32 x 1K = 32 x 1024) And 32,800 no of gates.

54 … Constructing RAM With Coincident selection:
Make row and column equal Total RAM = 32K x 8 = 256K = Take Sq Root of = 512 512 = 29 , meaning 9-bits is fed to the ROW Decoder. Remaining 6-bits is fed to the COLUMN Decoder. Row Decoder = 9 to 512 line decoder Column Decoder = 6 to 64 line decoder No of gates = 608

55 - Making Larger or Wider Memories from Smaller Ones…
Array of SRAM ICs … ? - Making Larger or Wider Memories from Smaller Ones…

56 ARRAY of SRAM ICs If an application is larger than the capacity of one chip, then There is a need to combine a number of chips in an array to form a required size of memory. Depends on 2 parameters No of words No of bits per word Number of words = address line 1-bit added to address bit would double the no of words Number of bit = data input & output 1-bit added to the word size, 1 data input & output must be added

57 Bigger.. hOW ? To make larger memories (more address locations)
Number of words  = address line  1-bit added to address bit would double the no of words. To make wider memories (bigger memory data size) Number of bit  = data input & output lines 1-bit added to the word size, 1 data input & output must be added.

58 Making Larger Memories
Using the CS lines, we can make larger memories from smaller ones by tying all address, data, and R/W lines in parallel, and using the decoded higher order address bits to control CS. Using the 4-Word by 1-Bit memory from before, we construct a 16-Word by 1-Bit memory.  

59 Lets say u have this memory Chip.
How to construct a 256K X 8 RAM using this 64K X 8 RAM Chip? No of words is the same No of address is not the same (64K  256K) 64K = 26 x 210 = 16-bit address bit 256 = 28 x 210 = 18-bit address bit An additional 2 bit is needed for the address bit

60 Constructing 256K X 8 RAM using 64K x 8 RAM Chip
2 additional address bit is applied to a 2 x 4 decoder and represent the MSB of the address bit. How many 64K x 8 RAM chip to add? Additional 2 bit = 22 = 4 of 64 x 8 RAM Use Memory Enable to activate the decoder.

61 Constructing 256K X 8 RAM using 64K x 8 RAM Chip
When bit 17 and 16 = 00 The first 64 x 8 RAM is activated Address : 0 – 65,535 When bit 17 and 16 = 01 The 2nd 64 x 8 RAM is activated Address : 65,536 – 131,071 When bit 17 and 16 = 10 The 3rd 64 x 8 RAM is activated Address : 131,071 – 196,607 When bit 17 and 16 = 11 The 4th 64 x 8 RAM is activated Address : 196,608 – 262,143 Figure 9.10: Morris Mano, pg 413

62 What if we are to expand the word size?
Example : 64K X 16 using 64K X 8 chip No of chip to be use refers to the word size. In this case, 16-bit is to be constructed from 8-bit words Therefore 2 of 64K X 8 Chip is to be used Connections: Address line is input to both chips CS is common to both chips R/W control input is also common to both chips INPUT & OUTPUT DATA LINE is SPLIT

63 Making Wider Memories To construct wider memories from narrow ones, we tie the address and control lines in parallel and keep the data lines separate. For example, to make a 4-word by 4-bit memory from 4, 4-word by 1-bit memories   Note: Both 16x1 and 4x4 memories take 4-chips and hold 16 bits of data.

64 Constructing a 64K X 16 using 64K X 8 chip
Din [15..8] Din [7..0] Dout [15..8] Dout [7..0]

65 Exercise Construct a 1024 k x 16 SRAM memory using 64 k x 8 memory chips.

66 Dynamic RAM (DRAM)

67 Dynamic RAM (DRAM) Basic Principle: Storage of information on capacitors. Charge and discharge of capacitor to change stored value Use of transistor as “switch” to: Store charge Charge or discharge See next slide for circuit, hydraulic analogy, and logical model.

68 DRAM ICs Provide high storage capacity at low cost, it dominates the high-capacity memory applications, e.g : Primary RAM in computers DRAM in many ways similar to SRAM except it must be periodically “refreshed”

69 DRAM Cell It consist of Capacitor C and Transistor T. Transistor T
Capacitor store electric charge Sufficient charge = logic 1 Insufficient charge = logic 0 Transistor T Act as a switch Switch open = the charge on capacitor remains fixed (stored) Switch closed = charge flow in and out, this allows the cell to be READ or WRITE

70 Dynamic RAM (continued)
Select Stored 1 Stored 0 To Pump T B C DRAM cell (a) (b) (c) Write 1 Write 0 Select (d) (e) B D Q C Read 1 Read 0 Warning: (d), (e), (f), and (g) are animated. Each animation is triggered with a mouse click and goes through two steps at 1 second intervals. C DRAM cell model (h) (f) (g)

71 Dynamic RAM - Bit Slice C is driven by 3-state drivers
Sense amplifier is used to change the small voltage change on C into H or L In the electronics, B, C, and the sense amplifier output are connected to make destructive read into non-destructive read Word Select select B C D Q C DRAM cell Word model select DRAM cell Word select 1 Word Select DRAM cell select 2 n 2 1 D Q Word select 2 n 2 1 C DRAM cell DRAM cell model Read/Write logic Data in Sense amplifier Data out Data in Read/ Bit Write select (b) Symbol Write logic Read logic Data out Bit Read/ Write select (a) Logic diagram

72 Hydraulic Analogy for DRAM Cell
(b) Small tank full = storing logic 1 (c) Small tank empty = storing logic 0 In this state the valve is closed

73 Hydraulic Analogy for DRAM Cell
(d) To write a logic 1: Pump will fill up big tank Valve open Water flows from big tank to small tank Once small tank is full, the valve is closed (e) To write a logic 0: Pump will empty big tank Valve open Water flows from small tank to big tank Once small tank is emptied (almost emptied), the valve is closed

74 Hydraulic Analogy for DRAM Cell
Note : Once the water level in storage increase or decrease in the READ operation, the level left in storage will not showing the actual value of the storage anymore. This is called Destructive Read To store the original value, we must perform a restore operation to the storage (to return the small tank to its original level)

75 Hydraulic Analogy for DRAM Cell
(f) Reading 1 from storage (small tank) Large tank at known intermediate level Valve opened IF Water flow from small tank to large tank Water increase slightly in large tank This slight increase depict READ value of logic 1 from storage (g) Reading 0 from storage (small tank) Large tank at known intermediate level Valve opened IF Water flow from large tank to small tank Water decrease slightly in large tank This slight decrease depict READ value of logic 0 from storage

76 Logic Model of DRAM Dynamic RAM cell circuit Logic Model of DRAM
In actual, there is another consideration for dynamic RAM. The analogous leakage (due to the use of capacitors) Due to this leaks, a full storage tank will eventually drain to a point which an increase in the level of the large tank on a READ operation cannot be observed. To compensate, a refresh is needed.

77 DRAM : Block Diagram

78 DRAM : Block Diagram The addressing is applied serially in two parts:
Row address Column address In order to hold the row address throughout the READ or WRITE operation, it is stored in a register. Signal that control the loading of the registers are: RAS : Row Address Strobe CASS : Column Address Strobe R/W : Read / Write OE : Output Enable Note : the LOW signals activate Read, Write and Output enable. This is because when Write operation is activated, there should not be any Data output.

79 DRAM : Block Diagram The refresh counter and refresh controller is used to control the refresh rate for the DRAM. Typical refresh rate is between 16 to 64 milliseconds 2 types of refresh: Distributed refresh (more commonly used) Burst refresh

80 DRAM Types FPM DRAM (Fast Page Mode DRAM)
EDO DRAM (Extended Data Output DRAM) SDRAM (Synchronous DRAM) DDR SDRAM (Double Data Rate SDRAM) RDRAM (Rambus® DRAM) ECC (Error Correcting Code)

81 DRAM Types Types to be discussed
Synchronous DRAM (SDRAM) Double Data Rate SDRAM (DDR SDRAM) RAMBUS® DRAM (RDRAM) Justification for effectiveness of these types DRAM often used as a part of a memory hierarchy (See details in chapter 14) Reads from DRAM bring data into lower levels of the hierarchy Transfers from DRAM involve multiple consecutively addressed words Many words are internally read within the DRAM ICs using a single row address and captured within the memory This read involves a fairly long delay

82 DRAM Types (continued)
Justification for effectiveness of these types (continued) These words are then transferred out over the memory data bus using a series of clocked transfers These transfers have a low delay, so several can be done in a short time The column address is captured and used by a synchronous counter within the DRAM to provide consecutive column addresses for the transfers burst read – the resulting multiple word read from consecutive addresses

83 Synchronous DRAM Transfers to and from the DRAM are synchronize with a clock Synchronous registers appear on: Address input Data input Data output Column address counter for addressing internal data to be transferred on each clock cycle beginning with the column address counts up to column address + burst size – 1 Example: Memory data path width: 1 word = 4 bytes Burst size: 8 words = 32 bytes Memory clock frequency: 5 ns Latency time (from application of row address until first word available): 4 clock cycles Read cycle time: (4 + 8) x 5 ns = 60 ns Memory Bandwidth: 32/(60 x 10-9) = 533 Mbytes/sec

84 Double Data Rate Synchronous DRAM
Transfers data on both edges of the clock Provides a transfer rate of 2 data words per clock cycle Example: Same as for synchronous DRAM Read cycle time = 60 ns Memory Bandwidth: (2 x 32)/(60 x 10-9) = Mbytes/sec

85 RAMBUS DRAM (RDRAM) Uses a packet-based bus for interaction between the RDRAM ICs and the memory bus to the processor The bus consists of: A 3-bit row address bus A 5-bit column address bus A 16 or 18-bit (for error correction) data bus The bus is synchronous and transfers on both edges of the clock Packets are 4-clock cycles long giving 8 transfers per packet representing: A 12-bit row address packet A 20-bit column address packet A 128 or 144-bit data packet Multiple memory banks are used to permit concurrent memory accesses with different row addresses The electronic design is sophisticated permitting very fast clock speeds

86 Arrays of DRAM Integrated Circuits
Similar to arrays of SRAM ICs, but there are differences typically handled by an IC called a DRAM controller: Separation of the address into row address and column address and timing their application Providing RAS and CAS and timing their application Performing refresh operations at required intervals Providing status signals to the rest of the system (e.g., indicating whether or not the memory is active or is busy performing refresh)

87 Table 9.2 : Morris Mano, pg 422

88 Assigment Folder Questions
Chapter 9 1, 2, 3, 4, 5, 9, 10, 12

89 THANK YOU


Download ppt "Chapter 3 Memory Basics."

Similar presentations


Ads by Google