42
Computer Architecture 1DT016 distance Fall 2017 http://xyx.se/1DT016/index.php Per Foyer Mail: [email protected] [email protected] 2017 1

Lecture 1: Computer architecture, the big picture

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Computer Architecture

1DT016 distanceFall 2017

http://xyx.se/1DT016/index.php

Per FoyerMail: [email protected]

[email protected] 2017 1

[email protected] 2017 2

Shock tactics!

The MIPS CPU

Don’t panic! Don’t be alarmed!

[email protected] 2017 3

(Maybe a couple of hours at most)

Eight (or more) Lectures / Sessions

• Not mandatory but recommended

Mandatory:

•Three Labs

•Four Assignments

Labs and assignments are 3 credits (hp) and the written exam 4.5 credits (hp) with a grand total of 7.5 credits (hp)

Is Computer Architecture fun to learn? YES!

About the course (25% speed)

[email protected] 2017 4

Litterature

David A. Patterson and John L. Hennessy:

Computer Organization and Design - The Hardware/Software Interface, 5th edition

(You can do with 2nd, 3rd and 4th editions too, but the page and chapter numbers will differ)

You really need the book to be ableto take the course!

[email protected] 2017 5

Lectures / Sessions

[email protected] 2017 6

Wednesday 2017-09-06 at 13.15 to 15.00Kick off. Computer architecture, the big picture.From Charles Babbage to AMD Ryzen Threadripper and Intel i9.

Saturday 2017-09-09 at 09.15 to 12.00A crash course in the fundamentals of digital technology and in MIPS assembly language programming.

Saturday 2017-09-23 at 09.15 to 12.00The CPU, Hardwired and microcoded control units. The RISC and CISC concepts, Endianess. APU, Co-processors, Microcontrollers. Performance.

Saturday 2017-10-07 at 09.15 to 12.00Synchronous and asynchronous buses, bus protocols, pipelining

Saturday 2017-10-21 at 09.15 to 12.00Memory systems, types, properties, interleaving, caches, Virtual memory strategies, Memory management units

Saturday 2017-11-25 at 09.15 to 12.00I/O systems, memory mapped and direct mapped I/O, DMA, Interrupts; NMI, vectorized, daisy chaining, I/O processors

Saturday 2017-12-02 at 09.15 to 12.00Flynn's taxonomy, Multicore processors, tightly and loosely coupled multiprocessors, clusters, meshes and grids

Saturday 2017-12-16 at 09.15 to 12.00Catch up session

Labs and AssignmentsLab 1: MIPS Assembly programming

Lab 2: MIPS Datapath

Lab 3: MIPS Pipelining

Assignment 1:Reverse engineering. Preventing a North Korean ICBM strike. ( 최후의 심판의 시나리오 )

Assignment 2:The art of digital design. From simulation to real hardware.

Assignment 3:The HP signum. Reverse Polish Notation.

Assignment 4:Design and implement your own 8-bit microcoded processor.

[email protected] 2017 7

DeadlinesYou may earn bonus points for the final exam if you hand in labs and assignments (and they pass) before certain deadlines (soon TBA):

Assignment 1 to 4 and Lab 1: 0.5p each + [a]

Lab 2 and 3: 1p each + [b]

The written exam will have a total of 40p

[a][b] For every deadline you meet you have the chance to win (!) a microcontroller development kit! A total of seven kits will be handed out

Huh? Yes.

Why? Because the fun of it!

[email protected] 2017 8

These can be yours!

[a] ARM Cortex-M4F based STM32F411 Nucleo

[email protected] 2017 9

[b] MIPS32 based MIKROE-1907

On the web

On the course pages you will find:

•The slides from the lectures / sessions

•Extra material

•Reading instructions

•Guides, tutorials, exercises and valuable links

•FAQs, tips and tricks

[email protected] 2017 10

http://xyx.se/1DT016/index.php

This is how this lecture looks like.Freeplane is free software and ideal for notes and for structuring information.

Freeplane - Mind/Concept mapping

[email protected] 2017 11

Perhaps it suits you?

LogSim – Logic SimulatorFree and available for Windows, macOS and Linux

[email protected] 2017 12

QtSPIM – Computer simulator

[email protected] 2017 13

Free and available for Windows, macOS and Linux

MARS – Computer simulator

[email protected] 2017 14

Free and available for Windows, macOS and Linux

Computer ArchitectureThe big picture

From Charles Babbage to AMD Ryzen Threadripper and Intel i9

[email protected] 2017 15

Analythical Engine (1837)

Charles Babbage(1791 – 1871)

[email protected] 2017 16

In some ways resembles a modern computer:

•”Mill”: Execution unit•Memory: Words of digits made up by cogs•Input: Punched card reader for programs•Output: Card punch

From Relays and Tubes to VLSI

[email protected] 2017 17

Multilevel Machines

[email protected] 2017 18

Level 0

Level 1

Level 2

Level 3

Level 4

Level 5

Digital Logic Level

Microprogramminglevel

Conventionalmachine level

Problem-orientedlanguage level

Operating systemmachine level

Assembly languagelevel

addmul: addi $r1, $zero, 2 mul $r1, $r1, 2 jr $ra

int addmul( int t ){ return (t + 2) * 2;}

li $v0, 4syscall

0x24020004 0x0000000c0x03E00008

110110101111010000010110000100010011111010100001

Translation (compiler)

Translation (assembler)

Partial interpretation (OS)

Interpretation(microprogram)

Executed byhardware

Binary relay logic

[email protected] 2017 19

V+ V+

Alarmbell

0 V

Alarmbell

0 V

A

C

R

BA B C

R

Logic expression:R = A OR B OR C

Logic expression:R = A AND B AND C

ABC

RABC

R

The electromechanical relayThe relay was invented by Joseph Henry in 1835.

[email protected] 2017 20

On(Binary one)

Off(Binary zero)

Zuse Z3 (1941)

[email protected] 2017 21

Konrad Zuse(1910 – 1995)

Electro-mechanical computer

•2000 relays•10 Instructions per second•Programs on punched film

ENIAC (1944)

[email protected] 2017 22

Electronic Numerical Integrator And Computer•Computer operated on decimal (!) numbers•17.468 Vacuum tubes •7200 Crystal diodes, 1500 relays, 70.000 resistors•5.000.000 hand soldered joints•Weight: 27 tons, Power consumtion 150 kW, Floor area: 167 m2

•Programming made by means of 1200 10-way switches and thousandsof patch cables. Reprogramming took days.•Clock: 10 kHz

Collossus Mk2 (1944)

[email protected] 2017 23

First Electronic Computer•2400 Vacuum tubes •1000+ Instructions per second•Paper tape loops as memory•Regarded world’s digital programable computer

The von Neumann Architecture

The von Neumann architecture (~1950) is a design model for a stored-program digital computer that uses a processing unit and a single separate storage structure to hold both instructionsand data.

[email protected] 2017 24

John von Neuman

The von Neuman Architecture

[email protected] 2017 25

vN properties:•Fully binary operation•Program and data share the same memory•Program instructions and data is indistinguishable

00110010

11110001

10100110

11001011

01110010

11001010

11101110

00000011

10110110

Memory address

Memory cell

The von Neumann bottleneck

[email protected] 2017 26

• The memory response time and bandwidth is low compared with the speed of the processor itself

• Memory operations are time consuming wastes processor capacity

The Arithmetic Logic Unit (ALU)

[email protected] 2017 27

ALU

Arithmetic

Logic

A + B

A – B

A * B

A / B

A < B

A == B

A AND B

A OR B

A XOR B

The Control Unit

[email protected] 2017 28

• Controls the data flow inside the processor• Controls the flow from and to the processor• May be microcoded or hardwired logic

Simplified microcoded instruction fetch cycle:

MAR PC, MREQPC PC + 1IR MDRDECODE

EDVAC (1949 – 1961)

[email protected] 2017 29

Electronic Discrete Variable Automatic Computer•First computer that solely operated on binary data only•First implementation of the vN architecture•Add, subtract, multiply and division in hardware•6.000 Vacuum tubes, 1000 words of ultrasonic serial main memory•64 Mercury acoustic delay lines (shift registers)•Magnetic tape secondary storage•Power consumtion 56 kW, Floor area: 46 m2

•Clock: 100 kHz

BESK (Sweden 1951-1953)

[email protected] 2017 30

Binär Elektronisk Sekvenskalkylator (Binary Electronic Sequence Computer)

•2.400 Vacuum tubes, 400 Germanium (semiconductor) diods•William memory (40 Cathode Ray Tubes holding 512 bits each)

• Later replaced with Ferrite core memory•Used Drum memory as second hand storage.•World’s fastest computer in October 1951 !!! (20.000 IPS)

Moore’s law states that IC transistor count doubles every two years

Moore’s law

[email protected] 2017 31

Bell TRADIC (1954)

[email protected] 2017 32

Believed to be the first Transistor Computer

TRAnsistor DIgital Computer(TRansitorized Airborne DIgital Computer)

•12.092 transistors•Performance unknown•Power consumption less than 500 Watts

1960’s DEC PDP Series

[email protected] 2017 33

1960: PDP-1, Solid state, 200.000 IPS

PDP = Programmed Data Processor

This is the actual machine owned by Update Computer Club att Uppsala university!As a student you can join Update. Go to: www.update.uu.se

1960-1975: PDP-8, Solid state, 500.000 IPS

The legendary IBM System/360

[email protected] 2017 34

A family of mainframe computers

IBM’s best selling system of all time•All processors microcoded and compatible•Many new architectural concepts were invented during the lifetime•Some new IBM systems are still compatible with S/360 (Why?)

Intel 4004 (1971)

2.300 Transistors92600 Instructions per secondClock: 740 kHzLithography: 10 μm

MCS-4 (chipset):

i4001: ROM (256 bytes)i4002: RAM (40 bytes)i4003: Shift register (10 bits)i4004: CPU (4-bit)

[email protected] 2017 35

The world’s first microprocessor

MIPS – ”Our” processorMicroprocessor without Interlocking Pipe Stages

[email protected] 2017 36

1985: MIPS R2000 (32-bit)2015: MIPS P6600 Warrior (64-bit)

The Super Computer Race: Early days

[email protected] 2017 37

Cray-1 (1976)

Assembling a Cray-2

Cray-2 (1986)

The Super Computer Race: Today

[email protected] 2017 38

IBM Blue Gene/P (2016)164.000 Processor cores40 racksPerformance: 596 TeraFlops

Cray XC50 (2016)World’s fastest computer to date735.200 Processor coresPerformance: 130 PetaFlops

596 x 1012 = 596.000.000.000.000130 x 1015 = 130.000.000.000.000.000

Flops = Number of floating point operations per second

Unbelievable performance!

AMD Ryzen Threadripper 1950X

[email protected] 2017 39

16 Cores32 Threads8 MB / 32 MB L2/L3 cacheClock: 4 GHz180 W TDP6.800.000.000 transistorsLithography 14 nm

2017 Q2

APUAccelerated Processing Unit

Intel Core i9-7980XE

[email protected] 2017 40

18 Cores36 Threads8 MB / 24.75 MB L2/L3 cacheClock: 4.3 GHz140 W TDP5.800.000.000 transistorsLithography 14 nm

2017 Q3

Famous Computer QuotesThomas J Watson, IBM CEO (1943)”I think there is a world wide market for maybe five computers”

Ken Olsen, Digital Equipment Corporation (1977)“There is no reason for any individual to have a computer in his home”

Bill Gates, Microsoft Corporation (1980)”640 kB should be enough for anybody”

Matematiknämnden, Stockholm (1954)”BESK kommer att täcka hela Sveriges behov av datorkraft fram till år 1970”

[email protected] 2017 41

Finito la musica!

[email protected] 2017 42