Tik-61.123 Computer Architecture
Download
Report
Transcript Tik-61.123 Computer Architecture
T-61.123 Computer Architecture,
Autumn 2005
• Target:
To understand how a computer works
– how the data is processed; how the processing
is controlled
– how the data is stored in the memory
– how the data is input and output
– how to measure performance; what affects
performance
17/07/2015
CA/Intro
1
Course Administration
• Instructor:
Dr. Seppo Haltsonen
([email protected])
• Course assistants: ([email protected])
– give all kind of help
– can be best contacted by e-mail and during
tutorial sessions
17/07/2015
CA/Intro
2
Course Administration
• Materials:
http://www.cis.hut.fi/Opinnot/T-61.123/
– mostly in English
• Newsgroup:
17/07/2015
opinnot.tik.tark
CA/Intro
3
Teaching
• 11 lectures on Thursdays at 16.15 starting
on 15th September
– in Finnish
• 6 tutorial sessions, extra points available
– every second week, starting on week 38
– for time and place see the course homepage
• individual project
17/07/2015
CA/Intro
4
Project
• Write and test a MIPS program.
• For assistants’ consulting hours see the
course homepage.
• Report deadline is 9th December.
– If late at most two weeks, the grade will be
reduced by 2; after that a new topic will be given
next year.
• Detailed instructions will be given later.
17/07/2015
CA/Intro
5
Assessment
•
exam grade * 2/3
+ project grade * 1/3
course grade
• Exam contains 5 problems, max 6 points
each; to pass one has to get at least 12
points.
17/07/2015
CA/Intro
6
Useful Previous Knowledge
• Basic knowledge of computers
• Basic knowledge of programming
– instructions, program structures
• Fundamentals of computer technology
– gates, combinational circuits, flip-flops,
registers, sequential circuits
17/07/2015
CA/Intro
7
Textbook
• David A. Patterson and John L. Hennessy,
Computer Organization & Design: The
Hardware/Software Interface, 2nd Edition,
Morgan Kaufmann, 1998
• 2nd Edition?
– Yes, 50% text changed, all exercises changed,
all examples modernised, new sections, …
• You can also use the 3rd edition.
17/07/2015
CA/Intro
8
Support Materials
• http://www.mkp.com/cod2e.htm
– Web extensions of the book’s contents
– Three sets of lecture slides
– SPIM simulator
• Lecture slides are mostly based on the
above slide sets (especially those of Tod
Amon)
17/07/2015
CA/Intro
9
What Computers Are
• Computers are programmable electronic
devices.
• They solve problems using algorithms.
• They consist of hierarchical layers of
hardware and software.
17/07/2015
CA/Intro
10
An Algorithm
Compute the average age of a group of people.
1. n = number of people
;input
2. sum = 0
3. i = 1
4. sum = sum + age of person i
;input
5. i = i+1
6. if i n then go to 4
7. sum = sum/n
8. average age = sum
;output
17/07/2015
CA/Intro
11
What Algorithms Involve
• data (operands and results)
• operations
• control (order of operations)
• see computer block diagram!
17/07/2015
CA/Intro
12
Hardware Layers
•
•
•
•
•
structures on silicon or other materials
electronic components (transistors etc.)
logic components (gates, flip-flops)
logic circuits (adders, registers, counters, etc.)
functional units (ALU, multiplier, shifter,
register file, control unit)
• computer components (CPU, memory, I/O unit)
• computer system
17/07/2015
CA/Intro
13
Software Layers
• Machine language
0010 1011 1101 1000
1001 0111 0101 1110
• Assembly language
MOV A, #3CH
ADD A, 20H
• High-level language
y = 15;
x = (y=y-5, 30/y);
17/07/2015
CA/Intro
14
Abstractions
• hardware and software layers are called
abstractions
• abstractions are a way to cope with
complexity
• lower-level details are hidden to offer a
simpler model at higher levels
17/07/2015
CA/Intro
15
Concepts; Definition One
• Computer architecture
attributes of a system visible to a programmer:
instruction set, data types, I/O mechanisms,
addressing of memory
• Computer organisation
hardware details transparent to a programmer:
operational units and their interconnections,
peripheral interfaces, memory technology
17/07/2015
CA/Intro
16
An Example
• Architectural issue: has the computer a
multiply instruction or not?
• Organisational issue: has the computer a
special multiply unit or does it repeatedly
use the add unit?
17/07/2015
CA/Intro
17
Concepts; Definition Two
• Computer architecture =
Instruction set architecture +
Machine organisation
• Instruction set architecture – interface
between the hardware and low-level
software
17/07/2015
CA/Intro
18
Instruction Set Architecture
•
•
•
•
•
•
Organisation of storage: registers, memory
Representations of data
Instruction set
Instruction formats
Modes of addressing and accessing data
Exceptional conditions
17/07/2015
CA/Intro
19
Instruction Set Architecture
• Advantage: enables different
implementations of the same architecture
• Disadvantage: may prevent using new
innovations
17/07/2015
CA/Intro
20
Machine Organisation
• Implementation, capabilities and performance
characteristics of functional units
• Interconnections of these units
• Information flows between these units
• Control of information flow
• VHSIC Hardware Description Language
(VHDL) descriptions
17/07/2015
CA/Intro
21
Block Diagram of a Computer
CPU
ALU
Input
Unit
Output
Unit
Control
Unit
Register
Unit
Memory
17/07/2015
CA/Intro
22
Computer Blocks
• CPU (Central Processing Unit)
• ALU (Arithmetic and Logic Unit):
calculations
• Register unit: data, memory addresses
• Control unit: control of the whole computer
• Memory: data, programs
• I/O unit: communication with the
surroundings
17/07/2015
CA/Intro
23
Instruction Cycle
•
•
•
•
•
•
Fetch instruction
Decode instruction
Fetch operands
Execute operation
Store result
Locate next instruction
17/07/2015
CA/Intro
24
Instruction Fetch
Address
Select next
instruction
Memory
Program
Counter
Instruction
CPU
Increment PC
to locate next
instruction.
Instruction
Register
17/07/2015
CA/Intro
25
Technology Changes
• vacuum tube transistor IC VLSI
• Moore’s law: number of transistors on a
single chip doubles every 1.5 years
• Consequences of Moore’s law (and other
improvements):
– processor performance and memory capacity
double every 1.5 years
– computers get smaller, faster and cheaper
17/07/2015
CA/Intro
26
Contents of the Course
•
•
•
•
•
•
•
Introduction
Performance issues
MIPS instruction set architecture
Datapath (ALU)
Control
Memory hierarchy
I/O interface
17/07/2015
CA/Intro
27
Related Course: T-61.124
Computer Architecture Project
• The MIPS R2000/3000 is studied in greater
detail than in T-61.123.
• The students design a RISC microprocessor.
• The design is done using available building
blocks and some parts designed by the
students using the VHDL language.
• The work is done in groups of 1-3 students.
17/07/2015
CA/Intro
28
Related Course: T-61.124
Computer Architecture Project
• Introductory lecture on Thursday 8th
December at 16.15
• Lecturer’s consulting hours in January and
February
17/07/2015
CA/Intro
29