📄 chap.4.io.ps
字号:
776 2375(Considering)N1278(Figure)X1562(4.1,)X1739(notice)X2008(that)X2186(what)X2406(we)X2551(have)X2766(\(until)X3008(now\))X3238(only)X3442(been)X3657(referring)X4027(to)X4135(as)X4248(a)X2 f576 2487(memory)N910(bus)X1 f1068(now)X1258(has)X1411(three)X1629(principal)X1997(components)X2487(\320)X2607(address,)X2943(data,)X3152(and)X3315(control.)X3636(The)X3 f3810(address)X4148(bus)X1 f576 2599(is)N666(used)X868(by)X990(the)X1134(CPU)X1346(to)X1447(specify)X1751(an)X1869(address)X2184(to)X2286(the)X2431(memory.)X2803(For)X2963(the)X3108(68000)X3375(processor,)X3794(this)X3960(is)X4051(essen-)X576 2711(tially)N814(24)X949(wires,)X1220(each)X1436(of)X1555(which)X1829(individually,)X2357(may)X2561(carry)X2797(either)X3055(a)X3136(logical)X3437(`1')X3587(or)X3705(`0',)X3879(and)X4056(which)X576 2823(together)N929(comprise)X1319(a)X1399(24-bit)X1666(address.)X2015(Therefore,)X2457(the)X2613(68000)X2891(may)X3095(address)X3421(2)X9 s2785(24)Y12 s3587 2823(bytes)N3828(of)X3946(memory,)X576 2935(because)N908(it)X989(is)X1080(capable)X1402(of)X1509(outputting)X1931(2)X9 s2897(24)Y12 s2085 2935(different)N2443(address)X2757(values)X3029(on)X3151(its)X3268(address)X3582(bus.)X3765(The)X3 f3941(data)X4148(bus)X1 f576 3047(is)N674(a)X751(collection)X1166(of)X1280(16)X1410(wires,)X1676(each)X1887(of)X2001(which)X2270(may)X2470(carry)X2702(a)X2779(logical)X3076(`1')X3222(or)X3336(`0')X3483(to)X3593(allow)X3842(the)X3995(CPU)X4216(to)X576 3159(transfer)N917(one)X1103(16)X1246(bit)X1395(word)X1639(at)X1756(a)X1846(time)X2065(to)X2187(the)X2352(memory)X2720(during)X3018(a)X3108(memory)X2 f3476(write)X1 f3721(operation.)X4179(By)X576 3271(``memory)N990(write)X1217(operation'',)X1698(we)X1839(simply)X2130(mean)X2368(any)X2536(68000)X2805(instruction)X3246(that)X3421(has)X3579(a)X3652(memory)X4003(address)X576 3383(as)N680(its)X795(destination)X1242(effective)X1604(address.)X1940(For)X2097(example,)X7 f1728 3543(MOVE.W)N2304 0.4091(#$1234,$5000)AX1 f576 3703(is)N688(a)X779(memory)X1148(write)X1394(operation)X1807(that)X2001(stores)X2274(the)X2441(value)X2699($1234)X2988(to)X3112(memory)X3482(location)X3842($5000.)X4179(By)X576 3815(``memory)N993(read)X1191(operation'',)X1675(we)X1819(simply)X2113(mean)X2354(any)X2525(68000)X2797(instruction)X3241(that)X3418(has)X3577(a)X3651(memory)X4003(address)X576 3927(as)N680(its)X795(source)X1070(effective)X1432(address.)X1768(For)X1925(example,)X7 f1728 4087(MOVE.W)N2304($5000,D0)X1 f576 4247(is)N674(a)X751(memory)X1106(read)X1306(operation)X1704(that)X1883(reads)X2120(the)X2272(contents)X2627(of)X2741(memory)X3096(location)X3441($5000)X3715(and)X3888(stores)X4146(that)X576 4359(value)N816(into)X997(data)X1189(register)X7 f1543(D0)X1 f1659(.)X1714(If)X1809(it)X1894(is)X1989(desired)X2298(to)X2404(transfer)X2729(more)X2958(than)X3155(16)X3281(bits)X3450(between)X3801(memory)X4152(and)X576 4471(the)N724(CPU)X940(in)X1045(one)X1214(instruction,)X1680(more)X1908(than)X2105(one)X2275(bus)X2439(transaction)X2893(will)X3074(have)X3287(to)X3393(take)X3585(place.)X3844(To)X3982(the)X4131(pro-)X576 4583(grammer,)N985(these)X1220(multiple)X1579(transfers)X1946(are)X2100(invisible,)X2492(except)X2780(for)X2928(the)X3082(fact)X3263(that)X3444(a)X3523(longword)X3927(operation)X576 4695(will)N754(take)X943(longer)X1217(to)X1320(execute)X1643(than)X1837(a)X1908(word)X2133(or)X2242(byte)X2437(operation.)X2854(For)X3016(example,)X3396(a)X7 f3502(MOVE.L)X1 f3879(instruction)X576 4807(that)N764(involves)X1132(a)X1217(memory)X1580(location)X1933(will)X2125(take)X2328(longer)X2616(to)X2733(execute)X3070(than)X3278(a)X7 f3397(MOVE.W)X1 f3787(or)X7 f3943(MOVE.B)X1 f576 4919(operation)N978(with)X1187(the)X1343(same)X1580(operands.)X2014(The)X3 f2203(control)X2536(bus)X1 f2718(has)X2885(many)X3138(widely)X3439(varying)X3772(purposes)X4152(and)X576 5031(functions.)N983(While)X1244(the)X1387(address)X1700(bus)X1858(tells)X2044(the)X2187(memory)X2 f2533(where)X1 f2768(,)X2817(and)X2981(the)X3124(data)X3310(bus)X3468(tell)X3617(the)X3759(memory)X2 f4104(what)X576 5143(data)N1 f775(to)X878(read)X1072(or)X1180(write)X1406(at)X1504(that)X1677(location,)X2040(the)X2187(control)X2489(bus)X2651(tells)X2841(the)X2988(memory)X2 f3338(what)X3554(to)X3658(do)X1 f3783(with)X3983(the)X4130(data)X576 5255(and)N745(address)X1063(values)X1339(presently)X1722(on)X1848(the)X1996(other)X2224(two)X2398(busses.)X2702(The)X2882(simplest)X3233(example)X3590(is)X3684(one)X3853(of)X3962(the)X4109(lines)X576 5367(of)N686(the)X834(control)X1137(bus)X1300(called)X1562(the)X1711(Read/Write)X2187(line)X2363(which)X2629(speci\256es)X2991(whether)X3332(to)X3438(Read)X3667(or)X3778(Write)X4029(data)X4221(at)X576 5479(the)N727(address)X1048(being)X1295(speci\256ed)X1670(on)X1799(the)X1950(address)X2271(bus.)X2461(Finally,)X2791(notice)X3060(the)X3210(input)X3 f3440(Clock)X3712(Signal)X1 f3968(.)X4024(This)X4227(is)X576 5591(simply)N862(a)X929(rapidly)X1226(alternating)X1663(pulse)X1890(which)X2149(provides)X2504(a)X2571(``drum)X2862(beat'')X3111(for)X3247(the)X3389(CPU.)X3623(All)X3770(of)X3875(the)X4018(actions)X576 5703(of)N686(the)X834(CPU)X1050(are)X1198(coordinated)X1683(with)X1884(this)X2053(signal.)X2337(The)X2517(period)X2793(of)X2903(this)X3072(waveform)X3492(determines)X3945(the)X4093(basic)X576 5815(clock)N824(rate)X1008(of)X1127(the)X1284(system.)X1614(Typical)X1948(values)X2233(for)X2384(this)X2562(clock)X2810(are)X2967(4)X3054(or)X3173(8)X3261(million)X3580(cycles)X3861(per)X4024(second)X39 p%%Page: 39 412 s 0 xH 0 xS 1 f3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(39)X2505(-)X3 f3717(Lecture)X4062(Notes)X1 f576 803(\(usually)N917(referred)X1252(to)X1357(as)X1467(4)X1545(or)X1655(8)X1733(Megahertz)X2175(and)X2344(abbreviated)X2824(MHz\),)X3107(for)X3249(a)X3322(clock)X3561(period)X3837(of)X3947(2.5)X2 f10 s9 f(\264)S1 f12 s4111(10)X2 f9 s9 f765(-)Y1 f4247(7)X12 s576 915(seconds)N904(\(250)X1104(ns\),)X1269(or)X1373(1.25)X2 f10 s9 f(\264)S1 f12 s1585(10)X2 f9 s9 f877(-)Y1 f1721(7)X12 s1789 915(seconds)N2117(\(125)X2317(ns\))X2458(respectively.)X776 1055(With)N993(this)X1157(brief)X1364(explanation)X1839(of)X1944(the)X2087(roles)X2299(of)X2404(busses)X2679(in)X2779(a)X2847(microprocessor)X3465(system,)X3781(let)X3903(us)X4013(resume)X576 1167(the)N731(illustration)X1186(of)X1303(their)X1517(actual)X1785(function)X2143(by)X2276(detailing)X2650(their)X2863(involvement)X3381(in)X3492(the)X3646(execution)X4057(of)X4173(the)X576 1279(simple)N7 f891(MOVE.B)X1 f1263(instruction)X1699(given)X1937(at)X2031(the)X2173(beginning)X2582(of)X2686(this)X2849(section.)X7 f1728 1439(MOVE.B)N2304($1000,D0)X1 f776 1627(Again,)N1073(assuming)X1474(that)X1658(the)X1815(PC)X1971(\(Program)X2373(Counter\))X2754(is)X2857(initially)X3197(set)X3343(to)X3457($2000,)X3760(the)X3917(following)X576 1739(sequence)N953(will)X1127(take)X1312(place.)X776 1879(1.)N920(The)X1098(CPU)X1313(places)X1583(the)X1730(value)X1968($002000)X2333(on)X2458(the)X2605(address)X2922(bus)X3084(lines,)X3319(and)X3487(asserts)X3772(the)X3919(Read)X4146(line)X920 1991(on)N1040(the)X1182(control)X1479(bus.)X776 2131(2.)N920(The)X1105(value)X1350($1038)X1626(will)X1812(appear)X2105(on)X2237(the)X2391(16)X2523(lines)X2741(of)X2857(the)X3011(data)X3208(bus)X3377(in)X3488(response)X3860(to)X3971(the)X4125(read)X920 2243(request)N1249(because)X1605(the)X1774(value)X2034($1038)X2325(was)X2524(contained)X2949(in)X3074(the)X3242(word)X3489(at)X3609(memory)X3980(location)X920 2355($002000.)N1305(At)X1426(the)X1569(moment)X1910(the)X2053(value)X2287(appears)X2606(on)X2727(the)X2870(data)X3056(bus,)X3238(the)X3381(CPU)X3592(captures)X3938(the)X4082(value)X920 2467(and)N1091(stores)X1347(it)X1433(within)X1710(the)X1859(CPU.)X2100(Finally,)X2428(the)X2577(CPU)X2794(will)X2975(internally)X3376(add)X3546(2)X3625(to)X3731(the)X3880(value)X4120(con-)X920 2579(tained)N1193(in)X1305(the)X1460(PC,)X1638(so)X1760(at)X1867(the)X2022(end)X2198(of)X2316(this)X2493(step)X2686(\(or)X2836(cycle\))X3110(the)X3266(PC)X3421(will)X3609(contain)X3931($002002,)X920 2691(which)N1181(is)X1271(the)X1415(address)X1729(of)X1835(the)X1979(next)X2170(word)X2392(in)X2492(memory)X2838(to)X2938(be)X3054(fetched,)X3387(i.e.,)X3554(the)X3697(second)X3989(word)X4211(of)X920 2803(the)N1062(instruction)X1498(being)X1736(executed.)X776 2943(3.)N920(During)X1237(the)X1400(third)X1627(cycle,)X1900(the)X2063(CPU)X2294(examines)X2703(the)X2866(value)X3120($1038,)X3429(and)X3613(realizes)X3953(this)X4138(is)X4248(a)X7 f920 3055(MOVE.B)N1 f1315(instruction)X1774(in)X1896(which)X2178(the)X2343(source)X2641(operand)X2998(is)X3109(in)X3231(a)X3321(memory)X3689(location)X4046(whose)X920 3167(address)N1233(is)X1322(no)X1443(more)X1666(than)X1857(16)X1978(bits)X2142(in)X2242(length,)X2532(and)X2697(the)X2841(destination)X3290(is)X3380(data)X3567(register)X7 f3916(D0)X1 f4032(.)X4082(Real-)X920 3279(izing)N1141(this,)X1332(the)X1478(CPU)X1692(knows)X1970(it)X2051(must)X2265(fetch)X2485(a)X2555(value)X2791(from)X3005(some)X3235(memory)X3583(location)X3921(and)X4087(place)X920 3391(it)N1000(in)X7 f1135(D0)X1 f1251(.)X1301(However,)X1703(it)X1783(is)X1873(still)X2044(unknown)X2427(to)X2528(the)X2672(CPU)X2 f2884(which)X1 f3140(memory)X3487(location)X3825(contains)X4173(the)X920 3503(value)N1157(to)X1260(be)X1379(fetched.)X1739(Therefore,)X2171(the)X2317(value)X2553(in)X2655(the)X2800(PC)X2944(\(i.e.,)X3145($2002\))X3444(is)X3535(again)X3771(placed)X4050(on)X4173(the)X920 3615(address)N1232(bus)X1389(and)X1552(the)X1694(Read)X1916(line)X2085(is)X2173(asserted.)X776 3755(4.)N920(Next,)X1155(the)X1297(value)X1530($1000)X1794(will)X1968(appear)X2249(on)X2369(the)X2511(data)X2697(bus)X2855(because)X3185(the)X3328(value)X3562($1000)X3827(is)X3916(contained)X920 3867(in)N1024(the)X1171(word)X1397(at)X1496(location)X1836($2002.)X2129(The)X2308(CPU)X2523(will)X2702(again)X2940(store)X3156(this)X3323(internally)X3721(and)X3888(update)X4173(the)X920 3979(PC)N1061(by)X1181(again)X1414(adding)X1700(2)X1772(to)X1871(it,)X1973(so)X2082(that)X2251(after)X2452(this)X2615(cycle,)X2867(the)X3009(PC)X3150(will)X3324(contain)X3632($2004.)X776 4119(5.)N920(Now)X1139(that)X1317(the)X1468(CPU)X1688(knows)X1972(the)X2124(address)X2446(of)X2560(the)X2712(source)X2997(operand,)X3365(it)X3453(is)X3551(ready)X3799(to)X3908(retrieve)X4237(it)X920 4231(from)N1135(memory.)X1508(Therefore,)X1940(the)X2086(CPU)X2300(will)X2478(now)X2671(place)X
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -