CS222: Computer Architecture

1y ago
17 Views
2 Downloads
1.59 MB
75 Pages
Last View : 15d ago
Last Download : 3m ago
Upload by : Camryn Boren
Transcription

CS222: Computer ArchitectureInstructor:Dr Ahmed Shalabyhttp://bu.edu.eg/staff/ahmedshalaby14# االخالق - االدب - االحترام الدكتور - المعيد - الطالب

2

Study: CS222:Computer ArchitectureWhy?How?What?

What ? Computer Architecture computer architecture defines how tocommand a processor. computer architecture is a set of rules andmethods that describe the uter system.

How ? Course Book

How ? Course ContentLec #SubjectWeek #Lec1Chapter 1: From Zero to OneWeek #1Lec2Chapter 2: Combinational Logic DesignWeek #2Lec 3Chapter 3: Sequential Logic DesignWeek #3Lec 4Chapter 4: Hardware Description LanguageWeek #4Lec 5Chapter 4 : continueWeek #5Lec 6Chapter 5: Digital Building BlocksWeek #6Lec 7Chapter 5 continueWeek #7Midterm ExamWeek #8Lec 8Chapter 6: Computer ArchitectureWeek #9Lec 9Chapter 6 : continueWeek #10Lec 10Chapter 7: MicroarchitectureWeek #11Lec 11Chapter 7 continueWeek #12Lec 12Chapter 7 continueWeek #13

AssessmentFinal-Term ExamMid-Term Exam lab Exam Oral Exam Projects (Verilog – ModelSim Quartus) logic design Project in Verilog – the week aftermidterm (Lab) final project - lab exam5050Chapter 8 is a self study - In Exam.

Reference Book

Why ? Computer Architecture

How ? Computers ArchitecutreSilicon Industry

Computer Architecture

Chapter 1Digital Design and Computer Architecture, 2nd EditionDavid Money Harris and Sarah L. HarrisChapter 1 12

Chapter 1 :: Topics BackgroundThe Game PlanThe Art of Managing ComplexityThe Digital AbstractionNumber SystemsLogic GatesLogic LevelsCMOS TransistorsPower ConsumptionChapter 1 13

Background Microprocessors have revolutionized our world– Cell phones, Internet, rapid advances in medicine, etc. The semiconductor industry has grown from 21billion in 1985 to 300 billion in 2011Chapter 1 14

The Game Plan Purpose of the course:– Understand what’s under the hood of a computer– Learn the principles of digital design– Design and build a microprocessorChapter 1 15

The Art of Managing Complexity Abstraction Discipline The Three –y’s– Hierarchy– Modularity– RegularityChapter 1 16

Abstraction Hiding details whenthey aren’t importantprogramsdevice driversfocus of this ersmemoriesAND gatesNOT apter 1 17

Discipline Intentionally restrict design choices Example: Digital discipline– Discrete voltages instead of continuous (Analog to Digital Converters)– Simpler to design than analog circuits – can build more sophisticatedsystems– Digital systems replacing analog predecessors: i.e., digital cameras, digital television, cell phones,CDsChapter 1 18

The Three -y’s Hierarchy– A system divided into modules and submodules Modularity– Having well-defined functions and interfaces Regularity– Encouraging uniformity, so modules can be easily reusedChapter 1 19

The Digital Abstraction Most physical variables are continuous– Voltage on a wire– Frequency of an oscillation– Position of a mass Digital abstraction considers discretesubset of valuesChapter 1 20

The Analytical Engine Designed by CharlesBabbage from 1834 –1871 Considered to be thefirst digital computer Built from mechanicalgears, where each gearrepresented a discretevalue (0-9)Quantum ComputingChapter 1 21

Digital Discipline: Binary Values Two discrete values:– 1’s and 0’s– 1, TRUE, HIGH– 0, FALSE, LOW 1 and 0: voltage levels, rotating gears, fluidlevels, etc. Digital circuits use voltage levels to represent1 and 0 Bit: Binary digitChapter 1 22

Digital DisciplineMost natural quantities (such as temperature, pressure, lightintensity, ) are analog quantities that vary continuously.Analog continuousDigital discreteDigital systems can process, store, and transmit data moreefficiently but can only assign discrete values to each point.Chapter 1 23

Digital Discipline Example – Audio- Analog to Digital Converters Sampling and QuantizationCD drive10110011101Digital dataDigital-to-analogconverterLinear amplifierAnalogreproductionof music audiosignalSpeakerSoundwavesTypes of electronic devices or instruments: Analog Digital Combination analog and digitalChapter 1 24

George Boole, 1815-1864 Born to working class parents Taught himself mathematics andjoined the faculty of Queen’sCollege in Ireland Wrote An Investigation of the Lawsof Thought (1854) Introduced binary variables Introduced the three fundamentallogic operations: AND, OR, andNOTChapter 1 25

Number Systems Decimal numbers1's column10's column100's column1000's column537410 5 103 3 102 7 101 4 100fivethousandsthreehundredsseventensfourones Binary numbers1's column2's column4's column8's column11012 1 23 1 22 0 21 1 20 1310oneeightonefournotwoChapter 1 26 oneone

Powers of Two 20 1 28 25621 2 29 51222 4 210 102423 8 211 204824 16 212 409625 32 213 819226 64 214 1638427 128 215 32768Handy to memorize up to 29Chapter 1 27

Number Conversion Decimal to binary conversion:– Convert 100112 to decimal– 16 1 8 0 4 0 2 1 1 1 1910 Decimal to binary conversion:– Convert 4710 to binary– 32 1 16 0 8 1 4 1 2 1 1 1 1011112Chapter 1 28

Binary Values and Range N-digit decimal number– How many values? 10N– Range? [0, 10N - 1]– Example: 3-digit decimal number: 103 1000 possible values Range: [0, 999] N-bit binary number– How many values? 2N– Range: [0, 2N - 1]– Example: 3-digit binary number: 23 8 possible values Range: [0, 7] [0002 to 1112]Chapter 1 29

Hexadecimal NumbersHex DigitDecimal EquivalentBinary 41110F151111Chapter 1 30

Hexadecimal Numbers Base 16 Shorthand for binaryChapter 1 31

Hexadecimal to Binary Conversion Hexadecimal to binary conversion:– Convert 4AF16 (also written 0x4AF) to binary– 0100 1010 11112 Hexadecimal to decimal conversion:– Convert 4AF16 to decimal– 162 4 161 10 160 15 119910Chapter 1 32

Bits, Bytes, Nibbles Bits10010110mostsignificantbit Bytes & Nibblesleastsignificantbitbyte10010110nibble teChapter 1 33

Large Powers of Two 210 1 kilo 220 1 mega 230 1 giga1000 (1024) 1 million (1,048,576) 1 billion (1,073,741,824) Chapter 1 34

Addition Decimal Binary113734 51688902carries111011 00111110carriesProblems : Big Numbers / Negative Numbers\\ Engineer Life develop and learn . All timesChapter 1 35

Binary Addition Examples Add the following4-bit binarynumbers Add the following4-bit binarynumbersOverflow!11001 010111101111011 011010001Chapter 1 36

Overflow Digital systems operate on a fixed number ofbits Overflow: when the result is too big to fit inthe available number of bits See the previous example of 11 6Ariane-5 Rocket Explosion (2002)Chapter 1 37

Signed Binary Numbers Sign/Magnitude Numbers Two’s Complement NumbersChapter 1 38

Sign/Magnitude Numbers 1 sign bit, N-1 magnitude bits Sign bit is the most significant (left-most) bit– Positive number: sign bit 0 A : a N 1 , a N 2 ,n 2– Negative number: sign bit 1aA ( 1)n 1a2 , a1 , a0 ia2 ii 0 Example, 4-bit sign/mag representations of 6: 6 0110- 6 1110 Range of an N-bit sign/magnitude number:[-(2N-1-1), 2N-1-1]Chapter 1 39

Sign/Magnitude Numbers Problems:– Addition doesn’t work, for example -6 6:1110 011010100 (wrong!)– Two representations of 0 ( 0):10000000Chapter 1 40

Two’s Complement Numbers Don’t have same problems as sign/magnitudenumbers:– Addition works– Single representation for 0Chapter 1 41

Two’s Complement Numbers Msb has value of -2N-1n 2A an 1 ( 2n 1 ) ai 2ii 0 Most positive 4-bit number: 0111 Most negative 4-bit number: 1000 The most significant bit still indicates the sign(1 negative, 0 positive) Range of an N-bit two’s comp number:[-(2N-1), 2N-1-1]Chapter 1 42

“Taking the Two’s Complement” Flip the sign of a two’s complement number Method:1. Invert the bits2. Add 1 Example: Flip the sign of 310 001121. 11002. 11101 -8 4 0 1 -310Chapter 1 43

Two’s Complement Examples Take the two’s complement of 610 011021. 10012. 110102 -610 What is the decimal value of the two’scomplement number 10012?1. 01102. 101112 710, so 10012 -710Chapter 1 44

Two’s Complement Addition Add 6 (-6) using two’s complementnumbers1110110 101010000 Add -2 3 using two’s complement numbers1111110 001110001Chapter 1 45

Increasing Bit Width Extend number from N to M bits (M N) :– Sign-extension– Zero-extensionCopyright 2012 ElsevierChapter 1 46

Sign-Extension Sign bit copied to msb’sNumber value is same Example 1:– 4-bit representation of 3 0011– 8-bit sign-extended value: 00000011 Example 2:– 4-bit representation of -5 1011– 8-bit sign-extended value: 11111011Chapter 1 47

Zero-Extension Zeros copied to msb’sValue changes for negative numbers Example 1:– 4-bit value 00112 310– 8-bit zero-extended value: 00000011 310 Example 2:– 4-bit value 1011 -510– 8-bit zero-extended value: 00001011 1110Chapter 1 48

Number System ComparisonNumber SystemRangeUnsigned[0, 2N-1]Sign/Magnitude[-(2N-1-1), 2N-1-1]Two’s Complement[-2N-1, 2N-1-1]For example, 4-bit 1121314150000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 11111000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 01111111 1110 1101 1100 1011 1010 100110000010000001 0010 0011 0100 0101 0110 0111Chapter 1 49 Two's ComplementSign/Magnitude

Logic Gates Perform logic functions:– inversion (NOT), AND, OR, NAND, NOR, etc. Single-input:– NOT gate, buffer Two-input:– AND, OR, XOR, NAND, NOR, XNOR Multiple-inputChapter 1 50

Single-Input Logic GatesNOTABUFYY AA01AYY AY10A01Y01Chapter 1 51

Two-Input Logic GatesANDABORYABY ABA0011B0101YY A BY0001A0011B0101Y0111Chapter 1 52

More Two-Input Logic GatesXORABNANDABYY A BA0011B0101NORYY ABY0110A0011B0101ABXNORYY A BY1110A0011B0101ABYY A BY1000Chapter 1 53 A0011B0101Y1001

Multiple-Input Logic GatesAND3NOR3ABCYY A B CA00001111B00110011C01010101Y10000000ABCYY ABCA00001111B00110011C01010101 Multi-input XOR: Odd parityChapter 1 54 Y00000001

Logic Levels Discrete voltages represent 1 and 0 For example:– 0 ground (GND) or 0 volts– 1 VDD or 5 volts What about 4.99 volts? Is that a 0 or a 1? What about 3.2 volts?Chapter 1 55

Logic Levels Range of voltages for 1 and 0 Different ranges for inputs and outputs toallow for noiseChapter 1 56

VDD Scaling In 1970’s and 1980’s, VDD 5 V VDD has dropped– Avoid frying tiny transistors– Save power 3.3 V, 2.5 V, 1.8 V, 1.5 V, 1.2 V, 1.0 V, Be careful connecting chips withdifferent supply voltagesChips operate because they contain magicsmokeProof:– if the magic smoke is let out, the chipstops workingChapter 1 57

Logic Family ExamplesLogic Family VDDVILVIHVOLVOHTTL5 (4.75 - 5.25)0.82.00.42.4CMOS5 (4.5 - 6)1.353.150.333.84LVTTL3.3 (3 - 3.6)0.82.00.42.4LVCMOS3.3 (3 - 3.6)0.91.80.362.7Chapter 1 58

Transistors Logic gates built from transistors 3-ported voltage-controlled switch– 2 ports connected depending on voltage of 3rd– d and s are connected (ON) when g is 1dg 0g 1ddgONOFFsssChapter 1 59

Silicon Transistors built from silicon, a semiconductor Pure silicon is a poor conductor (no free charges) Doped silicon is a good conductor (free charges)– n-type (free negative charges, electrons)– p-type (free positive charges, holes)Free electronSiSiSiSiSiSiSiSiSiSiSiSiSiSilicon LatticeFree holeSiSiSiAsSiSiBSiSiSiSi- n-Type -p-TypeChapter 1 60 SiSiSi

MOS Transistors Metal oxide silicon (MOS) transistors:– Polysilicon (used to be metal) gate– Oxide (silicon dioxide) insulator– Doped atesourcedrainnMOSChapter 1 61

Transistors: nMOSGate 0Gate 1OFF (no connectionbetween source anddrain)ON (channel betweensource and raten ------channelpGNDGNDChapter 1 62 nsubstrate

Transistors: pMOS pMOS transistor is opposite– ON when Gate 0– OFF when Gate rcedrainChapter 1 63

Transistor FunctiondnMOSpMOSg 0g 1ddOFFgONssssssgOFFONddChapter 1 64 d

Transistor Function nMOS: pass good 0’s, so connect source toGND pMOS: pass good 1’s, so connect source tworkChapter 1 65

CMOS Gates: NOT GateNOTAVDDYAY AA01Y10AP1YN1GNDP1N1Y01Chapter 1 66

CMOS Gates: NOT GateNOTAVDDYAY AA01P1YN1Y10GNDAP1N1Y0ONOFF11OFFON0Chapter 1 67

CMOS Gates: NAND GateNANDABYP2YY ABA0011A0011B0101B P10101P1Y1110P2AN1BN2N1N2YChapter 1 68

CMOS Gates: NAND GateNANDABYP2YY OFFAN1BN2N1OFFOFFONONN2OFFONOFFONY1110Chapter 1 69

CMOS Gate wnnetworkSilicon RunChapter 1 70

NOR GateHow do you build a three-input NOR gate?Chapter 1 71

NOR3 GateABCYChapter 1 72

Other CMOS GatesHow do you build a two-input AND gate?ABYChapter 1 73

Gordon Moore, 1929 Cofounded Intel in1968 with RobertNoyce. Moore’s Law:number of transistorson a computer chipdoubles every year(observed in 1965) Since 1975, transistorcounts have doubledevery two years.Chapter 1 74

Moore’s Law “If the automobile had followed the same development cycle as thecomputer, a Rolls-Royce would today cost 100, get one millionmiles to the gallon, and explode once a year . . .”– Robert CringleyChapter 1 75

What ? Computer Architecture computer architecture defines how to command a processor. computer architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer system.

Related Documents:

CS222: Computer Organization and Architecture Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati 1. Outline . Computer Organization & Architecture, 7th Edition, Pearson Education India, 2010 – HamacherC. etal, thComputer

What is Computer Architecture? “Computer Architecture is the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals.” - WWW Computer Architecture Page An analogy to architecture of File Size: 1MBPage Count: 12Explore further(PDF) Lecture Notes on Computer Architecturewww.researchgate.netComputer Architecture - an overview ScienceDirect Topicswww.sciencedirect.comWhat is Computer Architecture? - Definition from Techopediawww.techopedia.com1. An Introduction to Computer Architecture - Designing .www.oreilly.comWhat is Computer Architecture? - University of Washingtoncourses.cs.washington.eduRecommended to you b

Paper Name: Computer Organization and Architecture SYLLABUS 1. Introduction to Computers Basic of Computer, Von Neumann Architecture, Generation of Computer, . “Computer System Architecture”, John. P. Hayes. 2. “Computer Architecture and parallel Processing “, Hwang K. Briggs. 3. “Computer System Architecture”, M.Morris Mano.

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE Debdeep Mukhopadhyay, CSE, IIT Kharagpur References/Text Books Theory: Computer Organization and Design, 4th Ed, D. A. Patterson and J. L. Hennessy Computer Architceture and Organization, J. P. Hayes Computer Architecture, Berhooz Parhami Microprocessor Architecture, Jean Loup Baer

1. Computer Architecture and organization – John P Hayes, McGraw Hill Publication 2 Computer Organizations and Design- P. Pal Chaudhari, Prentice-Hall of India Name of reference Books: 1. Computer System Architecture - M. Morris Mano, PHI. 2. Computer Organization and Architecture- William Stallings, Prentice-Hall of India 3.

CS2410: Computer Architecture Technology, software, performance, and cost issues Sangyeun Cho Computer Science Department University of Pittsburgh CS2410: Computer Architecture University of Pittsburgh Welcome to CS2410! This is a grad-level introduction to Computer Architecture

developed an integrated computer architecture labo-ratory called CAL2 that features a flexible, hierarch-ical, graphical simulator of an educational computer system (SimECS) and a web-based software system for Computer Architecture Learning and Self-Testing (CALKAS). The educational computer system (ECS) is designed to demonstrate a broad .

Accounting theory also includes the reporting of account-ing and financial information. There has been and will continue to be exten - sive discussion and argumentation as to what these basic assumptions, definitions, principles, and concepts should be; thus, accounting theory is never a final and finished product. Dialogue always continues, particularly as new issues and problems arise. As .