Upload
hakiet
View
222
Download
7
Embed Size (px)
Citation preview
1
LOGO
Oleh: Junartho Halomoan ([email protected])
Mikroprosesor dan Antarmuka
Pendahuluan
Pendahuluan
Mikroprosesor
telah menjadi
bagian dari
Kehidupan
modern, hampir
semua benda
Elektronik
Berbasis
mikroprosesor
JUN - I
TTELKOM
2
Aplikasi Mikroprosesor (µP)
Hiburan
Sistem Kendali
Alat rumah tangga
Alat perkantoran
Kendaraan
dll
Keunggulan mikroprosesor
Dibandingkan dengan implementasimenggunakan komponen diskrit:
Lebih fleksibel (programable) Komponen lebih sedikit
Dibandingkan dengan implementasisoftware
Lebih cepat
JUN - I
TTELKOM
3
SejarahSempoa
Cina abad ke 10 sebelum Masehi
Eniac:
1943
Desimal 20 accumulator 10 digit
30 ton, 18000 tabung vacum, daya140 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
Evolusi Mikroprosesor [1]
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.
JUN - I
TTELKOM
4
Evolusi Mikroprosesor [2]
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.
Evolusi Mikroprosesor [3]
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).
JUN - I
TTELKOM
5
Evolusi Mikroprosesor [4]
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.
Evolusi Mikroprosesor [5]
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.
JUN - I
TTELKOM
6
Evolusi Mikroprosesor [6]
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.
Evolusi Mikroprosesor [7]
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.
JUN - I
TTELKOM
7
Evolusi Mikroprosesor [8]
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).
Evolusi Mikroprosesor [9]
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)
JUN - I
TTELKOM
8
Evolusi Mikroprosesor [10]
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
Evolusi Mikroprosesor [11]
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!!!)
JUN - I
TTELKOM
9
Evolusi µP Intel (Singkat)
Name Date Transistors um Clock Memory Data width MIPS
8080 1974 6,000 6 2 MHz 64 kB 8 bits 0.64
80868088
1979 29,000 3 5 MHz 1 MB16 bits bus8-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 GB32 bits64-bit bus
100
Pentium II 1997 7,500,000 0.35 233 MHz 64 GB32 bits64-bit bus
~300
Pentium III 1999 9,500,000 0.25 450 MHz 64 GB32 bits64-bit bus
~510
Pentium 4 2000 42,000,000 0.18 1.5 GHz 64 GB32 bits64-bit bus
~1,700
Pentium 4 "Prescott"
2004 125,000,000 0.09 3.6 GHz 64 GB32 bits64-bit bus
~7,000
Core-i7 2009
Sistem Bilangan (Review TekDig)
Desimal Biner Biner
8 bit
Biner
16 bit
Biner
20 bit
Hexa Notasi Umum
59
255
1 k
32k
64 k
1 M
0011 1111 1111 1111
- 96
0111 1111 1111 1111 1111
3FF
JUN - I
TTELKOM
10
Komponen Dasar Komputer : ALU
ALU (Arithmetic and Logic Unit)
+ - x / or and xor not
Arithmetic biner pada komputer padadasarnya penjumlahan
- adalah + menggunakan 2’s complement
X adalah + dan geser kiri dilakukan berulang-ulang
/ adalah – dan geser kanan
Operasi aritmetik memerlukan adder (FA & HA) dan register yang bisa digeser isinya(shift register)
FA
Carry
in
Carry
out
S1
A1B1
Sum = Carry-in xor A
xor B
Carry out = (A and B) or (Carry-in
and B) or (Carry in and A)
A – B = A + B’ + 1
(Carry-in)
FA
Carry
in
Carry
out
S2
A2B2
FA
Carry
inCarry
out
S3
A3B3JUN - I
TTELKOM
11
Model ALU dalam sistem komputer
A B
n n
+ - x / logic
Accumulator
Central Processing Unit
CPU
Memori I/O
BUS
Operasi ALU
A + B
Ambil A (memori) ALU
A (ALU) Acc
Ambil B (memori) ALU
A (Acc) ALU
Proses +
Hasil Acc
A B
n n
+ - x / logic
Accumulator
JUN - I
TTELKOM
12
ES
CS
SS
DS
4
3
2
1
CONTROL
SYSTEM
AH AL
BH BL
CH CL
DH DL
SP
BP
SI
DI
OPERAND
FLAGS
C-BUS
IP
ALU
INSTRUCTIONSTREAM
BYTEQUEUE
A- BUS
BIU
EU
•ALU 16 bit
•Accumulator
•8 bit AL
•16 bit AX (AL+AH)
•Register data tambahan
•BX Base
•CX Counter
•DX Data
•SP Stack Pointer
•BP Base Pointer
•SI Source Index
•DI Destination Index
Register- register dalam Intel 8088
Sign & Unsign Number
Unsigned number adalah cara menyatakan bilanganpositif dengan menggunakan seluruh digit yang ada
8 bit (00000000 sd 11111111) menyatakan bilangan 0 sd255)
16 bit (0000000000000000 sd 11111111111111) menyatakan bilangan 0 sd 65535
Signed number adalah cara menyatakan bilanganpositif dan negatif dengan menggunakan bit MSB sebagai tanda + (0) dan – (1)
8 bit (00000000 sd 01111111) menyatakan bilangan 0 sd127 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
JUN - I
TTELKOM
13
Operasi Aritmatika dan Flag
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
1 1 0 0 1 1 0 0
1 1 0 0 1 1 0 0 xor
0 0 0 0 0 0 0 0
Zero Flag
Zero adalah kondisi hasil operasiaritmetik dan logik yang menghasilkan0 JU
N - ITTELK
OM
14
Carry Flag
Carry adalah kondisi hasilpenjumlahan yang melebihi kapasitasregister
1 1 1 1 1 1 1
1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 0 +
1 1 1 1 1 1 0 0
FE
FE +
1 FC
Carry bit
Aux. Carry bit
Borrow
Borrow adalah suatu kondisi hasilpengurangan
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
JUN - I
TTELKOM
15
Overflow
Overflow adalah kondisi yang terjadisaat penambahan dan penguranganbilangan bertanda (melebihijangkauan bilangan bertanda/ signed bit)
1 1 1 1 1
+76 0 1 1 1 0 1 1 0
+68 0 1 1 0 1 0 0 0 +
+144 1 1 1 0 0 1 1 0
- (negatif)
Floating Point
S EXP exc127 Mantisa Biner
1 10000000 111000000000000000000000 - 1.111 x 21
0 10000010 000101000000000000000000 1000.101
0 01111111 000000100000000000000000 1.0000001
1 01111110 101010000000000000000000 -1.10101 2-1
0 00000000 00000000000000000000000 0.0
JUN - I
TTELKOM
16
Tracing Instruksi [1]
Address Code Command AX CS IP Z C O
0000 135B 0100 0 0 0
CS:0100 B8 FF FF MOV AX,FFFF FFFF 135B 0103 0 0 0
CS:0103
CS:0103
05 01 00
05 02 00
ADD AX,0001
ADD AX,0002
0000
0001
135B
135B
0106
0106
1
0
1
1
0
0
Address Code Command 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
Tracing Instruksi [2]
JUN - I
TTELKOM
17
Address Code Command AL CS IP Z C O A
00 135B 0100 0 0 0 0
CS:0100 B0 4C MOV AL,4C 4C 135B 0102 0 0 0 0
CS:0102 04 44 ADD AL,44 90 135B 0104 0 0 1 1
Tracing Instruksi [3]
Tracing Instruksi [4]
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
JUN - I
TTELKOM
18
Tracing Instruksi [5]
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
Tracing Instruksi [7]
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
JUN - I
TTELKOM
19
Tracing Instruksi [8]
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
Tracing Instruksi [9]
Example 16bit:
MOV AX,34EH
MOV DX,6A5H
ADD DX,AX
MOV CX,34EH
ADD CX,6A5H
JUN - I
TTELKOM
20
LOGO
Thank You!www.themegallery.com
JUN - I
TTELKOM