Pengantar Organisasi Komputer - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Pengantar Organisasi Komputer

Description:

MDRout, IRin. Fetch operand (isi lokasi memori yg ditunjuk oleh R3) R3out, MARin, Read ... MDRout, IRin. PCout, Yin , If SF=0 then End // take the branch? ... – PowerPoint PPT presentation

Number of Views:84
Avg rating:3.0/5.0
Slides: 46
Provided by: bobbyn4
Category:

less

Transcript and Presenter's Notes

Title: Pengantar Organisasi Komputer


1
IKI10230Pengantar Organisasi KomputerBab 10
Micro Architecture
Sumber1. Paul Carter, PC Assembly Language2.
Hamacher. Computer Organization, ed-53. Materi
kuliah CS61C/2000 CS152/1997, UCB
5 Mei 2004 L. Yohanes Stefanus (yohanes_at_cs.ui.ac.i
d)Bobby Nazief (nazief_at_cs.ui.ac.id) bahan
kuliah http//www.cs.ui.ac.id/kuliah/POK/
2
Prosesor Control Datapath
3
Organisasi Prosesor (Single-bus)
Control Unit
DatapathUnit
4
Legenda
  • PC Program Counter
  • MAR Memory Address Register
  • MDR Memory Data Register
  • ALU Arithmetic Logic Unit
  • IR Instruction Register
  • SP Stack Pointer

5
Siklus Eksekusi Instruksi
  • Eksekusi instruksi yang ukurannya tetap
  • do
  • 1. IR ? PC // Fetch instruksi
  • 2. PC ? PC d // Tunjuk ke lokasi instruksi
    berikutnya
  • 3. Eksekusi instruksi
  • while (!stop)
  • Eksekusi instruksi yang ukurannya bervariasi
  • do
  • do // Fetch instruksi
  • IR ? PC
  • PC ? PC d
  • while (!end-of-instruction)
  • Eksekusi instruksi
  • while (!stop)

6
Operasi-operasi Dasar Dalam Eksekusi Instruksi
  • Pertukaran Data Antar-Register
  • Operasi Aritmatika Logika di Datapath
  • Mengambil (fetching) Data dari Memori
  • Menyimpan (storing) Data ke Memori

7
Pertukaran Data Antar-Register
R1in
  • Instruksi
  • MOV R4,R1 R4 ? R1
  • Langkah-langkah
  • Enable output of R1// setting R1out to 1
  • Enable input of R4 // setting R4in to 1

X
R1
X
R1out
R4in
X
R4
X
R4out
8
Operasi Aritmatika dan Logika
  • Instruksi
  • ADD R1,R2 R1 ? R1 R2
  • Langkah-langkah
  • R1out, Yin
  • R2out, Add, Zin
  • Zout, R1in

9
Mengambil Data dari Memori
  • Instruksi
  • MOV R2,R1 R2 ? R1
  • Langkah-langkah
  • MAR ? R1
  • Read
  • Tunggu sinyal MFC// MFC Memory Function
    Completed// Pada saat MFC aktif// MDR ? MMAR
  • R2 ? MDR

10
Menyimpan Data ke Memori
  • Instruksi
  • MOV R1,R2 R1 ? R2
  • Langkah-langkah
  • MAR ? R1
  • MDR ? R2, Write
  • Tunggu sinyal MFC// MFC Memory Function
    Completed// Pada saat MFC aktif// MMAR ? MDR

11
  • Langkah-langkah
  • Pengeksekusian Instruksi

12
Tahapan Eksekusi Instruksi
  • Instruksi
  • Add R1,R3 R1 ? R1 R3
  • Langkah-langkah
  • Fetch instruksi
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • Fetch operand (isi lokasi memori yg ditunjuk oleh
    R3)
  • R3out, MARin, Read
  • R1out, Yin, WMFC
  • Lakukan operasi penjumlahan
  • MDRout, Add, Zin
  • Simpan hasil penjumlahan di R1
  • Zout, R1in, End

13
1. Fetch instruksi
  • PCout, MARin, Read, Clear Y, Set carry-in to
    ALU, Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin

Control lines
Address lines
Data lines
00000000
Add
1
Carry-in
PC1
14
2. Fetch operand
  • R3out, MARin, Read
  • R1out, Yin, WMFC

Address lines
Data lines
15
3. Lakukan operasi penjumlahan
  • MDRout, Add, Zin

Address lines
Data lines
Add
Carry-in
Zin
16
4. Simpan hasil penjumlahan
  • Zout, R1in, End

Address lines
Data lines
17
Tahapan Eksekusi Branching
  • Unconditional (JMP Loop)
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • PCout, Yin
  • Offset-field-of-IRout, Add, Zin // PC ? PC
    Offset
  • Zout, PCin, End
  • Conditional (contoh JS Loop)
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • PCout, Yin , If SF0 then End // take the branch?
  • Offset-field-of-IRout, Add, Zin // PC ? PC
    Offset
  • Zout, PCin, End

18
  • MOV EAX,EBX

19
Tahapan Eksekusi Instruksi MOV EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EBXout, MARin, Read
  • WMFC
  • MDRout, EAXin, End

Control lines
Read
Address lines
PCout
MARin
Data lines
Clear Y
00000000
Add
1
Set Carry-in
PC1
20
Tahapan Eksekusi Instruksi MOV EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EBXout, MARin, Read
  • WMFC
  • MDRout, EAXin, End

Control lines
WMFC
Address lines
PCin
Data lines
Zout
21
Tahapan Eksekusi Instruksi MOV EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EBXout, MARin, Read
  • WMFC
  • MDRout, EAXin, End

Control lines
Address lines
Data lines
22
Tahapan Eksekusi Instruksi MOV EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EBXout, MARin, Read
  • WMFC
  • MDRout, EAXin, End

Control lines
Read
Address lines
Data lines
23
Tahapan Eksekusi Instruksi MOV EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EBXout, MARin, Read
  • WMFC
  • MDRout, EAXin, End

Control lines
WMFC
Address lines
Data lines
24
Tahapan Eksekusi Instruksi MOV EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EBXout, MARin, Read
  • WMFC
  • MDRout, EAXin, End

Control lines
Address lines
Data lines
25
  • ADD EAX,EBX

26
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • Instruksi
  • ADD EAX,EBX EAX ? EAX EBX
  • Langkah-langkah
  • Fetch instruksi
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • Fetch operand ke-1 (EAX)
  • EAXout, Yin
  • Fetch operand ke-2 (EBX) dan Lakukan operasi ALU
  • EBXout, Add, Zin
  • Simpan hasil penjumlahan di EAX
  • Zout, EAXin, End

27
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EAXout, Yin
  • EBXout, Add, Zin
  • Zout, EAXin, End

Control lines
Read
Address lines
PCout
MARin
Data lines
Clear Y
00000000
Add
1
Set Carry-in
PC1
Zin
28
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EAXout, Yin
  • EBXout, Add, Zin
  • Zout, EAXin, End

Control lines
WMFC
Address lines
PCin
Data lines
Zout
29
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EAXout, Yin
  • EBXout, Add, Zin
  • Zout, EAXin, End

Control lines
Address lines
Data lines
30
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EAXout, Yin
  • EBXout, Add, Zin
  • Zout, EAXin, End

Control lines
Address lines
Data lines
31
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EAXout, Yin
  • EBXout, Add, Zin
  • Zout, EAXin, End

Control lines
Instruction Decoder
PC1
Address lines
MAR
IR
Data lines
MDR
EBX
YEAX
EAX
ALU
Z
TEMP
32
Tahapan Eksekusi Instruksi ADD EAX,EBX
  • PCout, MARin, Read, Clear Y, Set carry-in to ALU,
    Add, Zin
  • Zout, PCin, WMFC
  • MDRout, IRin
  • EAXout, Yin
  • EBXout, Add, Zin
  • Zout, EAXin, End

Control lines
Address lines
Data lines
33
  • Peningkatan Kinerja Prosesor

34
Multiple-bus salah satu cara peningkatan kinerja
Add R1,R2,R3 R1?R2R3
35
Bandingkan dengan Organisasi Single-bus
Add R1,R2,R3 R1?R2R3
36
Beberapa Teknik Peningkatan Kinerja Prosesor
Lainnya
  • Pre-fetchinginstruksi berikutnya (i1) di-fetch
    pada waktu pengeksekusian instruksi (i)
  • Perlu teknik Branch Prediction
  • Pipeliningeksekusi instruksi dipecah kedalam
    tahap-tahap yang dapat dilakukan secara overlap
  • Fetch Instruksi
  • Decode Instruksi
  • Baca Operand (dari register asal)
  • Lakukan Operasi
  • Tulis Hasil (ke register tujuan)
  • On-chip Cachemempercepat akses data dari/ke
    memori

37
  • LAMPIRAN

38
  • Gating
  • Controlling Data Access from/to a Gate

39
Input Output Gating
operasi tulis baca dilakukan secara bergantian
memungkinkan peranti lain menggunakan bus
Operasi Baca
Operasi Tulis
Zout Q output 0 X 3-state 1 1 1
1 0 0
  • 1-bit bus Zin Q
  • X 0 Q
  • 0 1 0
  • 1 1 1

40
  • Komponen-komponen Waktu Eksekusi

41
Komponen-komponen Waktu Eksekusi
  • Waktu Eksekusi Ditentukan Oleh
  • Gate Delay
  • Waktu yang dibutuhkan output suatu gerbang logika
    berubah sesuai kondisi inputnya
  • Registers Delay
  • Waktu yang dibutuhkan isi register berubah sesuai
    inputnya

42
Waktu Eksekusi Gate Delay
  • When input 0 ? 1, output 1 ? 0 but NOT instantly
  • Output goes 1 ? 0 output voltage goes from Vdd
    (5v) to 0v
  • When input 1 ? 0, output 0 ? 1 but NOT instantly
  • Output goes 0 ? 1 output voltage goes from 0v to
    Vdd (5v)
  • Voltage does not like to change instantaneously

Voltage
1 gt Vdd
0 gt GND
Time
43
Waktu Eksekusi Series Connection
Vdd
V1
Vin
G1
G2
G1
G2
C1
Voltage
Vdd
V1
Vout
Vin
Vdd/2
d1
d2
GND
Time
  • Total Propagation Delay Sum of individual
    delays d1 d2
  • Capacitance C1 has two components
  • Capacitance of the wire connecting the two gates
  • Input capacitance of the second inverter

44
Waktu Eksekusi Registers Delay
Clk
  • Setup Time Input must be stable BEFORE the
    trigger clock edge
  • Hold Time Input must REMAIN stable after the
    trigger clock edge
  • Clock-to-Q time
  • Output cannot change instantaneously at the
    trigger clock edge

45
Waktu Eksekusi
R2out, Add, Zin
Turn-on time for 3-state driver
Transmission time
Propagation delay through ALU
Setup time
Hold time
Write a Comment
User Comments (0)
About PowerShow.com