You are on page 1of 26

B261 Systems Architecture

Chris Clack
clack@cs.ucl.ac.uk
b261-request@cs.ucl.ac.uk
http://www.cs.ucl.ac.uk/teaching/B261
Objectives
To understand the fundamentals of computer
organisation and design
processor (datapath and control)
memory
input and output
To protect you against unscrupulous
sales(wo)men!
To accomplish this by learning how to control a
computer at a low level (assembler)
B261 Topics

Introduction, definitions, performance


Instruction sets
Programming in MIPS
Representation of numbers/arithmetic
Memory and virtual memory
Peripheral devices i/o
Examples of other systems
Reading

DA Patterson and JL Hennessy


“Computer Organization and Design” 2nd.ed.
Morgan Kaufmann publishers
£29.95 paperback, ISBN 1-55860-491-X
Available by telephone, quoting your credit card
number, from Harcourt Brace (speak to Kerry
Rochester on one of these numbers: 0181-308-5700
or 0181-308-5710 or 0171-424-4200)
May (?) soon be available in Waterstones
Or get 2nd hand from 3rdyr student
Organisation
3 Lectures p.w.
G22, Pearson Building
BEWARE: This week’s Thursday 10th Jan
lectures cancelled!!!!
One tutorial/practical session p.w.
to be taken by (To Be Announced)
Fridays, 10-11 or 11-12, room 203
see Webpage for allocation !
covering theory + help with exercises
Join the mailing group b261
http://www.cs.ucl.ac.uk/teaching/B261
Today
Organisational matters
Brief overview of computer organisation
Stored program computer
bits
bytes
levels of abstraction
memory
cache
instructions
Performance
Computer Organisation

Processor: interrupts
datapath
control

Cache
main bus

Main I/O I/O I/O


Memory Controller Controller Controller

Graphics Keyboard
display
A Puzzle

What does the following mean?


00000000001000100100000000100000
00000000011001000100100000100000
00000001000010010010100000100010
OK, then, this?
000000 00001 00010 01000 00000 100000
000000 00011 00100 01001 00000 100000
000000 01000 01001 00101 00000 100010
Translation

And this?
0 1 2 8 0 32
0 3 4 9 0 32
0 8 9 5 0 34
How about this?
add $8,$1,$2
add $9,£3,$4
sub $5,$8,$9
More Translation

Becoming clear?
$8 = $1 + $2
$9 = $3 + $4
$5 = $8 - $9
Surely OK now?
u = a +b
v = c+d;
x=u-v
Or, obviously: x = (a+b) - (c+d)
Levels of Abstraction

Program x = (a+b) - (c+d)


source code

compiler
add $8,$1,$2
add $9,£3,$4
Assembly code
sub $5,$8,$9

Assembler
00000000001000100100000000100000
00000000011001000100100000100000
Machine code 00000001000010010010100000100010
Another Interpretation?

What does the following mean?


00000000001000100100000000100000
It could mean, instead:
25 + 214 + 217 + 221
= 32 + 16384 + 131072 + 2097152
= 2244640
Computer Architecture
Stored Program Computer

Fundamental principals of a computer:


instructions are stored as numbers
data is (obviously?) stored as numbers
programs and data are stored in the same
memory
They are loaded
store instructions to the CPU, data
ALU and data into registers,
Main Memoryare stored instructions
in memory. executed, results
Registers load stored into memory
CPU
Memory in MIPS architecture

Byte
An array of words 3 2 1 0
word is 32 bits
consisting of four 8-bit bytes 3 2 1 0

Memory addresses refer to 7 6 5 4


bytes rather than words:
So each memory address
contains 8 bits
There are 230 memory words
in this architecture
Registers

A register is single word store, in the


CPU, close to the ALU.
The ALU has extremely fast access to the
registers (discussed later in course)
In modern RISC based computers
All instructions are carried out on data stored
in registers
There are load and store instructions from
main memory to the registers.
In MIPS there are 32 registers $0...$31
Instruction Set

The instruction set specifies the lowest


level computational capabilities of the
computer.
The instruction set is like the ‘vocabulary’
of the computer, the instructions are its
‘words’.
There is (almost) a 1-1 mapping between
binary machine instructions, and
symbolic representations in assembly
language.
Instruction Set Architecture (From Patterson)

. . . the attributes of a [computing] system as seen by the


programmer, i.e. the conceptual structure and functional
behavior, as distinct from the organization of the data
flows and controls, the logic design, and the physical
implementation.
SOFTWARE
Amdahl, Blaaw, and Brooks, 1964
-- Organization of Programmable
Storage

-- Data Types & Data Structures:


Encodings & Representations

-- Instruction Formats

-- Instruction (or Operation Code) Set

-- Modes of Addressing and Accessing Data Items and Instructions

-- Exceptional Conditions
What is "Computer Architecture" (Patterson)

° Co-ordination of levels of abstraction

Application

Operating
Compiler System
Instruction Set
Architecture
Instr. Set Proc. I/O system
Digital Design
Circuit Design

° Under a set of rapidly changing Forces


Forces on Computer Architecture (Patterson)

Programming
Technology Languages

Applications
Computer
Architecture

Operating
Systems
History
Trends in Performance

Computers have become incredibly more


powerful since they were invented in the
1930s.
A hand held-computer is typically more
powerful
processor speed, memory
Than a room sized computer of a
generation ago.
Trends in Performance

Nobody anticipated the phenomenal growth


of computing power:
“Where…the ENIAC is equipped with 18,000
vacuum tubes and weighs 30 tons, computers
in the future may have 1,000 vacuum tubes
and perhaps weigh just 1.5 tons”
Popular Mechanics, March 1949
Similarly, we can’t tell what computing will be
like 50 years from now!
Technology: Microprocessor Logic Density (Patterson)

10000000

r4400
i80486 r4000
1000000

i80386
i80286
100000
r3010

i8086
10000
i8080
i8008
i4004

1000
1970 1975 1980 1985 1990 1995 2000

Memory: 4x every 3 years


Performance Trends (Patterson)

1000

Supercomputers
100
Mainframes
Performance

10
Minicomputers

Microprocessors
1

0.1
1965 1970 1975 1980 1985 1990 1995 2000

Year
CPU and LAN Performance (Patterson)

Relative
Performance

CPU
(spec)

1000
LAN
DEC 1 Gb ATM
100 Alpha

MIPS
10 M/120
100 Mb FDDI
10 Mb
1
Year
1980 1985 1990 1995 2000
Summary

Computer organisation overview


Stored program computer
Memory, registers
Levels of abstraction
Instruction set architecture
Performance trends

You might also like