cps3340 computer architecture fall semester, 2013 10/3/2013 lecture 9: memory unit instructor:...
TRANSCRIPT
![Page 1: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/1.jpg)
CPS3340 COMPUTER
ARCHITECTURE Fall Semester, 2013
CPS3340 COMPUTER
ARCHITECTURE Fall Semester, 2013
10/3/2013
Lecture 9: Memory UnitInstructor: Ashraf Yaseen
DEPARTMENT OF MATH & COMPUTER SCIENCECENTRAL STATE UNIVERSITY, WILBERFORCE, OH
1
![Page 2: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/2.jpg)
Review
Last Class Computer Clock Latch and Flip Flops
This Class Register and Register Files Memory
Next Class Quiz MIPS Instructions
![Page 3: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/3.jpg)
Register Files
A register file consists of a set of registers that can be read and written by supplying a register number Built from an array of D Flip-Flops A decoder is used to select a register in the
register file
![Page 4: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/4.jpg)
Reading Registers
Multiplexor Select data
from the specific register
![Page 5: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/5.jpg)
Writing to a register
Write Signal Specify a write
operation to the register
Decoder Specify which
register to write Register Data
Data to write to the register
![Page 6: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/6.jpg)
Register Files
Register Files Can be used to build small memory Too costly to build large amount of memory
Large Scale Memory Static random access memories (SRAM) Dynamic random access memories (DRAM)
![Page 7: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/7.jpg)
SRAMs
SRAM Integrated circuits of memory arrays A single access port
Either read or write Fixed access time to any datum
Height Number of addressable locations
Width Number of output bits per unit
Example: 8Mx8 SRAM 8M = 223, 23 address lines 8 output bits
![Page 8: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/8.jpg)
2Mx16 SRAM
21-bit address line 16-bit data input/output
![Page 9: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/9.jpg)
Implementation of Large SRAM Register File
Use Multiplexor 32x1 Multiplexor
Large SRAM Impractical to use a large multiplexor like 64kx1 Try to remember the implementation of a two input
multiplexor
Solution A more efficient implementation of Multiplexor Shared output line (bit line)
Allow multiple sources to drive a single output line
![Page 10: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/10.jpg)
Three State Buffer
Two inputs A data signal An output enable (output select)
A single output Three states
Output enable = 1 Asserted (1) state Deasserted (0) state
Output enable = 0 High Impedance state Allow the another three-state buffer with output
enable =1 to determine the output
![Page 11: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/11.jpg)
Multiplexor using Three-State Buffers
Three-State Buffer Two inputs
A data signal An output enable (output select)
A single output Three states
Output enable = 1 Asserted (1) state Deasserted (0) state
Output enable = 0 High Impedance state Allow the another three-state
buffer with output enable =1 to determine the output
![Page 12: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/12.jpg)
12
![Page 13: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/13.jpg)
Organization of a 4M SRAM
Array of 8 Modules – Each for a bit Addr 21-10
Use a 12 to 4096 decoder Select an array of1024 bits out of 4K 1024 bits
Addr 9-0 Select 1 bit from the 1024 bits as an output bit
![Page 14: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/14.jpg)
DRAM
SRAM Requires 4-6 transistors per bit Fast But costly
DRAM Requires 1 transistor per bit Charge stored in a capacitor
Needs to be refreshed periodically Slower than SRAM
But less expensive
![Page 15: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/15.jpg)
Organization of a 4M DRAM
Addr 11-21 Select 1 row from 2048 rows
Addr 10-0 Select 1 bit from the 2048 bits as an output bit
Column Latches Store the selected output from 2048x2048 array
temporally
![Page 16: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/16.jpg)
DRAM
![Page 17: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/17.jpg)
SRAM and DRAM
SRAM Fast but costly Small amount Used for Computer Cache
DRAM Slow but less costly Large amount Used for Computer Main Memory
![Page 18: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/18.jpg)
Error Detection and Correction
Error in large memory Potential of data corruption
Error Checking Code Detect possible corruption data
Error Correction Code Correct possible corruption data
![Page 19: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/19.jpg)
Parity Code
Mechanism of (Even) Parity Code Count the number of 1s in a word If the number of 1s is odd
1 If the number of 1s is even
0 Example
Data Parity bit
01100111 1 When a word is written into memory, the parity bit is also
calculated and written When a word is read, if the parity bit does not match, there
is an error
![Page 20: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/20.jpg)
Parity Scheme
1-bit Parity Scheme Can detect at most 1 bit of error Cannot detect 2 bits of error Cannot correct an error
![Page 21: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/21.jpg)
Error Correction Code (ECC)
Error Correction Code (ECC) Can correct certain errors Requires more bits
7 bits for 64-bit word 8 bits for 128-bit word
Most computers use ECC for Detection of 2 bits of error Correction of 1 bit of error
![Page 22: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/22.jpg)
Summary
Register DRAM and SRAM Error Correction Code
![Page 23: CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 10/3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL](https://reader036.vdocuments.us/reader036/viewer/2022070413/5697bfc41a28abf838ca5aab/html5/thumbnails/23.jpg)
What I want you to do
Review Appendix C