Date post: | 21-Dec-2015 |
Category: |
Documents |
View: | 218 times |
Download: | 1 times |
Computer Organization
Lecture Set – 01
Course Overview & Chapter 1
Huei-Yung Lin
CCUEE Computer Organization 2
Textbooks
Required: “Computer Organization and Design”, 3rd Ed. Patterson & Hennessy (No translation yet!)
References: “Computer Architecture: A Quantitative Approach”, 3rd Ed. Hennessy &
Patterson MIPS Assembly Language Programming,
http://www.eecs.harvard.edu/~ellard/Courses/cs50-asm.pdf Chapter 2: MIPS Tutorial Chapter 4: The MIPS R2000 Instruction Set
Programmed Instruction to MIPS Assembly Language, http://chortle.ccsu.edu/AssemblyTutorial/TutorialContents.html
Chapter 26 — Simple Subroutine Linkage. Chapter 27 — Stack-based Linkage Convention
CCUEE Computer Organization 3
Grading
Grading Policy (total score : 110): 2 Midterms: 40% (each with 20%) Final: 30% Home work 20%: NO LATE home work Participation & Quiz: 20%
Please note if you miss three quizzes, you will get 0 point from this category. Further, you will pay the extra penalty (5 points of the total score) for each missing quiz when you are absent over three quizzes.
No makeup exams!
CCUEE Computer Organization 4
Course Outline
Computer Abstractions and Technology (2 lectures) Instructions: Language of the Computer (6 lectures) Midterm #1 Arithmetic for Computers (6 lectures) Assessing and Understanding Performance (2 lectures) The Processor: Datapath and Control (3 lectures) Midterm #2 Enhancing Performance with Pipelining (5 lectures) Large and Fast: Exploiting Memory Hierarchy (3 lectures) Storage, Networks, and Other Peripherals (1 lectures) Final
CCUEE Computer Organization 5
Introduction
This course is all about how computers work But what do we mean by a computer?
Different types: desktops, servers, embedded devices Different uses: automobiles, graphics, finance, genomics, … Different manufacturers: Intel, Apple, IBM, Sun, … Different underlying technologies and different costs!
Analogy: consider a course on “automotive vehicles” Many similarities from vehicle to vehicle (e.g., wheels) Huge differences from vehicle to vehicle (e.g., gas vs. electric)
Best way to learn: Focus on a specific instance and learn how it works While learning general principles and historical perspectives
CCUEE Computer Organization 6
Why Learn This Stuff?
You want to call yourself a “computer scientist” You want to build software people use (need
performance) You need to make a purchasing decision or offer “expert”
advice
CCUEE Computer Organization 7
Overview
Both hardware and software affect program performance: Algorithm determines number of source-level statements
Determines both the count of source level statements and I/O operations Language/Compiler/Architecture determine machine instructions
(Chapters 2 and 3) Determine the number of machine instructions
Processor/Memory determine how fast instructions are executed (Chapters 5, 6 and 7) Determines how fast instructions are executed
I/O system (hardware and OS) (Chapter 8) Determines how fast I/O operations are executed
Accessing and understand performance in Chapter 4
CCUEE Computer Organization 8
Computer Systems Overview Technology Trends Instruction Sets (and Software) Logic and Arithmetic Performance Processor Implementation Memory Systems Input/Output
Roadmap for the Term: Major Topics
CCUEE Computer Organization 9
Classes of Computer Systems
EmbeddedDesktop Server
Image sources: Dell Computer www.dell.com Rackable Systems www.rackablecom Apple Computer www.apple.com
CCUEE Computer Organization 10
Desktop Computer Systems For “General-Purpose” Use
Word-Processing, Web surfing, Multimedia, etc. Computation and Programming
What’s in the box Microprocessor Memory - Synchronous DRAM Hard disk(s), CDROM/DVD, etc. I/O - mouse, keyboard, video card, monitor, network, etc.
Important Issues: Performance - how fast is “fast enough”? Basic capabilities (and expandability) Cost
CCUEE Computer Organization 11
Server Computer Systems
Large-Scale Services File storage Computation (e.g., supercomputers) Transaction Processing, Web
What’s in the Box(es) Microprocessor(s) Hard disks Network Interface(s)
Important issues: Performance Reliability, availability Cost
One Rack-Mount PC Unit(Google uses ~ 10,000)
CCUEE Computer Organization 12
Embedded Computer Systems Computer as part of larger system
Consumer electronics, appliances Networking, telecommunications Automotive / aircraft control
What’s in the box Microcontroller / Microprocessor Memory: RAM, ROM; Disk Special-purpose I/O (including analog stuff)
Important issues Cost, Power Consumption Performance (against real-time constraints) Reliability and Safety
CCUEE Computer Organization 13
“Five classic components”
Processor
Computer
Control(“brain”)
Datapath(“brawn”)
Memory
(where programs, data live whenrunning)
Devices
Input
Output
Keyboard, Mouse
Display, Printer
Disk (where programs, data live whennot running)
Computer System Organization
CCUEE Computer Organization 14
Executing Programs - the “fetch/execute” cycle Processor fetches instruction from memory Processor executes “machine language” instruction
Processor
Control
Datapath
100101001011000000101001010100011111011101100110100101001011000010010100101100001001010010110000
Memory
111101110110011010010100101100001001010010110000
nextinstr
OK, but how do we write useful programs using these instructions?
Load DataPerform Calculation
Store Results
Address
Instruction
Computer System Operation
CCUEE Computer Organization 15
55 E F
Abstractions in Computer Systems Designers use abstraction to manage complexity
Focus on pertinent information Suppress unnecessary detail
Example: Auto controls Well-understood interface (inputs, outputs) Details suppressed
CCUEE Computer Organization 16
Abstractions in Computer Systems
Coordination of many levels of abstraction
ComputerOrganization
I/O systemProcessor
CompilerOperating
System(Mac OS X)
Application (ex: browser)
Digital DesignCircuit Design
Instruction Set Architecture
Datapath & Control
transistors
MemoryHardware
Software Assembler
CCUEE Computer Organization 17
Machine Language 00000000001000100100000000100000
High-Level Language (C) c = a + b;
Assembly Language add R8,R1,R2
Assembler
Compiler
Software Abstractions - Languages
CCUEE Computer Organization 18
Operating system Insulates programmer from low-level details
Manages system resources Manages file system
Coordinates operation of multiple programs Protects from system from damage by user programs
(accidental or malicious) Programs interact with OS through system calls
Libraries Provide programmer access to high-level “primitives” Programs access through well-defined interface (API)
Software Abstractions - System Software
CCUEE Computer Organization 19
The most important abstraction of computer design
Logic - gates, state machines, etc.
Circuit - transistors, etc.
Layout - mask patterns, etc.
Hardware
Processor I/O System
Software
Compiler
Application Programs
Operating System
Application
Instruction Set ArchitectureInterface between SW & HW
Instruction Set Architecture (ISA) - The Hardware-Software Interface
CCUEE Computer Organization 20
Instruction Set Architecture
Also called architecture A very important abstraction
Interface between hardware and low-level software Includes instructions, registers, memory access, I/O and so on Advantage: different implementations of the same architecture Disadvantage: sometimes prevents using new innovations
True or False: Binary compatibility is extraordinarily important?
Modern instruction set architectures: IA-32, PowerPC, MIPS, SPARC, ARM, and others
CCUEE Computer Organization 21
Architecture: features visible to programmer Registers and memory model Data types Instructions
Organization: system implementation Processor design: Datapath, Control, “microarchitecture” System design: Processor + Memory, I/O
Architecture vs. Organization
CCUEE Computer Organization 22
Memory (Max. 4GB)
0x000000000x000000040x000000080x0000000C0x000000100x000000140x000000180x0000001C
0xfffffffc
0xfffffffc
32 bits
32 General Purpose Registers
R0R1R2
R30R31
PC = 0x0000001C
32 bitsRegisters
32
op rs rt offset
op rs rt rd functshamt
op address
Instruction Formats
Example Architecture: MIPS
CCUEE Computer Organization 23
Top 5 Reasons to Study MIPS
It’s in the book It’s used in many applications Learning its architecture and implementation exposes you
to important concepts It’s relatively simple and easy to implement (compared to
other architectures) Ideas presented using MIPS generalize to other
architectures (even the 80x86!)
CCUEE Computer Organization 24
Overview of Physical Implementations
The hardware out of which we make systems
Integrated Circuits (ICs) Combinational logic circuits, memory elements, analog interfaces
Printed Circuit Boards (PCB) Substrate for ICs and interconnection, distribution of CLK, Vdd, and
GND signals, heat dissipation Power Supplies
Converts line AC voltage to regulated DC low voltage levels. Chassis (rack, card case, ...)
Holds boards, power supply, provides physical interface to user or other systems
Connectors and Cables
CCUEE Computer Organization 25
Under the Hood: A Desktop PC Display (CRT or LCD) Keyboard, Mouse “The Box”
Power Supply Motherboard (see next slide)
Memory Graphics card Standard bus card slots (e.g. PCI) Standard I/O connectors (e.g. USB, Parallel Port, etc) Disks, CDRW, etc.
CCUEE Computer Organization 26
Organization of a Desktop PC
System Cotroller
(North Bridge)
DRAMMemory(DIMMs)
CPU
AGP Graphics Card
AGP (Graphics) Bus
Memory Bus
PCI Backplane Bus
Peripheral Bus Cotroller
(South Bridge)
LAN SCSI
ISA Bus*
USB
Dual EIDE BIOSROM
CCUEE Computer Organization 27
Typical Motherboard (Pentium III)
Rear Panel Conn.
Processor
Memory
N. Bridge
S. Bridge
IDE Disk Conn.
AGP
BIOS ROM
Floppy Conn.Power Conn.
PCI Cards
CCUEE Computer Organization 28
Explanations (I)
Northbridge is the chip or chips that connect a CPU to memory, the PCI bus, Level 2 cache and AGP activities.
Southbridge is the chip that controls all of the computers I/O functions, such as USB, audio, serial, the system BIOS, the ISA bus, the interrupt controller and the IDE channels.
Intelligent Drive Electronics (IDE) interface is an interface for mass storage devices, in which the controller is integrated into the disk or CD-ROM drive.
CCUEE Computer Organization 29
Explanations (II)
Accelerated Graphics Port: an interface specification developed by Intel Corporation. AGP is based on PCI, but is designed especially for the
throughput demands of 3-D graphics
Peripheral Component Interconnect: a local bus standard developed by Intel Corporation. Most modern PCs include a PCI bus in addition to a more general
ISA expansion bus.
Industry Standard Architecture bus, the bus architecture used in the IBM PC/XT and PC/AT.
CCUEE Computer Organization 30
BIOS (basic input/output system) A built-in software On PCs, the BIOS contains all the code required to
control the keyboard, display screen, disk drives, serial communications, and a number of miscellaneous functions.
The BIOS is typically placed in a ROM chip that comes with the computer (it is often called a ROM BIOS).
This ensures that the BIOS will always be available and will not be damaged by disk failures.
CCUEE Computer Organization 31
Source: EE Times, www.eetimes.com
Under the Hood: Apple iPod
CCUEE Computer Organization 32
Computer Systems Overview Technology Trends Instruction Sets (and Software) Logic and Arithmetic Performance Processor Implementation Memory Systems Input/Output
Roadmap for the Term: Major Topics
CCUEE Computer Organization 33
Computer Systems Overview
Types of Computer Systems Abstractions used in Computer Systems Architecture vs. Organization Common Architectures “Under the Hood” - chips and systems
CCUEE Computer Organization 34
Technology Trends
Historical Notes Current Technology (CMOS VLSI) Trends (Moore’s Law)
Image Source:Intel Corporationwww.intel.com
CCUEE Computer Organization 35
Instruction Sets (and Software) General principles of instruction set design The MIPS instruction set Software concerns: procedures, stacks, etc.
op rs rt offset
op rs rt rd functshamt
op address
CCUEE Computer Organization 36
Logic & Arithmetic
Quick review: binary numbers and arithmetic Adder & ALUs; multiplication & division Floating Point
A
B
F(A,B)
OperationSelect
ALU
CCUEE Computer Organization 37
Performance
Response Time vs. Throughput Measuring performance using individual programs Combining measurements Benchmarks
CCUEE Computer Organization 38
Processor Implementation
Basic implementation Single-Cycle Multicycle
Pipelined implementation Advanced techniques
0 2 4 6 8 10Time
12
IF ID EX MEM WB
14
IF ID EX MEM WB
IF ID EX MEM WB
IF ID EX MEM WB
14
CCUEE Computer Organization 39
Memory Systems
Memory Technology Overview Memory Hierarchy
Cache Memories - making access faster Virtual Memory - making memory larger using disk
Registers Cache
MemoryProcessor Disk
CCUEE Computer Organization 40
Input/Output
I/O Overview Impact of I/O on Performance Buses Interfacing
Image Source:Seagate Technolgy LLCwww.seagate.com
CCUEE Computer Organization 41
Roadmap for the Term: Major Topics Computer Systems Overview Technology Trends Instruction Sets (and Software) Logic and Arithmetic Performance Processor Implementation Memory Systems Input/Output
CCUEE Computer Organization 42
Outline - Technology Trends
Brief History of Computer Technology Today’s Technology: VLSI CMOS VLSI Technology Trends
CCUEE Computer Organization 43
1940s-50s - Vacuum Tubes 1950s-60s - Discrete Transistors 1960s-70s - Discrete ICs (e.g., TTL) 1970s-present - LSI and VLSI microprocessors
A Brief History of Computer Technology
CCUEE Computer Organization 44
Computer History - 1940s-1960s
ENIAC - 1940s(Vacuum Tubes)
IBM 360 - 1960s(Transistors)
CCUEE Computer Organization 45
Computer History - 1970s
DEC VAX 11/780 - 1970s(Discrete IC’s)
Intel 4004 - 1970s(First Microprocessor)
CCUEE Computer Organization 46
Computer History - 1970s
MOS Technology 6502
Apple II Computer
CCUEE Computer Organization 47
Computer History - 1980s
Intel 8088(LSI Microprocessor) Original IBM PC
Images:Intel Corporation www.intel.compcbiography members.tripod.com/pcmuseum
CCUEE Computer Organization 48
Outline - Technology Trends
Brief History of Computer Technology Today’s Technology: VLSI VLSI Technology Trends
CCUEE Computer Organization 49
Today: VLSI Microprocessors
PowerPC 7400 (G4)6.5M transistors / 450MHz / 8-10W
L=0.15µm
Pentium® III28M transistors / 733MHz-1Gz / 13-26W
L=0.25µm shrunk to L=0.18µm
CCUEE Computer Organization 50
Today: VLSI Microprocessors
Pentium® 442M transistors / 1.3-1.8GHz
49-55WL=180nm
Pentium® 4 “Northwood”55M transistors / 2-2.5GHz
55WL=130nm Area=131mm2
Process Shrinks
Pentium® 4 “Prescott”125M transistors / 2.8-3.4GHz
115WL=90nm Area=112mm2
CCUEE Computer Organization 51
Today: VLSI Microprocessors
PowerPC® 940 (G5)58M transistors / 2GHz / 97W
L=130nm Area=118mm2
Image courtesy International Business Machines All Rights ReservedIntel Itanium® 2
410M transistors / 1.3GHz / 130WL=130nm Area=374mm2
Image source: Intel Corporation www.intel.com
CCUEE Computer Organization 52
VLSI Technology Overview
Fabrication of multiple transistors on a chip Dominant technology: CMOS Other technologies:
Bipolar (e.g., TTL) Bi-CMOS - hybrid Bipolar, CMOS GaAs - Gallium Arsenide (for high speed) Si-Ge - Silicon Germanium (for high speed, RF)
CCUEE Computer Organization 53
2002: L=130nm2003: L=90nm2005: L=65nm?
Transistor length Lshrinks over time!
p+ p+
n substrate
channel
Source Drain
p transistor
G
S
D
SB
Polysilicon GateSiO2
Insulator L
W
G
substrate connectedto VDD
Polysilicon GateSiO2
Insulator
n+ n+
p substrate
channel
Source Drain
n transistor
G
S
D
SB
LW
G
S
D
substrate connectedto GND
VLSI Technology - CMOS Transistors
CCUEE Computer Organization 54
A
B
A B
OUT B
A
A
B
OUT
NAND NOR
What logic functions do these gates perform?
VLSI Technology - CMOS Logic Gates
CCUEE Computer Organization 55
VLSI Processing (Fig. 1-14)
CCUEE Computer Organization 56
Integrated Circuits (2003 State-of-the-Art)
Primarily Crystalline Silicon 1mm - 25mm on a side 2003 - feature size ~ 0.13µm = 0.13 x 10-6 m 100 - 400M transistors (25 - 100M “logic gates") 3 - 10 conductive layers “CMOS” (complementary metal oxide
semiconductor) - most common.
Package provides: spreading of chip-level signal paths to board-
level heat dissipation.
Ceramic or plastic with gold wires.
Chip in Package
Bare Die
CCUEE Computer Organization 57
Printed Circuit Boards (PCB)
Fiberglass or ceramic 1-20 conductive layers 1-20in on a side IC packages are soldered
down
CCUEE Computer Organization 58
VLSI Design Tradeoffs
Cost - related to chip size Amount of logic Current technology Non recurring engineering (NRE) cost vs. unit cost
Performance Clock speed Implementation Application
Power consumption Power supply voltage Clock speed
CCUEE Computer Organization 59
Outline - Technology Trends
Brief History of Computer Technology Today’s Technology: VLSI VLSI Technology Trends
CCUEE Computer Organization 60
VLSI Trends: Moore’s Law
In 1965, Gordon Moore predicted that transistors would continue to shrink, allowing: Doubled transistor density every 24 months Doubled performance every 18 months
History has proven Moore right But, is the end in sight?
Physical limitations Economic limitations
I’m smilingbecause I was right!
BUT… No exponential
is forever!
Gordon MooreIntel Co-Founder and Chairmain Emeritus
Image source: Intel Corporation www.intel.com
CCUEE Computer Organization 61
Year Chip L transistors
1971 4004 10µm 2.3K
1974 8080 6µm 6.0K
1976 8088 3µm 29K
1982 80286 1.5µm 134K
1985 80386 1.5µm 275K
1989 80486 0.8µm 1.2M
1993 Pentium® 0.8µm 3.1M
1995 Pentium® Pro 0.6µm 15.5M
1999 Mobile PII 0.25µm 27.4
2000 Pentium® 4 0.18µm 42M
2002 Pentium® 4 (N) 0.13µm 55M
2003 Itanium® 2 (M) 0.13µm 410M
Source: http://www.intel.com/pressroom/kits/quickreffam.htm, EE Times
Microprocessor Trends (Intel)
CCUEE Computer Organization 62
Technology Trends: Microprocessor Complexity
Year
Transisto
rs
1000
10000
100000
1000000
10000000
100000000
1970 1975 1980 1985 1990 1995 2000
i80386
i4004
i8080
Pentium
i80486
i80286
i80862X transistors/ChipEvery 1.5 years
Called “Moore’s Law”
Alpha 21264: 15 millionPentium Pro: 5.5 millionPowerPC 620: 6.9 millionAlpha 21164: 9.3 millionSparc Ultra: 5.2 million
Moore’s Law
Athlon (K7): 22 Million
Itanium 2: 410 Million
CCUEE Computer Organization 63
Technology Trends: Processor Performance
0100200300400500600700800900
87 88 89 90 91 92 93 94 95 96 97
DEC Alpha21264/600
DEC Alpha 5/500
DEC Alpha 5/300
DEC Alpha 4/266
IBM POWER 100
1.54X/yr
Intel P4 2000 MHz(Fall 2001)
year
Pe
rfo
rma
nc
e m
eas
ure
CCUEE Computer Organization 64
Technology Trends: Memory Capacity (Single Chip DRAM)
size
Year
Bits
1000
10000
100000
1000000
10000000
100000000
1000000000
1970 1975 1980 1985 1990 1995 2000
year size (Mbit)
1980 0.0625
1983 0.25
1986 1
1989 4
1992 16
1996 64
1998 128
2000 256
2002 512
CCUEE Computer Organization 65
Summary - Technology Trends Processor
Logic capacity increases ~ 30% per year Clock frequency increases ~ 20% per year Cost per function decreases ~20% per year
Memory DRAM capacity: increases ~ 60% per year
(4x every 3 years) Speed: increases ~ 10% per year Cost per bit: decreases ~25% per year
Disk Storage capacity increases ~ 60% per year
CCUEE Computer Organization 66
Summary
5 classic components of all computers Control Datapath Memory Input Output
processor Two key technologies for modern processors
Compilers Silicon
Two key ideas for Exploiting parallelism via pipelining Exploiting locality of access via caches
CCUEE Computer Organization 67
Computer Systems Overview Technology Trends Instruction Sets (and Software) Logic & Arithmetic Performance Processor Implementation Memory systems Input/Output
Roadmap for the Term: Major Topics
CCUEE Computer Organization 68
References
Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann Publishers all rights
reserved Tod Amon's COD2e Slides © 1998 Morgan Kaufmann
Publishers all rights reserved Dave Patterson’s CS 152 Slides – Fall 1997 © UCB Rob Rutenbar’s 18-347 Slides – Fall 1999 CMU John Nestor’s ECE 313 Slides – Fall 2004 LC T.S. Chang’s DEE 1050 Slides – Fall 2004 NCTU Other sources as noted