28
An Architecture Lesson Constructing the CPU Fluency with Information Technology 2012-04-25 Katherine Deibel, Fluency in Information Technology 1 INFO100 and CSE100 Katherine Deibel

An Architecture Lesson Constructing the CPU

  • Upload
    zocha

  • View
    34

  • Download
    3

Embed Size (px)

DESCRIPTION

INFO100 and CSE100. Fluency with Information Technology. An Architecture Lesson Constructing the CPU. Katherine Deibel. Computer History. Abacus: Fingers, strings, and stones Antikythera mechanism: Greek mechanical astronomical tool Babbage Difference Engine: Geared mechanical calculator - PowerPoint PPT Presentation

Citation preview

Page 1: An Architecture  Lesson Constructing the CPU

An Architecture LessonConstructing the CPU

Fluency with Information Technology

2012-04-25 Katherine Deibel, Fluency in Information Technology 1

INFO100 and CSE100

Katherine Deibel

Page 2: An Architecture  Lesson Constructing the CPU

Computer History Abacus: Fingers, strings, and stones Antikythera mechanism:

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 2

Page 3: An Architecture  Lesson Constructing the CPU

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!

2012-04-25 Katherine Deibel, Fluency in Information Technology 3

Page 4: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 4

Page 5: An Architecture  Lesson Constructing the CPU

Jack Kilby Inventor of the integrated circuit

and the handheld calculator 2000 Nobel Prize for Physics First integrated circuit:

2012-04-25 Katherine Deibel, Fluency in Information Technology 5

Page 6: An Architecture  Lesson Constructing the CPU

Intel Core i7 Processor

758 million transistors (2008)2012-04-25 Katherine Deibel, Fluency in Information Technology 6

Page 7: An Architecture  Lesson Constructing the CPU

Photolithography

2012-04-25 Katherine Deibel, Fluency in Information Technology 7

substrate

oxide

1. Prepare wafer

substrate

oxide

2. Add photoresist

photoresist

Page 8: An Architecture  Lesson Constructing the CPU

Photolithography

2012-04-25 Katherine Deibel, Fluency in Information Technology 8

substrate

oxide

3. Align photomask 4. Expose to UV light

photoresist

glasschrome chrome

substrate

oxide

PR

glasschrome chrome

Page 9: An Architecture  Lesson Constructing the CPU

Photolithography

2012-04-25 Katherine Deibel, Fluency in Information Technology 9

substrate

oxide

5. Develop and removephotoresist exposedto UV light

6. Etch exposed oxide

substrate

PRPR PRPR

oxide oxide

Page 10: An Architecture  Lesson Constructing the CPU

Photolithography

We now have our circuit board

2012-04-25 Katherine Deibel, Fluency in Information Technology 10

substrate

7. Remove remainingphotoresist

oxide oxide

Page 11: An Architecture  Lesson Constructing the CPU

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 photomask and the circuit can be

created again and again

2012-04-25 Katherine Deibel, Fluency in Information Technology 11

Page 12: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 12

Page 13: An Architecture  Lesson Constructing the CPU

SemiconductorsExample: an AND gate

True only if both inputs are true

Send “yes” signal on wire

Make semiconductor conduct if input 1 is true

Detect presence / absence of “yes”

Make semiconductorconduct if input 2 is true

2012-04-25 Katherine Deibel, Fluency in Information Technology 13

Page 14: An Architecture  Lesson Constructing the CPU

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

In Out

Gate

2012-04-25 Katherine Deibel, Fluency in Information Technology 14

Page 15: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 15

Page 16: An Architecture  Lesson Constructing the CPU

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)

2012-04-25 Katherine Deibel, Fluency in Information Technology 16

Page 18: An Architecture  Lesson Constructing the CPU

Anatomy of a Computer

Memory

ALU Control InputFloppy DiskHard Disk

ScannerKeyboardMouse

Output SpeakersPrinterMonitor

2012-04-25 Katherine Deibel, Fluency in Information Technology 18

Page 19: An Architecture  Lesson Constructing the CPU

Memory Programs and their data must be in the

memory while they are running

0

G1

o2

D3

a4

w5

g6

s7

!8

!9

010

...11

byte = 8 bits0 1 0 0 0 1 0 0

memory addresses

memory contents

2012-04-25 Katherine Deibel, Fluency in Information Technology 19

Page 20: An Architecture  Lesson Constructing the CPU

Control The Fetch/Execute cycle is hardwired into

the computer’s control, i.e. it is the actual “engine”

Instruction: ADDB 20, 10, 16Put in memory location 20 the contents of memory location 10 + contents of memory location 16

6 10

11

12

13

14

15

1216 17 18 19

Zz20

...21

6 10

11

12

13

14

15

1216 17 18 19

1820

...21

2012-04-25 Katherine Deibel, Fluency in Information Technology 20

Page 21: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 21

Page 22: An Architecture  Lesson Constructing the CPU

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

8 10

11

12

13

14

15

716 17 18 19

1520

...21

60 10

11

12

13

14

15

-5516 17 18 19

520

...21

Instruction: ADDB 20, 10, 16

2012-04-25 Katherine Deibel, Fluency in Information Technology 22

Page 23: An Architecture  Lesson Constructing the CPU

ALU (Arithmetic Logic Unit) The Arithmetic/Logic Unit does the actual

computation Most computers have only about a 100-

150 instructions hard wiredEach type of data has its own separate instructionsADDB : add bytesADDH : add half wordsADD : add wordsADDS : add short decimal numbersADDD : add long decimal numbersADDBU: add bytes unsigned…

2012-04-25 Katherine Deibel, Fluency in Information Technology 23

Page 24: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 24

Page 25: An Architecture  Lesson Constructing the CPU

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)

110

111

112

113

114

115 116 117 118 119 120...

121ADD 210,216,220 AND 414,418,720

Program Counter: 112

OR688,724

2012-04-25 Katherine Deibel, Fluency in Information Technology 25

Page 26: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 26

Page 27: An Architecture  Lesson Constructing the CPU

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

2012-04-25 Katherine Deibel, Fluency in Information Technology 27

Page 28: An Architecture  Lesson Constructing the CPU

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 programs them that way

2012-04-25 Katherine Deibel, Fluency in Information Technology 28