300 likes | 520 Views
Announcement: HTML Formatting. You know about tabbing You need to learn about linebreaking Long lines of text should be broken onto multiple lines About 80 characters per line Makes it easier to edit long lines Source looks cleaner
E N D
Announcement: HTML Formatting • You know about tabbing • You need to learn about linebreaking • Long lines of text should be broken onto multiple lines • About 80 characters per line • Makes it easier to edit long lines • Source looks cleaner • We grade for this. You might want to clean up project 1A tonight. Katherine Deibel, Fluency in Information Technology
INFO100 and CSE100 Fluency with Information Technology An Architecture LessonConstructing the CPU Katherine Deibel Katherine Deibel, Fluency in Information Technology
Computer History • Abacus: Fingers, strings, and stones • Antikytheramechanism: Greek mechanical astronomical tool • Babbage Difference Engine:Geared mechanical calculator • Vacuum tube computers:Colossus, Eniac, Univac • Transistor Computers:Manually-wired transistors • Integrated Circuits:Modern age computers Katherine Deibel, Fluency in Information Technology
Integrated Circuits • Integrated circuits (ICs) powered the information revolution • When computers were made of discrete parts, millions of hand connections • 3 wires per transistor • 2 per capacitor • 2 per resistor • Labor intensive, expensive, error prone, unreliable, cumbersome, … even with robot manufacturing! Katherine Deibel, Fluency in Information Technology
Integrated Circuits Integrated circuits (ICs) solved that by two ideas • Integration:Circuits built as a unit from alike parts • Photolithography:Printing process to make chips Katherine Deibel, Fluency in Information Technology
Jack Kilby • Inventor of the integrated circuitand the handheld calculator • 2000 Nobel Prizefor Physics • First integrated circuit: Katherine Deibel, Fluency in Information Technology
Intel Core i7 Processor 758 million transistors (2008) Katherine Deibel, Fluency in Information Technology
Photolithography photoresist oxide oxide substrate substrate 1. Prepare wafer 2. Add photoresist Katherine Deibel, Fluency in Information Technology
Photolithography glass glass chrome chrome chrome chrome photoresist PR oxide oxide substrate substrate 3. Align photomask 4. Expose to UV light Katherine Deibel, Fluency in Information Technology
Photolithography PR PR PR PR oxide oxide oxide substrate substrate Develop and removephotoresist exposedto UV light Etch exposed oxide Katherine Deibel, Fluency in Information Technology
Photolithography We now have our circuit board oxide oxide substrate Remove remainingphotoresist Katherine Deibel, Fluency in Information Technology
The Gist of Photolithography • Think bookmaking • Used to be monks copying each page by hand • Printing press requires initial typesetting and then multiple copies are easy • Same idea with integrated circuits • Used to require wiring of individual transistors • Create the photomaskand the circuit can be created again and again Katherine Deibel, Fluency in Information Technology
Semiconductors • Semiconductor: • Sometimes it conducts • Sometimes it doesn’t • One can control when semiconductors do and don’t conduct • That is the basis for PandA with silicon Katherine Deibel, Fluency in Information Technology
Semiconductors Example: an AND gate True only if both inputs are true Detect presence / absence of “yes” Make semiconductor conduct if input 1 is true Make semiconductorconduct if input 2 is true Send “yes” signal on wire Katherine Deibel, Fluency in Information Technology
Field Effect • A charged field can control whether a semiconductor conducts or not • A transistor has three wires • Source (input) • Drain (output) • Gate (control) • The charge of the control wire (gate) is key • Neutral gate, channel doesn’t conduct • Charged gate, channel conducts Gate Out In Katherine Deibel, Fluency in Information Technology
Computers ... • Deterministically execute instructions to process information • Chooses the next instruction as it is programmed • Executes specific instructions based only on the program and input it is given Katherine Deibel, Fluency in Information Technology
Fetch/Execute Cycle • A computer is an instruction execution engine • The fetch/execute cycle is the process that executes instructions Instruction Fetch (IF) Instruction Decode (ID) Data Fetch (DF) Instruction Execution (EX) Result Return (RR) Katherine Deibel, Fluency in Information Technology
Animation Fetch/Execute cycle http://courses.washington.edu/fit100/wi12/videos/fetch-execute.swf Katherine Deibel, Fluency in Information Technology
Anatomy of a Computer ALU Control Input Mouse Keyboard Scanner Floppy Disk Hard Disk Memory Output Monitor Printer Speakers Katherine Deibel, Fluency in Information Technology
Memory • Programs and their data must be in the memory while they are running memory addresses 0 6 1 2 3 4 5 7 8 9 10 11 g G o D a w s ! ! 0 ... memory contents byte = 8 bits 0 1 0 0 0 1 0 0 Katherine Deibel, Fluency in Information Technology
Control • The Fetch/Execute cycle is hardwired into the computer’s control, i.e. it is the actual “engine” Instruction: ADDB 20, 10, 16 Put in memory location 20 the contents of memory location 10 + contents of memory location 16 10 10 16 16 11 11 12 12 13 13 14 14 15 15 17 17 18 18 19 19 20 20 21 21 6 6 12 12 18 Zz ... ... Katherine Deibel, Fluency in Information Technology
Memory: Words • Memory not usually broken up byte by byte • Many data types are longer than one byte • Integers are usually four bytes • Doubles (real numbers) are eight bytes • A word is a chunk of several bytes • 32-bit machine → 4 bytes per word • Integers are one word • Doubles are two words Katherine Deibel, Fluency in Information Technology
Indirect Data Reference • Instructions tell where the data is, not what the data is • An instruction might produce different values even if the command is the same • Instruction: ADDB 20, 10, 16 10 16 11 12 13 14 15 17 18 19 20 21 8 7 15 ... 10 16 11 12 13 14 15 17 18 19 20 21 60 -55 5 ... Katherine Deibel, Fluency in Information Technology
ALU (Arithmetic Logic Unit) • The Arithmetic/Logic Unit does the actual computation • Most computers have only about a 100-150 instructions hard wired Each type of data has its own separate instructions ADDB : add bytes ADDH : add half words ADD : add words ADDS : add short decimal numbers ADDD : add long decimal numbers ADDBU : add bytes unsigned … Katherine Deibel, Fluency in Information Technology
Input/Output • Input units bring data to memory from outside world; • Output units send data to outside world from memory • Most peripheral devices are “dumb” in that the processor assists their operation • Disks are both memory devices and input/output devices Katherine Deibel, Fluency in Information Technology
The PC’s PC • The program counter (PC) tells where the next instruction comes from • Instructions are a word long, so add 4 to the PC to find the next instruction (on a 32-bit machine) Program Counter: 112 110 116 111 112 113 114 115 117 118 119 120 121 688,724 ADD 210,216,220 AND 414,418,720 OR ... Katherine Deibel, Fluency in Information Technology
Clocks Run The Engine • The rate a computer performs the Fetch / Execute cycle is controlled by its clock • Current clocks run 2-3 GHz (2-3 trillion cycles a second!) • In principle, one instruction per cycle • Not always achieved as instructions may take multiple cycles • Clever use of multiple ALUs allows for more than one instruction to be completed per cycle Katherine Deibel, Fluency in Information Technology
Clocks Run The Engine • Clock speed is not a good indicator of speed • Only good to compare CPUs in same brand • Other factors such as RAM and clock speed • Clock speed of the front-side bus • Nervous system of computer • Electrical pathway that connects CPU, RAM, hard drive • Memory • Working memory of the computer • Fast memory built into the CPU chip • Having to save to disk is slooooooow Katherine Deibel, Fluency in Information Technology
Summary • From the transistors to the CPU to the instructions, computers are well-structured • Explicit transistor layouts printed out en masse • Binary instructions connecting memory, input, output, and the logic units • Logic follows logic • Despite our experience, computers are not vindictive or cruel • Unless someone programmed them that way Katherine Deibel, Fluency in Information Technology
Announcements • JavaScript is coming • RGB/Binary exercise will go up this afternoon (counts as a Lab) • Project 1A is due tonight by 10pm • Project 1B is due Thursday, Feb 9 Katherine Deibel, Fluency in Information Technology