Isnaini Ahmadi 15514
-
Upload
isnaini-ahmadi -
Category
Documents
-
view
22 -
download
0
description
Transcript of Isnaini Ahmadi 15514
LAPORAN EKSPERIMEN ORGANISASI DAN ARSITEKTUR KOMPUTER
“Mikroinstruksi ISA 2”
S1 Elektronika dan Instrumentasi
Dosen Pengampu:
Nia Gella Augoestien
Oleh:
Isnaini Ahmadi
13/349535/PA/15514
PROGRAM STUDI ELEKTRONIKA DAN INSTRUMENTASI
JURUSAN ILMU KOMPUTER DAN ELEKTRONIKA
FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM
UNIVERSITAS GADJAH MADA
YOGYAKARTA
2015
a. Judul
Mikroinstruksi ISA (MIC-1) II
b. Listing
1) 2)
c. Hasil
J := 3;
k :=2;
I := j + k;
if i = 3 then
j := j – 1;
else
j := k – 2;
J := 10;
for i = 4 to 6
do
j := j – 2;
-----------------Start cycle 1-----------------
-----
goto 0x2
MDR: Put 0x0
H: Put 0x0
ALU: 0 AND 0 = 0x0
Goto ADDR: 0x2
-----------------Start cycle 2-----------------
-----
PC=PC+1;fetch;goto (MBR)
PC: Put FFFFFFFF
H: Put 0x0
ALU: 0 + B + 1 = 0x0
PC: Store 0
PC: Fetch byte 0
MEM: Fetch from byte# 0x0
requested. Processing...
Goto MBR: 0x0
-----------------Start cycle 3-----------------
-----
goto 0x2
MDR: Put 0x0
H: Put 0x0
ALU: 0 AND 0 = 0x0
MEM: Fetch value 0x10 from address
0x0
MBR: Store 0x10
Goto ADDR: 0x2
-----------------Start cycle 4-----------------
-----
PC=PC+1;fetch;goto (MBR)
PC: Put 0
H: Put 0x0
ALU: 0 + B + 1 = 0x1
PC: Store 1
PC: Fetch byte 1
MEM: Fetch from byte# 0x1
requested. Processing...
Goto MBR: 0x10
-----------------Start cycle 5-----------------
-----
SP=MAR=SP+1;goto 0x16
SP: Put 0x8000
H: Put 0x0
ALU: 0 + B + 1 = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MEM: Fetch value 0x2 from address
0x1
MBR: Store 0x2
Goto ADDR: 0x16
-----------------Start cycle 6-----------------
-----
PC=PC+1;fetch;goto 0x17
PC: Put 1
H: Put 0x0
ALU: 0 + B + 1 = 0x2
PC: Store 2
PC: Fetch byte 2
MEM: Fetch from byte# 0x2
requested. Processing...
Goto ADDR: 0x17
-----------------Start cycle 7-----------------
-----
TOS=MDR=MBR;wr;goto 0x2
MBR: Put 0x2
H: Put 0x0
ALU: 0 OR B = 0x2
MDR: Store 0x2
TOS: Store 0x2
MAR: Write to word 0x8001
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x20004 requested. Processing...
MEM: Fetch value 0x10 from address
0x2
MBR: Store 0x10
Goto ADDR: 0x2
-----------------Start cycle 8-----------------
-----
PC=PC+1;fetch;goto (MBR)
PC: Put 2
H: Put 0x0
ALU: 0 + B + 1 = 0x3
PC: Store 3
PC: Fetch byte 3
MEM: Write value 0x2 to address
0x20004
MEM: Fetch from byte# 0x3
requested. Processing...
Goto MBR: 0x10
-----------------Start cycle 9-----------------
-----
SP=MAR=SP+1;goto 0x16
SP: Put 0x8001
H: Put 0x0
ALU: 0 + B + 1 = 0x8002
MAR: Store 0x8002
SP: Store 0x8002
MEM: Fetch value 0x3 from address
0x3
MBR: Store 0x3
Goto ADDR: 0x16
-----------------Start cycle 10----------------
------
PC=PC+1;fetch;goto 0x17
PC: Put 3
H: Put 0x0
ALU: 0 + B + 1 = 0x4
PC: Store 4
PC: Fetch byte 4
MEM: Fetch from byte# 0x4
requested. Processing...
Goto ADDR: 0x17
-----------------Start cycle 11----------------
------
TOS=MDR=MBR;wr;goto 0x2
MBR: Put 0x3
H: Put 0x0
ALU: 0 OR B = 0x3
MDR: Store 0x3
TOS: Store 0x3
MAR: Write to word 0x8002
MDR: Write 0x3
MEM: Write value 0x3 to word#
0x20008 requested. Processing...
MEM: Fetch value 0x36 from address
0x4
MBR: Store 0x36
Goto ADDR: 0x2
-----------------Start cycle 12----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 4
H: Put 0x0
ALU: 0 + B + 1 = 0x5
PC: Store 5
PC: Fetch byte 5
MEM: Write value 0x3 to address
0x20008
MEM: Fetch from byte# 0x5
requested. Processing...
Goto MBR: 0x36
-----------------Start cycle 13----------------
------
H=LV;goto 0x1C
LV: Put 0xC000
H: Put 0x0
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x1 from address
0x5
MBR: Store 0x1
Goto ADDR: 0x1C
-----------------Start cycle 14----------------
------
MAR=H+MBRU;goto 0x1D
MBR: Put 0x1
H: Put 0xC000
ALU: A + B = 0xC001
MAR: Store 0xC001
Goto ADDR: 0x1D
-----------------Start cycle 15----------------
------
MDR=TOS;wr;goto 0x1E
TOS: Put 0x3
H: Put 0xC000
ALU: 0 OR B = 0x3
MDR: Store 0x3
MAR: Write to word 0xC001
MDR: Write 0x3
MEM: Write value 0x3 to word#
0x30004 requested. Processing...
Goto ADDR: 0x1E
-----------------Start cycle 16----------------
------
SP=MAR=SP-1;rd;goto 0x1F
SP: Put 0x8002
H: Put 0xC000
ALU: NOT 0 + B = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MAR: Read from word 0x8001
MEM: Write value 0x3 to address
0x30004
MEM: Read from word# 0x20004
requested. Processing...
Goto ADDR: 0x1F
-----------------Start cycle 17----------------
------
PC=PC+1;fetch;goto 0x20
PC: Put 5
H: Put 0xC000
ALU: 0 + B + 1 = 0x6
PC: Store 6
PC: Fetch byte 6
MDR: Read 0x2
MEM: Read value 0x2 from address
0x20004
MEM: Fetch from byte# 0x6
requested. Processing...
Goto ADDR: 0x20
-----------------Start cycle 18----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
TOS: Store 0x2
MEM: Fetch value 0x36 from address
0x6
MBR: Store 0x36
Goto ADDR: 0x2
-----------------Start cycle 19----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 6
H: Put 0xC000
ALU: 0 + B + 1 = 0x7
PC: Store 7
PC: Fetch byte 7
MEM: Fetch from byte# 0x7
requested. Processing...
Goto MBR: 0x36
-----------------Start cycle 20----------------
------
H=LV;goto 0x1C
LV: Put 0xC000
H: Put 0xC000
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x2 from address
0x7
MBR: Store 0x2
Goto ADDR: 0x1C
-----------------Start cycle 21----------------
------
MAR=H+MBRU;goto 0x1D
MBR: Put 0x2
H: Put 0xC000
ALU: A + B = 0xC002
MAR: Store 0xC002
Goto ADDR: 0x1D
-----------------Start cycle 22----------------
------
MDR=TOS;wr;goto 0x1E
TOS: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
MDR: Store 0x2
MAR: Write to word 0xC002
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x30008 requested. Processing...
Goto ADDR: 0x1E
-----------------Start cycle 23----------------
------
SP=MAR=SP-1;rd;goto 0x1F
SP: Put 0x8001
H: Put 0xC000
ALU: NOT 0 + B = 0x8000
MAR: Store 0x8000
SP: Store 0x8000
MAR: Read from word 0x8000
MEM: Write value 0x2 to address
0x30008
MEM: Read from word# 0x20000
requested. Processing...
Goto ADDR: 0x1F
-----------------Start cycle 24----------------
------
PC=PC+1;fetch;goto 0x20
PC: Put 7
H: Put 0xC000
ALU: 0 + B + 1 = 0x8
PC: Store 8
PC: Fetch byte 8
MDR: Read 0x0
MEM: Read value 0x0 from address
0x20000
MEM: Fetch from byte# 0x8
requested. Processing...
Goto ADDR: 0x20
-----------------Start cycle 25----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x0
H: Put 0xC000
ALU: 0 OR B = 0x0
TOS: Store 0x0
MEM: Fetch value 0x15 from address
0x8
MBR: Store 0x15
Goto ADDR: 0x2
-----------------Start cycle 26----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 8
H: Put 0xC000
ALU: 0 + B + 1 = 0x9
PC: Store 9
PC: Fetch byte 9
MEM: Fetch from byte# 0x9
requested. Processing...
Goto MBR: 0x15
-----------------Start cycle 27----------------
------
H=LV;goto 0x18
LV: Put 0xC000
H: Put 0xC000
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x1 from address
0x9
MBR: Store 0x1
Goto ADDR: 0x18
-----------------Start cycle 28----------------
------
MAR=H+MBRU;rd;goto 0x19
MBR: Put 0x1
H: Put 0xC000
ALU: A + B = 0xC001
MAR: Store 0xC001
MAR: Read from word 0xC001
MEM: Read from word# 0x30004
requested. Processing...
Goto ADDR: 0x19
-----------------Start cycle 29----------------
------
SP=MAR=SP+1;goto 0x1A
SP: Put 0x8000
H: Put 0xC000
ALU: 0 + B + 1 = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MDR: Read 0x3
MEM: Read value 0x3 from address
0x30004
Goto ADDR: 0x1A
-----------------Start cycle 30----------------
------
PC=PC+1;wr;fetch;goto 0x1B
PC: Put 9
H: Put 0xC000
ALU: 0 + B + 1 = 0xA
PC: Store A
PC: Fetch byte A
MAR: Write to word 0x8001
MDR: Write 0x3
MEM: Write value 0x3 to word#
0x20004 requested. Processing...
MEM: Fetch from byte# 0xA
requested. Processing...
Goto ADDR: 0x1B
-----------------Start cycle 31----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x3
H: Put 0xC000
ALU: 0 OR B = 0x3
TOS: Store 0x3
MEM: Write value 0x3 to address
0x20004
MEM: Fetch value 0x15 from address
0xA
MBR: Store 0x15
Goto ADDR: 0x2
-----------------Start cycle 32----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put A
H: Put 0xC000
ALU: 0 + B + 1 = 0xB
PC: Store B
PC: Fetch byte B
MEM: Fetch from byte# 0xB
requested. Processing...
Goto MBR: 0x15
-----------------Start cycle 33----------------
------
H=LV;goto 0x18
LV: Put 0xC000
H: Put 0xC000
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x2 from address
0xB
MBR: Store 0x2
Goto ADDR: 0x18
-----------------Start cycle 34----------------
------
MAR=H+MBRU;rd;goto 0x19
MBR: Put 0x2
H: Put 0xC000
ALU: A + B = 0xC002
MAR: Store 0xC002
MAR: Read from word 0xC002
MEM: Read from word# 0x30008
requested. Processing...
Goto ADDR: 0x19
-----------------Start cycle 35----------------
------
SP=MAR=SP+1;goto 0x1A
SP: Put 0x8001
H: Put 0xC000
ALU: 0 + B + 1 = 0x8002
MAR: Store 0x8002
SP: Store 0x8002
MDR: Read 0x2
MEM: Read value 0x2 from address
0x30008
Goto ADDR: 0x1A
-----------------Start cycle 36----------------
------
PC=PC+1;wr;fetch;goto 0x1B
PC: Put B
H: Put 0xC000
ALU: 0 + B + 1 = 0xC
PC: Store C
PC: Fetch byte C
MAR: Write to word 0x8002
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x20008 requested. Processing...
MEM: Fetch from byte# 0xC
requested. Processing...
Goto ADDR: 0x1B
-----------------Start cycle 37----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
TOS: Store 0x2
MEM: Write value 0x2 to address
0x20008
MEM: Fetch value 0x60 from address
0xC
MBR: Store 0x60
Goto ADDR: 0x2
-----------------Start cycle 38----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put C
H: Put 0xC000
ALU: 0 + B + 1 = 0xD
PC: Store D
PC: Fetch byte D
MEM: Fetch from byte# 0xD
requested. Processing...
Goto MBR: 0x60
-----------------Start cycle 39----------------
------
SP=MAR=SP-1;rd;goto 0x3
SP: Put 0x8002
H: Put 0xC000
ALU: NOT 0 + B = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MAR: Read from word 0x8001
MEM: Read from word# 0x20004
requested. Processing...
MEM: Fetch value 0x36 from address
0xD
MBR: Store 0x36
Goto ADDR: 0x3
-----------------Start cycle 40----------------
------
H=TOS;goto 0x4
TOS: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
H: Store 0x2
MDR: Read 0x3
MEM: Read value 0x3 from address
0x20004
Goto ADDR: 0x4
-----------------Start cycle 41----------------
------
TOS=MDR=H+MDR;wr;goto 0x2
MDR: Put 0x3
H: Put 0x2
ALU: A + B = 0x5
MDR: Store 0x5
TOS: Store 0x5
MAR: Write to word 0x8001
MDR: Write 0x5
MEM: Write value 0x5 to word#
0x20004 requested. Processing...
Goto ADDR: 0x2
-----------------Start cycle 42----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put D
H: Put 0x2
ALU: 0 + B + 1 = 0xE
PC: Store E
PC: Fetch byte E
MEM: Write value 0x5 to address
0x20004
MEM: Fetch from byte# 0xE
requested. Processing...
Goto MBR: 0x36
-----------------Start cycle 43----------------
------
H=LV;goto 0x1C
LV: Put 0xC000
H: Put 0x2
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x0 from address
0xE
MBR: Store 0x0
Goto ADDR: 0x1C
-----------------Start cycle 44----------------
------
MAR=H+MBRU;goto 0x1D
MBR: Put 0x0
H: Put 0xC000
ALU: A + B = 0xC000
MAR: Store 0xC000
Goto ADDR: 0x1D
-----------------Start cycle 45----------------
------
MDR=TOS;wr;goto 0x1E
TOS: Put 0x5
H: Put 0xC000
ALU: 0 OR B = 0x5
MDR: Store 0x5
MAR: Write to word 0xC000
MDR: Write 0x5
MEM: Write value 0x5 to word#
0x30000 requested. Processing...
Goto ADDR: 0x1E
-----------------Start cycle 46----------------
------
SP=MAR=SP-1;rd;goto 0x1F
SP: Put 0x8001
H: Put 0xC000
ALU: NOT 0 + B = 0x8000
MAR: Store 0x8000
SP: Store 0x8000
MAR: Read from word 0x8000
MEM: Write value 0x5 to address
0x30000
MEM: Read from word# 0x20000
requested. Processing...
Goto ADDR: 0x1F
-----------------Start cycle 47----------------
------
PC=PC+1;fetch;goto 0x20
PC: Put E
H: Put 0xC000
ALU: 0 + B + 1 = 0xF
PC: Store F
PC: Fetch byte F
MDR: Read 0x0
MEM: Read value 0x0 from address
0x20000
MEM: Fetch from byte# 0xF
requested. Processing...
Goto ADDR: 0x20
-----------------Start cycle 48----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x0
H: Put 0xC000
ALU: 0 OR B = 0x0
TOS: Store 0x0
MEM: Fetch value 0x15 from address
0xF
MBR: Store 0x15
Goto ADDR: 0x2
-----------------Start cycle 49----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put F
H: Put 0xC000
ALU: 0 + B + 1 = 0x10
PC: Store 10
PC: Fetch byte 10
MEM: Fetch from byte# 0x10
requested. Processing...
Goto MBR: 0x15
-----------------Start cycle 50----------------
------
H=LV;goto 0x18
LV: Put 0xC000
H: Put 0xC000
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x0 from address
0x10
MBR: Store 0x0
Goto ADDR: 0x18
-----------------Start cycle 51----------------
------
MAR=H+MBRU;rd;goto 0x19
MBR: Put 0x0
H: Put 0xC000
ALU: A + B = 0xC000
MAR: Store 0xC000
MAR: Read from word 0xC000
MEM: Read from word# 0x30000
requested. Processing...
Goto ADDR: 0x19
-----------------Start cycle 52----------------
------
SP=MAR=SP+1;goto 0x1A
SP: Put 0x8000
H: Put 0xC000
ALU: 0 + B + 1 = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MDR: Read 0x5
MEM: Read value 0x5 from address
0x30000
Goto ADDR: 0x1A
-----------------Start cycle 53----------------
------
PC=PC+1;wr;fetch;goto 0x1B
PC: Put 10
H: Put 0xC000
ALU: 0 + B + 1 = 0x11
PC: Store 11
PC: Fetch byte 11
MAR: Write to word 0x8001
MDR: Write 0x5
MEM: Write value 0x5 to word#
0x20004 requested. Processing...
MEM: Fetch from byte# 0x11
requested. Processing...
Goto ADDR: 0x1B
-----------------Start cycle 54----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x5
H: Put 0xC000
ALU: 0 OR B = 0x5
TOS: Store 0x5
MEM: Write value 0x5 to address
0x20004
MEM: Fetch value 0x10 from address
0x11
MBR: Store 0x10
Goto ADDR: 0x2
-----------------Start cycle 55----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 11
H: Put 0xC000
ALU: 0 + B + 1 = 0x12
PC: Store 12
PC: Fetch byte 12
MEM: Fetch from byte# 0x12
requested. Processing...
Goto MBR: 0x10
-----------------Start cycle 56----------------
------
SP=MAR=SP+1;goto 0x16
SP: Put 0x8001
H: Put 0xC000
ALU: 0 + B + 1 = 0x8002
MAR: Store 0x8002
SP: Store 0x8002
MEM: Fetch value 0x3 from address
0x12
MBR: Store 0x3
Goto ADDR: 0x16
-----------------Start cycle 57----------------
------
PC=PC+1;fetch;goto 0x17
PC: Put 12
H: Put 0xC000
ALU: 0 + B + 1 = 0x13
PC: Store 13
PC: Fetch byte 13
MEM: Fetch from byte# 0x13
requested. Processing...
Goto ADDR: 0x17
-----------------Start cycle 58----------------
------
TOS=MDR=MBR;wr;goto 0x2
MBR: Put 0x3
H: Put 0xC000
ALU: 0 OR B = 0x3
MDR: Store 0x3
TOS: Store 0x3
MAR: Write to word 0x8002
MDR: Write 0x3
MEM: Write value 0x3 to word#
0x20008 requested. Processing...
MEM: Fetch value 0x9F from address
0x13
MBR: Store 0x9F
Goto ADDR: 0x2
-----------------Start cycle 59----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 13
H: Put 0xC000
ALU: 0 + B + 1 = 0x14
PC: Store 14
PC: Fetch byte 14
MEM: Write value 0x3 to address
0x20008
MEM: Fetch from byte# 0x14
requested. Processing...
Goto MBR: 0x9F
-----------------Start cycle 60----------------
------
SP=MAR=SP-1;rd;goto 0x3B
SP: Put 0x8002
H: Put 0xC000
ALU: NOT 0 + B = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MAR: Read from word 0x8001
MEM: Read from word# 0x20004
requested. Processing...
MEM: Fetch value 0x0 from address
0x14
MBR: Store 0x0
Goto ADDR: 0x3B
-----------------Start cycle 61----------------
------
SP=MAR=SP-1;goto 0x3C
SP: Put 0x8001
H: Put 0xC000
ALU: NOT 0 + B = 0x8000
MAR: Store 0x8000
SP: Store 0x8000
MDR: Read 0x5
MEM: Read value 0x5 from address
0x20004
Goto ADDR: 0x3C
-----------------Start cycle 62----------------
------
H=MDR;rd;goto 0x3D
MDR: Put 0x5
H: Put 0xC000
ALU: 0 OR B = 0x5
H: Store 0x5
MAR: Read from word 0x8000
MEM: Read from word# 0x20000
requested. Processing...
Goto ADDR: 0x3D
-----------------Start cycle 63----------------
------
OPC=TOS;goto 0x3E
TOS: Put 0x3
H: Put 0x5
ALU: 0 OR B = 0x3
OPC: Store 0x3
MDR: Read 0x0
MEM: Read value 0x0 from address
0x20000
Goto ADDR: 0x3E
-----------------Start cycle 64----------------
------
TOS=MDR;goto 0x3F
MDR: Put 0x0
H: Put 0x5
ALU: 0 OR B = 0x0
TOS: Store 0x0
Goto ADDR: 0x3F
-----------------Start cycle 65----------------
------
Z=OPC-H;if (Z) goto 0x101; else goto
0x1
OPC: Put 0x3
H: Put 0x5
ALU: NOT A + B + 1 = 0xFFFFFFFE
Goto ADDR: 0x1
-----------------Start cycle 66----------------
------
PC=PC+1;goto 0x40
PC: Put 14
H: Put 0x5
ALU: 0 + B + 1 = 0x15
PC: Store 15
Goto ADDR: 0x40
-----------------Start cycle 67----------------
------
PC=PC+1;fetch;goto 0x41
PC: Put 15
H: Put 0x5
ALU: 0 + B + 1 = 0x16
PC: Store 16
PC: Fetch byte 16
MEM: Fetch from byte# 0x16
requested. Processing...
Goto ADDR: 0x41
-----------------Start cycle 68----------------
------
goto 0x2
MDR: Put 0x0
H: Put 0x5
ALU: 0 AND 0 = 0x0
MEM: Fetch value 0x15 from address
0x16
MBR: Store 0x15
Goto ADDR: 0x2
-----------------Start cycle 69----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 16
H: Put 0x5
ALU: 0 + B + 1 = 0x17
PC: Store 17
PC: Fetch byte 17
MEM: Fetch from byte# 0x17
requested. Processing...
Goto MBR: 0x15
-----------------Start cycle 70----------------
------
H=LV;goto 0x18
LV: Put 0xC000
H: Put 0x5
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x1 from address
0x17
MBR: Store 0x1
Goto ADDR: 0x18
-----------------Start cycle 71----------------
------
MAR=H+MBRU;rd;goto 0x19
MBR: Put 0x1
H: Put 0xC000
ALU: A + B = 0xC001
MAR: Store 0xC001
MAR: Read from word 0xC001
MEM: Read from word# 0x30004
requested. Processing...
Goto ADDR: 0x19
-----------------Start cycle 72----------------
------
SP=MAR=SP+1;goto 0x1A
SP: Put 0x8000
H: Put 0xC000
ALU: 0 + B + 1 = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MDR: Read 0x3
MEM: Read value 0x3 from address
0x30004
Goto ADDR: 0x1A
-----------------Start cycle 73----------------
------
PC=PC+1;wr;fetch;goto 0x1B
PC: Put 17
H: Put 0xC000
ALU: 0 + B + 1 = 0x18
PC: Store 18
PC: Fetch byte 18
MAR: Write to word 0x8001
MDR: Write 0x3
MEM: Write value 0x3 to word#
0x20004 requested. Processing...
MEM: Fetch from byte# 0x18
requested. Processing...
Goto ADDR: 0x1B
-----------------Start cycle 74----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x3
H: Put 0xC000
ALU: 0 OR B = 0x3
TOS: Store 0x3
MEM: Write value 0x3 to address
0x20004
MEM: Fetch value 0x10 from address
0x18
MBR: Store 0x10
Goto ADDR: 0x2
-----------------Start cycle 75----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 18
H: Put 0xC000
ALU: 0 + B + 1 = 0x19
PC: Store 19
PC: Fetch byte 19
MEM: Fetch from byte# 0x19
requested. Processing...
Goto MBR: 0x10
-----------------Start cycle 76----------------
------
SP=MAR=SP+1;goto 0x16
SP: Put 0x8001
H: Put 0xC000
ALU: 0 + B + 1 = 0x8002
MAR: Store 0x8002
SP: Store 0x8002
MEM: Fetch value 0x1 from address
0x19
MBR: Store 0x1
Goto ADDR: 0x16
-----------------Start cycle 77----------------
------
PC=PC+1;fetch;goto 0x17
PC: Put 19
H: Put 0xC000
ALU: 0 + B + 1 = 0x1A
PC: Store 1A
PC: Fetch byte 1A
MEM: Fetch from byte# 0x1A
requested. Processing...
Goto ADDR: 0x17
-----------------Start cycle 78----------------
------
TOS=MDR=MBR;wr;goto 0x2
MBR: Put 0x1
H: Put 0xC000
ALU: 0 OR B = 0x1
MDR: Store 0x1
TOS: Store 0x1
MAR: Write to word 0x8002
MDR: Write 0x1
MEM: Write value 0x1 to word#
0x20008 requested. Processing...
MEM: Fetch value 0x64 from address
0x1A
MBR: Store 0x64
Goto ADDR: 0x2
-----------------Start cycle 79----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 1A
H: Put 0xC000
ALU: 0 + B + 1 = 0x1B
PC: Store 1B
PC: Fetch byte 1B
MEM: Write value 0x1 to address
0x20008
MEM: Fetch from byte# 0x1B
requested. Processing...
Goto MBR: 0x64
-----------------Start cycle 80----------------
------
SP=MAR=SP-1;rd;goto 0x5
SP: Put 0x8002
H: Put 0xC000
ALU: NOT 0 + B = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MAR: Read from word 0x8001
MEM: Read from word# 0x20004
requested. Processing...
MEM: Fetch value 0x36 from address
0x1B
MBR: Store 0x36
Goto ADDR: 0x5
-----------------Start cycle 81----------------
------
H=TOS;goto 0x6
TOS: Put 0x1
H: Put 0xC000
ALU: 0 OR B = 0x1
H: Store 0x1
MDR: Read 0x3
MEM: Read value 0x3 from address
0x20004
Goto ADDR: 0x6
-----------------Start cycle 82----------------
------
TOS=MDR=MDR-H;wr;goto 0x2
MDR: Put 0x3
H: Put 0x1
ALU: NOT A + B + 1 = 0x2
MDR: Store 0x2
TOS: Store 0x2
MAR: Write to word 0x8001
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x20004 requested. Processing...
Goto ADDR: 0x2
-----------------Start cycle 83----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 1B
H: Put 0x1
ALU: 0 + B + 1 = 0x1C
PC: Store 1C
PC: Fetch byte 1C
MEM: Write value 0x2 to address
0x20004
MEM: Fetch from byte# 0x1C
requested. Processing...
Goto MBR: 0x36
-----------------Start cycle 84----------------
------
H=LV;goto 0x1C
LV: Put 0xC000
H: Put 0x1
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x1 from address
0x1C
MBR: Store 0x1
Goto ADDR: 0x1C
-----------------Start cycle 85----------------
------
MAR=H+MBRU;goto 0x1D
MBR: Put 0x1
H: Put 0xC000
ALU: A + B = 0xC001
MAR: Store 0xC001
Goto ADDR: 0x1D
-----------------Start cycle 86----------------
------
MDR=TOS;wr;goto 0x1E
TOS: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
MDR: Store 0x2
MAR: Write to word 0xC001
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x30004 requested. Processing...
Goto ADDR: 0x1E
-----------------Start cycle 87----------------
------
SP=MAR=SP-1;rd;goto 0x1F
SP: Put 0x8001
H: Put 0xC000
ALU: NOT 0 + B = 0x8000
MAR: Store 0x8000
SP: Store 0x8000
MAR: Read from word 0x8000
MEM: Write value 0x2 to address
0x30004
MEM: Read from word# 0x20000
requested. Processing...
Goto ADDR: 0x1F
-----------------Start cycle 88----------------
------
PC=PC+1;fetch;goto 0x20
PC: Put 1C
H: Put 0xC000
ALU: 0 + B + 1 = 0x1D
PC: Store 1D
PC: Fetch byte 1D
MDR: Read 0x0
MEM: Read value 0x0 from address
0x20000
MEM: Fetch from byte# 0x1D
requested. Processing...
Goto ADDR: 0x20
-----------------Start cycle 89----------------
------
TOS=MDR;goto 0x2
MDR: Put 0x0
H: Put 0xC000
ALU: 0 OR B = 0x0
TOS: Store 0x0
MEM: Fetch value 0xA7 from address
0x1D
MBR: Store 0xA7
Goto ADDR: 0x2
-----------------Start cycle 90----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 1D
H: Put 0xC000
ALU: 0 + B + 1 = 0x1E
PC: Store 1E
PC: Fetch byte 1E
MEM: Fetch from byte# 0x1E
requested. Processing...
Goto MBR: 0xA7
-----------------Start cycle 91----------------
------
OPC=PC-1;goto 0x2F
PC: Put 1E
H: Put 0xC000
ALU: NOT 0 + B = 0x1D
OPC: Store 0x1D
MEM: Fetch value 0x0 from address
0x1E
MBR: Store 0x0
Goto ADDR: 0x2F
-----------------Start cycle 92----------------
------
PC=PC+1;fetch;goto 0x30
PC: Put 1E
H: Put 0xC000
ALU: 0 + B + 1 = 0x1F
PC: Store 1F
PC: Fetch byte 1F
MEM: Fetch from byte# 0x1F
requested. Processing...
Goto ADDR: 0x30
-----------------Start cycle 93----------------
------
H=MBR<<8;goto 0x31
MBR: Put 0x0
H: Put 0xC000
ALU: 0 OR B = 0x0
H: Store 0x0
MEM: Fetch value 0x3 from address
0x1F
MBR: Store 0x3
Goto ADDR: 0x31
-----------------Start cycle 94----------------
------
H=H OR MBRU;goto 0x32
MBR: Put 0x3
H: Put 0x0
ALU: A OR B = 0x3
H: Store 0x3
Goto ADDR: 0x32
-----------------Start cycle 95----------------
------
PC=H+OPC;fetch;goto 0x33
OPC: Put 0x1D
H: Put 0x3
ALU: A + B = 0x20
PC: Store 20
PC: Fetch byte 20
MEM: Fetch from byte# 0x20
requested. Processing...
Goto ADDR: 0x33
-----------------Start cycle 96----------------
------
goto 0x2
MDR: Put 0x0
H: Put 0x3
ALU: 0 AND 0 = 0x0
MEM: Fetch value 0x15 from address
0x20
MBR: Store 0x15
Goto ADDR: 0x2
-----------------Start cycle 97----------------
------
PC=PC+1;fetch;goto (MBR)
PC: Put 20
H: Put 0x3
ALU: 0 + B + 1 = 0x21
PC: Store 21
PC: Fetch byte 21
MEM: Fetch from byte# 0x21
requested. Processing...
Goto MBR: 0x15
-----------------Start cycle 98----------------
------
H=LV;goto 0x18
LV: Put 0xC000
H: Put 0x3
ALU: 0 OR B = 0xC000
H: Store 0xC000
MEM: Fetch value 0x2 from address
0x21
MBR: Store 0x2
Goto ADDR: 0x18
-----------------Start cycle 99----------------
------
MAR=H+MBRU;rd;goto 0x19
MBR: Put 0x2
H: Put 0xC000
ALU: A + B = 0xC002
MAR: Store 0xC002
MAR: Read from word 0xC002
MEM: Read from word# 0x30008
requested. Processing...
Goto ADDR: 0x19
-----------------Start cycle 100--------------
--------
SP=MAR=SP+1;goto 0x1A
SP: Put 0x8000
H: Put 0xC000
ALU: 0 + B + 1 = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MDR: Read 0x2
MEM: Read value 0x2 from address
0x30008
Goto ADDR: 0x1A
-----------------Start cycle 101--------------
--------
PC=PC+1;wr;fetch;goto 0x1B
PC: Put 21
H: Put 0xC000
ALU: 0 + B + 1 = 0x22
PC: Store 22
PC: Fetch byte 22
MAR: Write to word 0x8001
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x20004 requested. Processing...
MEM: Fetch from byte# 0x22
requested. Processing...
Goto ADDR: 0x1B
-----------------Start cycle 102--------------
--------
TOS=MDR;goto 0x2
MDR: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
TOS: Store 0x2
MEM: Write value 0x2 to address
0x20004
MEM: Fetch value 0x10 from address
0x22
MBR: Store 0x10
Goto ADDR: 0x2
-----------------Start cycle 103--------------
--------
PC=PC+1;fetch;goto (MBR)
PC: Put 22
H: Put 0xC000
ALU: 0 + B + 1 = 0x23
PC: Store 23
PC: Fetch byte 23
MEM: Fetch from byte# 0x23
requested. Processing...
Goto MBR: 0x10
-----------------Start cycle 104--------------
--------
SP=MAR=SP+1;goto 0x16
SP: Put 0x8001
H: Put 0xC000
ALU: 0 + B + 1 = 0x8002
MAR: Store 0x8002
SP: Store 0x8002
MEM: Fetch value 0x2 from address
0x23
MBR: Store 0x2
Goto ADDR: 0x16
-----------------Start cycle 105--------------
--------
PC=PC+1;fetch;goto 0x17
PC: Put 23
H: Put 0xC000
ALU: 0 + B + 1 = 0x24
PC: Store 24
PC: Fetch byte 24
MEM: Fetch from byte# 0x24
requested. Processing...
Goto ADDR: 0x17
-----------------Start cycle 106--------------
--------
TOS=MDR=MBR;wr;goto 0x2
MBR: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
MDR: Store 0x2
TOS: Store 0x2
MAR: Write to word 0x8002
MDR: Write 0x2
MEM: Write value 0x2 to word#
0x20008 requested. Processing...
MEM: Fetch value 0x64 from address
0x24
MBR: Store 0x64
Goto ADDR: 0x2
-----------------Start cycle 107--------------
--------
PC=PC+1;fetch;goto (MBR)
PC: Put 24
H: Put 0xC000
ALU: 0 + B + 1 = 0x25
PC: Store 25
PC: Fetch byte 25
MEM: Write value 0x2 to address
0x20008
MEM: Fetch from byte# 0x25
requested. Processing...
Goto MBR: 0x64
-----------------Start cycle 108--------------
--------
SP=MAR=SP-1;rd;goto 0x5
SP: Put 0x8002
H: Put 0xC000
ALU: NOT 0 + B = 0x8001
MAR: Store 0x8001
SP: Store 0x8001
MAR: Read from word 0x8001
MEM: Read from word# 0x20004
requested. Processing...
MEM: Fetch value 0xFF from address
0x25
MBR: Store 0xFF
Goto ADDR: 0x5
-----------------Start cycle 109--------------
--------
H=TOS;goto 0x6
TOS: Put 0x2
H: Put 0xC000
ALU: 0 OR B = 0x2
H: Store 0x2
MDR: Read 0x2
MEM: Read value 0x2 from address
0x20004
Goto ADDR: 0x6
-----------------Start cycle 110--------------
--------
TOS=MDR=MDR-H;wr;goto 0x2
MDR: Put 0x2
H: Put 0x2
ALU: NOT A + B + 1 = 0x0
MDR: Store 0x0
TOS: Store 0x0
MAR: Write to word 0x8001
MDR: Write 0x0
MEM: Write value 0x0 to word#
0x20004 requested. Processing...
Goto ADDR: 0x2
-----------------Start cycle 111--------------
--------
PC=PC+1;fetch;goto (MBR)
PC: Put 25
H: Put 0x2
ALU: 0 + B + 1 = 0x26
PC: Store 26
PC: Fetch byte 26
MEM: Write value 0x0 to address
0x20004
MEM: Fetch from byte# 0x26
requested. Processing...
Goto MBR: 0xFF
d. Pembahasan
Proses 0 Bipush 2 bipush 3 i store i istore j
I load j iload k iadd istore i i load i
Bipush 3 if_ICMPEQ L1 Iload j bipush 1 isub
istore j iload j
Pada eksperimen kali ini di gunakan fungsi program sebagai pembanding dan
pengulangan seperti looping . Instruksi yang digunakkan sebagai pembanding ialah dengan
instruksi if_icmpeq (nama) yaitu membandingkan antara stack teratas (TOS) dengan stack
yang berada di bawahnya . Saat nilai dari pembandingan sama maka nilai k = 0 namun saat
nilai berbeda maka program akan menjalankan instruksi selanjutnya yaitu dengan mengurangi
nilai j menjadi j-1 . Sedangkan instruksi pengulangan yang digunakan ialah dengan
menggunakan instruksi DUP (sebagai pendupplikat variabel pada Stack TOS ke Stack MAR .
kemudian menggunakkan instruksi GOTO sebagai pengulangan hingga keadaan yang di
inginkan sesuai kemudian di hentikan menggunakan instruksi halt ,.
Eksperimen pertama dengan memasukkan nilai 2 dan 3 (push ) setelah itu di
masuukkan ke alam variable j lalu k , maka j akan bernilai 3 dan k akan bernilai 2 dikarenakan
pada penyimpanan nilai 2 dan 3 menggunakkan prinsip Last In First Out , jadi data yang di
masuukkan terakhir akan di pop di masukkkan ke variabel yang pertama . Settelah itu nilai
dari J dan k di panggil yang nantinnya akan di add ( ditambahkan antara nilai pada variabel j
dan k ) kemudian dengan instruksi i hasil dari penambahaan di masukkan . di lakukkan
pembandingan hasil dengan IF_ICMPEQ saat i bernilai 1 (bipush 1 ) maka masukk ke instruksi
L1 k=0 , semisal tidak maka program akan berlanjut ke instruksi selanjutnya .
e. Kesimpulan
Arsitektur pada mikro dapat diimplementasikan pada ISA
Terdapat berbagai emulator untuk mempelajari mikro arsiterktur ISA
Program pada arsitektur mikro isa dapat di terjemahkan detail dengan menggunakan register.
Dengan menggunakan instruksi dup dan pembanding pada stack , program pengulangan pada
mikro arsitektur isa dapat di jalankan .
2 3
j j
k
j + k i
j
3
j j
1
j - 1
j