+ All Categories
Home > Documents > CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer...

CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer...

Date post: 17-Jan-2016
Category:
Upload: cori-austin
View: 219 times
Download: 0 times
Share this document with a friend
33
CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC Berkeley Copyright (C) 2001 UCB
Transcript
Page 1: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

CPSC 321Computer Architecture

Summer 2005

Lecture 1

Introduction and Five Components of a ComputerPraveen Bhojwani

Adapted from CS 152 Spring 2002 UC Berkeley

Copyright (C) 2001 UCB

Page 2: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Course Information• Instructor

– Praveen Bhojwani [email protected]• 514B, HRBB tel: 458-0833

• Office Hours: to be announced on the class website

• TA– Ping Luo [email protected]

Page 3: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Course Information [contd…]

• Grading: Projects, Labs, Exams– Labs 20%– Mid Term 20%– Finals 25%– Projects 30%– Quizzes 5%

• Labs– MIPS (Assembly Programming), Verilog (HDL)

• Projects– Project 1: MIPS – Projects 2 & 3: Verilog (Datapath Design)

Page 4: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Course Information [contd…]

• Books– Computer Organization and Design: The Hardware/Software

Interface, Second Edition ,

David A. Patterson and John L. Hennessy, 2nd edition, Morgran Kaufmann Publishers.

– Digital Design

M. Morris Mano, 3rd Edition, Prentice Hall

– Check the course webpage for other materials and links

Page 5: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Course Information [contd…]

• Course Webpage– http://students.cs.tamu.edu/praveenb/cpsc321

• CS Accounts– Use your CS accounts to turnin and check

any email regarding course

Page 6: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Course Overview

34-b it A LU

LO register(16x2 bits)

Load

HI

Cle

arH

I

Load

LO

M ultiplicandRegister

S h iftA ll

LoadM p

Extra

2 bits

3 232

LO [1 :0 ]

Result[H I] Result[LO]

32 32

Prev

LO[1]

Booth

Encoder E N C [0 ]

E N C [2 ]

"LO

[0]"

Con trolLog ic

InputM ultiplier

32

S ub /A dd

2

34

34

32

InputM ultiplicand

32=>34sig nEx

34

34x2 M U X

32=>34sig nEx

<<13 4

E N C [1 ]

M ulti x2 /x1

2

2HI register(16x2 bits)

2

01

3 4 Arithmetic

Single/multicycleDatapaths

Computer Arithmetic

Datapaths

Page 7: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Course Overview [contd…]IFetchDcd Exec Mem WB

IFetchDcd Exec Mem WB

IFetchDcd Exec Mem WB

IFetchDcd Exec Mem WB

Pipelining

Memory Systems

Performance

Memory

Page 8: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

What’s in for me ?

• In-depth understanding of the inner-workings of modern computers, their evolution, and trade-offs present at the hardware/software boundary.– Insight into fast/slow operations that are easy/hard to

implementation hardware

• Experience with the design process in the context of a large complex (hardware) design.– Functional Spec --> Control & Datapath --> Physical

implementation– Modern CAD tools

Page 9: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Computer Architecture - Definition

• Computer Architecture = ISA + MO

• Instruction Set Architecture– What the executable can “see” as underlying hardware– Logical View

• Machine Organization– How the hardware implements ISA ?– Physical View

Page 10: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Computer Architecture – Changing Definition• 1950s to 1960s: Computer Architecture Course:

–Computer Arithmetic

• 1970s to mid 1980s: Computer Architecture Course: –Instruction Set Design, especially ISA appropriate for compilers

• 1990s: Computer Architecture Course:Design of CPU, memory system, I/O system, Multiprocessors, Networks

• 2000s: Computer Architecture Course: –Non Von-Neumann architectures, Reconfiguration

• DNA Computing, Quantum Computing ????

Page 11: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Some Examples …° Digital Alpha (v1, v3) 1992-97

° HP PA-RISC (v1.1, v2.0) 1986-96

° Sun Sparc (v8, v9) 1987-95

° SGI MIPS (MIPS I, II, III, IV, V)1986-96

° Intel (8086,80286,80386,1978-96 80486,Pentium, MMX, ...)

Page 12: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

The MIPS R3000 ISA (Summary)

• Instruction Categories

– Load/Store– Computational– Jump and Branch– Floating Point

• coprocessor– Memory Management– Special

R0 - R31

PCHI

LO

OP

OP

OP

rs rt rd sa funct

rs rt immediate

jump target

3 Instruction Formats: all 32 bits wide

Page 13: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

CPSC 321

“What” is Computer Architecture ?

I/O systemInstr. Set Proc.

Compiler

OperatingSystem

Application

Digital DesignCircuit Design

Instruction Set Architecture

Firmware

• Coordination of many levels of abstraction• Under a rapidly changing set of forces• Design, Measurement, and Evaluation

Datapath & Control

Layout

Page 14: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Impact of changing ISA

• Early 1990’s Apple switched instruction set architecture of the Macintosh– From Motorola 68000-based machines

– To PowerPC architecture

• Intel 80x86 Family: many implementations of same architecture– program written in 1978 for 8086 can be run

on latest Pentium chip

Page 15: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Factors affecting ISA ???

ComputerArchitecture

Technology ProgrammingLanguages

OperatingSystems

History

Applications

Cleverness

Page 16: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

ISA: Critical Interface

instruction set

software

hardware

Examples: 80x86 50,000,000 vs. MIPS 5500,000 ???

Page 17: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

The Big Picture

Control

Datapath

Memory

Processor

Input

Output

Since 1946 all computers have had 5 components!!!

Page 18: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Technology Trends

• Processor– logic capacity: about 30% per year– clock rate: about 20% per year

• Memory– DRAM capacity: about 60% per year (4x every 3 years)– Memory speed: about 10% per year– Cost per bit: improves about 25% per year

• Disk– capacity: about 60% per year– Total use of data: 100% per 9 months!

• Network Bandwidth– Bandwidth increasing more than 100% per year!

Page 19: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

i4004

i8086

i80386

Pentium

i80486

i80286

SU MIPS

R3010

R4400

R10000

1000

10000

100000

1000000

10000000

100000000

1965 1970 1975 1980 1985 1990 1995 2000 2005

Transistors

i80x86

M68K

MIPS

Alpha

° In ~1985 the single-chip processor (32-bit) and the single-board computer emerged

° In the 2002+ timeframe, these may well look like mainframes compared single-chip computer (maybe 2 chips)

DRAMYear Size1980 64 Kb1983 256 Kb1986 1 Mb1989 4 Mb1992 16 Mb1996 64 Mb1999 256 Mb2002 1 Gb

uP-Name

Microprocessor Logic DensityDRAM chip capacity

Technology Trends

Page 20: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Technology Trends

Smaller feature sizes – higher speed, density

ECE/CS 752; copyright J. E. Smith, 2002 (Univ. of Wisconsin)

Page 21: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Technology Trends

Number of transistors doubles every 18 months

(amended to 24 months)

ECE/CS 752; copyright J. E. Smith, 2002 (Univ. of Wisconsin)

Page 22: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Levels of RepresentationHigh Level Language

Program

Assembly Language Program

Machine Language Program

Control Signal Specification

Compiler

Assembler

Machine Interpretation

temp = v[k];

v[k] = v[k+1];

v[k+1] = temp;

• lw $15, 0($2)• lw $16, 4($2)• sw $16, 0($2)• sw $15, 4($2)

0000 1001 1100 0110 1010 1111 0101 10001010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111

ALUOP[0:3] <= InstReg[9:11] & MASK

Page 23: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Execution CycleInstruction

Fetch

Instruction

Decode

Operand

Fetch

Execute

Result

Store

Next

Instruction

Obtain instruction from program storage

Determine required actions and instruction size

Locate and obtain operand data

Compute result value or status

Deposit results in storage for later use

Determine successor instruction

Page 24: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

The Role of Performance

Page 25: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Performance Metrics

• Response Time– Delay between start end end time of a task

• Throughput– Numbers of tasks per given time

Page 26: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Examples (Throughput/Performance)

• Replacing the processor with a faster version ?

• Adding additional processor to a system ?

Page 27: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Measuring Performance

• Wall-clock time –or- Total Execution Time

• CPU Time– User Time– System Time

Try using time command on UNIX system

Page 28: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Relating the Metrics

• Performance = 1/Execution Time

• CPU Execution Time = CPU clock cycles for program x Clock cycle time

• CPU clock cycles = Instructions for a program x Average clock cycles per Instruction

Page 29: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Amdahl’s Law

• Pitfall: Expecting the improvement of one aspect of a machine to increase performance by an amount proportional to the size of improvement

Page 30: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Amhdahl’s Law [contd…]

• A program runs in 100 seconds on a machine, with multiply operations responsible for 80 seconds of this time. How much do I have to improve the speed of multiplication if I want my program to run five times faster ?

• Execution Time After improvement = (exec time affected by improvement/amount of improvement) + exec time unaffectedexec time after improvement = (80 seconds / n) + (100 – 80 seconds)

We want performance to be 5 times faster =>

20 seconds = 80/n seconds / n + 20 seconds

0 = 80 / n !!!!

Page 31: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Amdahl’s Law [contd…]

• Opportunity for improvement is affected by how much time the event consumes

• Make the common case fast

Page 32: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Summary • Computer Architecture = Instruction Set Architure + Machine

Organization• All computers consist of five components

– Processor: (1) datapath and (2) control– (3) Memory– (4) Input devices and (5) Output devices

• Not all “memory” are created equally– Cache: fast (expensive) memory are placed closer to the

processor– Main memory: less expensive memory--we can have more

• Interfaces are where the problems are - between functional units and between the computer and the outside world

• Need to design against constraints of performance, power, area and cost

Page 33: CPSC 321 Computer Architecture Summer 2005 Lecture 1 Introduction and Five Components of a Computer Praveen Bhojwani Adapted from CS 152 Spring 2002 UC.

Summary

• Performance “eye of the beholder”

Seconds/program =

(Instructions/Pgm)x(Clk Cycles/Instructions)x(Seconds/Clk cycles)

• Amdahl’s Law “Make the Common Case Faster”


Recommended