CPSC 321 Computer Architecture

Download Report

Transcript CPSC 321 Computer Architecture

ELEN 350
Computer Architecture
Spring 2005
Introduction and Five Components of a Computer
Adapted from CS 152 Spring 2002 UC Berkeley
Adapted from CPSC 321 Fall 2004 Hank Walker, TAMU
Course Instructor
Weiping Shi ([email protected])
• Class time: MWF 11:30am-12:20pm
• Office hour: TuF 3:00pm-5:00pm or by appt.
• 320 WERC, Tel: 458-0093
• TA and Grader: TBA
Course Information [contd…]
• Grading: Projects, Assignments, Exams
– Quizs
10%
– Midterm
30%
– Final
30%
– Assignments 30%
• Assignments include
– Verilog (HDL)
– MIPS (Assembly Programming)
– More like project
Course Information [contd…]
• Required Text
– Computer Organization and Design: The Hardware/Software
Interface, Third Edition ,
David A. Patterson and John L. Hennessy, Morgan Kaufmann
Publishers
• Reference Information
– Check the course webpage for other materials and links
Course Information [contd…]
• Course Webpage
– http://ece.tamu.edu/~wshi/350.html
Course Overview
Input
Multiplier
Input
Multiplicand
32
Multiplicand
Register
LoadMp
32=>34
signEx
<<1
32
34
34
32=>34
signEx
1
Arithmetic
0
34x2 MUX
Multi x2/x1
34
34
Sub/Add
34-bit ALU
Control
Logic
32
ShiftAll
LO register
(16x2 bits)
Prev
2
Booth
Encoder
HI register
(16x2 bits)
LO[1]
ENC[2]
ENC[1]
ENC[0]
LoadLO
2
LoadHI
Extra
2 bits
2
ClearHI
2
"LO
[0]"
34
32
Computer Arithmetic
32
Result[HI]
LO[1:0]
32
Result[LO]
Single/multicycle
Datapaths
Datapaths
Course Overview [contd…]
IFetchDcd
Exec Mem
IFetchDcd
WB
Exec Mem
IFetchDcd
WB
Exec Mem
IFetchDcd
WB
Exec Mem
Performance
WB
Pipelining
Memory
Memory Systems
What’s In It For Me ?
• In-depth understanding of the inner-workings of
modern computers, their evolution, and tradeoffs 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
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
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 ????
Some Examples …
° Digital Alpha
(v1, v3)
1992-97
RIP soon
° HP PA-RISC
(v1.1, v2.0) 1986-96
RIP soon
° Sun SPARC
(v8, v9)
1987-95
° SGI MIPS (MIPS I, II, III, IV, V) 1986-96
° IA-16/32 (8086,286,386, 486, 1978-1999
Pentium, MMX, SSE, …)
° IA-64 (Itanium)
1996-now
° AMD64/EMT64
2002-now
° IBM POWER (PowerPC,…)
1990-now
° Many dead processor architectures live on in
microcontrollers
“What” is Computer Architecture ?
Application
Operating
System
Compiler
CPSC 321
Firmware
Instr. Set Proc. I/O system
Datapath & Control
Digital Design
Circuit Design
Layout
• Coordination of many levels of abstraction
• Under a rapidly changing set of forces
• Design, Measurement, and Evaluation
Instruction Set
Architecture
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
Factors Affecting ISA ???
Technology
Programming
Languages
Applications
Computer
Architecture
Cleverness
Operating
Systems
History
ISA: Critical Interface
software
instruction set
hardware
Examples: 80x86 50,000,000 vs. MIPS 5500,000 ???
The Big Picture
Processor
Input
Control
Memory
Datapath
Output
Since 1946 all computers have had 5 components!!!
Example Organization
• TI SuperSPARCtm TMS390Z50 in Sun SPARCstation20
MBus Module
SuperSPARC
Floating-point Unit
L2
$
Integer Unit
Inst
Cache
Ref
MMU
Data
Cache
CC
MBus
L64852 MBus control
M-S Adapter
SBus
Store
Buffer
Bus Interface
DRAM
Controller
SBus
DMA
SBus
Cards
SCSI
Ethernet
STDIO
serial
kbd
mouse
audio
RTC
Floppy
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!
Technology Trends
Microprocessor Logic Density
DRAM chip capacity
10000000
uP-Name
R10000
Pentium
R4400
i80486
1000000
Transistors
Year
1980
1983
1986
1989
1992
1996
1999
2002
DRAM
Size
64 Kb
256 Kb
1 Mb
4 Mb
16 Mb
64 Mb
256 Mb
1 Gb
100000000
i80386
i80286
100000
R3010
i8086
SU MIPS
i80x86
M68K
10000
MIPS
Alpha
i4004
1000
1965
1970
1975
1980
1985
1990
1995
2000
2005
°
In ~1985 the single-chip processor (32-bit) and the single-board computer emerged
°
In ~2002 started having multiple processor cores on a chip (IBM POWER4)
Technology Trends
Smaller feature sizes – higher speed, density
ECE/CS 752; copyright J. E. Smith, 2002 (Univ. of Wisconsin)
Technology Trends
Number of transistors doubles every 18 months
(amended to 24 months)
ECE/CS 752; copyright J. E. Smith, 2002 (Univ. of Wisconsin)
The Role of Performance
Example of Performance Measure
Performance Metrics
• Response Time
– Delay between start end end time of a task
• Throughput
– Numbers of tasks per given time
Examples
(Throughput/Performance)
• Replacing the processor with a faster
version ?
• Adding additional processor to a system ?
Measuring Performance
• Wall-clock time –or- Total Execution Time
• CPU Time
– User Time
– System Time
Try using time command on UNIX system
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
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
Summary
• Performance “eye of the beholder”
• Running time = IC*CPI*cycle time
– IC (instruction count), depends on instruction
set and compiler
– CPI (cycles per instruction), depends on
architecture
– Cycle time, depends on VLSI technology, not
discussed in this course