Professional Documents
Culture Documents
Transparencies
Transparencies
CPU
A dd re ss Bu s Da ta Bus Co n tro l Bu s
F1-1
TM-1
CPU
In st r uc t io n Re g ist e r ( IR)
Pro gr am Co u nt er ( PC)
Inst r u ct io n De co d e an d C on t r o l U nit
Re g ist e r 0 Re g ist e r 1
A r it h m et ic an d Lo g ic Un it ( A LU ) Reg ist er n - 1
F1-2
TM-2
Opcode Fetch
CPU
A d dr e ss Bu s
N Pr o g ram Co u n t e r D a t a Bu s
RA M
N+2 N+1
Op co d e
N N-1
F1-3
TM-3
Memory Maps
1 Byte
F FFF 7 6 5 4 3 2 1 0 6 5 ,5 3 5 FF FF
4 K ROM
F0 0 0 EFFF
4 4 K Em pt y
H exa d ec im al A d dr esse s
De cim a l A dd re sse s
. . .
0004 0003 0002 0001 0000
4000 3 FFF
4 3 2 1
0 0000
1 6 K RA M
F1-6/7
TM-4
16-Bit Addresses
15
14
13
12
11
10
(a )
9
1 0 0 1 1
C
1 0 0 1 1
F
1 1 0
3
0 1 1
(b )
F1-8
TM-5
S pecify software
Design software
E dit
Translat e
C oncept
Product
S pecify hardware
D esign hardware
1-11
TM-6
L ist in g f ile ( .M A P)
Edit o r
A sse m b le r
Ob je ct f ile (. OBJ)
L in ke r/ lo ca t o r
A b so lut e o b je ct f ile
Sim ula t o r
OBJHEX c o nv er sio n
He x f ile (. HEX)
Do wn lo ad / t e rm in al e m ula t e
RA M
Fact o ry m ask p ro ce ss
ROM
1-13
TM-7
Motorola S-records
S00900006D796E616D656F S11320003C3C000A327C201661000020534666F4F2 S11320101E3C00E44E4E53636F7474204D61634B59 S10C2020656E7A6965200D0A0061 S113202A1E3C00F81019670000064E4E60F64E7505 S9030000FC
(a)
S1 1 3 2 0 0 0 3 C3 C0 0 0 A 3 2 7 C2 0 1 6 6 1 0 0 0 0 2 0 5 3 4 6 6 6 F4 F2
(b)
1-14
TM-8
31
16
15
8 7
D0 D1 D2 D3 D4 D5 D6 D7
31 16 15 0
D at a Re g is t e rs
A0 A1 A2 A3 A4 A5 A6
31 16 15 0
A7 A7
31 24 23 0
PC Pro g ra m Co un t er
15 8 7 0
123
CCR
SR St a t u s Re g ist e r
F2-1
TM-9
Syst e m Byt e
15 T 13 S 10 I2
123
Carry Ove rf lo w Ze ro Ne g at ive Sig n Ex t e nd Int er rup t M ask Sup e rviso r St a t e Trac e Mo d e
F2-4
TM-10
1 1 1
C = Sm D m + Rm D m + Sm Rm = 0 0 + 0 0 + 0 0 = 0 V = Sm Dm Rm + Sm D m Rm = 0 0 0 + 1 1 1 = 1 X = C = 0
Rm = 1 Dm = 0 Sm = 0
F2-5
TM-11
1 By t e ( 8 b it s) F FFFF F
F2-7
TM-12
1 W ord ( 1 6 b it s)
FFF FFE
By t e FFF FFE
By t e FFF FFF
F2-8
TM-13
1 L o ng w or d ( 3 2 b it s )
W or d a dd re ss: n + 4
B yt e n + 4
et c.
L o ng w o rd s ca n b e at a ny e ve n a dd re ss
n + 8 n + 4 n
B yt e n
B yt e n + 1
B y te n + 2
B y te n + 3
Wo rd ad d ress: n
W o rd ad dr ess: n + 2
F2-9
TM-14
Notes: EA = effective address An = address register Dn = data register Xn = address or data register used as index register CCR = condition code register SR = status register USP = user stack pointer SSP = supervisor stack pointer
PC = program counter ( ) = contents of d8 = 8-bit offset (displacement) d16 = 16-bit offset (displacement) N = 1 for byte, 2 for word, 4 for longword. (If An is the stack pointer and the operand size is byte, N = 2 to keep the stack pointer on a word boundary.) ` = is replaced by
T2-1
TM-15
F2-10
TM-16
Instruction:
MOVEA.L A3,A0
Mo ve t o a d dr e ss r e g ist e r
Before:
After:
3 2 bit s are m ov e d
F2-11
TM-17
Absolute Short
Instruction:
MOVE.L #$1E,$800
So urc e a dd re ssin g m o d e is im m e d ia t e
Before:
**** MEMORY **** Address Contents 000800 12 000801 34 000802 56 000803 78 000800 000801 000802 000803 00 00 00 1E
De st in at io n a dd re ssin g m o d e is ab so lu t e sho rt
After:
3 2 -b it o p e ran d siz e m o v es d at a t o f o u r c on se cu t iv e b y t e lo ca t io n s
F2-13
TM-18
Absolute Long
Instruction: MOVE.B #$1E,$8F000 **** MEMORY **** Address Contents 08F000 FF 08F000 1E
Before: After:
Op era n d siz e is b yt e
F2-14
TM-19
Register Indirect
Instruction:
MOVE.L D0,(A0)
Before:
**** MEMORY **** Address Contents 001000 55 001001 02 001002 3F 001003 00 001000 001001 001002 001003 10 43 83 4F
After:
A0 00001000 D0 1043834F
A lo n g w o r d is w r it t e n t o ad d r e ss $ 0 0 1 0 0 0
F2-17
TM-20
Instruction:
MOVE.W (A5)+,D0
Before:
**** MEMORY **** Address Contents 001000 45 001001 67 001002 89 001003 AB 001000 001001 001002 001003 45 67 89 AB
A dd re ss re gist e r in cr em e n t e d b y nu m b e r o f b y t e s m ov e d, 2
After:
A5 00001002 D0 00004567
F2-18
TM-21
Instruction:
MOVE.W D0,-(A7)
**** MEMORY **** Address Contents Before: 001000 10 001001 12 001002 83 001003 47 After: 001000 001001 001002 001003 01 43 83 47
A dd re ss re gist e r d e cre m en t ed b y nu m b e r o f b y t e s m ov e d, 2
A7 00001000 D0 00000143
F2-19
TM-22
Instruction: MOVE.W 6(A0),D0 **** MEMORY **** Address Contents Before: 001026 07 001027 BF After: 001026 001027 07 BF
Ef f e ct ive a d dr ess is 6 p lu s va lu e in A 0
A d dre ss r e g is t e r do e s no t ch an g e
F2-20
TM-23
Instruction: MOVEA $10(A0,D0.L),A1 **** MEMORY **** Address Contents 00101C EF 00101D 10
Before:
After:
00101C 00101D
EF 10
No t e: EA = $ 1 0 + $ 1 0 0 A + $ 2 = $ 1 0 1 C
F2-22
TM-24
Instruction:
MOVE.W $1020(PC),D5
**** MEMORY **** Address Contents Before: 001020 AB 001021 CD After: 001020 001021 AB CD
In st r uc t io n is t w o w o rd s lo ng , s o PC is in cr em e n t e d b y f o ur
F2-23
TM-25
Instruction:
MOVE.W $1020(PC,D0.W),D5
On ly lo w - o rd er 1 6 b it s o f D 0 use d a s ind e x
Before:
After:
001026 001027
FE DC
F2-26
TM-26
Immediate
Instruction:
MOVE.L #$1FFFF,D0
Im m e dia t e d at a f ollo w
Before: After:
F2-28
TM-27
68000 Signals
Vc c (2 ) GND (2 )
A d dr ess Bu s
A1 -A 2 3
68000
D at a Bu s CL K AS R/ W FC0 Pro ce ssor St a t u s FC1 FC2 UDS L DS D TA CK A syn ch ro n o us Bu s Co n t ro l D0 -D1 5
MC 6 8 0 0 Perip h era l Co n t ro l
E V MA VPA
BR BG BGAC K
Bu s A rb it ra t io n Co n t ro l
B ERR Sy st e m Co n t r ol RESET HA L T
F2-33
TM-28
Bu s Sig n als
A2 3
A2 3
A1 A0
A1 WORD / BYT E UD S ( ev en b yt e) 1 0 A0 X 0 1 U DS 0 0 1 L DS 0 1 0
WORD / BYT E
LD S ( o dd b yt e )
( a)
(b )
F2-34
TM-29
68 0 00
A 1 -A2 3 D 8 -D 1 5 D 0 -D7 A d d r e ss B us
D a t a B us ( u pp e r b y t e) D a t a B us ( l ow er b y t e )
A d dre ss De co d ing
Up p er RA M CS
Lo wer RAM CS
UD S
L DS
F2-36
TM-30
Generation of -DTACK
A d dre ss Bu s
6 80 0 0
A dd re ss De co d ing RA M Ad d re s s D e co d ing RA M
74 07 +5 V 10 K DT A CK
CS
740 7
CS
Fro m o t h e r RA Ms , ROM s, I/ O De v ic es , et c.
F2-36
TM-31
Function Code FC2 0 0 0 0 1 1 1 1 FC1 0 0 1 1 0 0 1 1 FC0 0 1 0 1 0 1 0 1 Address Space Type (Undefined, reserved) User Data User Program (Undefined, reserved) (Undefined, reserved) Supervisor Data Supervisor Program CPU Space (Interrupt Acknowledge) T2-3
TM-32
S0
S1
S2
S3
S4
S5
S6
S7
F2-39
TM-33
S0
S1
S2
S3
S4
S5
S6
S7
TM-34
Instruction EXG LEA LINK MOVE MOVEA MOVEM MOVEP MOVEQ PEA UNLK
Operation Exchange registers Load effective address Link and allocate stack Move source to destination Move source to address register Move multiple registers Move to peripheral Move short data to destination Push effective address Unlink stack T3-3
TM-35
TM-36
CMP Example
Instruction:
CMP.B #'z',D7
D7 d o e s n o t ch an g e
Notes:
12 3
Z= 1 N = 0 V = 0 ( sig n b it d oe s n ot ch an g e) C = 0 ( b o rro w no t re q u ir ed ) X = 1 (n o ch an g e)
F3-5
TM-37
DIVS Example
Instruction:
DIVS #-3,D7
Div is or , - 3
D ivid en d , 1 4
Qu o t ie n t , -4
Re m ain d er , 2
TM-38
Boolean Instructions
Operation AND source to destination AND immediate data to destination Exclusive OR source to destination Exclusive OR immediate data to destination Complement destination OR source to destination OR immediate data to destination Test condition codes and set operand Test operand and set condition codes T3-5
TM-39
EOR Example
Instruction: EOR.L D6,(A4)+ **** MEMORY **** Address Contents Before: 003100 AB 003101 CD 003102 EF 003103 10 After: 003100 003101 003102 003103 ABCDEF10 + 12345678 B9F9B968 1 2 3
Z= N = V = X = 0 1 C = 0 ( alw a ys) n ot af f e ct e d ( assu m e 0 )
So ur ce o p e ran d
De st ina t io n o p e ran d
B9 F9 B9 68
A 4 in cre m en t ed by four
Notes:
F3-10
TM-40
Bit Movement
Op era n d 0
ASR
Op er a nd
C X
LSL
C X
Ope ra nd
LSR
Op e ran d
C X
ROL
Rotate left
C Op e ran d
ROR
Rotate right
Op er an d
ROXL
Op e ran d
ROXR
Op era nd
SWAP
1 6 b it s
1 6 b it s
T3-6
TM-41
ASR Example
Instruction:
ASR.B D3,D2
Before:
Sh if t c o un t in D3
Sh if t d at a in D 2
After:
Notes:
F3-11
TM-42
Operation Change bit Clear bit Set bit Test bit T3-7
TM-43
BTST Example
Instruction:
BTST #7,D5
T e st b it 7 o f D 5
Before:
Bit 7 = 0
After:
Z = 1
F3-12
TM-44
TM-45
ABCD Example
Instruction: ABCD -(A3),-(A4) **** MEMORY **** Address Contents 00200E 98 00210E 54
O p e r an d siz e alw a ys b y t e
Before:
X= 1
After:
00200E 00210E
1
98 53
Notes:
---XNZVC 00010001
(X = 1 ) 98 + 54 + 1 = 15 3 ( t h e h u nd r e d s d ig it is st o r e d in C & X)
( ad d 0 6 )
( ad d 6 0 )
Z= 0 C = X = 1 N = V = u nd e f ine d ( a ssum e 0 )
F3-13
TM-46
Instruction Bcc BRA BSR DBcc JMP JSR NOP RTE+ RTR RTS +privileged instruction
Operation Branch conditionally Branch always Branch to subroutine Test, decrement, and branch Jump to address Jump to subroutine No operation Return and deallocate stack Return and restore condition codes Return from subroutine
T3-9
TM-47
BRA Example
Instruction:
BRA $20A0
Br a n ch d e st in at io n
Before:
Registers PC 00002050
In st r uc t io n w o r d
After:
PC 000020A0
Notes:
Bra n ch o f f s et , 8 b it s
F3-15
TM-48
BSR/RTS Example
BSR $ 4 0 F2
BEFO RE
RE GIS T ERS:
A FT ER
RE GIS T ERS:
PC A7
0 0 5 0 16 0 000 305 0
PC A7
0 0 4 0 F2 0 000 304 C
MEMO RY:
MEMO RY:
00 501 A 0 0 5 0 1 8 F0 DA 00 501 6 6 1 0 0
MA IN PROGRA M BSR $ 4 0 F2
00 50 1A 0 0 5 0 1 8 F0 DA 00 50 16 6 1 00
MA IN PROGRA M BSR $ 4 0 F2
0 0 4 0 F A 4 E7 5
0 0 4 0 F A 4 E7 5
0 0 4 0 F2
0 0 4 0 F2
00 3 05 0 1 234 00 3 04 E 5 678 0 0 3 0 4 C 9 A BC
A7 STA CK
STA CK A7
RT S
BEFORE
REGIST ERS:
A FT ER
REGIST E RS:
PC A7
0 0 4 0 FA 0 00 0 3 04 C
PC A7
0 05 01A 0 00 0 30 5 0
MEMORY:
MEMORY:
00 5 01 A 0 0 5 0 1 8 F0 DA 00 5 01 6 61 00
MA IN PROGRA M BSR $ 4 0 F2
00 5 01 A 0 0 5 0 1 8 F0 DA 00 5 01 6 61 00
MA IN PROGRA M BSR $ 4 0 F2
0 0 4 0 FA 4 E7 5
RT S SU BROU TINE
0 0 4 0 FA 4 E7 5
RT S SU BROU TINE
0 0 4 0 F2
0 0 4 0 F2
ST A CK A7
A7 ST A CK
F3-16
TM-49
Instruction ANDI++ CHK EORI++ ILLEGAL MOVE++ ORI++ RESET+ STOP+ TAS TRAP TRAPV
Operation AND immediate to status register/condition code register Trap on upper out-of-bounds operand Exclusive OR immediate to status register/condition code register Illegal instruction trap Move to/from status register/condition code register OR immediate to status register/condition code register Assert RESET line Stop processor Test and set operand Trap unconditionally Trap on overflow
TM-50
TRAP Example
Instruction: TRAP #5 **** MEMORY **** Address Contents 002FFA 12 002FFB 34 002FFC 56 002FFD 78 002FFE 9A 002FFF BC 000094 00 000095 01 000096 80 000097 F0 002FFA 002FFB 002FFC 002FFD 002FFE 002FFF 000094 000095 000096 000097 00 1F 00 00 20 02 00 01 80 F0
Before:
Sy st e m St a ck Po int er
V ec t o r ad d r e ss f o r t ra p 5
V ec t o r f o r t rap 5
After:
Sy st e m St a ck Po int er d e cr e m e nt ed by 6 Su p er viso r St a t e b it = 1
SR sa ve d o n syst em st ac k
PC sav ed o n sy st e m st a ck
Notes:
F3-18
TM-51
Operation Word (1st word specifies operation and addressing modes) Immediate Operand (if any, one or two words) Source Effective Address Extension (if any, one or two words) Destination Effective Address Extension (if any, one or two words) F3-19
TM-52
TM-53
Condition true false high low or same carry clear carry set not equal equal overflow clear overflow set plus minus greater or equal less than greater than less or equal
Encoding 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Test 1 0 C Z C+Z
C
C
Z
Z
V
V
N
N
N V + N V N V + N V N V Z +N V Z Z + N V + N V
Not available for Bcc instruction Twos complement arithmetic = Boolean AND + = Boolean OR T3-12
TM-54
Opcode Map
Bits 15 through 12 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Operation Bit Manipulation/MOVEP/Immediate Move Byte Move Long Move Word Miscellaneous ADDQ/SUBQ/Scc/DBcc Bcc/BSR MOVEQ OR/DIV/SBCD SUB/SUBX (Unassigned) CMP/EOR AND/MUL/ABCD/EXG ADD/ADDX Shift/Rotate (Unassigned) T3-13
TM-55
Assembler Operation
PROG.OBJ
L eg e nd : Ut ilit y p ro g ram
PRO G.SRC
( a)
C o m m an d
Inp u t f ile
O b je ct co d e o ut p ut f ile
( b)
F4-1
TM-56
Assembler Files
La b el f ield
Mn e m o nic f ie ld
Op er an d f ie ld
C om m en t f ield (e m p t y )
PROG
LOOP
Sou r ce f ile
( a)
1 2 3 4 5 6 7 8
(b )
L ist in g f ile
F4-2
TM-57
Listing Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 00001000 00001000 00001002 00001004 00001008 00000064 0000100A 0000100E 00001012 00001016 0000101A 0000101E 00001022 00001026 0000102A 0000F000 0000102C 00001030 00001032 00001034 00001036 00001038 6006 60FE 6000FFFE 181B 3A3C0064 3A3C0064 3A3C0064 3A3C0064 3A3C0064 3E3CFFFB 3E3CFFFB 3A390000 F000 3A390000 F000 4E71 4E71 67FA ORG BRA BRA HERE BRA MOVE.B COUNT EQU MOVE.W MOVE.W MOVE.W MOVE.W MOVE.W MOVE.W MOVE.W MOVE PORT BACK EQU MOVE NOP NOP BEQ END $1000 *+8 * HERE (A3)+,D4 100 #COUNT,D5 #100,D5 #$64,D5 #144Q,D5 #%01100100,D5 #-5,D7 #$FFFB,D7 $F000,D5 $F000 PORT,D5 ;"*" location counter ;branch to itself ;branch to itself ;indirect addressing ;equate symbol to value ;symbol as immed. data ;decimal ;hexadecimal ;octal (A68K format) ;binary ;negative number, decimal ;negative number, decimal ;data address ;equate symbol as address ;data address (symbol) ;code address (NOP = ; no operation) BACK
F4-4
TM-58
Assemble-Time Operators
Operator .NOT. .LOW. .HIGH. .LWRD. .HWRD. * / + .MOD. .SHR. .SHL. .AND. .OR. .XOR. .EQ. .NE. .GE. .LE. .GT. .LT. .UGT. .ULT. Function Unary minus Logical NOT Low byte High byte Low word High word Multiplication Division Addition Subtraction Modulo Logical shift right Logical shift left Logical AND Logical OR Logical XOR Equal Not Equal Greater or equal Less or equal Greater than Less than Unsigned greater than Unsigned less than Precedence 1 1 1 1 1 1 3 3 4 4 3 3 3 5 6 6 7 7 7 7 7 7 7 7 Type Unary Unary Unary Unary Unary Unary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary Binary
Operators apply to A68K. Different assemblers may support different operators. Relational operators return 1s (true) or 0s (false). T4-1
TM-59
1 2 3 4 5 6 7 8 9 10 11
00000064 00002000 00002000 00002004 00002008 0000200C 00002010 00002014 00002018 0000201C 00002020
EQU ORG MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE END
100 $2000 #-1,D5 #4+50/10,D5 #25.mod.6,D5 #$8000.shr.5,D5 #$45&$F0,D5 #.high.'AB',D5 #5.gt.4,D5 #COUNT/2,D5
F4-5
TM-60
Assembler Directives
Directive ORG EQU END DC DS RSEG EXTERN PUBLIC Operation set program origin equate value to symbol end of source program define data constant define RAM storage begin relocatable segment define external symbol define public symbol [label] [label] ORG symbol EQU END DC DS RSEG Syntax value value label number[,number][...] count name
T4-2
TM-61
Listing Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Address 00001000 00001000 00000064 00002000 00002000 0000000D 00003000 00003000 00003004 00003006 0000300A 00004001 00004002 00005000 00005000 00000050 00006000 00006000 00006050 00007000 00007000 00007002 00007006 0000700A 0000700C 00000000 00000000 00000004 Contents 1A3C0064 1A3C0064 0005FFFF 05FF 4A4F484E 0D00 000F 6100 *************** ORG START MOVE.B COUNT EQU ORG HERE MOVE.B CR EQU ORG NUM DC MORE DC.B NAME DC.B DC.B ORG VALUE DC ORG DC.W LENGTH EQU ORG BUFFER DS.B TEMP DS.B ORG MOVE.L MOVEA LOOP MOVE.B SUBQ.B BNE RSEG BEGIN MOVE.B END CH4-6.SRC ********************* $1000 #100,D5 100 $2000 #COUNT,D5 $0D define a symbol $3000 set origin 5,-1 word size default 5,-1 byte size constants 'JOHN' ASCII string CR,0 CR is a symbol $4001 15 decimal constant $5000 'a' 80 $6000 LENGTH 1 $7000 #LENGTH,D1 use R1 as counter #BUFFER,A1 A1 points to buff #0,(A1)+ clear location #1,D1 done? LOOP no: clear again EPROM #44,D5
F4-8
TM-62
Linker Operation
Le g en d :
Ut i lit y pr o g r a m
( a)
Co m m an d CPU In p ut f ile s
O pt i o ns f o llo w
A bso l u t e o u t p u t f i le f o r m at t e d in S- r ec o r d s
L ist in g f ile
F4-10
TM-63
TM-64
T ra ns it io n m a y o cc ur o n ly d ur in g ex ce pt io n p r o ce ssing
U ser M o de
Su pe rv isor Mo d e
F6-1
TM-65
Exception Tree
Exc ep t ion
Ext e r n al
Int e r na l
In t er r u p t
In st r uc t io n
Exec ut io n Er r o r
Use r V e ct o r
A ut o V e ct o r
Bu s Er r o r
Re s e t
T RA P T RA PV CH K
T r a ce
D iv id eb y - ze r o
Pr iv ileg e V io la t io n
A d dr ess Er r o r
Ille g al In s t r uc t io n
F6-2
TM-66
St art e xc ep t ion
Ma ke in t ern al c op y of SR
S = 1, T = 0
Int err up t ? no
y es
Up d at e in t e rru p t m a sk lev el
Ob t a in v ec t o r n um be r
V ec t o r a dd re ss = ve ct or n u m b er x 4
Pus h PC an d c o pie d SR o n t o st ac k
( V ec t o r ad d re ss) -----> PC
C on t in u e e xe cu t io n
F6-3
TM-67
Hig h -Me m o r y
15 0
SP ( old )
SP ( n ew )
Lo w -Mem or y
F6-4
TM-68
A3 1
A 10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
all ze r o s
V7
V6
V5
V4
V3
V2
V1
V0
V e ct o r n u m b er
F6-5
TM-69
The reset vector is four words and resides in the supervisor program (SP) space. All other vectors reside in the supervisor data (SD) space. The spurious interrupt vector is taken when there is a bus error during an interrupt acknowledge cycle. Trap #n uses vector number 32 + n. See Table 6-5.
T6-2
TM-70
T6-3
TM-71
TM-72
TM-73
Hig h - Me m o ry
15 0
SP (o ld )
SP ( ne w )
Lo w -M em o ry
( a)
15
u n de f in ed
R/ W I/ N FC 2 FC1 FC 0
142 4 3
Fu nc t io n C o de I/ N 0 = in s t r uc t io n 1 = n o t a n in st r u ct io n R/ W 0 = w r it e c yc le 1 = re ad cy cle
( b)
TM-74
F6-6
TM-75
CL K
+5V
Vcc
0V
1 42 4 44
E xec ut e 1 st in st ru c t io n
L eg e nd :
1 Int er na l st art -u p t im e Bus s t at e u n kn ow n A ll c o nt r o l sig n als in ac t ive . D at a b us in r ea d m o d e Bu s c y cle ( m e m o ry r e ad o r m em o r y w r it e )
F6-7
TM-76
Sw it c h W ir e
LED
( a)
Sw it c h Co m p u t e r
L ED
( b)
F7-1
TM-77
L ED # 7
D D D D D D D D Q Q Q Q Q Q Q Q
+5 V
0 0 C 0 0 0
A23 A22 A21 A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 UD S AS R/ W D T A CK Co n t ro l Bu s
0 0 C
A2 3 A2 2 A2 1 A2 0 A1 9 A1 8 A1 7 A1 6 A1 5 A1 4 A1 3 A1 2 A1 1 A1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1 U DS AS R/ W
D1 2 D1 1 D1 0 D9 D8
L ED # 0
WRIT E LED S
0 0
+5 V
F7-2
TM-78
M em o ry r e ad
Me m o r y r ea d
M em or y r e ad
13 2
One clo ck p er io d t im e
S0
S1
S2
S3
S4
S5
S6
S7
$ 0 0 C0 0 0
sw it c h d at a
F7-3
TM-79
0 0 C
( a)
A 23 A 22 A 21 A 20 A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 UDS AS R/ W
0 0
REA D SW IT CH ES
A 23 A 22 A 21 A 20 A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 UDS AS R/ W
W RIT E L ED S
0
(b )
XX X0
F7-5
TM-80
In pu t F lo w c h ar t :
O ut p ut Flo w c h a r t :
E nt er
En t e r
Rea d D e v ic e S t a t u s Flag
Re ad D ev ice S t at us F la g
NO
D e vic e Re ad y ?
YE S
NO
De v ic e Rea d y ?
Y ES
In p ut D at a
Ou t p u t Da t a
Clea r Flag
Cle ar Fla g
Ex it
Exit
( a)
(b )
F7-7
TM-81
Keyboard Interface
D a ta Bu s
D8 Ke yb o ard KBD D A TA D D D D D D D D Q Q Q Q Q Q Q Q D1 5 D1 4 D1 3 D1 2 D1 1 D1 0 D9 D8
F L AG K EYH IT S Q R
A k ey is pr ess e d
KBD DA T A K EYH IT ( b)
V alid D at a
F7-6
TM-82
Da t a B us
CPU
A d dr ess Bu s Co nt ro l Bus
Pe r ip h e r al In t er f a ce IC
A1 A0 R/ W A d d r e ss D ec o din g Re ad St at us e t c. e t c. CS In p u t W rit e C o nt ro l etc . etc . Ou t p u t
Pe ri p h er a l Dev ic e
F7-9
TM-83
t im e
M ain P r o g r am
( a)
ISR
ISR
ISR
**
**
**
M ain
Ma in
M ain
Ma in
* ** ( b)
F7-11
TM-84
Signal
IP2 IP1 IP 0
Interrupt 0 1 2 3 4 5 6 7
1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
TM-85
TM-86
TM-87
Interrupt Circuitry
+5 V 1 0K V PA 74 07
680 00
N o n - Mas k ab le In t er r u p t ( NM I) A3 A2 A1 +5 V
7 4 HC 1 3 8 C B A 7 6 5 4 3 2 1 0 IA C K 7 IA C K 6 IA C K 5 IA C K 4 IA C K 3 IA C K 2 IA C K 1
+5 V IN T 7 IN T 6 IN T 5 IN T 4 IN T 3 IN T 2 IN T 1 +5 V
E1 E2 E3
7 4 H C1 3 8 C B A 7 6 5 4 3 2 1 0 IA ( In t e rr up t Ac k n o w led g e ) S P ( Sup e r v is o r P r og r a m ) S D ( Su p e r v is o r Da t a )
UP ( Us er P ro g ram ) UD ( Us er D at a)
F7-12
TM-88
Da t a Bu s
CPU
A dd re ss Bu s C o nt ro l Bu s
Me m o r y
DMA Co n t r o lle r
Dev ic e
F7-13
TM-89
D at a Bu s A dd re ss Bu s Co n t r o l Bus
Me m o r y
DMA Co n t ro l le r
Dev ic e
F7-14
TM-90
68 000 CPU
D MA Co nt ro lle r BR BG BR BG BGA CK
BGA CK
F7-15
TM-91
Bus Arbitration
6 8 0 0 0 CPU
DMA Co n t r ol le r
Re qu e st t he Bus 1 . A ssert b us r e q ue st ( BR = 0 )
Gr an t t he Bus 1 . A sse r t b u s g ran t ( BG = 0 ) A ckn o w le dg e Bus M ast er sh ip 1 . A ssert b us g r a nt a ck no w le d ge (B GA CK = 0 ) 2 . Ne g at e b u s req u e st ( BR = 1 ) Ter m ina t e Bus A rb it r a t io n 1 . Ne g at e b u s gr an t ( BG = 1 ) a nd w a it f o r BGA CK t o be n e ga t e d Op er a t e as Bu s Mast e r t im e 1 . Pe r f o r m d at a t r an sf e rs acc o r d in g t o sam e r u les t h e CPU u se s
F7-16
TM-92
t im e
BR
BG
BGA CK
1 2 3
CPU cy cles
1 2 3
C PU cy cle s
DM A cy cles
F7-17
TM-93
6 8 6 8 1 DUA RT
Re s e t Cir c uit
Sy st e m Bu ses
A dd r e ss D ec od e Cir c uit
Mo nit o r EPRO Ms (1 6 K)
U ser EPRO Ms ( 1 6 K)
RAM s ( 1 6 K)
F8-3
TM-94
68000 CPU
14, 49
+5 V
16, 53
V cc G ND
15
68000 CPU
C LK
+5 V
20 19 21
13 11 12
6 9
A2 3 A2 2 A2 1 A2 0 A1 9 A1 8 A1 7 A1 6 A1 5 A1 4 A1 3 A1 2 A1 1 A1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1
52 51 50 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29
A d d r es s Bu s
Co n t r o l Bu s
7 8 10
28 27 26
25 24 23
22 18 17
7 X 1 0 K
D1 5 D1 4 D1 3 D1 2 D1 1 D1 0 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
54 55 56 57 58 59 60 61 62 63 64 1 2 3 4 5
D at a Bu s
F8-4
TM-95
7 4 HC 1 4
1 2
0 . 0 1 F
3 4 5 6
47 C LK to 680 00
1K
1K
10 pF
3.68 64 MHz
13
12
BA U D CL K
to 686 81
F8-6
TM-96
+5 V
+5 V
1N 9 14
1 0K
9
7 4 HC1 4
8 11 10
7 407
3 4
RESET to 68 000 H A LT
100 RESET
2 2 F
F8-7
TM-97
M ON IT OR + 2 2 F
+5V IN T 7 Ext er na l In t e r ru pt s IN T 6 IN T 5 IN T 4 IN T 3 IN T 2 IN T 1
7 x 10K 4 3 2 1 13 12 11
7 4 HC1 4 8 7 6 5 4 3 2 1 0 E1 7 4 H C1 3 8 A2 A1 A0
6 7 9
to 68 000
+5 V X1 6
10
E0 GS
15 14
V PA
11
10
A3 A2 A1 +5V 7 4 H C1 3 8 f ro m 680 00
3
3 2 1
C B A
6 7 9 10 11 12 13 14 15
FC 2 FC 1 FC 0 +5 V
2 1
C B A
AS
4 5
E1 E2 E3
7 6 5 4 3 2 1 0
IA SP SD
4 5
E1 E2 E3
7 6 5 4 3 2 1 0
7 9 10 11 12 13 14 15
to 686 81
UP UD
F8-8
TM-98
f ro m 68 000
1 2 3 4 5 6 7 8 9 11 20 10
I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 Vc c GN D
1 6 L8
O8 O7 O6 O5 O4 O3 O2 O1
19 18 17 16 15 14 13 12 9 8
D T A CK
t o 6 800 0
7 407
F8-9
TM-99
FFFFFE
Re f le ct ed
7 M w o rd s
200000 1FFFFE
Ex pa ns io n
9 9 2 K w o rd s
010000 00FFFE
D UA RT 8 K w or d s ( I/ O) 1 M w o rd s ( 2 M b y t e s)
8 M w o rd s ( 1 6 M b y t e s)
00C000 00BFFE
RA M0 U RA M 0 L
008000 007FFE
EPROM1 U EPROM1 L
8 K w or d s ( syst e m / u ser )
004000 003FFE
EPROM0 U EPROM0 L
8 K w or d s ( u ser )
000000
8 K w o rd s ( MON 6 8 K)
F8-10
TM-100
Monitor EPROMs
f r om 68 000
2 23 21 24 25 3 4 5 6 7 8 9 10
A1 2 A1 1 A1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
2764A EPROM
( m o nit or )
D7 D6 D5 D4 D3 D2 D1 D0
19 18 17 16 15 13 12 11
V cc Vpp PGM
28 1 27
22
t o / f ro m 680 00
CS
GN D
14
f ro m 680 00
2 23 21 24 25 3 4 5 6 7 8 9 10
A1 2 A1 1 A1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
2764A EPROM
( m o nit or )
D7 D6 D5 D4 D3 D2 D1 D0
19 18 17 16 15 13 12 11
D7 D6 D5 D4 D3 D2 D1 D0
+ 5V V cc Vpp PGM
28 1 27
OE f ro m A dd r e ss De co d e C ir cu it EPROM0 L
20
22
CS
GN D
14
F8-12
TM-101
User EPROMs
A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1
2 23 21 24 25 3 4 5 6 7 8 9 10
f ro m 6 800 0
2764A EPROM
(u se r )
D7 D6 D5 D4 D3 D2 D1 D0
19 18 17 16 15 13 12 11
D1 D1 D1 D1 D1 D1 D9 D8 +5 V
5 4 3 2 1 0
Vc c Vp p PGM
28 1 27
22
t o/ f ro m 68 000
CS
GND
14
f ro m 680 00
2 23 21 24 25 3 4 5 6 7 8 9 10
2764A EPROM
( use r )
D7 D6 D5 D4 D3 D2 D1 D0
19 18 17 16 15 13 12 11
D7 D6 D5 D4 D3 D2 D1 D0
+5 V Vc c Vp p PGM
28 1 27
22
CS
GND
14
F8-13
TM-102
System/User RAM
f ro m 6 800 0
2 23 21 24 25 3 4 5 6 7 8 9 10
6264 RA M
D7 D6 D5 D4 D3 D2 D1 D0
19 18 17 16 15 13 12 11
D1 D1 D1 D1 D1 D1 D9 D8
5 4 3 2 1 0
+5V Vcc
28 26
R/ W f r o m A d dr ess D ec od e Cir cu it RA M0 U
27 20
W CS
OE GND
22
t o / f ro m 68 000
14
f ro m 6 800 0
A1 3 A1 2 A1 1 A1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1
2 23 21 24 25 3 4 5 6 7 8 9 10
6264 RA M
D7 D6 D5 D4 D3 D2 D1 D0
19 18 17 16 15 13 12 11
D7 D6 D5 D4 D3 D2 D1 D0 +5V
Vcc
28 26
R/ W f ro m A d dr e ss D ec od e Cir cu it RA M0 L
27 20
W CS
OE GND
22
14
F8-14
TM-103
68681 DUART
J3
D B2 5 S
25 30 11
t o / f ro m 68 000
D7 D6 D5 D4 D3 D2 D1 D0 RESET R/ W D T AC K A4 A3 A2 A1
16 24 17 23 18 22 19 34 8 9
TxD A
31 12
T1 I
T1 O
Rx DA
R1 0
R1 I
14
2 7
T e r m ina l/ H os t Co m p u t e r
68681 DUA RT
11 10
MA X 232
TxD B
10
J8
D B2 5 S
7 3
T2 I
T2 O
6 5 3 1
Rx DB
1
R2 0
R2 I
+5V
16
O p t io n al Ser ia l Por t
+
3
C1 + C1 4
Vcc
2
IN T 2 IA CK 2 D UA RT
21 37
4 X 1 0 F +
V+
6
C2 +
5
V15
35
C2 -
G ND
32
BA UD CL K
C LK/ X1
33 15
J1
8 7 9 3 17 4 11 5
X2
40
+ 5V
20
V cc G ND
26 14 27 13 28 12 29
38 39 2 36 4 7
14 15 16 12 13 6 20 10
+5V
F8-15
TM-104
J2
D7 D6 D5 D4 D3 D2 D1 D0 t o / f ro m 680 00 A 16 A3 A2 A1 RESET V PA E R/ W t o / f ro m In t e r ru pt Circu it IN T3 SD +5V
1 2 3 4 5 6 7 8
11
14 15 16
13 18 17 19
12 9
20
10
2 0 - pin h ea de r
F8-16
TM-105
686 81 DU ART OP7 OP6 OP5 OP4 OP3 OP2 OP1 OP0 15 26 14 27 13 28 12 29
8 7 9 3
J1 17 15 13 11 8 6 4 2
7 4 LS2 4 4 3 5 7 9 12 14 16 18
8 220
+5 V
17 4 11 5
20
1, 19 +5V
10
IP5 IP4
36 4
F9-3
TM-106
7 4 LS2 4 4 17 15 13 11 8 6 4 2 3 5 7 9 12 14 16 18 7 22 0 1 13 10 8 7 2 11 a b c d e f g
+5 V 14, 3
a f g c d b
20 10
1, 19 +5V
MA N 7 2 A 7 -s eg m e nt co m m o n an od e LED +5 V
2 36 4 7
16 12 13 6
4 1 0 k
F9-4
TM-107
+5 V 6 86 8 1 28 12 29 J1 5 13 12 18 V cc O P2 O P1 O P0
4 11 5
8 47 14 13 8 7 6 1 2 4 a a b b c c d d e e ff g dp 4 ,1 2 e d dp f g a b f
4 MA N 4 7 4 0 A
a b g f
a b g f
a b g
20 10
+5 V
e d
e d
e d
6 0 .0 1 5 F 9
f O SC g GN D D4 7 D3 8 D2 10 h (d p ) D1 11
dp
dp
dp
4,12
4 ,1 2 4 2 N3 9 0 4
4 ,1 2
F9-6
TM-108
MC14499 Timing
t im e
D AT A ( OP2 )
d1
d2
d3
d4
d1 9
d20
F9-7
TM-109
t im e Bit N o .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 4 2 4 3 1 42 4 3 1 4 2 4 3 1 4 2 4 3 1 4 2 4 3
De cim a l Poin t s Dig it 1 D ig it 2 D igit 3 Dig it 4
F9-8
TM-110
SEG
D IGIT MC1 4 4 9 9
SEG
D A TA C LO CK EN AB LE
h et c.
F9-9
TM-111
Ex t e r n al Inp u t s J1 6 868 1 D UA RT L SB
20
MSB
+ 5V
10
6 H
5 G
4 F
3 E
14 D
13 C
12 B
11 A DA T A 1 0 IN CL K 2 9
6 H
5 G
4 F
3 E
14 D
13 C
12 B
11 A DA T A IN CL K 2 etc . 10
IP0
D AT A O UT G ND 8, 1 5
7 4 L S1 6 5 Vcc 16 + 5V 7 nc L O AD 1
D AT A O UT G ND 8, 1 5
7 4 L S1 6 5 Vc c 16 +5V 7 nc L O AD 1
O P1 O P0
12 29
11 5
F9-10
TM-112
J2
1
26 27 28 D5 29 D4 D7 D6
6 821 PIA CA 2 CA 1 39 40
D7
2
D6
3
D5
4
D4
5
PA 7 PA 6 PA 5 PA 4 PA 3 PA 2
9 8 7 6 5 4 3 2
30 D3 31 D2 32 D1 33 D0
D3
6
D2 D1 D0
7 8
23 CS2 24 CS1
1 2
SD A16
11
PA 1 PA 0
22 +5 V CS0
7 4 HC 0 0
4
17 16 15 14 13 12 11 10
18 13 19 17 12 14
6 5
A3 A2 A1
15 16 20 10
nc
19 18
+5V
+5 V
20 1
V cc GN D
F9-11
TM-113
68 21 PIA
PA 0
3
PA 1
4
PA 2 PA 3
5
0
6 N
PA 4 4
7 M
PA 5 8
8 L
PA 6 C
9 K
PA 7 Gra yh ill PN 8 8 BA 2
F9-12
TM-114
68 21
9 5 6 7 8
M C1 4 0 8 L 8 1 k V r ef +
14
+5V 1 50 10 0
15
PA 7
8
D7 D6 D5 D4 V r ef -
PA 6
7
PA 5
6
1 k
PA 4
5 9 10 11 12
PA 3
4
D3 D2 D1
+ 1 2 V -1 2 V 1
PA 2
3
nc
4 .7 k
PA 1
2
PA 0
13 16 2
D0
4
+5 V
V CC COMP
IO
2 3
4 6
VO
8 1
L M3 0 1
1 5 pF
GND V EE
3
3 3 pF
-1 2 V
F9-13
TM-115
+ 1 2 V -1 2 V 7 2 4 6
1 .2 k VO
1 .2 k
2 5 F
0 .0 2 2 F
L M3 0 1 ( lo w - pa ss f ilt e r )
+
8 1
5 k
LM 3 0 1 ( vo lt ag e f o llo w e r )
Sp ea k e r
33 pF
3 3 pF
F9-15
TM-116
AD C0 8 0 4 682 1
19 3
V cc WR Vin ( + ) IN TR CS RD Vr ef V in( - )
20
+5V 10 k t r im p o t ( t r an sd uc er)
C B2 C B1
6 Di f f e re nt ial In p ut s 7
18
1 2
nc
17 16 15 14 13 12 11 10
11 12 13 14 15 16 17 18
D7 D6 D5 D4 D3 D2 D1 D0
C LK R
19
1 5 k CL K IN
4
1 5 0 pF D GN D A GN D
10 8
F9-16
TM-117
Clea r INT R
St a r t o f Co n ve rsio n
En d o f Co nv er sion
C le ar IN TR
St ar t Ne xt Co nv er sio n
WR
1 0 0 s
IN T R
F9-17
TM-118
VB 1 0 k
47
4 6
1 0 F
+ 1 2 V -1 2 V 7 2 4 6 3 8 1
47
1 k 1%
2 3
2 2 k +5V 2 2 k
1 0 0 k 1%
LM 3 0 1 ( p r e -am p )
LM 3 0 1 (a m p )
33 pF +5 V 1N914
33 pF
1 .2 k 0 .0 4 4 F 2 .4 k 1 .2 k
+ 1 2 V -1 2 V 7 2 3 4 6 3
L F3 9 8 ( sa m p le an d h o ld )
+12V -1 2 V
A DC0 8 0 4
18 k V C
1 4 8 5
5 . 6 k
20
V cc
+5 V
0 .0 2 2 F
8 1
L M3 0 1 ( lo w -p a ss f ilt e r )
6 7
0 .0 0 1 F
V in (+ )
7
33 pF
V in (- )
CS RD
WR IN T R V re f CL K R D7 D6 D5 D4 D3 D2 D1 D0
9 19
nc
17 16 15 14 13 12 11 10
11 12 13 14 15 16 17 18
15 k CL K IN
4
1 50 pF D GND A GND
10 8
TM-119
F9-19
TM-120
Sample-and-Hold Waveforms
1 0 0 s m in im un Sign a l a t V C
Sig n al at V D
V o lt a ge
T im e
F9-20
TM-121
68000-Family Features
48-pin 68008 Data Bus (bits) Address Bus (bits) Data Cache (bytes) Instruction Cache (bytes) On-Chip Memory Management On-Chip FloatingPoint Unit 52-pin 68008 68000 68010 68020 68030 68040
8 20 No No
8 22 No No
16 24 No No
16 24 No No
32 32 256 No No
T10-1
TM-122
68040 Company Motorola Introduced Architecture Width (bits) Registers (general/FP) Multiprocessing Support? Device Size (mm) Transistors (millions) Clock (MHz) SPECint 92 SPECfp 92 Peak Power (Watts) Price ($US/1000 units) 1989 CISC 32 16/8 No 10.8 x 11.7 1.2 25 21 15 6 $233
80486 Intel 6/91 CISC 32 8/8 No not available 1.2 50 27.9 13.1 5 $432
PowerPC IBM/Motorola 4/93 RISC 32 32/32 Yes 11 x 11 2.8 80 85 105 9.1 $557
Pentium Intel 3/93 CISC 32 8/8 Yes 17.2 x 17.2 3.1 66 67.4 63.6 16 $898
Alpha 21064 DEC 2/92 RISC 64 32/32 Yes 15.3 x 12.7 1.68 200 130 184 30 $505
Source: IEEE Spectrum, December 1993, p. 21 Integer and floating-point performance benchmarks
T10-10
TM-123