17.01.2014 Aufrufe

Rechnernetze und Organisation

Rechnernetze und Organisation

Rechnernetze und Organisation

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Fetch-Execute<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

1


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Übersicht<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Motivation<br />

Modulare Computer<br />

– Bussyteme<br />

Fetch and Execute<br />

Einfaches Input/Output<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

2


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Motivation<br />

Prinzipielle Funktionsweise einer CPU<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Minimalistischer Prozessor<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

3


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Komponenten eines Computers<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Alle Computer gleich aufgebaut<br />

– Prozessor<br />

– Speicher<br />

– Input/Output (IO)<br />

Foto © Opteronix<br />

Computer sind modular<br />

aufgebaut<br />

– Komponenten<br />

• Speicher<br />

• Grafikarten<br />

• ...<br />

... hängen am Systembus<br />

Processor<br />

(CPU)<br />

Memory<br />

Systembus<br />

Input<br />

Output<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

4


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Computer-Aufbau: PC<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Pentium CPU<br />

Systembus ist aufgeteilt<br />

– Northbridge<br />

• Schnell<br />

• Für Speicher<br />

• Für Grafikkarte<br />

– Southbridge<br />

• Langsam<br />

• Für PCI-Bus<br />

• Für USB-Bus<br />

• Für Festplatte<br />

– IDE/ATA-Bus<br />

► Computer sind hierarchisch<br />

aufgebaut.<br />

Selbst Busse haben<br />

eine Hierarchie.<br />

Foto © Hardwaregr<strong>und</strong>lagen.de<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

5


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Bussyteme<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Gr<strong>und</strong>konzept<br />

– Datenverbindung von Modulen<br />

– Zwei Module können zu einem<br />

Zeitpunkt miteinander<br />

kommunizieren<br />

– Zeitliche Aufteilung der<br />

Kommunikation<br />

Processor<br />

(CPU)<br />

Memory<br />

Systembus<br />

Input<br />

Output<br />

Bus<br />

Adresse<br />

Kontrolle<br />

Daten<br />

– Bündel an Leitungen<br />

– Unidirektional: Adressen<br />

– Bidirektional: Daten<br />

d 0<br />

d 1<br />

d 2<br />

d 3<br />

d 4<br />

d 5<br />

...<br />

d 30<br />

d 31<br />

GND<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

6


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Busse<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Vorteile<br />

– Modularer Aufbau<br />

– Skalierbarkeit<br />

– Wiederverwendung von<br />

Ressourcen<br />

• Busleitungen<br />

– Reusability<br />

(„Wiederverwendbarkeit“)<br />

• z.B. Netzwerk-Chip<br />

– Einheitliche Kommunikation<br />

CPU<br />

Memory<br />

Systembus<br />

Grafik<br />

Netzwerk<br />

...<br />

Nachteile<br />

– Throughput Bottleneck („Flaschenhals“)<br />

• Module teilen sich Bus-Bandbreite<br />

– Niedrige Taktfrequenz<br />

Alternative<br />

– N-zu-N Verbindung<br />

• Zu viele Leitungen<br />

– Z.b. N=10 Module mit 32-Bit Bus:<br />

10*(10-1)/2*32 = 1440 Datenleitungen<br />

Memory<br />

CPU<br />

Netzwerk<br />

Grafik<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

7


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Bus-Timing<br />

Was wird in Timing-Diagramm<br />

dargestellt?<br />

– Adressen<br />

– Kontrollsignale<br />

– Daten<br />

– Zeitverhalten<br />

Synchrone Datenübertragung<br />

– Bustakt<br />

• Langsamer als Prozessortakt<br />

Bandbreite von Bussen<br />

– Taktfrequenz * Busbreite<br />

• 33 MHz * 32-Bit = 132 MB/s<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Processor<br />

(CPU)<br />

Memory<br />

Systembus<br />

Input<br />

Output<br />

Clk<br />

Addr<br />

R/W<br />

Data<br />

1 2 3<br />

Addr1 Addr2 Addr3<br />

Read Read Write<br />

Instr Data Result<br />

7.5 ns<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

8


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Busbeispiel: PCI<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

32<br />

AD<br />

– 32-Bit Bus<br />

• Adress- <strong>und</strong><br />

Daten-Multiplexing<br />

– 33 MHz Bustakt<br />

– 132 MB/s Durchsatz<br />

• Maximalwert<br />

4<br />

PAR<br />

C/BE<br />

Parität<br />

Buskommando<br />

Adresse, Daten<br />

PCI-Karte<br />

Idsel<br />

Devsel<br />

Stop<br />

Irdy<br />

Trdy<br />

Frame<br />

Serr<br />

Perr<br />

Kontrollsignale<br />

Gnt<br />

Req<br />

Rst<br />

Clk<br />

Reset<br />

Clock (Takt)<br />

Clk<br />

Frame<br />

AD<br />

C/BE<br />

– Beispiel: Schreibzugriff<br />

• Minimale Transaktion<br />

– Mindestens zwei Takte<br />

» Adressierung<br />

» Datenübertragung<br />

1 2 3 4<br />

Adresse<br />

Daten1<br />

Command BE1 BE2<br />

Adressphase<br />

Datenphase<br />

Daten2<br />

Datenphase<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

9


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Bus-Signale<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Input<br />

Analoge Darstellung digitaler<br />

Information<br />

– Als Spannung<br />

Ausbreitungsgeschwindigkeit<br />

– 2/3 Lichtgeschwindigkeit<br />

• 133 MHz: 150 cm (in 7,5 ns)<br />

• 1 GHz: 20 cm (in 1 ns)<br />

Ideal<br />

t<br />

Leitung<br />

Real<br />

t<br />

RC-Effekt<br />

Output<br />

– R: Resistance („Widerstand“)<br />

– C: Capacitance („Kapazität“)<br />

– R, C durch Nichtidealität der<br />

Bauteile (Transistoren,<br />

Leiterbahnen)<br />

– Verzögert Signale<br />

• Delay<br />

• Langsamer Flankenanstieg<br />

Wärme<br />

R<br />

C<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

10


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Digitale Signale<br />

CMOS-Technologie<br />

– CMOS: Complementary<br />

Metal-Oxide Semiconductor<br />

„Komplementärer Metall-Oxyd<br />

Halbleiter“<br />

Logik-Pegel<br />

– Hängen von Spannungsversorgung ab<br />

– CMOS-Schaltungen restaurieren Signal<br />

Gängige Logikpegel (Angaben in Volt)<br />

Eingang<br />

Ausgang<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Foto © Wikipedia/Grabert<br />

Technik<br />

CMOS<br />

5V<br />

CMOS<br />

2,5V<br />

CMOS<br />

1,8V<br />

Low<br />

(VIL)<br />

High<br />

(VIH)<br />

Low<br />

(VOL)<br />

High<br />

(VOH)<br />

≤ 1,5 ≥ 3,5 ≤ 0,5 ≥ 4,44<br />

≤ 0,7 ≥ 1,7 ≤ 0,2 ≥ 2,3<br />

≤ 0,7 ≥ 1,17 ≤ 0,45 ≥ 1,2<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

11


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Simple CPU<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Microchip PIC16F54<br />

– 8-Bit Controller<br />

– 768 Byte ROM<br />

• Flash-Speicher<br />

– 25 Byte RAM<br />

– 10 MHz Clock<br />

– Preis: 0.44 US$<br />

– 33 Instruktionen<br />

Foto © Microchip<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

12


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Fetch-Execute<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Von Neumann Architektur<br />

– Einheitlicher Speicher<br />

• Für Daten <strong>und</strong> Programme<br />

Fetch-and-Execute Algorithmus<br />

– Sequentielle Instruktionsabarbeitung<br />

– Fetch<br />

• Instruktion lesen<br />

• Instruktion dekodieren<br />

• Operanden lesen<br />

– Execute<br />

• Operation ausführen<br />

• Ergebnis speichern<br />

CPU<br />

Control Unit<br />

► Enorme Anzahl an Instruktionen pro Sek<strong>und</strong>e (GHz)<br />

ALU<br />

– Macht aus einfachen Instruktionen komplexe Software<br />

Computer<br />

Memory<br />

Fetch<br />

Execute<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

13


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Fetch-Execute: Komponenten<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Was benötigt eine CPU für<br />

Fetch-Execute?<br />

– Control Unit<br />

• Steuert CPU Abläufe<br />

– Datenübernahme von<br />

Registern<br />

– Wählt Operation von<br />

ALU<br />

– Instruction pointer<br />

• Speicheradresse mit<br />

aktueller Instruktion<br />

– Instruction register<br />

• Aktuelle Instruktion<br />

– Memory Address <strong>und</strong><br />

Memory Buffer Register<br />

• Speicher-Interface<br />

– ALU<br />

• Exekutiert Instruktionen<br />

– Register / Akkumulator<br />

• Mini-Speicher für<br />

Operanden <strong>und</strong> Ergebnis<br />

Control Unit<br />

Control<br />

IP<br />

Instr. pointer<br />

IR<br />

Instr. Register<br />

MAR<br />

Mem. addr. Reg.<br />

Address<br />

CPU<br />

MBR<br />

Mem. Buf. Reg.<br />

Data<br />

Memory<br />

EAX<br />

EAX EAX EAX<br />

Accumulator<br />

ALU<br />

Arithm. Logic Unit<br />

Systembus<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

14


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Nach dem Reset<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Nach Reset ...<br />

– Stabile Versorgungsspannung<br />

– Stabiler Takt<br />

... beginnt CPU<br />

– Instruktionen<br />

abzuarbeiten<br />

Die erste Instruktion<br />

– Liegt an fixer Adresse<br />

• Meist 0x00000000<br />

Control Unit<br />

Control<br />

IP<br />

Instr. 00000000 pointer<br />

IR<br />

Instr. Register<br />

MAR<br />

Mem. addr. Reg.<br />

Address<br />

CPU<br />

MBR<br />

Mem. Buf. Reg.<br />

Data<br />

Memory<br />

EAX<br />

EAX EAX EAX<br />

Accumulator<br />

ALU<br />

Arithm. Logic Unit<br />

Systembus<br />

Instr. 1 00000005<br />

Instr. 0<br />

00000000<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

15


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Instruction Fetch<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Fetch = Holen aktueller<br />

Instruktion aus Speicher<br />

– Instruction pointer zeigt auf<br />

aktuelle Speicheradresse<br />

– 1. Speicher adressieren<br />

• Memory Address Register<br />

– Übernimmt Adresse<br />

von IP<br />

• Lesezugriff auf<br />

Systembus<br />

– 2. Wert auslesen<br />

• Memory Buffer Register<br />

– Übernimmt Wert<br />

(“Datum”) aus Memory<br />

• Instruction Register<br />

– Speichert Instruktion<br />

» Kopie von Memory<br />

Control Unit<br />

Control<br />

read<br />

IP<br />

00000000<br />

Instr. pointer<br />

IR<br />

Instr. Register 0<br />

MAR<br />

Mem. 00000000 addr. Reg.<br />

Address<br />

1.<br />

00000000<br />

CPU<br />

MBR<br />

Mem. Instr. Buf. Reg. 0<br />

Data<br />

Memory<br />

Instr. 0<br />

EAX<br />

EAX EAX EAX<br />

Accumulator<br />

ALU<br />

Arithm. Logic Unit<br />

2.<br />

Systembus<br />

Instr. 1 00000005<br />

00000000<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

16


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Instruction Decode<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Decode<br />

– Control Unit<br />

• Erkennt Instruktion am<br />

Opcode<br />

– Z.B. 0x05 = ADD<br />

EAX, immediate<br />

» Addiere<br />

konstanten 32-<br />

Bit Wert zu EAX<br />

Register<br />

• u.U. Fetch von<br />

Operanden nötig<br />

– Weiterer Speicher-<br />

Zugriff nötig<br />

Instruction Pointer<br />

– Wird erhöht sobald<br />

Instruction-Fetch<br />

abgeschlossen<br />

Control Unit<br />

ADD<br />

EAX,<br />

...<br />

Control<br />

IP<br />

Instr. IP++ pointer<br />

IR<br />

Instr. 05 Register<br />

MAR<br />

Mem. addr. Reg.<br />

Address<br />

CPU<br />

MBR<br />

Mem. Buf. Reg.<br />

Data<br />

Memory<br />

EAX<br />

EAX EAX EAX<br />

Accumulator<br />

ALU<br />

Arithm. Logic Unit<br />

Systembus<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

17


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Operand Fetch<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Operand Fetch<br />

– Speicherzugriff ähnlich<br />

wie bei Instruction<br />

Fetch<br />

• Immediate Operand<br />

Speicherzugriff<br />

– Folgt immer direkt<br />

auf Instruktions-<br />

Opcode<br />

– Instruction-Pointer<br />

zeigt darauf!<br />

– Immer Sequentiell!<br />

– Memory hat nur ...<br />

• ... einen Adressbus<br />

• ... einen Datenbus<br />

Control Unit<br />

Control<br />

IP<br />

00000001<br />

Instr. pointer<br />

IR<br />

Instr. Register<br />

MAR<br />

Mem. 00000001 addr. Reg.<br />

Address<br />

00000001<br />

CPU<br />

MBR<br />

Mem. 0000008 Buf. Reg.<br />

Data<br />

Memory<br />

EAX<br />

EAX EAX EAX<br />

Accumulator<br />

ALU<br />

Arithm. Logic Unit<br />

Systembus<br />

Instr. 1 00000005<br />

0000008 00000001<br />

05 00000000<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

18


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Execute<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Execute<br />

– Control Unit<br />

– ALU<br />

• Wählt ALU-Operation<br />

aus<br />

• Wählt Operanden aus<br />

• Berechnet Operation<br />

– Hier: Addition<br />

– Weitere<br />

Operationen von<br />

ALUs<br />

» Add, Subtract<br />

» Increment, Decr.<br />

» AND, OR, XOR<br />

» Shift left / right<br />

» Rotate left / right<br />

Control Unit<br />

Control<br />

IP<br />

CPU<br />

Memory<br />

EAX<br />

EAX EAX EAX<br />

Instr. IP += pointer 4 Accumulator 0000010<br />

IR<br />

Instr. Register<br />

MAR<br />

Mem. addr. Reg.<br />

Address<br />

MBR<br />

Mem. 0000008 Buf. Reg.<br />

Data<br />

ALU<br />

Arithm. Logic Unit<br />

ADD<br />

0000018<br />

Systembus<br />

Instr. 1 00000005<br />

0000008 00000001<br />

05 00000000<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

19


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Store Result<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Store<br />

– Ergebnis speichern<br />

– Ziel:<br />

• Entweder Prozessor-Register<br />

• Oder Speicheradresse<br />

Load / Store Architektur<br />

– Operanden müssen in Register<br />

stehen<br />

• Bei Pentium nicht der Fall<br />

– Ergebnis nur in Register<br />

speichern möglich<br />

• Auch bei Pentium<br />

– Separate Instruktionen für<br />

Memory-Zugriff (load, store)<br />

• Verwenden viele Prozessoren<br />

(RISC)<br />

– Beispiel: memc = mema + memb<br />

• 2 Load-, 1 Store-, 1 Add-<br />

Instruktion nötig<br />

Control Unit<br />

Control<br />

IP<br />

Instr. pointer<br />

IR<br />

Instr. Register<br />

MAR<br />

Mem. addr. Reg.<br />

Address<br />

CPU<br />

MBR<br />

Mem. Buf. Reg.<br />

Data<br />

Memory<br />

EAX<br />

EAX EAX EAX<br />

Accumulator 0000010<br />

ALU<br />

Arithm. Logic Unit<br />

0000018<br />

Systembus<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

20


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Instruktionszyklus<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Phasen der Instruktions-<br />

Abarbeitung<br />

1. Fetch instruction<br />

2. Decode instruction<br />

3. Fetch operand<br />

4. Execute operation<br />

5. Store result<br />

Clk<br />

Phase<br />

Instruktion dauert<br />

1 2 3 4<br />

Fetch Decode Operand Exec<br />

– Mehrere Prozessortakte<br />

– Meist 5 oder 6 Takte<br />

Memoryzugriffe bilden<br />

Flaschenhals<br />

Instruction Cycle<br />

5<br />

Store<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

21


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Pre-Fetching<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Beschleunigt Fetch-Execute<br />

Algorihtmus<br />

– Nutzt leere Buszyklen ...<br />

• Zyklen ohne Speicherzugriff<br />

– ... Zum Fetchen der nächsten<br />

Instruktion<br />

Benötigt<br />

– Zusätzlichen Speicher in CPU<br />

IR<br />

Instr. Register<br />

• Pre-fetch queue<br />

Fetch1<br />

Fetch2<br />

Exec1<br />

Fetch3<br />

Exec2<br />

Pre-Fetching<br />

– Parallelisiert Abarbeitung von<br />

Instruktionen<br />

Probleme<br />

– Programmverzweigungen<br />

• Pre-Fetch-Instruktionen<br />

müssen u.U. verworfen werden<br />

► Hardware macht prinzipiell<br />

alles parallel!<br />

Fetch4<br />

Exec3<br />

Fetch4'<br />

Fetch5<br />

Exec4<br />

Exec5<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

22


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Pipelining of Fetch/Execute<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Pipelining<br />

– Verfünffachung<br />

des Durchsatzes<br />

• Nur bei 100%<br />

Fetch1 Fetch2 Fetch3 Fetch4 Fetch5 ...<br />

Füllung der Pipeline<br />

• Instruktionstakt =<br />

Prozessortakt<br />

Decod1 Decod2 Decod3 Decod4 Decod5<br />

– Jede Instruktion dauert<br />

fünf Takte<br />

– Fünf Instruktionen in Pipe<br />

Probleme<br />

– Datenabhängigkeiten<br />

• Von Instruktionen<br />

– Verzweigungen im Programm<br />

– Memory-Flaschenhals muss durch Caches eliminiert werden<br />

• Verwendung von Caches für Instruktionen <strong>und</strong> Daten<br />

– Schneller Zwischenspeicher<br />

– Wesentlich weniger Speicherkapazität als DRAM<br />

► RISC-Prozessoren sind besser für Pipelining geeignet<br />

1 2 3 4 5 6 7 8<br />

...<br />

Oprnd1 Oprnd2 Oprnd3 Oprnd4 Oprnd5<br />

...<br />

Exec1 Exec2 Exec3 Exec4 Exec5<br />

Store1 Store2 Store3 Store4<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

23


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Simple IO<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Memory-mapped IO<br />

– Input/Output in Speicher eingeblendet<br />

– Aus Softwaresicht kein Unterschied<br />

Address-Decoder<br />

Address<br />

– Generiert Chip-select Signale<br />

• Adressraum wird aufgeteilt<br />

CS<br />

Data<br />

Mem<br />

Systembus<br />

Address<br />

Address<br />

Decoder<br />

7FFF<br />

0000<br />

CS Chip<br />

Select<br />

IO Address<br />

Data<br />

Input<br />

Output<br />

80ff<br />

8000<br />

CPU benötigt<br />

– Keine zusätzlichen IO-<br />

Instruktionen<br />

IO-Module benötigen<br />

– Datenregister<br />

– Kontrollregister<br />

– Statusregister<br />

Not<br />

Used<br />

IO<br />

32K<br />

RAM<br />

FFFF<br />

8100<br />

80ff<br />

8000<br />

7FFF<br />

0000<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

24


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Simple IO: Beispiel mit PIC 16F54<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Memory-mapped IO<br />

D[0] D Q Pin RB0<br />

D[1] D Q Pin RB1<br />

D[2] D Q Pin RB2<br />

...<br />

Pin RB7<br />

D[7] D Q<br />

Write_PortB<br />

PIC 16F54<br />

Timing Diagram<br />

Write_PortB<br />

D[7:0]<br />

RB[7:0]<br />

RB[7]<br />

A5<br />

IO-Programmierung<br />

A5<br />

– BCF PORTB, 7<br />

• „Bit Clear on PORTB in Bit 7“<br />

– Bit-7 in Register PortB wird 0<br />

– Output-Pin RB7 wird LOW<br />

– MOVLW H`A5`<br />

MOVWF<br />

Foto © Microchip<br />

PORTB<br />

• Move literal A5 to W-register<br />

• Move W-register to PortB<br />

– RB0 = 1, RB1 = 0, RB2 = 1,<br />

RB3 = 0, RB4 = 0, RB5 =1,<br />

RB6 = 0, RB7 = 1<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

25


IAIK – Institut für Angewandte Informationsverarbeitung <strong>und</strong> Kommunikationstechnologie<br />

Zusammenfassung<br />

<strong>Rechnernetze</strong> <strong>und</strong> <strong>Organisation</strong><br />

Bussysteme<br />

– Ermöglichen modularen Aufbau<br />

• Von Computern<br />

Prozessoren arbeiten einfach<br />

– Fetch-Execute Algorithmus<br />

Input / Output<br />

– Mit memory-mapped IO möglich<br />

Literatur:<br />

– Rob Williams, „Computer Systems Architecture“,<br />

Addision-Wesley, 2001: Kapitel 3.<br />

Professor Dr. Johannes Horst Wolkerstorfer Cerjak, 19.12.2005<br />

RNO VO02_fetchexecute<br />

26

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!