Architecture

1DT016 distance Fall 2017

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

Per Foyer Mail: [email protected]

[email protected] 2017 1 Shock tactics!

The MIPS CPU

[email protected] 2017 2 Don’t panic! Don’t be alarmed!

(Maybe a couple of hours at most)

[email protected] 2017 3 About the course (25% speed)

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!

[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 able to take the course!

[email protected] 2017 5 Lectures / Sessions

Wednesday 2017-09-06 at 13.15 to 15.00 Kick 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.00 A crash course in the fundamentals of digital technology and in MIPS assembly language programming.

Saturday 2017-09-23 at 09.15 to 12.00 The 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.00 Synchronous and asynchronous buses, bus protocols, pipelining

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

Saturday 2017-11-25 at 09.15 to 12.00 I/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.00 Flynn's taxonomy, Multicore processors, tightly and loosely coupled multiprocessors, clusters, meshes and grids

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

[email protected] 2017 6 Labs and Assignments

Lab 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 Deadlines

You 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! 

[b] MIPS32 based MIKROE-1907

[a] ARM Cortex-M4F based STM32F411 Nucleo

[email protected] 2017 9 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

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

[email protected] 2017 10 Freeplane - Mind/Concept mapping

This is how this lecture looks like. Perhaps it suits you? Freeplane is free software and ideal for notes and for structuring information.

[email protected] 2017 11 LogSim – Logic Simulator Free and available for Windows, macOS and Linux

[email protected] 2017 12 QtSPIM – Computer simulator Free and available for Windows, macOS and Linux

[email protected] 2017 13 MARS – Computer simulator Free and available for Windows, macOS and Linux

[email protected] 2017 14 Computer Architecture The big picture

From Charles Babbage to AMD Ryzen Threadripper and Intel i9

[email protected] 2017 15 Analythical Engine (1837)

Charles Babbage (1791 – 1871)

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

[email protected] 2017 16 From Relays and Tubes to VLSI

[email protected] 2017 17 Multilevel Machines

int addmul( int t ) Level 5 Problem-oriented { language level return (t + 2) * 2; } Translation (compiler) Assembly language addmul: addi $r1, $zero, 2 Level 4 level mul $r1, $r1, 2 jr $ra Translation (assembler) Operating system li $v0, 4 Level 3 machine level syscall Partial interpretation (OS) Conventional 0x24020004 0x0000000c Level 2 machine level 0x03E00008 Interpretation (microprogram) Level 1 Microprogramming 110110101111010000010110 level 000100010011111010100001 Executed by hardware Level 0 Digital Logic Level

[email protected] 2017 18 Binary relay logic

V+ V+

A

A B C B Logic expression: R = A AND B AND C

C Logic expression: R = A OR B OR C

Alarm Alarm R R bell bell A A B R B R 0 V C 0 V C

[email protected] 2017 19 The electromechanical relay

The relay was invented by Joseph Henry in 1835.

Off On (Binary zero) (Binary one)

[email protected] 2017 20 Zuse Z3 (1941)

Konrad Zuse (1910 – 1995)

Electro-mechanical computer

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

[email protected] 2017 21 ENIAC (1944)

Electronic Numerical Integrator And Computer •Computer operated on decimal (!) numbers •17.468 Vacuum tubes •7200 Crystal , 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 thousands of patch cables. Reprogramming took days. •Clock: 10 kHz

[email protected] 2017 22 Collossus Mk2 (1944)

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

[email protected] 2017 23 The

John von Neuman

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 instructions and data.

[email protected] 2017 24 The von Neuman Architecture

Memory cell

10100110 00110010 11001010 11110001 Memory address 01110010 11101110 00000011 vN properties: 10110110 •Fully binary operation •Program and data share the same memory 11001011 •Program instructions and data is indistinguishable

[email protected] 2017 25 The von Neumann bottleneck

• The memory response time and bandwidth is low compared with the speed of the processor itself • Memory operations are time consuming  wastes processor capacity

[email protected] 2017 26 The Arithmetic Logic Unit (ALU)

A + B Arithmetic A – B A * B A / B A < B A == B ALU Logic A AND B A OR B A XOR B

[email protected] 2017 27 The Control Unit

Simplified microcoded instruction fetch cycle:

MAR  PC, MREQ PC  PC + 1 IR  MDR DECODE

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

[email protected] 2017 28 EDVAC (1949 – 1961)

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

[email protected] 2017 29 BESK ( 1951-1953)

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)

[email protected] 2017 30 Moore’s law Moore’s law states that IC count doubles every two years

[email protected] 2017 31 Bell TRADIC (1954)

Believed to be the first Transistor Computer

TRAnsistor DIgital Computer (TRansitorized Airborne DIgital Computer)

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

[email protected] 2017 32 1960’s DEC PDP Series

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

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

PDP = Programmed Data Processor

[email protected] 2017 33 The legendary IBM System/360

A family of mainframe

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?)

[email protected] 2017 34 Intel 4004 (1971)

The world’s first microprocessor

2.300 Transistors 92600 Instructions per second Clock: 740 kHz Lithography: 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 MIPS – ”Our” processor

Microprocessor without Interlocking Pipe Stages

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

[email protected] 2017 36 The Super Computer Race: Early days

Cray-1 (1976) Cray-2 (1986)

Assembling a Cray-2

[email protected] 2017 37 The Super Computer Race: Today

IBM Blue Gene/P (2016) Cray XC50 (2016) 164.000 Processor cores World’s fastest computer to date 40 racks 735.200 Processor cores Performance: 596 TeraFlops Performance: 130 PetaFlops

Flops = Number of floating point operations per second

596 x 1012 = 596.000.000.000.000 130 x 1015 = 130.000.000.000.000.000 Unbelievable performance!

[email protected] 2017 38 AMD Ryzen Threadripper 1950X

2017 Q2 16 Cores 32 Threads

APU 8 MB / 32 MB L2/L3 cache Accelerated Processing Unit Clock: 4 GHz 180 W TDP 6.800.000.000 transistors Lithography 14 nm

[email protected] 2017 39 Intel Core i9-7980XE

2017 Q3 18 Cores 36 Threads 8 MB / 24.75 MB L2/L3 cache Clock: 4.3 GHz 140 W TDP 5.800.000.000 transistors Lithography 14 nm

[email protected] 2017 40 Famous Computer Quotes

Thomas 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