Sei sulla pagina 1di 20

Computer Architecture

Saleem Afzal Dhillon


Dept. of Computer Science
(UOG)
University of Gujrat

1
Summer 2012

Course Information
 http://groups.yahoo.com/summer_CA_2012_UOG

 Lectures
2 lectures/week.
 Lecture notes will be available at the web page.
 The whole set of last year’s lecture notes is on the UOGIS.
 Lecture notes following the course book’s structure are also
available via the web.

 Examination
 Written exam, closed book.

Course Information (cont’d)


 Literature
 William Stallings: Computer Organization and
Architecture, 8th edition, Peason Prentice Hall, 2010.
 http://williamstallings.com/COA/COA8e.html
 Available in the library
 You can also use:
• Older editions of this book.
• Books covering the same subjects.
Ex. Hennessy and Patterson: “Computer Architecture:
A Quantitative Approach.”

2
Course Information (cont’d)
 Labs
 Hands-on practice with concepts taught in the course.
 Familiar with tools for architecture evaluation via simulation.
 Give insights in various trade-offs involved in the design of computers.
 Enhance the understanding of parallel computer systems.

 Lab assignments
 Lab 1: Cache memories.
 Lab 2: Instruction Pipelining.
 Lab 3: Superscalar Processors.
 Lab 4: VLIW Processors.
 L b 5:
Lab 5 Multiprocessor
M lti andd Multi-Computer
M lti C t S Systems.
t

 Please sign up for the labs in the website before Nov 2.

 Additional information to be given in the lab seminar (lesson)


 Wednesday 3/11, 13-15 (Jakob S3, Ke U11); 15-17 (R22).

Lecture 1

 Computer architecture:
concepts and definitions

 CPU and instruction


execution

 What is expected from this


course

Zebo Peng, IDA, LiTH 6 TDTS 08 – Lecture 1

3
Computer Architecture
 Computer architecture refers to those attributes of a computer
system visible to programmers, or those attributes that have a
direct impact on the logical execution of programs.

Registers

Instruction
I/O Devices ALU
set

Memory
System

Many Definitions for CA


 “The science and art of selecting and
interconnecting hardware components to create
computers that meet functional,
functional performance
and cost goals.”
 “The theory behind the design of a computer.”
 “The conceptual design and fundamental
operational structure of a computer system.”
 “The
The arrangement of computer components and
their relationships.”
 …

4
Typical Architecture Attributes
 The instruction set.
 Basic data representation methods.
 I/O mechanisms.
h i
 The basic units in the CPU.
 Functions of the major components.
 Instruction execution.
 Memory organization.
organization
 The ways in which the basic components are
interconnected.
 …

Why Study Computer Architecture?

 To be a professional in any field of computing today, you


should not regard the computer as just a black box that
executes programs by magic
magic.
 You should understand a computer system’s functional
components, their characteristics, their performance, and
their interactions.
 You need to understand computer architecture in order
to build a program so that it runs more efficiently on a
machine.
hi
 When selecting a system to use, you should be able to
understand the tradeoff among various components,
such as CPU clock speed vs. memory size.

5
What is a computer?

Definition of a Computer
 A computer is a data processing machine which is
operated automatically under the control of a list of
instructions (called a program) stored in its main
memory.

Computer

C
Central Data transfer M i
Main
Processing Unit Memory
(CPU)
Control

6
A Computer System
 A computer system consists of a computer and its
peripherals.
 Computer peripherals include input devices
devices, output
devices, and secondary memories.

Computer System
Input Output
device
Computer
p device

Secondary
memory

Microprocessor Market Share


General-purpose computers

98%

2%

7
Basic Principles of Computers
Virtually all modern computer designs are based on the
von Neumann architecture principles:

 Data and instructions are stored in a CPU


single read/write memory.
 The contents of this memory are
addressable by location, without
regard to what are stored there.
 Instructions are executed sequentially
(from one instruction to the next)
unless the order is explicitly modified.
Memory

Why von Neumann Architecture?


 General-purpose, programmable.
 They can solve very different problems
by executing different programs.
 Instruction execution is done CPU
automatically.
 It can be built with very simple
electronics components:
 Data processing function is performed
b gates.
by t
 Data storage function is provided by
memory cells.
 Data communication is achieved by
electrical wires. Memory
Zebo Peng, IDA, LiTH 16 TDTS 08 – Lecture 1

8
Technology Development

Eniac, 1946

Sourc
e: S3

Moore’s Law

Number of transistors per chip


# of trans. would double every 1.5 years
100M
Clock Frequency (every 2 years)
75M Performance
Memory capacity
50M

25M

year
75 80 85 90 95 00

9
2010-10-20

Intel Microprocessor Evolution


2009/2/10
Intel 8‐core Xeon
2.3 Billion Transistor
45nm 

Intel 4004
2.3 Thousands 
transistors
10000 nm

Feb. 10, 2009

19 Images courtesy of Intel Corporation

Lecture 1

 Computer architecture:
concepts and definitions

 CPU and instruction


execution

 What is expected from this


course

10
Central Processing Unit (CPU)
The Central Processing Unit (CPU), also called
processor, includes two main units:
 A program control unit, and
 An Arithmetic and Logic Unit (ALU).

CPU
Arithmetic
Control Unit and Logic
Unit

Register

Zebo Peng, IDA, LiTH 21 TDTS 08 – Lecture 1

CPU (Cont’d)
 The primary function of a CPU is to execute the instructions
stored in the main memory.
 An instruction
st uct o tells
te s tthe
eCCPU
U to pe
perform
o o one
eoof its
ts bas
basicc
operations.
 The CPU includes also a set of registers, which are
temporary storage devices used to hold control information,
key data, and intermediate results.
 It includes also an internal bus infrastructure, which provides
data movement paths among the control unit unit, ALU
ALU, and
registers.
 The CU is the one which interprets (decodes) the instruction
to be executed and "tells" the other components what to do.

11
CPU Internal Structure

Registers
 CPU must have some working space (temporary
storage).
 These storage units are called registers.
 They are the top level component in the memory
hierarchy.
 Number and function of the registers vary
between different computers.
 Register organization is one of the major design
decisions.

12
2010-10-20

Register Organization
 The registers serve two main functions:
 User-Visible Registers: used by machine or
assembly language programmers to minimize
memory access.
• General-purpose registers
• Data registers
• Address registers
• Condition code registers
 Control and Status Registers: used by the control
unit to control the operation of the CPU, and by the
operating system to control the execution of
programs.

Machine Instructions
 The CPU can only execute machine code in binary format,
called machine instructions.
 A machine
ac e instruction
st uct o spec
specifies
es tthe
e following
o o g information:
o at o
 What has to be done (the operation code)
 To whom the operation applies (source operands)
 Where does the result go (destination operand)
 How to continue after the operation is finished (next instruction
address).
 Machine instructions are of four types:
 Arithmetic and logic operations.
 Data transfer between memory and CPU registers.
 Program control (conditional branches, etc.).
 I/O transfer.

13
2010-10-20

Instruction Set Design


 The design of an instruction set is critical to the operations
of a computer system. The most important issues are:
 Operation repertoire — How many and which operations to
provide, and how complex operations should be.
 Data types — Which data types to be supported.
 Instruction format — Length, number of addresses, size of various
fields, etc.
 Registers — Number of CPU registers and their use.
 Addressing — Which modes to be provided
provided.
 The issues are highly interrelated and must be considered
together.

Instruction Execution Mechanism

PC AR

Control Unit IR ALU

CPU
MAR MBR

Address D/I

Main Memory

14
2010-10-20

Instruction Execution
fetch cycle execute cycle

fetch decode execute

PC -> MAR Decode(IR) Perform the specified operation


M[MAR] -> MBR
MBR -> IR (memory access may be needed)
PC + 1 -> PC (PC may be changed)

PC AR

Control Unit IR ALU


CPU
MAR MBR

Machine Cycles
 The execution of an instruction is carried out in a machine
cycle (instruction cycle).
 The CPU executes one instruction after the other
other, cycle by
cycle, repeatedly.
 The machine cycle time (or instruction execution time) of a
computer gives an indication of its performance (speed).
 Ex. a computer can have a performance of 733 MIPS (Millions of
Instructions Per Second).
 Since different instructions need different time to execute
execute,
the average instruction execution time is used to calculate
performance.

15
2010-10-20

Summary
A computer executes repeatedly a series of instructions
(called programs) stored in its main memory:
 It performs data processing operations specified by the
programs.
 It runs the programs automatically, with no need for
human intervention.
 It can perform the operations in extremely high speed.
 It can store and manipulate
p a large
g amount of data.
 It can communicate with each other and with users in an
efficient way.
 It represents program and data in the same way, which
leads to flexibility.

Lecture 1

 Computer architecture: concept


and definitions

 CPU and instruction


execution

 What is expected from this


course

16
2010-10-20

Computer Architecture
 Computer architecture refers to those attributes of a computer
system visible to programmers, or those attributes that have a
direct impact on the logical execution of programs.

Registers

Instruction
I/O Devices ALU
set

Memory
System

Computer Organization
 Computer organization refers to the operational units and their
interconnections that realize the architectural specifications.

Registers Hidden Reg.

I/O Devices ALU

Memory Microprog.
System
Syste controller

 Ex. Multiplication function:


 Architectural issue: having a multiply instruction or not.
 Organization issue: a special multiply unit or repeated use of the add
unit to perform multiplication.

17
2010-10-20

Architecture vs. Organization


 The same architecture with different organizations
 All Intel x86 family share the same basic architecture.
 The IBM System/370 family share the same basic
architecture.
 Same architecture gives code compatibility.

Structure - Top Level

Peripherals Computer

Central Main
Processing Memory
Unit

Computer
Systems
Interconnection

Input
Output
Communication
lines

18
2010-10-20

Structure - The CPU

CPU

Computer Arithmetic
Registers and
I/O Login Unit
System CPU
Bus
Internal CPU
Memory Interconnection

Control
Unit

Structure - The Control Unit

Control Unit

CPU
Sequencing
ALU Login
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders

Control
Memory

19
2010-10-20

Lecture Contents
1. Introduction: Basic concepts and definitions of computer
architecture and organizations.
2. Memory System: Memory hierarchy, cache memories,
virtual memories, memory management.
3. Instruction Pipelining: Organization, pipeline hazards,
reducing branch penalties, branch prediction strategies.
4. RISC Architectures: Analysis of instruction execution,
compiling for RISC computers, RISC-CISC trade-offs.
5. Superscalar Architectures: Instruction level parallelism
and machine parallelism, HW techniques for performance
enhancement, limitations.
6. VLIW Architectures: VLIW advantages and limitations,
compiling for VLIW architectures, the Merced (Itanium)
architecture.

Lecture Contents (Cont’d)


7. Parallel Computation: Parallel programs, performance of
parallel computers, classification of architectures.
8. SIMD Architectures: Vector processors, array processors,
multimedia extensions.
9. MIMD Architectures: Symmetric multiprocessors, NUMA
architecture, and clusters.
10. Cache Coherence in Parallel Architectures: Cache
design for parallel system, cache coherence protocols.
11
11. Multi-Core
Multi Core Processor and GPU: Technology,
Technology hardware
issues, software impact, commercial examples.
12. Low-Power Architectures: Power consumption in CMOS
circuits, designing for low power, Crusoe processor.

20

Potrebbero piacerti anche