v1cp1 – week 6

23
V1CP1 – week 6 Central Processing Unit

Upload: mickey

Post on 15-Jan-2016

36 views

Category:

Documents


0 download

DESCRIPTION

V1CP1 – week 6. Central Processing Unit. CPU. MEMORY. I/O. adresbus databus controlebus. Blokschema computersysteem (recap). n bepaalt het adresbereik – max. 2 n geheugenregisters m – vaak gelijk aan het aantal bits per register. Central Processing Unit (CPU). Bron: Wikipedia. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: V1CP1 – week 6

V1CP1 – week 6Central Processing Unit

Page 2: V1CP1 – week 6

2

adresbus

databus

controlebus

CPU MEMORY I/O

Blokschema computersysteem(recap)

Page 3: V1CP1 – week 6

3

n bepaalt het adresbereik – max. 2n geheugenregisters

m – vaak gelijk aan het aantal bits per register

Central Processing Unit (CPU)

Bron: Wikipedia

Page 4: V1CP1 – week 6

4

adresbus

databus

controlebus

BIU

Registers

ALUStatus register

Stack pointer

PC

ICU

Instructie register

TU

1001001001001110

1001001001001110

Opbouw van de CPU

Page 5: V1CP1 – week 6

5

Onderdelen van de CPU

CPU = Central Processing Unit ICU = Internal Control Unit TU = Timing Unit ALU = Arithmetic Logic Unit BIU = Bus Interface Unit Registers (general purpose) Program Counter (PC) Stackpointer Statusregister Instruction register

Page 6: V1CP1 – week 6

6

John von Neumann (28-12-1903 - 8-2-1957)

Stored Program Architecture

Page 7: V1CP1 – week 6

7

BIU

Registers

1001001001001110

1001001001001110

ALUStatus register

Stack pointer

PC

TU

ICU

Instructie register 1001101101100011

0011100101111010

Data en instructies staan in het geheugen

Page 8: V1CP1 – week 6

8

FInstruction

Fetch

DInstruction

Decode

EInstruction Execution

SStore Result

Von Neumann cyclus

Page 9: V1CP1 – week 6

9

Werking van een processor

1. Haal een instructie op (Fetch)- zet inhoud PC op adresbus- geef een leessignaal op controlebus- verhoog inoud van PC- plaats data van databus in Instructie Register

2. Decodeer de instructie (Decode)

3. Voer de instructie uit (Execute)

4. Sla het resultaat op (Store)

5. Ga naar 1

Page 10: V1CP1 – week 6

10

adres

data

adres stabiel

R/W

Lees cyclus Schrijf cyclusSchrijf cyclus

Bus timing

Page 11: V1CP1 – week 6

11

…etc…

C=A or B0110

C=A and B1010

C=A-B0010

C=A+B1100

C=A+10100

C=B1000

C=A0000

functief0

f1

f2

f3

Arithmetic/Logic Unit (ALU)

A B

C

statusn z v c

functie

ALU

Page 12: V1CP1 – week 6

12

0000011000001000 0x0608 Z80: LD B,8

1010011000001000 0xC608 6809: LDB #8

0000011000001000 0x0608 8080: MVI B,8

0xB72345 6809: STA 2345 Big Endian

0x324523 Z80: LD (2345),A Little Endian

High Low

Machine instructies

Page 13: V1CP1 – week 6

13

Kenmerken van een instructie

Binaire code (instruction format) Lengte (aantal geheugenadressen) Invloed op de statusvlaggen Hoe vindt de CPU de data voor de instructie

(adressing mode) Hoeveel klokcycli kost de uitvoering

Page 14: V1CP1 – week 6

14

Instructietypen

Verplaatsing (mov, ldr, str)

Bewerking Logisch (and, or, lsl, … ) Rekenkundig (add, sub, mul, … )

Sprong Conditioneel (beq, bne, … ) Niet conditioneel (jmp, bra, … )

Subroutine aanroep (call, ret, …) Speciale instructies (nop, hlt, swi, … )

Page 15: V1CP1 – week 6

15

CPU demo (ZEP2)

Page 16: V1CP1 – week 6

16

Cache geheugen(in Core 2 Duo)

Bron: www.zdnet.com.au

Page 17: V1CP1 – week 6

17

Page 18: V1CP1 – week 6

18

PCI gebaseerd computersysteem

Page 19: V1CP1 – week 6

19

Accellerated Graphics Port (AGP)

Page 20: V1CP1 – week 6

20

Intel PM855 Chipset

Bron: www.intel.com

Page 21: V1CP1 – week 6

21

PCI Express Based System

Bron: AV Bhatt, Intel

Page 22: V1CP1 – week 6

22

PCI Express Lanes

Bron: AV Bhatt, Intel

Page 23: V1CP1 – week 6

23

Opdrachten

Bestudeer hfdst. 7.4 t/m 7.4.3 Bestudeer hfdst. 8.3