Chapter 12 - Memory Devices Digital information is easily stored Commonly used memory devices and systems will be examined Flip flops Registers VLSI and LSI memory devices The difference between main memory and auxiliary memory A computer main memory is called the working memory, it is in constant communications with the CPU (Central Processing Unit). Auxiliary memory (mass storage) have the capacity to store massive amounts of data without the need for power. 261 12 1 Memory Terminology Memory cell A device or electrical circuit used to store a single bit (0 or 1) Ex. FF. Memory word A group of bits (cells) in a memory that represents instruction or data of some type, usually range from 8 to 64 bits depending on the size of the computer. Byte Capacity Represents how many bits can be stored in a particular memory device, usually represented as: number of words X word size Example: a memory of size 4096X20 has 4096 words (usually a multiple of 1024 1K), each is 20-bit size, can be represented as 4 K X 20. 262 1
12-1 Memory Terminology Example: A memory chip is specified as 2 K X 8. How many words can be stored on this chip? what is the word size? How many total bits can this chip store? 2 K = 2 X 1024 = 2048 words Word Size: 8-bit Total bits = 2048 X 8 = 16384 bits Density Another term of capacity. 263 12-1 Memory Terminology Address A number that identifies the location of a word in a memory, each word has a unique address. Example: the simple memory has 8 words, the address is represented as 3-bit ranging from 000 to 111. 264 2
12-1 Memory Terminology Read operation The operation where the binary word stored in a specific address is read and transferred to other device. Example: to read word 4, we must perform read operation on address 100, also called fetch operation. Write operation The operation where a new word is placed into a specific memory location, also called store operation, the new data will replace (overwrite) previous stored data. 265 12-2 General Memory Operation Every memory system requires I/O lines to provide the following functions Select memory address being accessed for R or W operation Select either a R or W operation Supply input data to be stored during a W Hold output data from memory during a R Enable or disable memory so that it will or will not respond to read/write commands 32X4 memory stores 32 words of 4-bit each, I 3..I 0 represents data inputs, O 3..O 0 represents data outputs. 266 3
12-2 General Memory Operation Address inputs 5 address lines (00000.. 11111) A 0..A 4 In general, N Address lines are required for a memory with 2 N words. Can be viewed as 32 4-bit register R/W input Controls whether a read or a write operation is to take place Read occurs R/W=1, write occurs when R/W=0 Memory enable Sometimes called chip enable (CE) or chip select (CS), active high, enables memory to responds to read and write operation if ME=1, if ME=0, memory will not respond to the address and R/W inputs. 267 General Memory Operation Read and Write operation 268 4
General Memory Operation Examples Example 1: Describe the conditions at each input and output when the contents of address location 00100 are to be read? Address inputs: 00100 Data inputs: xxxx (not used) R/W = HIGH ME = HIGH Data outputs: 0001 Example 2: Describe the conditions at each input and output when the data word 1110 is to be written into address location 01101? Address inputs: 01101 Data inputs: 1110 R/W= LOW ME= HIGH Data outputs: xxxx (not used) 269 12-3 CPU Memory Connections Main memory is interfaced to the CPU through three groups of signal lines/bus: address bus data bus control bus When a computer is executing a program of instructions, the CPU continually fetches (reads) information from those locations in memory that contains the program code as well as the data to be operated on. The CPU will store (write) data into memory locations as instructed by program instructions. 270 5
12 3 CPU Memory Connections System bus functions: Address bus unidirectional, carries address outputs from CPU to memory Data bus bi-directional, carries data between CPU and memory ICs Control bus carries controls signals (such as R/W) from CPU to memory 271 12-3 CPU CPU Memory Connections Read/Write Operations Write operation process: CPU places the memory location address on the address bus CPU places data to be stored on the data bus CPU activates the control signal for the W operation Memory ICs determine location for memory storage by decoding the binary address Data on the data bus is transferred to selected memory location Read operation process: CPU places address of memory location for data retrieval on the address bus CPU activates the control signal lines for the R operation Memory ICs determine location of data being retrieved Memory IC places data from the memory location onto the data bus from which they are transferred to the CPU 272 6