AK07 Operasi Unit Kontrol
AK07 Operasi Unit Kontrol
doc Hlm = 14 1
Microoperations
♦ Each step of the instruction cycle can be decomposed into
microoperation primitives that are performed in a precise time sequence
– Instruction fetch:
t1: MAR <-- (PC)
t2: MBR <-- memory
PC <-- PC+1
t3: IR <-- (MBR)
♦ Two approaches
– Hardwired logic
» Control unit is viewed as a sequential logic circuit
» Used to generate fixed sequences of control signals
» Implemented using any of a variety of “standard” digital logic
techniques
» Principle advantages
High(er) speed operation
Smaller implementations (component counts)
Hardwired approach
♦ Three general design approaches
– Traditional “state-table” method from a digital logic course
» Can produce the minimum component design
» Complex design that may be hard to modify
– Clocked delay element
» Straight-forward layout based on flowchart of the intruction
implementation
» Requires more delay elements (flip flops) than are really needed
– Sequence counter approach
» Polyphase clock signals are dervied from the master clock using a
standard counterdecoder approach
» These signals are applied to the combinational portion of the
circuit
♦ Example: load register B (control signal C12)
– C12 = T4I3 +T5I6Z +T6I24P
Microprogramming
♦ The concept of microprogramming was developed by Maurice Wilkes in
1951, using diode matrices for the memory element
Operasi Mikro
Operasi mikro adalah operasi fungsional atau operasi atomik suatu CPU.
dijelaskan
pada pulsa waktu pertama : Memindahkan isi PC ke MAR
pada pulsa waktu kedua : Memindahkan isi lokasi memori yang
dispesifikasi kan MAR ke MBR.
Menambahkan 1 ke isi PC.
Pada pulsa waktu ketiga : Memindahkan isi MBR ke IR.
Operasi mikro kedua dan ketiga terjadi pada satuan waktu kedua. Operasi
mikro ketiga dapat dikelompokkan dengan operasi mikro yang keempat
tanpa mempengaruhi operasi pengambilan.
t1 : MAR ← (PC)
t2 : MBR← Memori
t3 : PC ← (PC) + 1
IR ← (MBR)
Siklus Interrupt
Pada akhir siklus eksekusi instruksi, dilakukan suatu pengujian untuk
menentukan apakah interrupt telah terjadi. Bila terjadi interrupt, maka akan
terjadi siklus interrupt.
Contoh siklus interrupt sbb.:
t1 : MBR ← (PC)
t2 : MAR ← Alamat-simpan
PC ← Alamat-rutin
t3 : Memori ← (MBR)
Pada langkah pertama, isi PC dipindahkan ke MBR, sehingga isi
tersebut dapat disimpan untuk dapat dikembalikan lagi dari interrupt.
Drs. Ign. Djoko Irianto, M.Eng. R0 - 30/12/2007 Arsitektur Komputer
AK 07 Operasi Unit Kontrol.doc Hlm = 14 11
Kemudian MAR dimuati dengan alamat dimana isi PC akan disimpan,
dan PC dimuati dengan alamat awal rutin pengolahan interrupt. Kedua
aksi ini dapat merupakan operasi mikro tunggal.
Langkah selanjutnya menyimpan isi MBR ke memori.
Siklus Eksekusi
Contoh siklus eksekusi pada instruksi penambahan sbb.:
ADD R1,X
Tambahkan isi lokasi X ke register R1.
Contoh lain siklus eksekusi yang lebih kompleks. Suatu instruksi umum
ditingkatkan dan dilompati apabila sama dengan nol.
ISZ X
Isi lokasi X ditambahkan dengan 1. Apabila hasilnya sama dengan nol,
maka instruksi berikutnya dilompati.
Rangkaian operasi mikronya sbb.:
t1 : MAR ← (IR(Alamat))
t2 : MBR ← Memori
t3 : MBR ← (MBR) + 1
t4 : Memori ← (MBR)
If(MBR=0) then (PC ← PC + 1)
Siklus Instruksi
Setiap fase siklus instruksi dapat diuraikan menjadi rangkaian operasi
mikro elementer.
Secara umum satu siklus instruksi dapat dibagi menjadi 4 bagian siklus
yaitu:
siklus pengambilan,
siklus tak langsung (instruction decoding dan operand fetch),
siklus eksekusi, dan
siklus interrupt.
Sinyal Kontrol
Berikut adalah gambaran model unit kontrol yang menunjukkan seluruh
input dan outputnya.
Register Instruksi Bus Kontrol
Sinyal Kontrol
dalam CPU
Summary
♦ This section has oveviewed the operation and the design of the control
unit
♦ Hardwired and microprogramming techniques discussed
– Basic operation of each
– Advantages and disadvantages of each
– “Costs” associated with each