Mikroprosesor dan Antarmuka
M
Pendahuluan
LOGO
-I
TT EL
KO
Oleh: Junartho Halomoan (
[email protected])
N
Pendahuluan
JU
Mikroprosesor telah menjadi bagian dari Kehidupan modern, hampir semua benda Elektronik Berbasis mikroprosesor
1
Aplikasi Mikroprosesor (µP)
-I
TT EL
KO
M
Hiburan Sistem Kendali Alat rumah tangga Alat perkantoran Kendaraan dll
N
Keunggulan mikroprosesor
JU
Dibandingkan dengan implementasi menggunakan komponen diskrit: Lebih fleksibel (programable) Komponen lebih sedikit Dibandingkan dengan implementasi software Lebih cepat
2
-I
TT EL
KO
M
Sejarah Sempoa Cina abad ke 10 sebelum Masehi Eniac: 1943 Desimal 20 accumulator 10 digit 30 ton, 18000 tabung vacum, daya 140 kW µP 4 bit: i4004 (1971) Hanya bisa add dan sub µP 8 bit: i8008 µP 16 bit: i8086/i8088/80286 µP 32 bit I80386/80486/Pentium µP 64 bit AMD Athlon64
N
Evolusi Mikroprosesor [1]
JU
80x86 Evolution 4004: 4-bit microprocessor. 4KB main memory. 45 instructions. PMOS technology. 50 KIPS 8008: (1971) 8-bit version of 4004. 16KB main memory. 48 instructions. NMOS technology.
3
Evolusi Mikroprosesor [2]
-I
TT EL
KO
M
8080: (1973) 8-bit microprocessor. 64KB main memory. 2 microseconds clock cycle time; 500,000 instructions/sec. 10X faster than 8008 8085: (1977) 8-bit microprocessor - upgraded version of the 8080. 64KB main memory. 1.3 microseconds clock cycle time; 769,230 instructions/sec. 246 instructions. Intel sold 100 million copies of this 8-bit microprocessor.
N
Evolusi Mikroprosesor [3]
JU
8086: (1978) 8088 (1979) 16-bit microprocessor. 1MB main memory. 2.5 MIPS (400 ns). 4- or 6-byte instruction cache. Other improvements included more registers and additional instructions. 80286: (1983) 16-bit microprocessor very similar in instruction set to the 8086. 16MB main memory. 4.0 MIPS (250 ns/8MHz).
4
Evolusi Mikroprosesor [4]
-I
TT EL
KO
M
80386: (1986) 32-bit microprocessor. 4GB main memory. 12-33MHz. Memory management unit added. Variations: DX, EX, SL, SLC (cache) and SX. 80386SX: 16MB through a 16-bit data bus and 24 bit address bus.
N
Evolusi Mikroprosesor [5]
JU
80486: (1989) 32-bit microprocessor, 32-bit data bus and 32-bit address bus. 4GB main memory. 20-50MHz. Later at 66 and 100MHz Incorporated an 80386-like microprocessor, 80387-like floating point coprocessor and an 8K byte cache on one package. About half of the instructions executed in 1 clock instead of 2 on the 386. Variations: SX, DX2, DX4. DX2: Double clocked version: 66MHz clock cycle time with memory transfers at 33MHz.
5
Evolusi Mikroprosesor [6]
-I
TT EL
KO
M
Pentium: (1993) 32-bit microprocessor, 64-bit data bus and 32-bit address bus. 4GB main memory. 60, 66, 90MHz. 1-and-1/2 100MHz version. Double clocked 120 and 133MHz versions. Fastest version is the 233MHz (3-and-1/2 clocked version). 16KB L1 cache (split instruction/data: 8KB each). Memory transfers at 66MHz (instead of 33MHz). Dual integer processors.
N
Evolusi Mikroprosesor [7]
JU
Pentium Pro: (1995) 32-bit microprocessor, 64-bit data bus and 36-bit address bus. 64GB main memory. Starts at 150MHz. 16KB L1 cache (split instruction/data: 8KB each). 256KB L2 cache. Memory transfers at 66MHz. 3 integer processors.
6
Evolusi Mikroprosesor [8]
-I
TT EL
KO
M
Pentium II: (1997) 32-bit microprocessor, 64-bit data bus and 36-bit address bus. 64GB main memory. Starts at 266MHz. 32KB split instruction/data L1 caches (16KB each). Module integrated 512KB L2 cache (133MHz). Memory transfers at 66MHz to 100MHz (1998).
N
Evolusi Mikroprosesor [9]
JU
Pentium III: (1999) 32-bit microprocessor, 64-bit data bus and 36-bit address bus. 64GB main memory. 800MHz and above. 32KB split instruction/data L1 caches (16KB each). On-chip 256KB L2 cache (at-speed). Memory transfers 100MHz to 133MHz. Dual Independent Bus (simultaneous L2 and system memory access)
7
Evolusi Mikroprosesor [10]
-I
TT EL
KO
M
Pentium IV: (2002) 1.4 to 1.9GHz and the latest at 3.20 GHz and 3.46GHz (Hyper-Threading)! 1MB/512KB/256KB L2 cache. 800 MHz (about 6.4GB/s)/533 MHz (4.3 GB/s)/ 400MHz (3.2 GB/s) system bus. 1066 MHz front side bus just available. Specialized for streaming video, game and DVD applications (144 new SIMD 128-bit instructions). 0.13um, more than 55 million transistors. Newer ones are in 90nm transistors, >125 million possible
N
Evolusi Mikroprosesor [11]
JU
Pentium D, Core 2 Duo, Core Duo, Core 2 Extreme Edition: (2005-2007) Dual processing cores Upto 4MB L2 cache and 1066 MHz FSB 65 nm and 45 nm transistors (and lots of them!!!)
8
Evolusi µP Intel (Singkat) Date
Transistors
um
Clock
Memory
Data width
MIPS
8080
1974
6,000
6
2 MHz
64 kB
8 bits
0.64
8086 8088
1979
29,000
3
5 MHz
1 MB
16 bits bus 8-bits bus
0.33
80286
1982
134,000
1.5
6 MHz
16 MB
16 bits
1
80386
1985
275,000
1.5
16 MHz
4 GB
32 bits
5
80486
1989
1,200,000
1
25 MHz
4 GB
32 bits
20
Pentium
1993
3,100,000
0.8
60 MHz
64 GB
32 bits 64-bit bus
100
Pentium II
1997
7,500,000
0.35
233 MHz
64 GB
32 bits 64-bit bus
~300
Pentium III
1999
9,500,000
0.25
450 MHz
64 GB
Pentium 4
2000
42,000,000
0.18
1.5 GHz
64 GB
32 bits 64-bit bus
~1,700
Pentium 4 "Prescott"
2004
125,000,000
0.09
3.6 GHz
64 GB
32 bits 64-bit bus
~7,000
KO
TT EL
2009
32 bits 64-bit bus
~510
-I
Core-i7
M
Name
Biner
Biner 8 bit
JU
Desimal
N
Sistem Bilangan (Review TekDig) Biner 16 bit
Biner 20 bit
Hexa
Notasi Umum
59
255
1k 32k
64 k 1M 0011 1111 1111 1111 - 96 0111 1111 1111 1111 1111 3FF
9
Komponen Dasar Komputer : ALU ALU (Arithmetic and Logic Unit) + - x / or and xor not Arithmetic biner pada komputer pada dasarnya penjumlahan - adalah + menggunakan 2’s complement X adalah + dan geser kiri dilakukan berulang-ulang / adalah – dan geser kanan
N
-I
TT EL
KO
M
Operasi aritmetik memerlukan adder (FA & HA) dan register yang bisa digeser isinya (shift register)
JU
A – B = A + B’ + 1 (Carry-in)
B3
Carry out
Sum = Carry-in xor A xor B
A3
B2 Carry in
FA
Carry out S3
Carry out = (A and B) or (Carry-in and B) or (Carry in and A)
A2
B1 Carry in
FA
A1 Carry in
FA Carry out
S2
S1
10
Model ALU dalam sistem komputer
A
B n
n CPU
BUS
M
+ - x / logic
-I
TT EL
Central Processing Unit
I/O
KO
Memori Accumulator
JU
N
Operasi ALU
A
n
B n
+ - x / logic
Accumulator
A+B Ambil A (memori) ALU A (ALU) Acc Ambil B (memori) ALU A (Acc) ALU Proses + Hasil Acc
11
Register- register dalam Intel 8088 BIU
•ALU 16 bit
C-BUS
•Accumulator •8 bit AL
•16 bit AX (AL+AH) •Register data tambahan •BX Base •CX Counter
4 3 2 1
INSTRUCTION STREAM BYTE QUEUE
ES CS SS DS IP
CONTROL SYSTEM
A- BUS
AH BH CH DH
•SP Stack Pointer •BP Base Pointer •SI Source Index
SP BP SI DI
ALU
OPERAND FLAGS
-I
TT EL
•DI Destination Index
AL BL CL DL
KO
•DX Data
M
EU
Sign & Unsign Number
JU
N
Unsigned number adalah cara menyatakan bilangan positif dengan menggunakan seluruh digit yang ada 8 bit (00000000 sd 11111111) menyatakan bilangan 0 sd 255) 16 bit (0000000000000000 sd 11111111111111) menyatakan bilangan 0 sd 65535
Signed number adalah cara menyatakan bilangan positif dan negatif dengan menggunakan bit MSB sebagai tanda + (0) dan – (1) 8 bit (00000000 sd 01111111) menyatakan bilangan 0 sd 127 dan (11111111 sd 10000000) menyatakan bilangan -1 sd -128 16 bit (0000000000000000 sd 01111111111111) menyatakan bilangan 0 sd 32767 dan (1111111111111111 sd 1000000000000000) menyatakan bilangan -1 sd -32768
12
Operasi Aritmatika dan Flag
-I
TT EL
KO
M
Flag Register digunakan untuk memberitahukan hasil atau keadaan suatu operasi aritmatika atau logik yang telah dieksekusi. Berikut ini beberapa Zero, Carry, Overflow, Borrow, Aux. Carry
N
Zero Flag
JU
Zero adalah kondisi hasil operasi aritmetik dan logik yang menghasilkan 0
1 1 0
1 1 0
0 0 0
0 0 0
1 1 0
1 1 0
0 0 0
0 0 0
xor
13
Carry Flag Carry adalah kondisi hasil penjumlahan yang melebihi kapasitas register Aux. Carry bit 1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1
0 0
1
1
1
1
1
1
0
0
FE
+
M
1 1 1
FE + 1 FC
KO
1
-I
TT EL
Carry bit
N
Borrow
JU
Borrow adalah suatu kondisi hasil pengurangan
1
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
0
0
0
0
0
0
0
4C
-
CC + 1 80
Borrow bit
14
Overflow Overflow adalah kondisi yang terjadi saat penambahan dan pengurangan bilangan bertanda (melebihi jangkauan bilangan bertanda/ signed bit)
+144
1 1
1 1
1 0
1
1
0
0 1
1 1
1 1
0 0
1 0
0 1
0 1
0 0
+
-I
TT EL
- (negatif)
M
+68
1 1
KO
+76
1 0
N
Floating Point
Mantisa
1
10000000
111000000000000000000000
- 1.111 x 21
0
10000010
000101000000000000000000
1000.101
0
01111111
000000100000000000000000
1.0000001
1
01111110
101010000000000000000000
-1.10101 2-1
JU
S EXP exc127
0 00000000
00000000000000000000000
Biner
0.0
15
Tracing Instruksi [1] Code
Command
AX
CS
IP
Z
C
O
0000
135B
0100
0
0
0
135B
0103
0
0
0
1 0
1 1
0 0
B8 FF FF
MOV AX,FFFF
FFFF
CS:0103 CS:0103
05 01 00 05 02 00
ADD AX,0001 ADD AX,0002
0000 0001
135B 135B
0106 0106
-I
TT EL
KO
CS:0100
M
Address
Code
Command
JU
Address
N
Tracing Instruksi [2] AX
CS
IP
Z C
O S
0000
135B
0100
0
0
0
0
CS:0100
B8 4C FF
MOV AX,FF4C
FF4C
135B
0103
0
0
0
0
CS:0103
2D CC FF
SUB AX,FFCC
FF80
135B
0106
0
1
0
1
16
Tracing Instruksi [3] Code
Command
AL
CS
IP
Z
C
O
A
00
135B
0100
0
0
0
0
0
0
0
0
1
1
CS:0100
B0 4C
MOV AL,4C
4C
135B
0102
CS:0102
04 44
ADD AL,44
90
135B
M
Address
0
0
-I
TT EL
KO
0104
N
Tracing Instruksi [4]
JU
MOV instruction: MOV destination, source ; copy source operand to destination Example: (8-bit ) MOV CL,55H MOV DL,CL MOV BH,DL MOV AH,BH
17
Tracing Instruksi [5]
-I
TT EL
KO
M
Example: (16-bit) MOV CX,468FH MOV AX,CX MOV BX,AX MOV DX,BX MOV DI,AX MOV SI,DI MOV DS,SI MOV BP,DS
N
Tracing Instruksi [7]
JU
Examples (diperiksa Instruksi yang ilegal): MOV BX,14AFH MOV SI,2345H MOV DI,2233H MOV CS,2A3FH MOV DS,CS MOV FR,BX MOV DS,14AFH
18
Tracing Instruksi [8]
-I
TT EL
KO
M
ADD instruction ADD destination, source ; add the source operand to destination Example 8 bit: MOV AL,24H MOV DL,11H ADD AL,DL MOV CH,24H MOV BL,11H ADD CH,BL MOV CH,24H ADD CH,11H
N
Tracing Instruksi [9]
JU
Example 16bit: MOV AX,34EH MOV DX,6A5H ADD DX,AX MOV CX,34EH ADD CX,6A5H
19
LOGO
JU
N
-I
TT EL
KO
www.themegallery.com
M
Thank You!
20