Top Banner
CS2100 Computer Organisation Use IVLE Introduction (AY20011/12) Semester 1
63
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: cs2100-1-intro

CS2100 Computer OrganisationUse IVLE

Introduction(AY20011/12) Semester 1

Page 2: cs2100-1-intro

2011 Sem 1 Introduction 2

Logistics (1)

➤ Lecturer: – Associate Professor Wong Weng Fai– Office: COM2-03-56– Email: [email protected]

Page 3: cs2100-1-intro

2011 Sem 1 Introduction 3

Logistics (2)

➤ Lectures:– Wednesdays 12-2pm @ LT19– Fridays 4-5pm @ LT19– Special make-up lecture:

• 19 Sep 10am-12pm• Venue to be announced later

➤ Tutorials and Labs to start the week of August 22– Remember to bid for your tutorial groups next week

Page 4: cs2100-1-intro

2011 Sem 1 Introduction 4

Assessment

➤ Lab assignments have to be handed up➤ Two individual take home assignments➤ In-class pop quizzes➤ Mid-term test

– 19 Sep 2011 2pm @ LT19

➤ Final exam– Monday, 21 Nov 2010 - 9am– Venue to be determined later

Page 5: cs2100-1-intro

2011 Sem 1 Introduction 5

Texts

➤ First half of the course will mainly come from:– Tan Tuck Choy, “Digital Logic Design”,

McGraw-Hill 2005.

➤ Second half of the course will mainly come from:– David A. Patterson and John L. Hennessy,

“Computer Organization and Design”, 3rd edition. Morgan Kaufmann Publishers.

Page 6: cs2100-1-intro

2011 Sem 1 Introduction 6

Why CS2100?

➤ Give you an idea of the inner workings of a computer

➤ Expose you to some very clever ideas– Outside software (“out of the box”)

➤ Give you a “taste” of hardware from a CS perspective

Page 7: cs2100-1-intro

2011 Sem 1 Introduction 7

How to succeed in CS2100

➤ Good attitude, stay positive– Stay curious

➤ Do your tutorials and labs

➤ Attend lectures– Not just in physical presence

➤ Ask!

Page 8: cs2100-1-intro

Let’s get started!

Page 9: cs2100-1-intro

2011 Sem 1 Introduction 9

Long long time ago… …Long long time ago… …➤ It all starts with numbers!

– All languages have some form of numbers– followed by arithmetic operations: addition, subtraction,

division, and so on

➤ History of number is quite interesting in itself– E.g. Concept of negative number

• Chinese ~200AD• India/Arabians ~1000AD• European ~1800AD

Page 10: cs2100-1-intro

2011 Sem 1 Introduction 10

Computing/ComputerComputing/Computer

➤Simple “computing” == arithmetic–Performing mathematical operations

➤Let’s look at definitions of “a computer”

Page 11: cs2100-1-intro

2011 Sem 1 Introduction 11

Computing/ComputerComputing/Computer

Def: Oxford English Dictionary (1955) n. A person who makes calculations or computations; a

calculator, a reckoner; spec. a person employed to make calculations in an observatory, in surveying, etc. 

Def: Oxford English Dictionary (today)n. an electronic device (or system of devices) which is used to store, manipulate, and communicate information, perform complex calculations, or control or regulate other devices or machines, and is capable of receiving information (data) and of processing it in accordance with variable procedural instructions (programs or software).

Page 12: cs2100-1-intro

2011 Sem 1 Introduction 12

Early History – Calculating devicesEarly History – Calculating devices

➤Abacus (or counting frame)–Middle east (early versions)

• 3000 BC

–Roman• 1 AD

–China:• Earliest written document (1400 AD)

Page 13: cs2100-1-intro

2011 Sem 1 Introduction 13

1600s1600s

➤ 1612 – Napier’s Bones– By John Napier

➤ 1630– “Circular Slide Rule”– By William Oughtred– Developed the slide-ruler

Page 14: cs2100-1-intro

2011 Sem 1 Introduction 14

Napier Bone ExampleNapier Bone Example

Arrange the bones to make “4896”.

First number is “2”, write down 2.Add 4+3=7, write down “7”.Add 6+6=12, write down “2”, carry the 1.Add 5+8(+1)=14, write down “4”, carry the 1.Add 2(+1)=3, write down “3”.

There is your answer!

7 x 4896 =

Page 15: cs2100-1-intro

2011 Sem 1 Introduction 15

1600s cont’1600s cont’

➤ 1642 – Pascaline– by Blaise Pascal

– Adding machine that used eight 10-toothed wheels

➤ 1673 – “Calculator”– by Gottfried Wilhelm von Leihniz– Used gears and dials: +-/*

Page 16: cs2100-1-intro

2011 Sem 1 Introduction 16

1800s cont’1800s cont’

➤1822 – Difference Engine– by Charles Babbage

• Often called the “father of computing”

– Designed a mechanical machine • Tabulate logarithm and trigonometric

– Never completed

Page 17: cs2100-1-intro

2011 Sem 1 Introduction 17

1800s cont’1800s cont’

➤1833 – Analytical Engine– Charles Babbage– A more general design

• Programmable!

– Four functions• Processing – arithmetic operations• Storage – 1000 50-digit numbers• Input and output

– Ada Augusta Lovelace • Developed the first program!

Page 18: cs2100-1-intro

2011 Sem 1 Introduction 18

18901890

➤ Tabulating Machine– by Herman Hollerith– Punch cards machines contained data for US census– Machine counted and summarized data– Founded Computing, Tabulating and Recording

Corporation

Page 19: cs2100-1-intro

2011 Sem 1 Introduction 19

Early 1900’sEarly 1900’s

➤1936 – The ABC computer– Atanasoff and Berry Computer– Fully electronic computer– Data represented as 50-bit binary number

Prof. Atanasoff with his machineat Iowa State University.

Page 20: cs2100-1-intro

2011 Sem 1 Introduction 20

Early 1900’sEarly 1900’s

➤ Alan Turing (1912-1954)– British– A brilliant mathematician and computer enthusiast

• PhD from Princeton in the US in 2 years only

– One of the “crackers” of the Germany ciphers in WII– Proposed the “Universal Machine Concept”

• Envisioned a computer that was programmable and flexible

– Turing is considered one of the fathers of modern computing theory

– The highest award in CS is called the “Turing award”

Page 21: cs2100-1-intro

2011 Sem 1 Introduction 21

Early 1900’sEarly 1900’s

➤1944 – Mark I– Electro-mechanical relays– Built by IBM and Howard Aiken of Harvard– Grace Hopper (US Navy) programmed the Mark I– Grace Hopper went on to develop the COBOL

programming language

Page 22: cs2100-1-intro

2011 Sem 1 Introduction 22

"First" Actual Computer Bug"First" Actual Computer Bug

Page 23: cs2100-1-intro

2011 Sem 1 Introduction 23

Early 1900’sEarly 1900’s

➤ 1944 – ENIAC– Electronic Numerical Integrator and Calculator – Eckert and Mauchly – University of Pennsylvania – 30 tons, 18000 vacuum tubes, 100times faster than Mark I– Commissioned by US army during WWI to compute

missile/ordinance trajectories • (it was completed at WWII)

Page 24: cs2100-1-intro

2011 Sem 1 Introduction 24

How to program on ENIAC?How to program on ENIAC?

Page 25: cs2100-1-intro

2011 Sem 1 Introduction 25

Early 1900’sEarly 1900’s

➤ 1945 – EDSAC– Electronic Delay Storage Automatic Computer– John Von Neumann (US)– Neumann’s design hailed as a huge advancement

• Von Neumann proposed the “fetch-and-execute” cycle

• ALL computers use this architecture now

John Von Neumann

Page 26: cs2100-1-intro

CS2100 = How computers work

Page 27: cs2100-1-intro

2011 Sem 1 Introduction 27

HOW DO COMPUTERS WORK?

➤ What is a computer?– Types: desktops, notebooks, servers, supercomputers,

embedded devices, …– Uses: Genomics, business, controls, graphics, games, …– Manufacturers: Intel, IBM, Apple, Microsoft, Sun, …

➤ Analogy: a course on “automotive vehicles”– Similarities from vehicle to vehicle– Differences from vehicle to vehicle

➤ Best way to learn:

– Focus on a specific instance and learn how it works …

– While learning general principles and historical perspectives.

Page 28: cs2100-1-intro

2011 Sem 1 Introduction 28

WHY? (FROM USER TO BUILDER)

➤ You want to call yourself a computer scientist.➤ You want to build software people use.➤ You need to make purchasing decisions.➤ You need to offer “expert” advice.➤ Hardware and software affect performance

– Algorithm determines number of source-level statements (CS1101, CS1102)

– Language, compiler, and architecture determine machine instructions (COD chapters 2 and 3)

– Processor and memory determine how fast instructions are executed (COD chapters 5, 6 and 7)

➤ Understanding performance (COD chapter 4)

Page 29: cs2100-1-intro

2011 Sem 1 Introduction 29

SO, WHAT IS A COMPUTER? (1)

➤ A machine?

Driver

Programmer

Example: An automobile augments our power of locomotion.

A computer is a device capable of solving problems according to designed programs. It simply augments our power of storage and speed of calculation.

Page 30: cs2100-1-intro

2011 Sem 1 Introduction 30

SO, WHAT IS A COMPUTER? (2)

➤ Computers as information processors.

Computer system

Raw data

Processed information

Page 31: cs2100-1-intro

2011 Sem 1 Introduction 31

SO, WHAT IS A COMPUTER? (3)

➤ From computer organisation perspective, we study the components and how they work together– Processor, memory, input/output devices, networks, …

Monitor (Output)

Mouse and Keyboard (Input)

Headphone (Output)

Hardware box (contains processor, memory, buses etc.)

Page 32: cs2100-1-intro

2011 Sem 1 Introduction 32

SO, WHAT IS A COMPUTER? (4)

Motherboard (Printed Circuit Board)

Processor

Slots for RAM chips

Network card and CRT card

Cage for mounting drives

Floppy disk drive and Hard disk drive

© above picture: Patterson and Hennessy

Page 33: cs2100-1-intro

2011 Sem 1 Introduction 33

SO, WHAT IS A COMPUTER? (5)

➤ PC motherboard

Page 34: cs2100-1-intro

2011 Sem 1 Introduction 34

SO, WHAT IS A COMPUTER? (6)

➤ Computer organisation

CPU

Computer

Control

Datapath

Memory Devices

Input

Output

Page 35: cs2100-1-intro

2011 Sem 1 Introduction 35

SO, WHAT IS A COMPUTER? (7)

➤ Inside a Pentium processor chip

Page 36: cs2100-1-intro

2011 Sem 1 Introduction 36

SO, WHAT IS A COMPUTER? (8)

➤ One of our focuses is the processor (datapath and control)– Implemented using millions of transistors

– Impossible to understand by looking at each transistor

– Hence, we need …

Page 37: cs2100-1-intro

2011 Sem 1 Introduction 37

Today

Intel Core 2 “Yorkfield” (45nm)Intel Core i7 “Bloomfield” (45nm)

Intel Core i7 “Gulftown” (32nm)

Page 38: cs2100-1-intro

2011 Sem 1 Introduction 38

From ground up

Transistor

Logic Gate

Circuits

Memory

Processor

Page 39: cs2100-1-intro

2011 Sem 1 Introduction 39

Fundamentals

➤ In the beginning… there was the transistor

William Shockley(1910-1989)

John Bardeen(1908-1991) Walter Houser Brattain

(1902-1987)

The 1956 Nobel Prize in Physics

"for their researches on semiconductors and their discovery of the transistor effect"

Won a second Nobel prize for Physics in 1972!

Page 40: cs2100-1-intro

2011 Sem 1 Introduction 40

On December 23, 1947…

➤ A single invention was to change the world

Page 41: cs2100-1-intro

2011 Sem 1 Introduction 41

So what is a transistor?

➤ It is a solid state switch– The input switches on or off the output– That why computers can only deal with 1’s

and 0’s – switch on or off

➤ It is an amplifier– The output signal is much stronger than the

input– You can connect things up

Page 42: cs2100-1-intro

2011 Sem 1 Introduction 42

The Metallic Oxide Semiconductor Field Effect Transistor

-

+

P- substrate

N+ source N+ drain

Gate

Gate oxide insulator

+

+ +

++

-

-

--

N-Channel Metallic Oxide Semiconductor Field Effect Transistor

Page 43: cs2100-1-intro

2011 Sem 1 Introduction 43

ACTION!

- - - - - - - - - - - - - - - - - - -

-

P- substrate

N+ source N+ drain

Gate

Gate oxide insulator

-

-

--

+++

+

+

-

++++++

-

+++++++++++++++

---

+-

N-Channel Metallic Oxide Semiconductor Field Effect Transistor

Page 44: cs2100-1-intro

2011 Sem 1 Introduction 44

State of the Art

Intel’s 90nm technology MOSFET

transistor (2002)

5 atoms thick oxide layer

The diameter of the human hair is about 20,000 nm

Page 45: cs2100-1-intro

2011 Sem 1 Introduction 45

From switch to gates

➤ Just switching on and off not enough to compute

➤ Need to build Boolean logic gates so as to compute Boolean logic functions

➤ The basic gates:– NOT– OR, AND– NAND, NOR

Page 46: cs2100-1-intro

2011 Sem 1 Introduction 46

N-channel and P-channel

Page 47: cs2100-1-intro

2011 Sem 1 Introduction 47

P-channel MOSFET

N-channel MOSFET

CMOS NOT Gate

VDD

GND

Input: 0 = 0V 1 = +5V

Output

CMOS Inverter

Page 48: cs2100-1-intro

2011 Sem 1 Introduction 48

P-channel MOSFET

N-channel MOSFET

CMOS NOT Gate

VDD

GND

Output = 0

CMOS Inverter

Input: 1 = +5V

Page 49: cs2100-1-intro

2011 Sem 1 Introduction 49

P-channel MOSFET

N-channel MOSFET

CMOS NOT Gate

VDD

GND

Output = 1

CMOS Inverter

Input: 0 = 0V

Page 50: cs2100-1-intro

2011 Sem 1 Introduction 50

A very important gateThe CMOS NAND gate

GND

Can you figure out what ishappening here?

A BA

AND

B

A

NAND

B

0 0 0 1

0 1 0 1

1 0 0 1

1 1 1 0

Page 51: cs2100-1-intro

2011 Sem 1 Introduction 51

Physical realization

GND

Page 52: cs2100-1-intro

2011 Sem 1 Introduction 52

An ExcursionHow do they make it?

Page 53: cs2100-1-intro

2011 Sem 1 Introduction 53

90nm, 65nm, 45nm…

The so-call technology node is the basic unit of the rules (the size of the grids) used to make such design. It is determined by many factors including the resolution of the printing, the purity of the material etc.

Each move from one node to another requires the building of entirely new wafer fabs – in the tune of billions of dollars.

Page 54: cs2100-1-intro

2011 Sem 1 Introduction 54

Today

Intel Core i7 “Bloomfield” (45nm)

Intel Core i7 “Gulftown” (32nm)

Intel “Sandy Bridge” (32nm)

216mm2

1.16 BILLION transistors

Page 55: cs2100-1-intro

2011 Sem 1 Introduction 55

I’ve seen the future, baby

An image of the template of the quantum dot device showing a central hole where seven phosphorus atoms are incorporated.

Running diagonally from top left to bottom right are the two electronic leads to connect to the dot.

May 24, 2010UNSW Centre for Quantum Computer Technology and University of Wisconsin-Madison

Page 56: cs2100-1-intro

2011 Sem 1 Introduction 56

ABSTRACTION (1/2)

➤ Delving into depth reveals more information

➤ Abstraction omits unnecessary details

Page 57: cs2100-1-intro

2011 Sem 1 Introduction 57

ABSTRACTION (2/2)

➤ Need to learn abstractions such as:– Application and system software– Assembly language and machine language– Architectural issues such as pipelining, caches, virtual memory– Combinational logic, arithmetic circuits– Sequential logic, finite state machines– Boolean logic (1s and 0s)– Transistors used to build logic gates (CMOS)– Semi-conductors/silicon used to build transistors– Properties of atoms, electrons and quantum dynamics

➤ So much to learn!

Page 58: cs2100-1-intro

2011 Sem 1 Introduction 58

HOW DO THE PIECES FIT TOGETHER?

I/O systemProcessor

Compiler

OperatingSystem

(Windows XP)

Instruction Set Architecture

Datapath & Control

Memory

Software

Assembler

Computer Architecture

Application (IE, Excel, etc.)

Digital Designtransistors

HardwareDigital Logic Design

➤ Coordination of many levels of abstraction➤ Under a rapidly changing set of forces➤ Design, measurement, and evaluation

Page 59: cs2100-1-intro

2011 Sem 1 Introduction 59

LEVELS OF REPRESENTATION

Page 60: cs2100-1-intro

2011 Sem 1 Introduction 60

WHAT WILL WE LEARN IN CS2100?

1. How are things represented in hardware?

➤ Binary representation

2. How are computations actually done using hardware?

➤ Boolean algebra➤ Computer arithmetic➤ Logic design

Page 61: cs2100-1-intro

2011 Sem 1 Introduction 61

WHAT WILL WE LEARN IN CS2100?

3. How to program the CPU at the level closest to hardware?

➤ Assembly programming

4. How are computer instructions processed internally?

➤ Control path➤ Data path➤ Pipelining

Page 62: cs2100-1-intro

2011 Sem 1 Introduction 62

WHAT WILL WE LEARN IN CS2100?

5. How does a computer record things?➤ Memory

6. How does communication take place internally?

➤ Bus

7. How does disk work?➤ Permanent recording media

Page 63: cs2100-1-intro

2011 Sem 1 Introduction 63

END