ELEC3608 Computer Architecture
Introduction
Philip H.W. Leong
School of Electrical and Information Engineering,
The University of Sydney
Course Organisation
2
ELEC3608 Administrative
Lecturer Prof Philip Leong (philip.leong@sydney.edu.au)
Room J03-837
TA Wenjie Zhou (wenjie.zhou@sydney.edu.au)
Room J03-840
Lectures Online
Labs Thur 9am-11am J03-630
https://canvas.sydney.edu.au/courses/25893
Web
3
Textbook
› Reading materials will be drawn from two main textbooks:
- Mostly from COD (any edition is fine)
“Computer Organization and Design: RISC-V Edition”
David Patterson, John Hennessy
1st Edition; Morgan Kaufmann (2017)
ISBN: 978-0128122754
COD
“Computer Architecture: A Quantitative Approach”
John Hennessy, David Patterson
6th Edition; Morgan Kaufmann (2017)
ISBN-13: 978-0128119051 CAQ
4
Assessments
Labs 10% • 5% prelab (individual)
• 5% laboratory (group)
Assignment 30% Design exercise (group)
Exam 60% 48 hr take home exam,
(individual)
› Labs
- Reinforce the lecture material, prepare for assignment
- Marked before the end of the lab, if you don’t finish you don’t get the mark i.e.
if you want good marks you need to prepare before the lab (no catchup lab)
- Must be submitted online using Canvas before the due time.
- You only get one chance for prelab so make sure you have a good
connection
› Assignment, you will be given time in lab to work on assignment
5
Computer Architecture
› Goals
- Learn basics of computer systems analysis and design
- Learn to make larger designs in VHDL
- Understand basic techniques in computer design
- Performance measurement, identifying bottlenecks
- Control and datapath design
- Pipelining
- Memory hierarchy
Things you will learn
› The Basics › Changes to ELEC3608 over last
- Single cycle processor few years
› Improving Performance - 2014 MIPS and VHDL (COD)
- Simple Pipelining - 2015 MIPS and Chisel
- Out-of-order execution - 2016 RISCV and Chisel
- Super-scalar processor - 2017-2019 RISCV and VHDL
› Memory Hierarchy and I/O - 2020 RISCV and VHDL (COVID
› Advanced Architectures version)
- Multi-core processors
- Vector processors
- VLIW
- Domain-specific accelerators
7
Computer Architecture
What is Computer Architecture?
Computer Architecture
9
What is Computer Architecture?
Computer architecture is the study
of the design and implementation of
computing systems.
10
Design constraints
Function Performance
Cost Power
Compatibility
11
Architectures continually changing
Applications
suggest how to Improved
Applications technologies
improve
technology, make new
provide applications
revenue to possible
Technology
fund
development
Cost of software development
makes compatibility a major
force in market
12
Computers in the 60s
Src: http://www.computerhistory.org DEC’s PDP-10
13
Today’s Computer
14
Uniprocessor Performance
Limited by Power, ILP,
Memory speed
15
Multi-Core CPU
Intel Lynnfield processor
(source: AnandTech)
16
Warehouse Scale Computer
› A new class of computer - massively
parallel cluster of computers
› Datacenter as a computer
- ~100,000 servers
- include design choices in electrical,
electronic and building construction
› Exploit service level parallelism
› Designed for cloud-based services
17
(Now is) A Golden Age for Computer Architecture
Google TPU3
https://www.youtube.com/watch?v=c03Z0Ms8pKg
Turing Award 2017 For pioneering a systematic, quantitative
approach to the design and evaluation of computer architectures
with enduring impact on the microprocessor industry.
18
The End of the Uniprocessor Era
Single biggest change in the history of
computing systems
19
This course
ELEC3608 Course Objectives
› To make a simple processor
› To make a uniprocessor that runs fast
- Various techniques developed through the 1990s
› To appreciate latest development in computer architecture research
- Techniques to overcome the Power Wall, ILP Wall, and the Memory Wall
- Techniques for domain-specific acceleration
21
A Quest into HW + SW
› Study of computer architecture requires deep understanding of both
hardware and software
› Software:
- Assume you know microprocessor programming and architecture (ELEC3607)
- Basic C/C++/Java and compilation flow
- Linux programming (in C and assembly)
› Hardware:
- You need to know basic digital system design (ELEC2602)
- Will learn to use a hardware description language VHDL
› We are using docker, you need to be able to run it!
22
Course Delivery
› Flipped classroom
- Preferred F2F lab + online lectures (but can be all online)
- Course website should have full instructions
- Video recordings of lectures will be provided, you need to watch them every
week
- They may be updated prior to the official lecture time of Monday 9am
- Watch them on Monday or Tuesday
- In the lab slot, I will be available via Zoom in the first hour (link on the course
website) Thur 9am
- Or email me
23
The Basics
24
Computer Architecture: HW/SW Interface
Applications
Software
Compiler
Assembler
Operating System
Instruction Set Architecture
Microarchitecture Processor Memory I/O
Hardware
Digital Design
Circuit Design
Transistors
25
Instruction Set Architecture (ISA)
› The contract between software and hardware
› Typically described by giving all the programmer-visible state (registers +
memory) plus the semantics of the instructions that operate on that state
› IBM 360 was first line of machines to separate ISA from implementation
(aka. microarchitecture)
› Many implementations possible for a given ISA
- E.g., the Soviets build code-compatible clones of the IBM360, as did Amdahl
after he left IBM.
- E.g.2., today you can buy AMD or Intel processors that run the x86-64 ISA.
- E.g.3: many cellphones use the ARM ISA with implementations from many
different companies including TI, Qualcomm, Samsung, Marvell, etc.
26
ISA to Microarchitecture Mapping
› ISA often designed with particular microarchitectural style in mind, e.g.,
– Accumulator hardwired, unpipelined
– CISC microcoded
– RISC hardwired, pipelined
– VLIW fixed-latency in-order parallel pipelines
– JVM software interpretation
› But can be implemented with any microarchitectural style
– Intel Ivy Bridge: hardwired pipelined CISC (x86) machine (with some
microcode support)
– Simics: Software-interpreted SPARC RISC machine
– ARM Jazelle: A hardware JVM processor
27
Notable ISAs
Alpha 1992 DEC; in 21264 processors, etc
MIPS 1986 research/MIPS
PA-RISC 1986 HP; HP Workstations in the 90s
PowerPC 1993 IBM/Motorola
SPARC 1987 Sun Microsystem
ARM 1985 ARM Dominate
Today
x86 1978 Intel
VAX 1977 DEC
IBM360 1964 IBM; “defined” computer architecture
Too complex for undergrad
See Appendix K of H&P for a survey of teaching…
major ISAs
28
This Course: RISC-V ISA
› RISC-V is a new simple, clean, extensible ISA that was originally
developed at Berkeley for education and research
- RISC-I/II, first Berkeley RISC implementations
- Berkeley research machines SOAR/SPUR considered RISC-III/IV
› Both of the dominant ISAs (x86 and ARM) are too complex to use for
teaching
› RISC-V ISA manual available on web page
› Full GCC-based tool chain available
29
Stored Program Computer
30
Electronic Numerical Integrator and Computer
(ENIAC)
› Inspired by Atanasoff and Berry, Eckert and Mauchly designed and built ENIAC
(1943-45) at the University of Pennsylvania
› The first, completely electronic, operational, general-purpose analytical calculator!
- 30 tons, 72 square meters, 200KW, 18000 vacuum tubes, ventilation shaft &
cooling system had to be installed in room
› Performance
WW-2 Effort
- Read in 120 cards per minute
- Addition took 200 ms, Division 6 ms
- 1000 times faster than Mark I
› Not very reliable, correct about 20 out of 100x
Application: Ballistic calculations
angle = f (location, tail wind, cross wind,
air density, temperature, weight of shell,
propellant charge, ... )
31
Electronic Discrete Variable
Automatic Computer (EDVAC)
› ENIAC’s programming system was hard-wired
- Machine was a collection of ALUs with hard-coded function tables each with
1200 10-way switches
- A program took about 2 weeks to write
- Difficulty of programming greatly underestimated
› Eckert, Mauchly, John von Neumann and others designed EDVAC (1944) to
solve this problem
- Solution was the stored program computer
“program can be manipulated as data”
› First Draft of a report on EDVAC was published in 1945, but just had von
Neumann’s signature!
- In 1973 the court of Minneapolis attributed the honor of inventing the
computer to John Atanasoff
32
Stored-Program Computer
Program = A sequence of instructions
Determines
Get the
Execute the the next
current
instruction instruction
instruction
to fetch
33
Ex: Calculating Class Grades*
grade = 0.1 lab + 0.2 mt +0.3 hw + 0.4 proj;
grade = 0;
tmp = 0.1 lab;
grade = grade + tmp;
tmp = 0.2 mt;
grade = grade + tmp; Time
tmp = 0.3 hw;
grade = grade + tmp;
tmp = 0.4 proj;
grade = grade + tmp;
*This is not how we are going to calculate your grades
34
And in conclusion…
› The study of computer architecture allows us to construct better computer
systems
- Performance, power, energy
› Computer architecture is a study that crosses software and hardware
› We will use RISC-V as main ISA for class work, but design principles
applicable to other computer designs
› Stored programmed computer will be the basic computing model studied
35
Acknowledgements
› These slides contain material developed and copyright by:
- Arvind (MIT)
- Krste Asanovic (MIT/UCB)
- Joel Emer (Intel/MIT)
- James Hoe (CMU)
- John Kubiatowicz (UCB)
- David Patterson (UCB)
- Hayden So (HKU)
› MIT material derived from course 6.823
› UCB material derived from course CS152, CS252
› HKU material derived from course ELEC3441
36