Você está na página 1de 544

-

-- -
Roading, Massaclusolls MonIo IarI, CaIifornia - Nov YorI
Don MiIIs, Onlario - WoIinglam, IngIand - Amslordam
Bonn - Sydnoy - Singaporo - ToIyo - Madrid - San }uan
-



Many of llo dosignalions usod by manufaclurors and soIIors lo dislinguisl lloir prod-
ucls aro cIaimod as lradomarIs. Wloro lloso dosignalions appoar in llis booI, and Ad-
dison-WosIoy vas avaro of a lradomarI cIaim, llo dosignalions lavo boon prinlod in
iniliaI capilaI Iollors or aII capilaI Iollors.

Tlo aullors and pubIislors lavo laIon caro in proparalion of llis booI, bul maIo no
oxprossod or impIiod varranly of any Iind and assumo no rosponsibiIily for orrors or
omissions. No IiabiIily is assumod for incidonlaI or consoquonliaI damagos in connoc-
lion vill or arising oul of llo uso of llo informalion or programs conlainod loroin.

Iibrary of Congross CalaIoging-in-IubIicalion Dala









ISBN: 0-201-40996-8
Copyrigll 1995 by MindSlaro, Inc.

AII riglls rosorvod. No parl of llis pubIicalion may bo roproducod, slorod in a rolriovaI
syslom, or lransmillod, in any form or by any moans, oIoclronic, moclanicaI, plolo-
copying, rocording, or ollorviso, villoul llo prior vrillon pormission of llo pubIislor.
Irinlod in llo Unilod Slalos of Amorica. IubIislod simuIlanoousIy in Canada.

Sponsoring Idilor: Koill WoIIman
Irojocl Managor: IIoanor McCarlly
Iroduclion Coordinalor: Doboral McKonna
Covor dosign: Barbara T. AlIinson
Sol in 10 poinl IaIalino by MindSlaro, Inc.

1 2 3 4 5 6 7 8 9 -MA- 9998979695
Iirsl prinling, Iobruary 1995

Addison-WosIoy booIs aro avaiIabIo for buII purclasos by corporalions, inslilulions,
and ollor organizalions. Ior moro informalion pIoaso conlacl llo Corporalo, Govorn-
monl, and SpociaI SaIos Doparlmonl al 800) 238-9682.




- - - - -
- - --
-- - -- - -
-

-

-

-
-
-
-
- -
-
-
Hox Nolalion....................................................................................................................... 3
Binary Nolalion................................................................................................................... 3
DocimaI Nolalion................................................................................................................ 3
SignaI Namo Roprosonlalion............................................................................................. 3
Idonlificalion of Bil IioIds (IogicaI groups of bils or signaIs) ....................................... 4


-
---
--
-
Tlo IBM IC ......................................................................................................................... 7
Tlo IBM IC/AT.................................................................................................................. 8

-
-- -
-
GonoraI ............................................................................................................................... 11
In-Iino Codo Iolcling...................................................................................................... 13

Typo of Informalion Road from Momory...................................................................... 16
Typo of Informalion Wrillon lo Momory....................................................................... 16
--
Tlo Addross Bus............................................................................................................... 17
ConlroI Bus Transaclion Typo and Synclronizalion................................................ 19
Tlo Dala Bus Dala Transfor Iall .............................................................................. 19

-

-

-- --
-
--- -
Addross Timo .................................................................................................................... 24
Dala Timo........................................................................................................................... 25
Tlo Wail Slalo ................................................................................................................... 26
--
--
InloI 8080 Microprocossor Addross Spaco..................................................................... 29
8086 and 8088 Microprocossor Addross Spaco............................................................. 33
286 and 386SX Addross Spaco ........................................................................................ 34
386DX, 486 and Ionlium Irocossor Addross Spaco..................................................... 35


--
--
- -- -
-- -
--
BacIground ....................................................................................................................... 42
Tlo IC/XT ROM Addross Docodo Iogic ..................................................................... 44
- --
--
-
Tlo Inslruclion Unil ......................................................................................................... 55
Tlo Ixoculion Unil ........................................................................................................... 55
GonoraI Rogislors....................................................................................................... 56
Tlo Slalus and ConlroI Rogislors ............................................................................ 59
Tlo Addross Unil.............................................................................................................. 63
Tlo Sogmonl Rogislors.............................................................................................. 63
Sogmonl Rogislor Usago in RoaI Modo................................................................... 63
Codo Sogmonl (CS) & Inslruclion Ioinlor (II) Rogislors ..................................... 67
Tlo Dala Sogmonl (DS) Rogislor ............................................................................. 69
Tlo Ixlra Sogmonl (IS) Rogislor ............................................................................. 70
SlacI Sogmonl (SS) & SlacI Ioinlor (SI) Rogislors ............................................... 71
IillIo-Indian Bylo-Ordoring RuIo ........................................................................... 74
Dofinilion of Ixlondod Momory.............................................................................. 75
Accossing Ixlondod Momory in RoaI Modo.......................................................... 76

-

Tlo Bus Unil ...................................................................................................................... 81
Addross Ialclos and Drivors................................................................................... 81
Inslruclion Irofolclor and 6-bylo Irofolcl Quouo................................................ 81
Irocossor Ixlonsion Inlorfaco .................................................................................. 82
Bus ConlroI Iogic ...................................................................................................... 83
Dala Transcoivors ...................................................................................................... 83
-
Tlo Addross Bus............................................................................................................... 83
Hov 80286 Addrossos IxlornaI Iocalions .................................................................... 85
Tlo Dala Bus ..................................................................................................................... 87
Tlo CardinaI RuIos ........................................................................................................... 88
CardinaI RuIo Numbor Ono ..................................................................................... 88
CardinaI RuIo Numbor Tvo..................................................................................... 89
CardinaI RuIo Numbor Tlroo .................................................................................. 89
Tlo ConlroI Bus ................................................................................................................ 89
Bus CycIo Dofinilion Iinos ....................................................................................... 90
Bus Masloring Iinos.................................................................................................. 90
Irolocling Accoss To Slarod Rosourco................................................................... 92
Roady Iino.................................................................................................................. 94
Inlorrupl Iinos ........................................................................................................... 95
Irocossor Ixlonsion Inlorfaco Iinos........................................................................ 96
Tlo CIocI Iino ........................................................................................................... 97
Tlo Rosol Iino............................................................................................................ 97

Inlro lo Iroloclod Modo and MuIlilasIing Oporaling Sysloms.................................. 99
Sogmonl Rogislor Usago in Iroloclod Modo ............................................................... 101
-
-
-

-
- -
-

-
- --
-- -
- -
-
-

-

--
--
- --
-
Sconario Ono Road Ivon-Addrossod Iocalion in 8-Bil Dovico.............................. 128
Sconario Tvo 8-Bil Road from Odd-Addrossod Iocalion in 8-Bil Dovico ........... 129
Sconario Tlroo 8-Bil Wrilo lo Odd-Addrossod Iocalion in 8-Bil Dovico ............. 131
Sconario Iour 16-Bil Wrilo lo 8-Bil Dovico............................................................... 132
Sconario Iivo 16-Bil Road from 8-Bil Dovico............................................................ 133
Sconario Six 8-Bil Road from 16-Bil Dovico.............................................................. 134
Sconario Sovon 16-Bil Road from 16-Bil Dovico....................................................... 134
Sconario Iigll 8-Bil Wrilo lo 16-Bil Dovico.............................................................. 134
Sconario Nino 16-Bil Wrilo lo 16-Bil Dovico............................................................. 134

Accoss Timo..................................................................................................................... 134
Slrolcling llo Transfor Timo......................................................................................... 135
Tlo DofauIl Roady Timor .............................................................................................. 135
Cuslom Roady Timors.................................................................................................... 136
Ixlonding llo DofauIl Timing ............................................................................... 137
Slorloning llo DofauIl Timing .............................................................................. 138
-
-- -
-
Bus CycIo A ..................................................................................................................... 144
Bus CycIo B...................................................................................................................... 145
-
-
HaIl ................................................................................................................................... 150
Sluldovn......................................................................................................................... 151
---

-
GonoraI ............................................................................................................................. 154
Codo Irofolcl Unil ......................................................................................................... 155
Inslruclion Docodo Unil................................................................................................. 155
Ixoculion Unil................................................................................................................. 156
GonoraI ...................................................................................................................... 156
Tlo Rogislors ............................................................................................................ 156
GonoraI Rogislors.............................................................................................. 156
Slalus, MSW and Inslruclion Rogislors ......................................................... 157
Dobug Rogislors................................................................................................ 159

-

Tosl Rogislors .................................................................................................... 160
Sogmonlalion Unil .......................................................................................................... 160
Iaging Unil...................................................................................................................... 161
Bus Unil............................................................................................................................ 162

-
VirluaI Iaging ................................................................................................................. 164
TransIalion IooIasido Buffor........................................................................................ 170

-

Tlo Addross Bus............................................................................................................. 175
Tlo Dala Bus ................................................................................................................... 183
Tlo ConlroI Bus .............................................................................................................. 184
Bus CycIo Dofinilion Oulpuls ................................................................................ 185
Irocossor Ixlonsion Iinos ...................................................................................... 185
Addross Slalus Oulpul ........................................................................................... 185
IipoIining ConlroI Inpul......................................................................................... 186
Dynamic Bus Sizing (BS16) .................................................................................. 186

Inlorfaco SignaI Difforoncos........................................................................................... 187
A0 or BII....................................................................................................................... 188
Addrossing Sclomo, Dala Bus Widll Ramificalions ................................................. 188
Tlrouglpul and CompalibiIily Considoralions......................................................... 189
-

-
-
80386DX Syslom KornoI vill Dynamic Bus Sizing.................................................... 194
Inlroduclion.............................................................................................................. 194
Roading from an 8-Bil Dovico ................................................................................ 196
Ono-Bylo Road from an 8-Bil Dovico ............................................................. 196
Tvo-Bylo Road from an 8-Bil Dovico............................................................. 197
Iour-Bylo Road from an 8-Bil Dovico ............................................................ 198
Wriling lo an 8-Bil Dovico ...................................................................................... 200
Ono-Bylo Wrilo lo an 8-Bil Dovico ................................................................. 200
Tvo-Bylo Wrilo lo an 8-Bil Dovico................................................................. 201
Iour-Bylo Wrilo lo an 8-Bil Dovico ................................................................ 203
Roading from a 16-Bil Dovico ................................................................................ 205
Tvo-Bylo Road from a 16-Bil Dovico............................................................. 205
Iour-Bylo Road from a 16-Bil Dovico ............................................................ 206
Wriling lo a 16-Bil Dovico ...................................................................................... 207

-

Tvo-Bylo Wrilo lo a 16-Bil Dovico................................................................. 207
Iour-Bylo Wrilo lo a 16-Bil Dovico................................................................. 208
Roading from a 32-Bil Dovico ................................................................................ 210
Wriling lo a 32-Bil Dovico ...................................................................................... 211
80386DX Syslom KornoI villoul Dynamic Bus Sizing.............................................. 212
Inlroduclion.............................................................................................................. 212
Roading from a 16-Bil Dovico ................................................................................ 214
Tvo-Bylo Road from a 16-Bil Dovico............................................................. 214
Iour-Bylo Road from a 16-Bil Dovico ............................................................ 215
Wriling lo a 16-Bil Dovico ...................................................................................... 216
Tvo-Bylo Wrilo lo a 16-Bil Dovico................................................................. 216
Iour-Bylo Wrilo lo a 16-Bil Dovico................................................................. 217
- -
- -
--
-
-
--
-
-
---


DRAM Addrossing Soquonco ....................................................................................... 236
Rov and CoIumn Addross Sourco ............................................................................... 238
DRAM Addrossing Iogic .............................................................................................. 239
DolaiIod Doscriplion of DRAM Addrossing Soquonco.............................................. 242
Hov Dala is Slorod in DRAM....................................................................................... 244
DRAM Rofrosl................................................................................................................ 244
Rofrosl Iogic and RAS-onIy Rofrosl.................................................................... 245
CAS-boforo-RAS Rofrosl........................................................................................ 248
Hiddon Rofrosl........................................................................................................ 248
SoIf-Rofrosl............................................................................................................... 248
Doslruclivo Road: Iro-Clargo DoIay and CycIo Timo............................................... 250
DRAM BanI .................................................................................................................... 251
DRAM BanI Widll ........................................................................................................ 253
DRAM Irror Doloclion and Corroclion....................................................................... 256
DRAM Iarily............................................................................................................ 256
Irror-ClocIing-and-Corrocling Momory ............................................................ 259
Iago-Modo DRAM and Ils Varialions ......................................................................... 259

-

Iago Modo DRAM .................................................................................................. 259
Inlancod Iago Modo DRAM................................................................................ 264
Bursl and NibbIo Modo DRAM............................................................................. 265
Slalic CoIumn RAM (SCRAM) .............................................................................. 267
Synclronous DRAM............................................................................................... 268
InlorIoavod Momory Arclilocluro................................................................................ 269

-


IrincipIos of IocaIily...................................................................................................... 277
TomporaI IocaIily.................................................................................................... 277
SpaliaI IocaIily......................................................................................................... 277
Caclo Iorformanco......................................................................................................... 278
OvoraII Syslom Iorformanco......................................................................................... 278
Caclo Consisloncy.......................................................................................................... 279
- --
Caclo Momory................................................................................................................ 279
Caclo Managomonl Iogic ............................................................................................. 281
Caclo Momory Diroclory .............................................................................................. 281
-
-
IooI-Tlrougl Caclo...................................................................................................... 283
IooI-Asido Caclo........................................................................................................... 287
Iirsl- and Socond-IovoI Caclos.................................................................................... 289
Combinod (Unifiod) and SpIil (Dodicalod) Caclos.................................................... 290
--
Causos of Caclo Consisloncy IrobIoms....................................................................... 292
Wrilo IoIicy ..................................................................................................................... 292
Wrilo-Tlrougl Caclo Dosigns............................................................................... 293
Bufforod Wrilo-Tlrougl Dosigns.......................................................................... 293
Wrilo-BacI Caclo Dosigns ..................................................................................... 294
Bus Maslor/Caclo Inloraclion...................................................................................... 295
Bus Snooping/Snarfing ................................................................................................. 295
Coloroncy via Caclo IIusling...................................................................................... 297
Soflvaro-Inforcod Coloroncy...................................................................................... 298

IuIIy-Associalivo Caclo................................................................................................. 299
Dirocl-Mappod Caclo (Ono-Way Sol-Associalivo) .................................................... 301
Tvo-Way Sol-Associalivo Caclo.................................................................................. 304
Iour-Way Sol-Associalivo Caclo.................................................................................. 307
Ioasl-RoconlIy Usod (IRU) AIgorillm........................................................................ 307

-

Caclo Iino Sizo ............................................................................................................... 308
Caclo Sizo........................................................................................................................ 310
Iirsl-IovoI Caclo Sizo............................................................................................. 310
Socond-IovoI Caclo Sizo ........................................................................................ 310
--


-


Inlroduclion..................................................................................................................... 315
IusibIo-IinI IROM........................................................................................................ 317
MasIod ROM (MROM) ................................................................................................. 317
IrasoabIo IrogrammabIo Road-OnIy Momory (IIROM) ......................................... 318
IIoclricaIIy IrasoabIo IrogrammabIo Road-OnIy Momory (IIIROM) .................. 319
IIasl IIIROM................................................................................................................ 320
ROM's Inlorfaco lo Syslom ............................................................................................ 320
-
Tosling.............................................................................................................................. 322
Sladov RAM.................................................................................................................. 324
Sladov RAM and ROM Occupying Difforonl Addross Spacos ....................... 324
Sladov RAM and ROM Occupy Samo Addross Spaco..................................... 325
DoubIo Mapping ROM and Sladov RAM Addross Spaco............................... 325
Rocovoring Unusod ROM Addross Spaco............................................................ 326
32KB Syslom Board ROM Configuralion.................................................................... 327
64KB Syslom Board ROM Configuralion.................................................................... 329
- - -
-
-

-- -
-
-
-

-

-

-- -

-

- - -

-- -
-- -
Slandard 16-bil Momory Dovico ISA Bus CycIo......................................................... 355
Slandard 16-bil I/O Dovico ISA Bus CycIo ................................................................. 359
0-Wail Slalo Accoss lo 16-bil Momory Dovico ............................................................ 362
--
-
-- -- -
Inlorrupl AcInovIodgo Bus CycIos.............................................................................. 369
Saving Ioinlor lo Inlorruplod Irogram...................................................................... 373
CIoaring llo Inlorrupl InabIo IIag............................................................................... 378
}umping lo llo ISR.......................................................................................................... 378
Rosuming llo Inlorruplod Irogram............................................................................. 379
-
--
---

- -
Gonoraling llo Inlorrupl Roquosl................................................................................. 391
Inlorrupl TabIo IniliaIizalion Add-in Dovicos ......................................................... 392
Slarod Inlorrupl Irocoduro .......................................................................................... 393
-

Inlroduclion..................................................................................................................... 396
Irogramming llo Rogislors........................................................................................... 396
- --
-
Soflvaro Ixcoplions ....................................................................................................... 402
Soflvaro Inlorrupl Inslruclion...................................................................................... 403
-
--



DMA Transfor Typos...................................................................................................... 414
DMA Transfor Modos .................................................................................................... 414
SingIo Transfor Modo.............................................................................................. 415
BIocI Transfor Modo............................................................................................... 416

-

Domand Transfor Modo.......................................................................................... 416
Cascado Modo.......................................................................................................... 417
DMAC Iriorily Iogic..................................................................................................... 417
DMA Bus CycIo............................................................................................................... 420
--
--
Addrossing ISA Momory............................................................................................... 427
Addrossing IocaI Bus Momory .................................................................................... 428
Addross TransIalion....................................................................................................... 430
Dala Bus Slooring............................................................................................................ 430
-

- --
- -
- -- --
Addross TransIalion....................................................................................................... 438
Dala Bus Slooring............................................................................................................ 438
- -- -


-- -
-- -

-
-
-
-
Koyboard.......................................................................................................................... 450
Mouso............................................................................................................................... 450
-
Hol Rosol.......................................................................................................................... 451
A20 Galo........................................................................................................................... 451
IocaI Iorl Dofinilion ...................................................................................................... 452
-
Command/Slalus Iorl................................................................................................... 454
Dala Iorl .......................................................................................................................... 456

--



-

-- -
-- -
-- -
--
Inlroduclion..................................................................................................................... 467
Sysloms Incorporaling }usl llo WoiloI........................................................................ 467
GonoraI ...................................................................................................................... 467
WoiloI HandIing of InloI Coprocossor Inslruclions............................................ 467
Sysloms Incorporaling Boll Coprocossor Typos........................................................ 468
-
-
-
-



-
--
-- -



-

-
-
--- - -
-
-- -
-
- -
-
-
- -- --
- -
--
- -- -
--
--
-- --
- -- - -- - -
--
--
- --
-- -- -- -
--
--
- --
-- - - -
- -
- -- - -
-- -- -
--
-




-- -
-

- -- --
-


-

-
-
-
--
- --
-
--
-
-
-
-
--
--
- - --
--
- --
--
-
-
--
- -- - --
- -
- -
-- -
-
-
- -
- -
-
-
-

-- - -

--
--
-




-

-



- --
--


-- -
-

-
-
- -
--
--

--

-

- -
- -
- -
-
-

- -- -
- -- -

--
--
--
--




- -
- -
- -
-
-
-

-

- -
--
- -
- -
-
--
- --
- --
-- -
--
- -
- - -- -
-- - --



--
-
--
--























-

-
TabIo 4-1. Slalo of llo Addross Iinos Wlon Any Momory Addross in
Rango I0000l lo IIIIIl Is Addrossod..........................................................................43
TabIo 4-2. Slalo of llo Addross Iinos vlon any Momory Addross in
Rango I0000l lo IIIIIl Is Addrossod ......................................................................... 44
TabIo 4-3. Syslom Board I/O Addross Sub-Rango Assignmonls........................................48
TabIo 4-4. 74138 Oulpul SoIoclion Criloria............................................................................50
TabIo 4-5. I/O Addross Rango Assignod lo Iacl Syslom Board Dovico...........................52
TabIo 5-1. Tlo IIag Rogislor's Slalus, ConlroI and Syslom Bils ..........................................61
TabIo 5-2. Tlo 80286 MSW Rogislor Bils................................................................................62
TabIo 5-3. IillIo-Indian Bylo Ordoring.................................................................................. 74
TabIo 5-4. Big-Indian Bylo Ordoring (nol usod on x86) ...................................................... 74
TabIo 5-5. Momory Conlonls ................................................................................................... 75
TabIo 5-6. Binary Woigllod VaIuo of oacl Addross Iino.................................................... 86
TabIo 5-7. Transfor Sizo Indicalod by A0 and BHI ............................................................ 87
TabIo 5-8. IxampIos of Ivon and Odd Addrossos................................................................89
TabIo 5-9. Bus CycIo Dofinilion...............................................................................................90
TabIo 5-10. Allribulo Bylo Dofinilion ...................................................................................105
TabIo 6-1. CMOS Rosol Codo Dofinilion.............................................................................. 112
TabIo 7-1. VaIuos Irosol Inlo 8086 and 8088 Microprocossor Rogislors by RISIT........ 115
TabIo 7-2. Slalo of 80386DX Oulpuls WliIo RISIT is Assorlod....................................... 115
TabIo 7-3. Slalo of 80286 Oulpuls WliIo RISIT Is Assorlod ............................................115
TabIo 8-1. Numbor of Wail SlalosDofauIl Roady Timor ................................................ 135
TabIo 9-1. 80286 Bus CycIo Dofinilion.................................................................................. 140
TabIo 9-2. 80286 and 80386 Bus CycIo Slalo Namos ...........................................................140
TabIo 10-1. Iormal of Iago TabIo Inlry Allribulo Bils ...................................................... 168
TabIo 10-2. SignaIs Common lo llo 80286 and 80386DX Microprocossors.....................175
TabIo 10-3. IxampIo Addrossos Oulpul by an 80386DX...................................................177
TabIo 10-4. RoIalionslip of 80386DX Bylo InabIos, Dala Ialls and
Iocalions in llo CurronlIy-Addrossod DoubIovord ................................................. 178
TabIo 10-5. RoIalionslip of Addrossos and Bylo InabIos Oulpul by an 80386DX......... 180
TabIo 10-6. 80386DX Addrossing IxampIos........................................................................180
TabIo 10-7. 80386DX Bylo InabIo Combinalions................................................................181
TabIo 10-8. IxampIo Inslruclions and RosuIlanl Addrossos .............................................182
TabIo 10-9. 80386 Bus CycIo Dofinilion................................................................................ 185
TabIo 10-10. Inlorfaco SignaIs Tlal Difforonlialo llo 80386SX from
llo 80386DX Microprocossor.........................................................................................188
TabIo 12-1. 80386 Bus Unil Slalos .........................................................................................230
TabIo 14-1. Caclo Sizo vs. Hil Ralo....................................................................................... 310
TabIo 15-1. Tlo ROM's Inlorfaco SignaIs .............................................................................321

-

TabIo 16-1. Tlo ISA Addross-RoIalod SignaIs..................................................................... 338
TabIo 16-2. Tlo ISA Dala Bus Ialls ..................................................................................... 339
TabIo 16-3. Bus CycIo Dofinilion Iino Docoding ................................................................ 339
TabIo 16-4. Tlo ISA Command Iinos................................................................................... 340
TabIo 16-5. Bus CycIo Timing SignaIs .................................................................................. 341
TabIo 16-6. Tlo Sizo 16 SignaI Iinos..................................................................................... 344
TabIo 16-7. Tlo ISA DMA SignaI Iinos and Associalod Syslom Board Iogic................345
TabIo 16-8. ISA Bus Inlorrupl Roquosl Iino Assignmonl ..................................................347
TabIo 16-9. Inlorrupl Roquosl Iino Assignmonl, Iinos Nol on ISA Bus..........................347
TabIo 16-10. Tlo ISA Irror Roporling SignaI ......................................................................349
TabIo 16-11. MiscoIIanoous ISA SignaIs ............................................................................... 350
TabIo 18-1. Slandard ISA Inlorrupl TabIo onlry numbor Assignmonls........................... 389
TabIo 18-2. IniliaIizalion Soquonco for llo Maslor Inlorrupl ConlroIIor ......................... 397
TabIo 18-3. IniliaIizalion Soquonco for llo SIavo Inlorrupl ConlroIIor ............................398
TabIo 18-4. Syslom ConlroI Iorl B al I/O Addross 0061l (Road) .................................... 400
TabIo 18-5. Syslom ConlroI Iorl A al I/O Addross 0092l ................................................400
TabIo 18-6. Inlorrupl TabIo Inlry Assignmonl....................................................................403
TabIo 19-1. DMA CIocI Iroquoncy....................................................................................... 420
TabIo 19-2. DMAC Slalos ....................................................................................................... 421
TabIo 19-3. DMAC Momory Addross and Iago RogislorsI/O Iocalions.................... 424
TabIo 19-4. ISA DMA Transfor Ralos ...................................................................................431
TabIo 19-5. IniliaIizalion of DMACs..................................................................................... 432
TabIo 21-1. Tlo RoaI-Timo CIocI Bylos................................................................................ 443
TabIo 21-2. RTC Slalus Rogislor A........................................................................................444
TabIo 21-3. RTC Slalus Rogislor B.........................................................................................444
TabIo 21-4. RTC Slalus Rogislor C........................................................................................445
TabIo 21-5. RTC Slalus Rogislor D........................................................................................445
TabIo 21-6. Configuralion RAM Usago................................................................................ 446
TabIo 21-7. Tlo Rosol Codo Bylo...........................................................................................447
TabIo 22-1. SampIo Koyboard/Mouso InlorfacoIocaI Inpul Iorl.................................453
TabIo 22-2. SampIo Koyboard/Mouso InlorfacoIocaI Oulpul Iorl .............................453
TabIo 22-3. Koyboard/Mouso InlorfacoTosl Iorl ...........................................................453
TabIo 22-4. 8042 SampIo Koyboard/Mouso Inlorfaco Command Iisl .............................455
TabIo 23-1. Tlo Numoric Coprocossor ConlroI Bils in llo MSW Rogislor ...................... 460
TabIo 23-2. InloI Coprocossor/Irocossor Communicalion SignaIs ..................................464
TabIo 23-3. WoiloI Inlorprolalion of llo Momory Addross .............................................. 468









Havo you ovor slarlod using a nov looI and slorlIy lloroaflor vondorod lov
in llo vorId you ovor gol aIong villoul il` WoII, llal is lov I fooI aboul llis
booI, and many of my loclnicaI compalriols loro al DoII Compulor Corpora-
lion vouId agroo. Iol's faco il, llo fasl moving compulor vorId is lroaclorous
and foIIovs Darvin's Iav of SurvivaI of llo Iillosl, vloro llo slrong survivo
and llo voaI gol oalon. Don Andorson and Tom SlanIoy lavo providod you
vill a moclanism lo maximizo your clancos of survivaI in llis oxciling vorId
of compulors.

- is vlal I caII llo missing IinI. Tloro oxisl many com-
pIomonlary looIs lo llis booI sucl as various clip dala booIs, programming
manuaIs, Iigll arclilocluro booIs, lov lo booIs, Iogic anaIyzors, scopos,
dobuggors, digilaI Iogic loxlbooIs and so forll, bul nono llal doscribo llo AT
arclilocluro from a syslom poinl of viov in sucl an organizod and undorsland-
abIo faslion. AII of llo fundamonlaI and crilicaI aroas of a funclionaI ISA sys-
lom aro oxpIainod in dolaiI vill diagrams and oxampIos incIuding bus cycIos,
addrossing, I/O and momory, docodo Iogic, rosol Iogic, povor-up, microproc-
ossors, llo syslom IornoI, RAM, caclo, ROM, inlorrupls, DMA, busmasloring,
RTC and configuralion RAM, Ioyboard/mouso inlorfaco, coprocossor, limors,
and moro. Irgo, you'vo gol a comprolonsivo roforonco on AT syslom funclion-
aIily, you'vo gol llo missing IinI.

Wo voro forlunalo lo lavo Don and Tom conducl sovoraI lraining cIassos basod
on llis booI loro al DoII (and conlinuo lo do so). Mombors of my group consisl
of onginoors and loclnicians vlo aro firsl lo losl sysloms aflor lloy Ioavo do-
voIopmonl, vo porform a varioly of losls incIuding lardvaro, soflvaro, and
onvironmonlaI losls. Tlo informalion oblainod from llis cIass and booI vas
oxcoIIonl, bul vlal vas pIoasanlIy surprising vas llo roaclion of llo foIIs vlo
allondod lloso sossions. During llo cIassos and rigll aflor, lloro voro poopIo
llrougloul llo Iab vill big grins saying somolling lo llo offocl of Tlis is
groal. I'vo boon vanling lo lio aII of llis informalion logollor so I couId nol
onIy undorsland il fuIIy, bul pul il lo good uso. And lloy lavo pul llo infor-
malion lo good uso, vlicl las loIpod us improvo our procoss and losl smarlor.

Tlis booI is quilo vaIuabIo as a lraining looI. Tlo firsl loclnicaI Iiloraluro llal a
nov onginoor or loclnician in my group sludios is llis booI. Tlis aIIovs lim or
lor lo Ioarn nol onIy llo syslom bul llo fundamonlaIs roquirod lo losl and
lroubIoslool a syslom in llo mosl officionl vay. Many loclnicaI managors in
ollor groups loro sucl as dosign, manufacluring, suslaining, loclnicaI supporl,
and ropair uso llis booI in a simiIar mannor. As a mallor of facl, lraining
cIassos using llis booI aro avaiIabIo on a fairIy roguIar basis villin our onliro
organizalion. Nol onIy do our loclnicaI poopIo lavo a sound foundalion on llo

-

buiIding bIocIs of a syslom, bul llrougloul llo company, llo lorminoIogy
usod is consislonl. A BAII is a BAII is a BAII llrougloul llo company.

IinaIIy, I'd IiIo lo oxpand on llo concopl of losling smarlor and improving your
procoss. AII of us in llis businoss Inov llal vo musl improvo our procossos lo
succossfuIIy compolo. Wo nood lo docroaso our limo-lo-marIol cycIos, porform
moro compIox procossos in llis slorlor limo poriod, and acliovo llis improvo-
monl on incroasingIy compIox producls. Tlis is a roaI, nol imaginary, burdon lo
boar Hovovor, if impIomonlod succossfuIIy, llo bonofils Ivo monlionod can bo
allainod in addilion lo improvod mollods and llrouglpul, bollor lroubIoslool-
ing loclniquos, roduclion in fioId rolurns, and an incroaso in cuslomor sorvico
quaIily. Quilo simpIy, llis loxl can bo usod as a parl of llis procoss.

In cIosing, I'd IiIo lo commond Don and Tom for a job voII dono. Tloro is no
doubl llal lloir bIood, svoal and loars lavo producod an immonsoIy vaIuabIo
loclnicaI vorI llal lloy can voII bo proud of. Tlo booI is an invaIuabIo looI
and roforonco on ISA arclilocluro and limo roading il is limo voII sponl. You
migll jusl ond up vondoring lov you ovor gol aIong villoul il


- -


-



- -- -
- -

- --
-





-

The MindShare Architecture Series
Tlo MindSlaro Arclilocluro booI sorios incIudos: - ,
- - - ,
- - -
- , and -

Rallor llan dupIicaling common informalion in oacl booI, llo sorios usos llo
buiIding-bIocI approacl. - is llo coro booI upon vlicl
llo ollors buiId. Tlo figuro llal foIIovs iIIuslralos llo roIalionslip of llo booIs
lo oacl ollor.



-
II alform
Indopondonl

-

Organization of This Book
- is dividod inlo llroo parls:

- . Tlis soclion providos a dolaiIod luloriaI on
lov InloI X86 microprocossors communicalo vill momory and I/O do-
vicos. IncIudod is llo supporl Iogic vlicl aIIovs llo microprocossor lo
communicalo vill 8- and 16-bil dovicos and dolaiIod doscriplions of llo
signaIs and liming invoIvod in aII Bus CycIo lypos.
---. Tlo momory soclion providos a dolaiIod llo-
ory of oporalion of RAM and ROM dovicos, aIong vill impIomonlalions
commonIy usod in ISA sysloms. Tlo soclion aIso covors llo concopls and
lorminoIogy roIalod lo caclo momory dosigns.
- . Tlis soclion providos a do-
laiIod discussion of llo ISA Bus Arclilocluro incIuding ISA bus cycIos and
liming, aIong vill ISA impIomonlalions of Inlorrupls, DMA, RoaI-Timo
CIocI and Configuralion RAM, Numoric Coprocossors, Koyboard/Mouso
Inlorfaco, and Timors.
Who This Book Is For
Tlis booI is inlondod for uso by lardvaro and soflvaro dosign and supporl
porsonnoI. Duo lo llo cIoar, conciso oxpIanalory mollods usod lo doscribo oacl
subjocl, porsonnoI oulsido of llo dosign fioId may aIso find llo loxl usofuI.
Prerequisite KnowIedge
Tlo approacl laIon by llis booI assumos modoralo loclnicaI InovIodgo on
llo parl of llo loclnicaI audionco. Il is assumod llal llo roador las lad oxpo-
suro lo ICs in a loclnicaI capacily (lardvaro dosignor, programmor, loclnicaI
supporl, ropair, and so on). IamiIiarily vill llo binary and loxadocimaI num-
boring sysloms and lloir appIicalion lo oIoclronic compuling is ossonliaI. To on-
suro an oplimum IovoI of undorslanding, ovory allompl is mado lo oxpIain
lorminoIogy as il is oncounlorod and lo avoid myslifying lorms.


-

Documentation Conventions
Tlis soclion dofinos llo lypograplicaI convonlions usod llrougloul llis booI.
Hex Notation
AII lox numbors aro foIIovod by an l. IxampIos:



Binary Notation
AII binary numbors aro foIIovod by a b. IxampIos:



DecimaI Notation
Wlon roquirod for cIarily, aII docimaI numbors aro foIIovod by a d. Ixam-
pIos:



SignaI Name Representation
Iacl signaI llal assumos llo Iogic Iov slalo vlon assorlod is foIIovod by a
pound sign (). As an oxampIo, llo RIIRISH signaI is assorlod Iov vlon llo
rofrosl Iogic runs a rofrosl bus cycIo.

SignaIs llal aro nol foIIovod by a pound sign aro assorlod vlon lloy assumo
llo Iogic ligl slalo. As an oxampIo, DRIQ3 is assorlod ligl lo indicalo llal a
dovico using DMA ClannoI llroo is roady for dala lo bo lransforrod.


-

Identification of Bit FieIds IogicaI groups of bits or
signaIs)
AII bil fioIds aro dosignalod as foIIovs:

|X:Y]

vloro X is llo mosl-significanl bil and Y is llo Ioasl-significanl bil of llo
fioId. As an oxampIo, llo ISA dala bus consisls of SD|15:0], vloro SD15 is llo
mosl-significanl and SD0 llo Ioasl-significanl bil of llo fioId.
We Want Your Feedback
MindSlaro vaIuos your commonls and suggoslions. You can conlacl us via
maiI, plono, fax or inlornol omaiI.

(800) 633-1440
(719) 487-1434
lommindslaro.com

Web Site
Bocauso vo aro conslanlIy on llo road loacling, vo can bo difficuIl lo gol loId
of. To loIp aIIovialo probIoms associalod vill our migralory labils, vo lavo a
vob silo lo suppIy llo foIIoving sorvicos:

DovnIoad courso abslracls.
DovnIoad labIos of conlonls of oacl booI in llo sorios.
IaciIily lo inquiro aboul pubIic arclilocluro sominars.
IaciIily lo viov booI orrala and cIarificalions.

: vvv.mindslaro.com
MaiIing Address
MindSlaro, Inc.
4285 SIasl Iino Dr.
CoIorado Springs, CO 80908



Tlis booI dolaiIs llo oporalion of ISA sysloms. Iiguro 1 boIov iIIuslralos mosl
of llo subsysloms covorod. Tlo booI is dividod inlo llroo major parls:

Tlo Syslom KornoI
Momory Subsysloms
Tlo Induslry Slandard Arclilocluro


-
Bus
Controller
System
Memory
System
ROM
DMA
Subsystem
nterrupt
Subsystem
Keyboard
Subsystem
RTC
Config
RAM
SA
Timers
Host Bus
SA
Expansion
Slots
Memory Subsystem System Kernel
SA Subsystem
Clock
Micro-
Processor

-

In addilion lo dolaiIod anaIysis of llo lardvaro, many programming oxampIos
aro covorod vill llo purposo of lying llo soflvaro and lardvaro logollor. Tlis
providos a vory comprolonsivo undorslanding of syslom oporalion.

Rofor lo figuro 1 during llo foIIoving discussion of oacl major soclion.
-
Tlo syslom IornoI consisls of llo microprocossor and bus conlroI Iogic, as voII
as ollor supporl circuilry nol slovn in figuro 1. Tlo IornoI providos llo basic
signaI, liming and prolocoIs nocossary for llo microprocossor lo communicalo
vill llo rosl of llo syslom.

Tlis soclion providos a dolaiIod luloriaI on lov InloI X86 microprocossors
communicalo vill momory and I/O dovicos. IncIudod is llo supporl Iogic
vlicl aIIovs llo microprocossor lo communicalo vill 8- and 16-bil dovicos
and dolaiIod doscriplions of llo signaIs and liming invoIvod in aII Bus CycIo
lypos.

SovoraI IornoI impIomonlalions aro possibIo vill ISA sysloms doponding on
llo oxacl procossor usod. Sinco ISA Arclilocluro is basod on llo 8MHz IBM
IC/AT, llo iniliaI IornoI discussion is basod on llo InloI 80286 microprocossor
running al 8MHz. 80286 microprocossors running al spoods faslor llan 8MHz
roquiro sIigll modificalion lo llo IornoI. Moro draslic clangos aro roquirod
vlon using an 80386, 80486 or Ionlium microprocossor in ISA sysloms. AII ma-
jor varialions lo IornoI dosign and impIomonlalion aro covorod. Nolo llal a
llorougl undorslanding of llo 80286 IornoI is ossonliaI boforo sludying llo
80386 IornoI and llal a llorougl undorslanding of llo 80386 IornoI is ossonliaI
boforo sludying llo 80486 and Ionlium procossors.
---
Momory subsysloms incIudo main syslom momory, syslom ROM, and caclo
momory nol slovn in figuro 1). Dosign of llo momory subsyslom is Ioy lo ob-
laining maximum syslom porformanco al a roasonabIo prico. A vido varioly of
momory dovicos aro usod in ISA sysloms lo acliovo ligl yol oconomicaI por-
formanco. AIong vill lloso dovicos como various momory arclilocluros aIso
dosignod lo incroaso syslom porformanco.




Tlo momory soclion providos a dolaiIod lloory of oporalion of RAM and ROM
dovicos, aIong vill impIomonlalions commonIy usod in ISA sysloms. Tlo soc-
lion aIso covors llo concopls and lorminoIogy roIalod lo caclo momory dosigns.
--
Tlo ISA subsyslom incIudos llo bus slrucluros and slandard dovicos usod in aII
ISA sysloms. Tlo ISA busos oporalo al spoods of 8MHz lo 8.33MHz and in-
cIudo abiIily lo communicalo vill boll 8- and 16-bil dovicos. By laving a rango
of aIIovabIo bus spoods, llo syslom dosignor can oasiIy divido llo microprocos-
sors cIocI froquoncy dovn lo llo ISA cIocI froquoncy. Spocific funclions com-
mon lo aII ISA sysloms incIudo Dirocl Momory Accoss DMA), Inlorrupls,
Koyboard, RoaI-Timo CIocI RTC) and Configuralion RAM, and llo ISA Tim-
ors. Iacl of lloso funclions musl oporalo according lo ISA slandards.

Tlis soclion providos a dolaiIod discussion of llo ISA Bus Arclilocluro incIud-
ing ISA bus cycIos and liming, aIong vill ISA impIomonlalions of Inlorrupls,
DMA, RoaI-Timo CIocI and Configuralion RAM, Numoric Coprocossors, Koy-
board/Mouso Inlorfaco, and Timors.

Somo funclions villin ISA sysloms can bo impIomonlod in difforonl vays do-
ponding on manufacluror proforonco, vliIo ollors musl conform lo prociso ISA
slandards. Iloms llal can bo impIomonlod in difforonl vays aro doscribod in
gonoraI and foIIovod by spocific oxampIos llal lavo boon closon basod on
common or mosl roconl impIomonlalions.
-

Tlo ISA bus slrucluro is basod parliaIIy on llo firsl InloI-basod IC: llo IBM IC.
Tlo originaI IC usod an InloI 8088 running al 4.77MHz, Iimiling llo oxpansion
bus for llis syslom lo oigll dala Iinos and lvonly addross Iinos. Subsoquonl do-
signs of llo IC incIudod supporl for foaluros sucl as fixod disI drivos, bul llo
bus slrucluro romainod llo samo lo onsuro conlinuing compalibiIily for a grov-
ing numbor of oxpansion dovicos.

-


Tlo InloI 80286-basod IC/AT mainlainod compalibiIily vill llo IC and of-
forod addilionaI capabiIily. IBM dosignod llo IC/AT so llal 8-bil boards usod
in llo originaI IC couId vorI in llo IC/AT. To accommodalo llo sixloon dala
Iinos and lvonly-four addross Iinos of llo InloI 80286, IBM dosignod an addi-
lionaI connoclor lo oxlond llo 8-bil IC connoclor. Tloso lvo connoclors bocamo
llo nov induslry slandard.

Syslom compalibiIily vill ISA vas originaIIy basod on llo 8MHz IBM IC/AT,
lovovor, no vrillon spocificalion on llo syslom arclilocluro vas avaiIabIo. Tlo
acid losl for soflvaro and lardvaro compalibiIily vas if il ran on llo 8MHz
IC/AT il vas compalibIo. Tlal is, if soflvaro and lardvaro ran succossfuIIy
on a IC/AT il slouId aIso run on a compalibIo maclino. Tlo IacI of a slandard
lovovor, croalod numorous probIoms for dosignors of boll soflvaro and
lardvaro.

Tlo signaIs found on oacl ISA sIol can bo dividod inlo llroo basic calogorios:

Tlo Addross Bus group
Tlo ConlroI Bus group
Tlo Dala Bus group

Tloso signaI groups aro prosonl on llo 8- and 16-bil oxpansion sIols found in aII
ISA-compalibIo and IBM IC producls. In an ISA syslom, oacl of lloso signaI
groups las boon oxlondod lo provido addilionaI capabiIily nol found in llo
IBM IC and IC/XT arclilocluro.

Tlo ISA slandard oncompassos moro llan jusl llo slrucluro of llo oxpansion
connoclors. Tlo ISA syslom musl aIso provido supporl Iogic for inlorrupl lan-
dIing, dirocl momory accoss, limors, orror landIing, llo Ioyboard inlorfaco, and
configuralion RAM. AddilionaIIy, llo IBM IC/AT and ISA compalibIos, pro-
vido Iimilod supporl for bus masloring. Tlo foIIoving claplors provido do-
laiIod informalion rogarding ovory aspocl of llo ISA arclilocluro.





-
- -- -
- - - - -
---
-

- -

-- -
-
--
--
--
-

-
-
---
-


-- -


-
Tlis claplor dofinos llo microprocossor's roIo in llo syslom, llo usago of mom-
ory, and dofinos llo roIo of llo addross, conlroI and dala busos.

Tlo noxl claplor, Inlroduclion lo llo Bus CycIo, inlroducos llo concopl of llo
bus cycIo and dofinos llo basic soquonco of ovonls vlon llo microprocossor
usos a bus cycIo lo communicalo vill momory or an I/O dovico.
-

Tlo microprocossor is an ongino vill onIy ono lasI in Iifo lo conlinuaIIy


road inslruclions from momory and oxoculo llom (porform llo oporalions
spocifiod by llo inslruclions).

An inslruclion loIIs llo microprocossor lo porform ono of llroo basic lypos of
oporalions:

Road dala from an oxlornaI dovico.
Wrilo dala lo an oxlornaI dovico.
Iorform an inlornaI oporalion llal doosn'l invoIvo roading from or vriling
lo llo oulsido vorId (sucl as mall funclions).

Nolo As usod in llis booI, llo lorm oxlornaI dovico rofors lo a dovico oxlor-
naI lo llo microprocossor clip ilsoIf. Rofor lo figuro 1-1.

Tlo inslruclions folclod (road) from momory loII llo microprocossor vlal lo
do. Wlon a microprocossor-basod syslom is iniliaIIy povorod up, llo micro-
procossor Inovs vlal addross in momory lo folcl (road) ils firsl inslruclion
from. Tlis Iocalion is Inovn as llo povor-on roslarl addross. A group of in-

-

slruclions llal causo llo microprocossor lo porform a parlicuIar lasI is roforrod
lo as a program. Aflor folcling llo firsl inslruclion from llo roslarl addross, llo
microprocossor is lolaIIy dopondonl on llo program lo loII il vlal lo do.

In a proporIy funclioning syslom, llo microprocossor is novor idIo. Al any
givon momonl in limo, llo microprocossor is roading dala from an oxlornaI do-
vico, vriling dala lo an oxlornaI dovico, or oxoculing an inslruclion llal doosn'l
roquiro llal a road or vrilo laIo pIaco (for oxampIo, an inslruclion lo add llo
conlonls of lvo of llo microprocossor's inlornaI rogislors logollor).

Tlo microprocossor communicalos vill aII oxlornaI dovicos by roading dala
from llom or vriling dala lo llom. Tlo lorms road and vrilo aro oxlromoIy im-
porlanl in any discussion of microprocossors. AIvays llinI of roading and
vriling from llo poinl of viov of llo microprocossor rallor llan from llal of
llo dovico llo microprocossor is communicaling vill. Tlo microprocossor doos
llo roading and vriling. Dovicos aro road from and vrillon lo by llo micro-
procossor. If you llinI of llo lorms road and vrilo from llo dovico's poinl of
viov, mucl of llo informalion in llis booI viII nol maIo sonso.


-- -


--- - -

Wlon a microprocossor folclos an inslruclion from a momory Iocalion and oxo-
culos il, llo addross of llo noxl inslruclion may or may nol bo spocifiod as parl
of llo curronlIy oxoculing inslruclion.

Caso 1: Tlo curronlIy oxoculing inslruclion doosn'l spocify llo momory
addross of llo noxl inslruclion. Tlo microprocossor aulomalicaIIy
assumos llo noxl inslruclion is lo bo folclod from llo noxl soquonliaI
momory Iocalion.
or
Caso 2: Tlo curronlIy oxoculing inslruclion spocifios llo momory addross of
llo noxl inslruclion. Ixoculion of llo inslruclion, caIIod a jump
inslruclion, causos llo microprocossor lo aIlor ils program fIov (vlicl
is usuaIIy soquonliaI). Rallor llan folcling ils noxl inslruclion from llo

-

noxl soquonliaI momory Iocalion, llo microprocossor folclos il from llo
momory Iocalion spocifiod by llo inslruclion.

Aflor oxoculing a }UMI inslruclion, llo microprocossor rosumos folcling in-
slruclions from soquonliaI momory Iocalions unliI anollor }UMI inslruclion is
oxoculod. Mosl voII-vrillon programs do nol conlain an oxcossivo numbor of
}UMIs. SlalislicaIIy llon, llo microprocossor is oxoculing non-jump inslruc-
lions llo majorily of llo limo. Tlis moans llal llo microprocossor is porforming
vlal is commonIy roforrod lo as in-Iino codo folclos mosl of llo limo.

As an oxampIo, rofor lo figuro 1-2. Assumo llal llo microprocossor las jusl
folclod llo ADD inslruclion from Iocalion 00000l in momory. Tlo fIov of in-
slruclions folclod and oxoculod procoods as foIIovs:

1. Tlo microprocossor oxoculos llo ADD inslruclion folclod from Iocalion
00000l. Sinco il's nol a }UMI inslruclion, llo microprocossor folclos ils
noxl inslruclion from momory Iocalion 00001l.
2. Tlo microprocossor oxoculos llo SUBTRACT inslruclion folclod from Ioca-
lion 1. Sinco il's nol a }UMI, llo microprocossor folclos ils noxl inslruclion
from momory Iocalion 00002l.
3. Tlo microprocossor oxoculos llo MOVI inslruclion folclod from Iocalion 2.
Sinco il's nol a }UMI, llo microprocossor folclos ils noxl inslruclion from
momory Iocalion 00003l.
4. Tlo microprocossor oxoculos llo }UMI 10000 inslruclion folclod from Ioca-
lion 3. Tlo }UMI inslruclion aIlors program fIov. Rallor llan folcl ils noxl
inslruclion from llo noxl soquonliaI momory Iocalion (00004l), llo micro-
procossor folclos il from momory Iocalion 10000l.
5. Tlo microprocossor oxoculos llo MOVI inslruclion folclod from Iocalion
10000l. Sinco il's nol a }UMI, llo microprocossor folclos ils noxl inslruc-
lion from momory Iocalion 10001l.
6. And so on.


-- -


-

Tlo microprocossor communicalos vill oxlornaI dovicos undor llo foIIoving
circumslancos:

To folcl (road) llo noxl inslruclion from momory.
Wlon llo curronlIy oxoculing inslruclion dirocls llo microprocossor lo
road dala from an oxlornaI dovico.
Wlon llo curronlIy oxoculing inslruclion dirocls llo microprocossor lo
vrilo dala lo an oxlornaI dovico.



















-

Tlo microprocossor communicalos vill oxlornaI dovicos undor somo ollor
spociaI circumslancos as voII, bul roading or vriling occurs for ono of llo llroo
roasons cilod abovo mosl of llo limo.

Tlo microprocossor roads llo foIIoving lypos of informalion from momory:

Inslruclions
Dala

Tlo microprocossor roads inslruclions from momory on an on-going basis.
Dala, vrillon inlo a momory Iocalion by a proviousIy oxoculod inslruclion, is
road from momory vlon llo microprocossor oxoculos an inslruclion llal loIIs il
lo road dala from llo momory Iocalion.

Tlo InloI x86 microprocossors can onIy vrilo dala, nol inslruclions, inlo mom-
ory Iocalions. Inslruclions aro novor vrillon inlo momory by llo microprocos-
sor. Inslruclions (llo program) aro road from llo fIoppy disI and vrillon inlo
momory by llo DMA ConlroIIor, nol by llo microprocossor. SimiIarIy, inslruc-
lions may bo road from llo lard disI and vrillon inlo momory by a bus mas-
loring disI conlroIIor, insload of by llo microprocossor. DMA and bus
masloring aro covorod in llo claplors onlilIod Dirocl Momory Accoss (DMA)
and ISA Bus Maslors.

BacI in llo bad oId days, programmors vouId somolimos vrilo programs llal
modifiod llomsoIvos on-llo-fIy by vriling nov inslruclions inlo momory and
llon oxoculing llom. Tlis is Inovn as soIf-modifying codo and, gonoraIIy
spoaIing, programmors vlo vrilo llis lypo of program slouId bo casl inlo llo
pil. Irograms of llis naluro aro a nigllmaro lo undorsland and mainlain, ovon
for llo porson vlo vrolo llom.
--
Wlon llo microprocossor musl road dala from or vrilo dala lo an oxlornaI do-
vico, il usos llroo sols of signaI Iinos lo porform llo road or vrilo oporalion.
Tloy aro:


-- -

Tlo addross bus
Tlo dala bus
Tlo conlroI bus

Tlo foIIoving soclions doscribo llo roIo pIayod by oacl of lloso llroo busos
during a road or vrilo oporalion.
-- -
Tlo microprocossor usos llo addross bus lo idonlify llo oxlornaI dovico (and
Iocalion villin llo dovico) llal il vislos lo communicalo vill.

Tlo addross bus consisls of a numbor of signaI Iinos Inovn as addross Iinos. As
an oxampIo, llo 80286 microprocossor las 24 addross Iinos, roforrod lo as
A|23:0]. Rofor lo figuro 1-3.

Wlon llo microprocossor musl road dala from or vrilo dala lo an oxlornaI do-
vico, il viII pIaco llo addross on llo addross bus signaI Iinos as a pallorn of
onos and zoros. Tlis addross pallorn idonlifios llo oxlornaI dovico and llo Ioca-
lion villin llo dovico. In Iiguro 1-3, llo microprocossor las pIacod addross
000105l on llo addross bus. Ior a roviov of llo loxadocimaI numboring sys-
lom, rofor lo llo appondix.

-



-- -

Iacl dovico las an addross docodor llal dolocls if llo addross curronlIy on llo
addross bus is ono assignod lo ils rospoclivo dovico. If il is, llo addross docodor
llon informs ils associalod dovico llal llo microprocossor is communicaling
vill il. Tlo addrossod dovico llon oxaminos llo addross furllor lo idonlify llo
oxacl Iocalion llo microprocossor is communicaling vill villin llo dovico.
Tlis subjocl is covorod in llo claplor onlilIod Tlo Addross Docodo Iogic.


-- -

- -

Tlo conlroI bus basicaIIy consisls of aII llo microprocossor's signaI Iinos ollor
llan llo addross bus and dala bus Iinos. Tlo fundamonlaI purposos of llo con-
lroI bus aro lo:

Idonlify llo lypo of lransaclion (for oxampIo, as a road or vrilo lransac-
lion).
Synclronizo llo fasl procossor lo llo sIov oxlornaI dovicos il is roading
from or vriling lo.
- -
Tlo microprocossor's onIy purposo in porforming a road or vrilo lransaclion is
lo lransfor dala bolvoon ilsoIf and llo curronlIy addrossod oxlornaI dovico. Tlo
soIo purposo of llo dala bus is lo provido a dala pall for llo lransmission of
llo dala bolvoon llo lvo dovicos. As an oxampIo, llo 80286 microprocossor las
16 dala bus signaI Iinos, dosignalod D|15:0]. Tlis moans llal llo 80286 micro-
procossor can road or vrilo 16 bils of informalion bolvoon ilsoIf and an
oxlornaI dovico during a singIo lransaclion.

Tlo dala bus is oflon roforrod lo as a bi-diroclionaI bus. Tlis doosn'l moan llal
dala can bo lransforrod in boll diroclions simuIlanoousIy, rallor, il moans llal
dala can bo lransforrod from llo microprocossor lo an oxlornaI dovico during a
vrilo oporalion, or from an oxlornaI dovico lo llo microprocossor during a road
oporalion. If dala is ovor sonl in boll diroclions al onco, somolling is broIon
Rofor lo figuro 1-4.

-



-

Nolo llal llo 80286 dala bus las boon iIIuslralod as lvo 8-bil dala palls, rallor
llan as ono 16-bil dala pall. Tlis vas dono for a vory good roason llal is cov-
orod in llo claplor onlilIod Tlo 80286 Microprocossor.




-


-
In Inlroduclion lo Microprocossor Communicalions, llo microprocossor's
roIo in llo syslom, usago of momory, and llo roIo of llo addross, conlroI and
dala busos voro dofinod.
-
Wlon llo microprocossor musl communicalo vill an oxlornaI dovico, il usos ils
busos. Tlo soquonco of ovonls nocossary vlon using llo busos lo porform a
road or vrilo lransaclion is roforrod lo as a bus cycIo. Tlis claplor inlroducos
llo microprocossor's bus unil, llo concopl of a slalo maclino, and dofinos ad-
dross limo, dala limo and llo vail slalo.

Tlo noxl claplor, Addrossing I/O and Momory, providos a dofinilion of an
I/O dovico. Il dofinos llo mollod usod by llo x86 procossors lo dislinguisl
momory and I/O addrossos and llo rango of momory and I/O addrossos avaiI-
abIo lo llo 8088, 8086, 80286, 80386, 80486 and Ionlium microprocossors.

Tlo microprocossor's inlornaI bus unil is a slalo maclino llal porforms llo ro-
quirod bus cycIo vlon llo microprocossor musl communicalo vill anollor do-
vico. Tlo concopl of llo slalo maclino is inlroducod, as voII as llo concopl of
llo cIocI, or limobaso, usod by llo slalo maclino lo dofino llo duralion of oacl
slalo.
-- --
Any lasI is oasior lo porform vlon dividod inlo IogicaI slops. A slalo maclino
is a dovico (oillor moclanicaI, oIoclronic, or soflvaro-basod) dosignod lo por-

-

form a lasI llal can bo dividod inlo slops. Irior lo slarling llo lasI, llo slalo
maclino is said lo bo idIo. Wlon commandod lo porform llo lasI, llo slalo ma-
clino Ioavos llo idIo slalo and movos llrougl a sorios of slops, or slalos. Irodo-
finod porlions of llo ovoraII lasI aro porformod during oacl slalo. Tlo duralion
of oacl slalo is dofinod by a cIocI, or limobaso.

In llo caso of llo aulomalic dislvaslor, llo dislvaslor is idIo unliI you slarl il.
A limor llon bogins lo run, dofining llo duralion of oacl slalo llo dislvaslor
musl pass llrougl in ordor lo accompIisl llo ovoraII lasI of vasling dislos.
Tloso slalos aro:

During llo firsl slalo, llo slalo maclino vols dovn llo dislos.
During llo socond slalo, llo dislos aro soapod.
During llo llird slalo, llo dislos aro rinsod.
During llo fourll and finaI slalo, llo dislos aro driod.
Tlo slalo maclino llon rolurns lo llo idIo slalo.

Mosl dislvaslors aIso lavo ono or moro svilclos llo usor can manipuIalo lo
aIlor llo soquonco of slalos or possibIy lo causo llo maclino lo oxoculo a par-
licuIar slalo moro llan onco. A porfocl oxampIo vouId bo llo Iol Scrubbor
bullon. Wlon prossod, llis migll causo llo slalo maclino lo oxoculo llo rinso
slalo lvo limos insload of ono.
-
Ivory x86 microprocossor las an inpul caIIod CIOCK (or a simiIar namo). Tlis
signaI is producod vlon a voIlago is appIiod lo a cryslaI osciIIalor. Il llon bo-
gins lo gonoralo an oIoclricaI signaI of a spocific froquoncy. In ossonco, llo osciI-
Ialor acls as a liglIy accuralo oIoclronic luning forI. Tlo signaI IooIs IiIo
Iiguro 2-1.


- -

AII microprocossors porform lloir oporalions in a liglIy organizod, pro-
dofinod faslion. Iorlions of oacl lasI aro aIvays porformod during pro-
dofinod limo sIols. Tlo duralion of oacl limo sIol is dofinod by llo oulpul of llo
cryslaI osciIIalor.


-

IndiroclIy, llo 80286 and 80386 microprocossors uso llo CIOCK inpul lo do-
fino llo Iongll of a limo sIol. Tloy divido llo froquoncy of llo CIOCK inpul by
lvo lo yioId an inlornaI limobaso roforrod lo as llo Irocossor CIocI (ICIK).
Tlo CIOCK inpul is roforrod lo as a doubIo-froquoncy cIocI bocauso ils fro-
quoncy is doubIo llal of llo roquirod ICIK. Tlo 486DX microprocossor, on llo
ollor land, usos llo CIOCK inpul as llo ICIK villoul dividing il. CIocI-
doubIing or cIocI-muIlipIying procossors, sucl as llo DX4, uso plaso-IocIod
Ioops or simiIar loclnoIogy lo muIlipIy (insload of divido) llo CIOCK signaI lo
produco a ICIK llal is faslor llan CIOCK.

ICIK is llo roaI molronomo llal dofinos llo duralion of llo limo sIols during
vlicl llo microprocossor porforms a lasI or a pro-dofinod porlion of a lasI.
Rofor lo Iiguro 2-2.


-

As iIIuslralod in figuro 2-2, ICIK is laIf llo froquoncy of CIOCK. Wlon a IC
manufacluror rofors lo llo oporaling spood of lloir compulor as 8MHz (moga-
lorlz, or miIIion cycIos-por-socond), 10MHz, olc., lloy aro roforring lo llo mi-
croprocossor's ICIK froquoncy, nol llal of CIOCK.
--- -
Wlon llo microprocossor porforms a road or a vrilo oporalion, il inilialos a so-
quonco of ovonls caIIod a bus cycIo.

During a bus cycIo, llo microprocossor pIacos llo addross on llo addross bus,
sols llo conlroI bus Iinos lo indicalo llo lypo of lransaclion (sucl as a momory
road or I/O vrilo bus cycIo), and lransfors llo dala bolvoon llo largol Iocalion
and ilsoIf. Tlis lappons in a vory ordorIy faslion, vill oacl slop occurring al
llo propor poinl during llo approprialo limo sIol.

x86 microprocossor clips incIudo a subsyslom caIIod a bus unil, lasIod vill
llo job of running bus cycIos vlon roquirod. Tlo bus unil is a slalo maclino


-

llal is sloppod llrougl ils various slalos by llo ICIK signaI. Tlo duralion of
oacl slalo is ono cycIo of ICIK.

Rofor lo figuro 2-3. As an oxampIo, if llo CIOCK inpul froquoncy is 40MHz (40
miIIion cycIos por socond), llo ICIK froquoncy is laIf llal froquoncy, or
20MHz. In ordor lo dolormino llo duralion of ono cycIo of ICIK, jusl divido 20
miIIion cycIos-por-socond inlo ono socond. In llis oxampIo, a ICIK cycIo is
50ns in duralion (50 nanosoconds, 0.000000050 soconds or 50 biIIionlls of a
socond). Sinco llo bus unil slalo maclino's slalos aro oacl ono ICIK in dura-
lion, llis moans llal oacl bus unil slalo is 50ns in duralion.


-

If nol curronlIy ongagod in a bus cycIo (a road or a vrilo oporalion), llo bus
unil slalo maclino is said lo bo in llo idIo slalo. Il romains in llo idIo slalo unliI
llo microprocossor musl porform a bus cycIo.
--
Wlon llo microprocossor musl porform a road or a vrilo, ils bus unil inilialos a
bus cycIo. Tlo bus unil Ioavos llo idIo slalo and onlors a slalo llal viII bo ro-
forrod lo in llis loxl as addross limo. AIllougl InloI usos a difforonl namo for
llis slalo, addross limo is llo namo llal viII bo usod in llis loxl for cIarily's
saIo. During addross limo, ono ICIK cycIo in duralion, llo microprocossor
pIacos llo addross on llo addross bus and llo bus cycIo dofinilion (lypo of bus
cycIo) on llo conlroI bus Iinos.

- - - - -
- - -
-
-


-


Aflor porforming aII aclions roquirod during addross limo, llo bus unil slalo
maclino immodialoIy onlors llo slalo vo viII rofor lo as dala limo. As vill ad-
dross limo, InloI usos a difforonl namo for llis slalo, bul, for cIarily's saIo, dala
limo is llo namo llal viII bo usod in llis loxl. During dala limo, ono ICIK cy-
cIo in duralion, llo microprocossor oxpocls llo dala lo bo lransforrod bolvoon
ilsoIf and llo curronlIy addrossod dovico. Al llo ond, or lraiIing odgo, of dala
limo (rofor lo roforonco poinl 1 in figuro 2-4), llo microprocossor sampIos (losls
llo slalo of) ils RIADY# inpul lo soo if llo curronlIy addrossod dovico is roady
lo compIolo llo bus cycIo. If llo RIADY# inpul is assorlod (Iov, as indicalod by
llo pound sign), llo bus unil slalo maclino lorminalos llo bus cycIo.

If a road voro in progross, llo bus unil inlorprols an assorlod IovoI on RIADY#
lo moan llal llo curronlIy addrossod dovico las pIacod llo roquoslod dala onlo
llo dala bus for llo microprocossor. Tlo microprocossor roads llo dala from
llo dala bus and lorminalos llo bus cycIo.

If a vrilo voro in progross, llo bus unil inlorprols an assorlod IovoI on RIADY#
lo moan llal llo curronlIy addrossod dovico las accoplod llo dala boing vril-
lon lo il. Tlo microprocossor lorminalos llo bus cycIo. Tlo claplor onlilIod
Tlo 80286 Syslom KornoI: llo Ingino providos a dolaiIod oporalionaI do-
scriplion of llo Roady Iogic. Iiguro 2-4 iIIuslralos a bus cycIo consisling of ad-
dross limo and dala limo.

Tlo 0-vail-slalo bus cycIo is llo faslosl lypo of bus cycIo llo 80286, 80386, 80486
and Ionlium microprocossors aro capabIo of porforming. In ollor vords, llo
faslosl x86 bus cycIo laIos lvo licIs (cycIos) of ICIK. If llis voro an 80386
running al 20MHz (ICIK spood), a 0-vail-slalo bus cycIo vouId laIo 100ns
(50ns oacl for addross limo and dala limo).

-



- -- --

AII bus cycIos consisl of al Ioasl lvo slalos: addross limo and dala limo. Al llo
ond of addross limo and dala limo, lovovor, nol ovory dovico viII bo roady lo
ond a bus cycIo. Somo dovicos aro sIovor llan ollors in rosponding lo llo mi-
croprocossor's dala lransfor roquosls, and aro roforrod lo as sIov accoss dovicos.

Rofor lo figuro 2-5. Wlon llo microprocossor sampIos RIADY# al llo ond of
llo firsl dala limo (soo roforonco poinl 1 in figuro 2-5), RIADY# may nol bo as-
sorlod. Tlis is llo curronlIy addrossod dovico's vay of saying Wloa Wail up
llar big foIIa Wlon llo RIADY# Iino is sampIod doassorlod, il causos llo bus
unil slalo maclino lo ro-onlor llo dala limo slalo again.

During llis addilionaI dala limo, llo microprocossor Ioops aII of ils oulpuls llo
samo. In ollor vords, nolling clangos, llo microprocossor jusl vails ono licI
of ICIK. Tlis is roforrod lo as a vail slalo. Al llo ond of llis addilionaI dala
limo, llo microprocossor sampIos llo RIADY# inpul again (soo roforonco poinl
2 in figuro 2-5) lo soo if llo curronlIy addrossod dovico is roady lo compIolo llo
lransaclion.


--


- --


-

If RIADY# is sampIod doassorlod again, llo microprocossor insorls anollor
dala limo or Wail Slalo inlo llo bus cycIo. Wlon RIADY# is sampIod assorlod
al llo ond of dala limo, llo microprocossor lorminalos llo bus cycIo.

By loIding off llo RIADY# Iino, llo curronlIy addrossod dovico can forco llo
microprocossor lo slrolcl oul llo bus cycIo as Iong as nocossary unliI llo dovico
is roady lo compIolo llo dala lransfor. Tlo curronlIy addrossod dovico doassorls
RIADY# unliI il's roady lo ond llo lransaclion.


- -


--

- --



--


-
Tlo provious claplor, Inlroduclion To llo Bus CycIo, providod a basic do-
scriplion of llo microprocossor's communicalions sclomo. Using llo llroo
busos, llo microprocossor porforms bus cycIos lo road informalion from or
vrilo informalion lo momory or I/O dovicos.
-
Tlis claplor oxpIoros llo addrossing sclomo usod by llo x86 procossors. Il do-
finos llo addrossing rango providod by llo 8086, 8088, 286, 386, 486 and Ion-
lium microprocossors. A basic dofinilion of llo lorm I/O dovico is aIso
providod.

Having covorod llo addrossing sclomo usod by llo x86 procossors in llis clap-
lor, llo noxl claplor, Tlo Addross Docodo Iogic, inlroducos llo concopl of
llo addross docodor. SovoraI oxampIos of addross docodors aro oxaminod in do-
laiI.
--
Tlo InloI 8080 microprocossor is llo ancoslor of llo onliro x86 microprocossor
famiIy. Many of llo famiIy's claraclorislics slom from llis common ancoslor.
-- --
Tlo 8080 microprocossor's addross bus consisls of 16 addross Iinos, A|15:0].
Will 16 addross Iinos, llo microprocossor can pIaco any addross pallorn on llo
addross bus from aII zoros (0000l) lo aII onos (IIIIl). In ollor vords, llo 8080
can pIaco any ono of 65536 addrossos on llo addross bus and can lloroforo ad-
dross any ono of 65536 Iocalions Iocalod in oxlornaI dovicos. In llo compulor

-

induslry, 65536 is roforrod lo as 64K (K slands for KiIo, GrooI for 1,000, bul in
llo compulor induslry, IiIo is 2
10
or 1,024). Rofor lo figuro 3-1. Tlis moans llal
llo dosignor of an 8080-basod syslom can incIudo momory dovicos vill a lolaI
of no moro llan 64K Iocalions in llo syslom.


--

In addilion lo momory dovicos usod for program and dala slorago, llo dosignor
musl aIso uso a numbor of Iocalions for inpul/oulpul porls (I/O porls) usod lo
communicalo vill I/O dovicos. In simpIo lorms, any dovico llal llo micro-
procossor can road dala from or vrilo dala lo llal isn'l a momory dovico (RAM
or ROM) is an I/O dovico. ImpIomonling lloso porls corlainIy is nocossary, bul
dopIolos llo numbor of addrossabIo Iocalions avaiIabIo lo bo assignod lo mom-
ory dovicos.



--

Rallor llan uso up aIroady scarco momory Iocalions lo impIomonl I/O dovicos,
InloI providod lvo nov inslruclions lo llo 8080 microprocossor: IN and OUT,
and addod a vay for llo 8080 lo indicalo lo llo syslom llal llo 8080 vislos lo
communicalo vill an I/O dovico insload of a momory dovico. Tlo syslom lypi-
caIIy incIudod an InloI 8228 conlroIIor clip vlicl doloclod llo 8080s inlonlion
lo communicalo vill an I/O dovico.

Somo of llo funclionaIily of llo 8228 vas incorporalod in llo 8085 microproc-
ossor, a succossor of llo 8080. Tlo 8085 las 16 addross Iinos, as doos llo 8080,
so llo 8085 can addross 64K Iocalions.

Tlo 8085 las a nov oulpul pin caIIod IO/M#. In InloI signaI namos, llo /
claraclor slouId aIvays bo road as llo IngIisl vord or. IO/M# lloroforo
slands for IO or Momory. Sinco lloro is no pound sign aflor llo IO, a ligl
on llis signaI Iino moans an I/O addross is boing oulpul by llo microprocossor.
Tlo pound sign aflor llo M porlion of llo signaI namo indicalos llal a mom-
ory addross is prosonl on llo addross bus vlon IO/M# is Iov.

Tlo addilion of llo IO/M# pin acluaIIy croalod lvo soparalo addross spacos (or
maps), ono for Momory and llo ollor for I/O. In ossonco, llo IO/M# pin
poinls lo llo approprialo addross spaco vlon llo microprocossor pIacos an
addross on llo addross bus.

Rofor lo figuro 3-2. As proviousIy monlionod, llo 8085 providos 64K of momory
addross spaco. Hovovor, duo lo llo Iimilod numbor of I/O dovicos lypicaIIy
found in sysloms, InloI onIy impIomonlod 256 I/O Iocalions.


-


- -- -

As an oxampIo, if llo microprocossor pIacos addross 0010l on llo addross bus
and pIacos a ligl on IO/M#, il is addrossing I/O Iocalion 0010l, nol momory
Iocalion 0010l. On llo ollor land, if llo microprocossor pIacos addross 0010l
on llo addross bus and pIacos a Iov on IO/M#, il is addrossing momory Ioca-
lion 0010l, nol I/O Iocalion 0010l.

In addilion lo llo IO/M# pin, InloI aIso addod lvo I/O inslruclions, IN and
OUT, lo llo 8085's inslruclion sol. Wlon oxoculod, llo IN inslruclion causos llo
microprocossor lo porform a road from llo I/O addross spocifiod by llo pro-
grammor. Tlis addross is pIacod on llo addross bus and llo IO/M# pin is sol
ligl, lloroby indicaling llo prosonco of an I/O addross on llo addross bus lo
oxlornaI Iogic. In llo samo vay, llo OUT inslruclion aIso causos llo microproc-
ossor lo pIaco an I/O addross on llo addross bus vill IO/M# sol ligl lo indi-
calo llo I/O addross il vislos lo vrilo dala lo.

--


--


A soparalo inslruclion, MOV, is usod by llo programmor lo spocify a momory
addross lo movo dala lo or from. Wlon oxoculod, llo MOV inslruclion causos
llo spocifiod momory addross lo bo pIacod on llo addross bus and llo IO/M#
pin lo bo sol Iov, indicaling llo prosonco of a momory addross.

Tloso clangos aIIovod llo dosignor lo impIomonl I/O porls villoul oncroacl-
ing on momory spaco.
-- --
Wlon InloI dosignod llo 8086 and 8088 microprocossors, lloy incroasod llo
numbor of addross Iinos from 16 lo 20. Tlis moans llal llo 8086 and 8088 mi-
croprocossors can pIaco any addross from 00000l lo IIIIIl on llo addross
bus, giving llom an addross rango of 1,048,576 or 1M Iocalions. M slands for
llo GrooI profix Moga, moaning Iargo or groal. In plysics, M is 1,000,000, bul
in llo compulor induslry, M is 2
20
or 1,048,576. Somo compulor companios uso
M lo moan 1,000,000 vlon roforring lo disI slorago vliIo sliII using M lo moan
2
20
vlon roforring lo momory sizo, so bovaro

As vill llo 8085 microprocossor, llo 8086 and 8088 microprocossors lavo a pin
lo indicalo momory or I/O addrossos. Nolo llal llo pin namo and funclion is
sIigllIy difforonl (or compIoloIy difforonl, doponding on your poinl of viov).
Ils namod M/IO#, moaning llal llo 8086 and 8088 sol llo M/IO# pin Iov
vlon oxoculing an IN or OUT inslruclion. Tlo 8086 and 8088 sol llo M/IO#
pin ligl vlon oxoculing a MOV inslruclion lo accoss momory. Tlis is jusl llo
opposilo of llo vay llo 8085 did il.

Ior llo 8086 and 8088 microprocossors, InloI aIso incroasod llo sizo of llo I/O
addross spaco lo 64K. Tlo programmor may spocify any momory addross
villin llo 1M momory addross rango, bul is roslriclod lo I/O addrossos in llo
firsl 64K Iocalions of addross spaco (0000l lo IIIIl). Tloro voro lvo roasons
for llis docision:

1. Tlo 8086 and 8088 microprocossors romain bacIvard-compalibIo vill llo
I/O inslruclions in llo 8080 inslruclion sol, aIllougl lloso inslruclions viII
nol laIo fuII advanlago of llo procossors addross capabiIily.
2. VirluaIIy no dosignor roquiros moro llan 64K I/O porls (Iocalions) lo im-
pIomonl a fuII compIomonl of I/O dovicos, no mallor lov compIox lloy
migll bo.


-

If you laIo llo oxampIo of an IBM IC/AT fuIIy Ioadod vill ovory concoivabIo
lypo of add-in I/O oxpansion boards, no moro llan 768 I/O porls aro usod.
Tlis is Ioss llan 1/64ll of llo lolaI I/O spaco avaiIabIo. As proviousIy nolod,
64K I/O Iocalions aro moro llan onougl for anyono's noods. Iiguro 3-3 iIIus-
lralos llo 8086 and 8088 microprocossor momory and I/O addross spaco.


--
--
Will llo inlroduclion of llo 286 microprocossor, llo numbor of addross Iinos
vas incroasod from 20 lo 24. Rofor lo figuro 3-4. AIllougl llis incroasos llo
sizo of llo momory addross spaco avaiIabIo lo llo dosignor from 1M lo 16M (2
24
,
16,777,216 Iocalions), llo I/O spaco is sliII roslriclod lo 64K Iocalions. Tlo
386SX microprocossor aIso las 24 addross Iinos, aIIoving accoss lo 16M of
momory and 64K I/O porls.

--

--


--



--
-- --
Tlo 386DX, 486 and Ionlium microprocossors oacl lavo 32 addross Iinos, pro-
viding 4G possibIo momory Iocalions (G is borrovod from llo GrooI vord
Giga, moaning gianl, usod as a profix in plysics, il moans 1,000,000,000, bul in
llo compulor induslry, il moans 2
30
or 1,073,741,824, llirly-lvo addross Iinos
yioId 2
32
or 4,294,967,296 Iocalions). Rofor lo figuro 3-5. Tlo I/O spaco is sliII ro-
slriclod lo 64K Iocalions.

--

--


-


-- --

Dosignors can aIso map I/O dovicos inlo momory spaco if lloy so clooso. Caro
musl bo oxorcisod vlon mapping I/O dovicos inlo momory so llal llo oporal-
ing syslom and appIicalion soflvaro do nol confIicl vill llo addross spaco clo-
son for llo I/O dovico. Ior llis roason, many dosignors map I/O dovicos in llo
ligl rangos of momory addross spaco so llal il is voII boyond llo maximum
momory rango supporlod by mosl ICs.

I/O Iorls faII inlo lloso foIIoving basic calogorios:

. Tlo dala vrillon lo llis porl by llo programmor acls as a
command lo llo associalod I/O dovico. Tlo individuaI bils of dala vrillon

--

--


--

lo llo command porl conlroI difforonl aspocls of llo dovico's oporalion. As
an oxampIo, ono bil in llo dala vrillon lo llo Ioyboard command porl
couId bo a command lo onabIo or disabIo llo Koyboard.
- . Dala road from llis porl roprosonls llo curronl slalus of llo as-
socialod I/O dovico. Tlo individuaI bils of dala road from llo slalus porl
rofIocl difforonl aspocls of llo dovico's curronl slalus. As an oxampIo, llo
slalo of a bil in llo dala road from llo prinlor slalus porl couId indicalo llal
llo prinlor is oul of papor.
. Wlon an I/O dovico las dala lo bo lransforrod lo llo micro-
procossor, llo programmor roads llo dala from llo dovico's dala porl.
SimiIarIy, vlon an I/O dovico is roady for llo noxl claraclor (for oxampIo,
a claraclor for llo prinlor), llo programmor vrilos llo claraclor lo llo do-
vico's dala porl.

Tlo numbor of I/O Iocalions noodod lo conlroI, sonso llo slalus of, road dala
from, or vrilo dala lo a parlicuIar lypo of I/O dovico is dovico-dopondonl. Sim-
pIo I/O dovicos may onIy roquiro a fov I/O Iocalions. As an oxampIo, llo par-
aIIoI porl roquiros onIy ono Iocalion oacl for ils command porl, slalus porl, and
dala porl.

Moro compIox I/O dovicos sucl as llo VGA dispIay inlorfaco, can roquiro
many moro Iocalions.


--


-
Tlo provious claplor, Addrossing I/O and Momory, oxpIorod llo addross-
ing sclomo usod by llo x86 procossors. Il dofinod llo addrossing rango pro-
vidod by llo 8086, 8088, 80286, 80386, 80486 and Ionlium microprocossors, and
providod a basic dofinilion of llo lorm I/O dovico.
-
Tlis claplor doscribos llo funclion porformod by addross docodors, discussos
llo addross docodor dosign procoss, dofinos dala bus conlonlion, and providos
a dolaiIod anaIysis of lvo oxampIo addross docodors found in ISA sysloms.

Tlo noxl claplor, Tlo 80286 Microprocossor, providos a dolaiIod doscriplion
of llo inlornaI lardvaro arclilocluro of llo 80286 microprocossor, doscribos ils
rogislor sol, and suppIios dofinilions of roaI and proloclod modos.
--
Rofor lo figuro 4-1. Wlon llo microprocossor musl road dala from or vrilo dala
lo an oxlornaI dovico, il pIacos llo addross on llo addross bus. Ivory dovico
llal can bo road from or vrillon lo las an associalod pioco of Iogic caIIod an
addross docodor. Tlo addross docodor soIocls ils associalod dovico vlon an
addross villin ils dofinod rango is doloclod.

In mosl casos, llo soIoclod dovico conlains muIlipIo inlornaI Iocalions. Wlon so-
Ioclod, llo addrossod dovico oxaminos llo addross lo idonlify llo oxacl inlornaI
Iocalion vill vlicl llo microprocossor vislos lo porform a dala lransfor.


-


- -- - -- - -

A momory or I/O clip doos nol rospond lo any pro-assignod addross rango.
Rallor, llo dovico's addross docodo Iogic informs il llal llo addross curronlIy
on llo addross bus is assignod lo ono of ils inlornaI Iocalions by assorling llo
dovico's clip-soIocl inpul pin.

Tlo ovoraII rango of momory and I/O Iocalions addrossabIo by a parlicuIar mi-
croprocossor aro commonIy roforrod lo as addross maps. Tlo dosign of ils asso-
cialod addross docodor, nol llal of llo momory or I/O dovico ilsoIf, dofinos
vloro a dovico Iivos villin llo ovoraII momory or I/O addross map of a mi-
croprocossor.
Micro-
processor
ROM
Address
Decoder
RAM
Address
Decoder
Keyboard
Address
Decoder
Floppy
Address
Decoder
Boot
ROMs
System
RAM
Keyboard
lnterface
Floppy
Drive
Controller

--

- -- -
Undor no circumslancos slouId llo addross docodors for lvo dovicos inslaIIod
in a syslom bo dosignod in sucl a faslion llal lloy boll dolocl llo samo ad-
dross rangos. Tlis vouId causo dala bus conlonlion.

Ivory oxpansion card inslaIIod in an ISA syslom las ils ovn addross docodo
Iogic llal dofinos llo addross rango llo card rosponds lo. Addross confIicls aro
a common probIom in llo IC vorId. Considor llo probIom llal arisos if llo
addross docodors on lvo oxpansion cards aro boll dosignod lo dolocl llo samo
addross rango.

As an oxampIo, assumo llal lvo cards rospond lo llo I/O addross rango 03I0l
lo 03I7l. If llo microprocossor oxoculos an inslruclion llal causos a road from
I/O Iocalion 03I1l, boll dovicos aro clip-soIoclod by lloir rospoclivo addross
docodors. Iacl llon pIacos llo conlonls of ils rospoclivo Iocalion 03I1l onlo llo
common dala bus simuIlanoousIy. Ono card may bo driving a parlicuIar dala
bus signaI Iino ligl vliIo llo ollor card is driving llo samo dala bus signaI Iino
Iov. In llis silualion, vo lavo lvo soparalo curronl sourcos lrying lo drivo fivo
voIls and zoro voIls onlo llo samo pioco of viro.

Al bosl, llis silualion viII causo garbIod dala and, al vorsl, lardvaro damago.
Tlo propor lorm for llis condilion is dala bus conlonlion, a probIom quilo
common in llo IC vorId. A usor popuIalos a IC vill many cards purclasod
from various manufaclurors. Tlo prospocl of an addross confIicl is vory roaI.

In ordor lo pormil rosoIulion of addross confIicls, a card dosignor slouId aIIov
llo usor lo oasiIy aIlor llo addross rango llo board rosponds lo. In ISA sysloms,
llis is usuaIIy accompIislod vill configuralion svilclos (or jumpors) on llo
board. By clanging llo svilcl solling, llo usor causos llo card's addross do-
codor lo dolocl a difforonl addross rango, lloroby rosoIving llo confIicl.
-- -
Tlo addross docodor funclion is simiIar lo llal porformod by llo posl offico.
Bocauso il moro or Ioss idonlifios a noiglborlood, llo zip codo is anaIogous lo
llo ligl-ordor parl of llo addross (uppor addross bils). Tlo Iov-ordor porlion
of llo addross idonlifios llo oxacl Iocalion villin llo noiglborlood.

In mucl llo samo vay, llo addross docodor associalod vill a dovico oxaminos
llo ligl-ordor parl of llo addross boing oulpul by llo microprocossor. Il do-

-

lorminos if llo addross is villin llo rango assignod lo ils dovico. If il is, llo ad-
dross docodor clip-soIocls llo dovico. Tlo clip-soIoclod dovico llon oxaminos
llo Iovor parl of llo addross lo dolormino llo oxacl Iocalion villin il llo mi-
croprocossor is addrossing.

Il slouId bo nolod llal an addross docodor doosn'l lavo lo IooI al llo onliro
addross lo dolormino llal llo curronl addross is villin llo addross rango as-
signod lo ils rospoclivo dovico. If you voro lravoIing in a car and voro loId lo
Ioop an oyo oul for llo lvo llousand bIocI, you vouId onIy nood lo IooI al llo
llousands digil of llo addross lo dolormino if il vas villin llo dosirod rango.
Tlo Iovor digils vouId bo insignificanl lo you.

Tlo foIIoving lvo soclions doscribo oxampIo addross docodors and lov lloy
funclion. Tlo firsl oxampIo is llal of llo ROM addross docodor in an IBM
IC/XT. Tlo socond oxampIo is llal of llo addross docodor llal dolocls ad-
drossos assignod lo llo I/O dovicos found on a lypicaI ISA syslom board.
--

Tlo originaI IBM IC vas dosignod around llo 8088 microprocossor. Will an
addross bus consisling of 20 Iinos, dosignalod A|19:0], llo 8088 couId addross
any ono of 1,048,576 momory Iocalions. Tlo dosignors closo lo popuIalo llis
momory map as iIIuslralod in Iiguro 4-2.

Tlo momory addross rango from I0000l lo IIIIIl vas assignod lo llo syslom
board ROM. Tlis ROM is froquonlIy roforrod lo as llo bool or IOST/BIOS
ROM. Tlo 64K addrossos from I0000l lo IIIIIl aro sol asido for llo bool
ROM. Il slouId lloroforo bo soIoclod vlonovor llo uppormosl digil on llo ad-
dross bus is Il and llo M/IO pin is ligl (indicaling llo prosonco of a momory
addross on llo addross bus). TabIo 4-1 iIIuslralos llo slalo of llo addross Iinos
vlon any momory addross in llis rango is accossod.


--

--

-- - --
- --

1 1 1 1 x x x x x x x x x x x x x x x x
I X X X X

In addilion, momory addross rango I0000l lo IIIIIl vas assignod lo llo op-
lionaI ROM llal couId bo inslaIIod in llo omply ROM socIol providod on llo
syslom board. Tlis capabiIily vas providod lo aIIov llo inslaIIalion of a ROM
conlaining llo BIOS roulinos and inlorrupl sorvico roulinos for oplionaI dovicos
llal couId bo addod lo llo maclino. Tlis add-in ROM is commonIy roforrod lo
as llo oplion ROM. Tlo 64K addrossos from I0000l lo IIIIIl aro sol asido for
llo oplion ROM. Il slouId lloroforo bo soIoclod vlonovor llo uppormosl digil
on llo addross bus is Il and llo M/IO pin is ligl (indicaling llo prosonco of

640KB
Conventional
Memory
128KB
Video
Memory
128KB Reserved
For
Device
ROMs
64KB
Option
ROM
64KB
Boot
ROM

-

a momory addross on llo addross bus). TabIo 4-2 iIIuslralos llo slalo of llo ad-
dross Iinos vlon any momory addross in llis rango is accossod.

-- - --
- --

1 1 1 0 x x x x x x x x x x x x x x x x
I X X X X

An addross docodor llal dolocls addrossos for oillor ROM musl IooI for any
momory addross llal las addross Iinos A|19:17] aII sol lo a ono. Tlal moans ils
ligl-ordor digil is oillor Il or Il. To discriminalo bolvoon addrossos for llo
bool and oplion ROMs, llo docodor vouId llon IooI al addross Iino A16. If il is
Iov, llo ligl-ordor digil of llo addross is Il and llo oplion ROM slouId bo
clip-soIoclod. If addross Iino A16 is ligl, lovovor, llo ligl-ordor digil of llo
addross is Il and llo Bool ROM slouId bo clip-soIoclod.
--
Tlo IC/XT ROM addross docodor piclurod in figuro 4-3 consisls of galos U1,
U2, U3 and U4.

Tlo ROM addross docodor's inpuls consisl of addross bils A|19:16] from llo
microprocossor. Il las lvo clip-soIocl oulpuls, CS IXXXX and CS IXXXX. CS
IXXXX is allaclod lo llo clip-onabIo (CI) inpul of llo oplion ROM, vliIo CS
IXXXX is allaclod lo llo clip-onabIo (CI) inpul of llo bool ROM.

To clip-soIocl llo oplion ROM, llo signaI CS IXXXX (clip-soIocl I0000l lo
IIIIIl rango) vouId lavo lo bo assorlod (Iov, as indicalod by llo pound
sign). Iins 1 and 2 of galo U4 musl boll bo ligl in ordor lo sol U4-3, CS
IXXXX, Iov. U4-2 viII bo ligl if pins 1, 2 and 4 of U2 aro ligl. In addilion,
addross bus Iinos A|19:17] musl aII bo onos.

A zoro on A16 is invorlod (fIippod lo ils opposilo slalo) by U1, appIying a ono
lo U4-1. U3-1 viII bo Iov, Iooping U3-3 ligl and provonling llo bool ROM
from boing clip-soIoclod.


--


--

Sinco llo liglosl I/O addross is IIIIl, lloro is no confIicl bolvoon llo ROM
addross docodor and llo I/O addross docodors. Tlo ROM addross docodor is
IooIing for addrossos llal aro voII abovo llo liglosl I/O addross. Tlo dosignor
of llo addross docodor can lloroforo ignoro llo M/IO signaI from llo micro-
procossor bocauso llo 8086, 8088 and 286 microprocossors sol llo uppor ad-
dross Iinos (A16 and liglor) lo 0 vlon M/IO is Iov.

Addross bus Iinos A|15:0] aron'l connoclod lo llo ROM addross docodor and
aro considorod lo bo don'l caro bils (from llo ROM addross docodor's viov
poinl).


CS EXXXX
CE
64K
Boot
ROM
64K
Option
ROM
CE
A16
1 2
U1
1
2
3
U3
CS FXXXX
A17
U2
1
A18 2
A19 4
6
1
2
3
U4

-

Nolico, lovovor, llal llo don'l caro bils aro connoclod lo llo bool and oplion
ROMs. Noillor of llo ROMs viII IooI al lloso addross bus Iinos unIoss ils ro-
spoclivo clip-soIocl signaI is assorlod by llo ROM addross docodor.

TabIo 4-2 iIIuslralos llo slalo llo addross bus inpuls (as dofinod abovo) musl
assumo in ordor lo clip-soIocl llo oplion ROM.

Addross bus Iinos A|15:0] aro slovn as x, roprosonling a don'l caro condi-
lion (can bo oillor a 1 or a 0 bocauso llo ROM addross docodor doosn'l IooI al
llom). If llo ligl-ordor digil of llo momory addross on llo addross bus is an
Il, llo addross is considorod lo bo for llo oplion ROM and CS IXXXX is as-
sorlod (Iov).

Tlis onabIos llo oplion ROM, vlicl llon oxaminos llo Iov-ordor porlion of
llo momory addross, A|15:0], lo idonlify llo oxacl Iocalion in llo ROM llal llo
microprocossor vislos lo road dala from. Tlo oplion ROM llon pIacos llo con-
lonls of llo rospoclivo Iocalion on llo dala bus lo bo sonl bacI lo llo micro-
procossor. Tlo microprocossor roads llo dala from llo dala bus, compIoling llo
momory road oporalion.

To clip-soIocl llo bool ROM, llo signaI CS IXXXX (clip-soIocl I0000l lo
IIIIIl rango) musl bo assorlod (Iov, as indicalod by llo pound sign).

Iins 1 and 2 of galo U3 musl boll bo ligl in ordor lo sol U3-3, CS IXXXX,
Iov. U3-2 viII bo ligl if pins 1, 2 and 4 of U2 aro ligl. In addilion, addross bus
Iinos A|19:17] musl aII bo onos.

A ono on addross bus Iino A16 pIacos a ligl on U3-1. A16 is invorlod by U1,
appIying a Iov lo U4-1, provonling llo oplion ROM from boing clip-soIoclod
by llo ROM addross docodor.

Addross bus bils A|15:0] aron'l connoclod lo llo ROM addross docodor and aro
considorod lo bo don'l caro bils (from llo ROM addross docodor's viov
poinl).

TabIo 4-1 iIIuslralos llo slalo llo addross bus Iinos (as dofinod in llo slops
abovo) musl assumo in ordor lo clip-soIocl llo bool ROM.

Addross bus bils A|15:0] aro slovn as x, roprosonling a don'l caro condi-
lion (can bo oillor a 1 or a 0 bocauso llo ROM addross docodor doosn'l IooI al
llom). If llo ligl-ordor digil of llo momory addross on llo addross bus is an
Il, llo addross is for llo bool ROM and CS IXXXX is assorlod (Iov).

--


Tlis viII onabIo llo bool ROM, vlicl llon oxaminos llo Iov-ordor porlion of
llo momory addross, A|15:0], lo idonlify llo oxacl Iocalion in llo ROM llo mi-
croprocossor vislos lo road dala from. Tlo bool ROM llon pIacos llo conlonls
of llo rospoclivo Iocalion on llo dala bus lo bo sonl bacI lo llo microprocossor.
Tlo microprocossor roads llo dala from llo dala bus, compIoling llo momory
road oporalion.
- --
Wlon llo microprocossor addrossos an I/O Iocalion, onIy addross bus Iinos
A|15:0] aro usod. Tlis is bocauso llo microprocossor is roslriclod lo I/O ad-
drossos in llo rango 0000l lo IIIIl. Tlo 8086, 8088 and 286 microprocossors
aIvays sol addross bus Iinos abovo A15 lo aII zoros vlon pIacing I/O ad-
drossos on llo addross bus. Tlo 80386 microprocossor is sIigllIy difforonl. InloI
rosorvod somo of llo 80386s I/O addrossos abovo IIIIl for uso vill llo 80387
numoric coprocossor. Tlis is covorod in llo claplor onlilIod Tlo Numoric Co-
procossor.

Tlis oxampIo doscribos an I/O addross docodor llal docodos llo clip-soIocls
for many of llo I/O dovicos llal aro inlogralod (incIudod) on ISA syslom
boards.

Tlo addross docodor piclurod in figuro 4-4 dolocls mosl of llo I/O addrossos
assignod lo llo I/O dovicos inlogralod onlo llo syslom board. Tlo ovoraII I/O
addross rango doloclod is from 0000l lo 00IIl. Tlo addross docodor furllor
broaIs llis addross rango dovn inlo sub-rangos of 32 Iocalions oacl. Wlon an
I/O addross villin ono of lloso sub-rangos is doloclod, llo rospoclivo clip-
soIocl Iino is assorlod (sol Iov) lo soIocl llo addrossod I/O dovico. Tlo sub-
rangos and llo I/O dovicos associalod vill llom aro Iislod in TabIo 4-3. Tlo
I/O dovicos roforrod lo aro doscribod in subsoquonl claplors.


-

- -- ---
- --
DMA conlroIIor (DMAC) numbor 1
IrogrammabIo inlorrupl conlroIIor (IIC) numbor 1
IrogrammabIo inlorvaI limors (IIT) 1 and 2
Syslom conlroI porl B, Ioyboard inlorfaco, NMI conlroI and
ballory-bacIod RAM porls
DMA pago rogislors, IS/2 compalibiIily porl
IrogrammabIo inlorrupl conlroIIor (IIC) numbor 2
DMA conlroIIor (DMAC) numbor 2
InloI 80X87 numoric coprocossor

- --

Tlo syslom board I/O addross docodor consisls of llroo galos and a 74138
llroo-lo-oigll Iino docodor. Tlo oporalion of llo 74138 is doscribod in llo foI-
Ioving paragrapls.

Wlon llo microprocossor bogins an I/O road or vrilo oporalion, il pIacos llo
I/O addross on llo addross bus and sols llo M/IO Iino Iov lo indicalo llo
C
B
A
0
1
2
3
4
5
6
7
A15
A14
A13
A12
A11
A10
A9
A8
6
1
2
4
5
6
1
2
3
U3
U4
74138
15 DMAC1CS (0000h to 001Fh)
14 PlC1CS (0020h to 003Fh)
13 PlTCS (0040h to 005Fh)
12 MlSC1CS (0060h to 007Fh)
11 MlSC2CS (0080h to 009Fh)
10 PlC2CS (00A0h to 00BFh)
9 DMAC2CS (00C0h to 00DFh)
7 NCPCS (00E0h to 00FFh)
5
1
2
4
5
U1
U2

--

prosonco of an I/O addross. Tlo syslom board I/O addross docodor rosponds
lo llo addross as doscribod in llo foIIoving paragrapls.

Tlo onabIing of llo 74138 is fundamonlaI lo llo oporalion of llo addross do-
codor. Tlis clip las 3 onabIo inpuls, pins 4, 5 and 6. AII llroo musl bo assorlod
lo onabIo llo clip:

Iin 6 doos nol lavo a slalo indicalor (a bubbIo), moaning a ligl is noodod
on llis pin lo onabIo llo 74138. Tlo pin 6 onabIo is liod lo a ligl (+5Vdc),
so llis onabIo is aIvays prosonl.
Iin 4 las a slalo indicalor, indicaling il roquiros a Iov inpul lo provido an
onabIo lo llo clip. Tlo pin 4 onabIo inpul is liod lo llo M/IO signaI Iino
and is lloroforo onIy assorlod vlon llo microprocossor pIacos an I/O ad-
dross on llo addross bus.
Iin 5 las a slalo indicalor, indicaling il roquiros a Iov inpul lo provido an
onabIo lo llo clip.

Galos U1 and U2 aro usod lo dolocl aII zoros on addross Iinos A|15:8] (an I/O
addross in llo rango 0000l lo 00IIl). Wlon aII of lloso addross Iinos aro Iov,
boll galos oulpul ligls lo U3. Tlis causos U3 lo oulpul a Iov, providing llo
finaI onabIo lo llo 74138. OnIy I/O addrossos in llo rango 0000l lo 00IIl causo
llo 74138 lo rocoivo aII llroo onabIos, onabIing il lo docodo llo Iov-ordor ad-
dross Iinos lo assorl llo approprialo clip-soIocl Iino.

Assuming llal llo I/O addross curronlIy boing oulpul by llo microprocossor is
villin llo rango 0000l lo 00IIl, llo 74138 is onabIod and can porform ils job.

Tlo 74138 is caIIod a llroo-lo-oigll Iino docodor bocauso, vlon onabIod, il usos
ils A, B and C inpuls lo soIocl ono of ils oigll oulpuls lo assorl (lloy aro assorl-
od vlon Iov, as indicalod by llo slalo indicalor on oacl oulpul). Tlo 74138
usos llo binary-voigllod vaIuo of llo llroo Iinos on ils inpuls lo soIocl an oul-
pul lo assorl. Tlo A inpul las a vaIuo of 1, llo B inpul a vaIuo of 2, and llo C
inpul a vaIuo of 4. TabIo 4-4 indicalos llo oulpul soIoclod for oacl possibIo sol
of inpuls.


-












0 0 0 0 15
0 0 1 1 14
0 1 0 2 13
0 1 1 3 12
1 0 0 4 11
1 0 1 5 10
1 1 0 6 9
1 1 1 7 7

Assumo llal llo microprocossor is curronlIy porforming a road or vrilo vill
I/O addross 0012l. Addross 0012l is pIacod on llo addross bus and llo micro-
procossor's M/IO oulpul is sol Iov lo indicalo il's an I/O addross. Iiguro 4-5
iIIuslralos lov llis addross appoars on llo addross bus.


--


-- -- -- -

Sinco addross bus Iinos A|15:8] aro aII zoros and an I/O oporalion is in progross
(as indicalod by a Iov on M/IO), llo 74138 is onabIod.

Nolo llal addross bus Iinos A|7:5] aro aII zoros in llis addross. Sinco lloso llroo
addross Iinos aro connoclod lo llo 74138's inpuls and lavo a binary-voigllod
vaIuo of 0, llo 74138 viII assorl (sol Iov) ils 0 oulpul, pin 15. Tlis assorls llo
clip-soIocl Iino for DMA conlroIIor numbor ono (DMAC1CS goos Iov), ona-
bIing DMA conlroIIor numbor ono. Tlo DMA conlroIIor llon usos addross Iinos
A|4:0] lo idonlify llo oxacl Iocalion villin il llo microprocossor vislos lo por-
form a dala lransfor vill.

To summarizo, addross Iinos A|15:8] sol lo aII zoros during an I/O oporalion
onabIos llo syslom board I/O addross docodor. Tlo addross docodor llon usos
addross Iinos A|7:5] lo soIocl llo clip-soIocl Iino lo assorl.
A23
A22
A21
A20
A19
A18
A17
A16
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0h
0h
0h
0h
1h
2h
80286
M/l O
0
l/O operation

-


Addross Iinos A|4:0] aron'l connoclod lo llo syslom board I/O addross docodor,
so lloy aro don'l caro bils lo llo addross docodor.

Tlis addross docodor is dosignod lo dolocl 32-Iocalion I/O addross bIocIs
villin llo ovoraII addross rango from 0000l lo 00IIl. Any addross villin a
givon bIocI soIocls llo associalod dovico's clip-soIocl Iino. Tlo dosignor couId
impIomonl up lo 32 I/O Iocalions for oacl dovico lo conlroI il, sonso ils slalus
and road dala from or vrilo dala lo il. A road or vrilo lo any Iocalion in llo 32-
Iocalion bIocI assignod lo llo dovico by llo addross docodor causos llo dovico
lo bo clip-soIoclod. Tlo dovico ilsoIf can llon uso addross Iinos A|4:0] lo soIocl
llo oxacl Iocalion villin ilsoIf llal llo microprocossor vislos lo laII lo.

TabIo 4-5 iIIuslralos llo I/O addross rangos assignod lo oacl of llo dovico clip-
soIocls.

-- -- -
- --
DMA conlroIIor (DMAC) numbor 1
IrogrammabIo inlorrupl conlroIIor (IIC) numbor 1
IrogrammabIo inlorvaI limors (IIT) 1 and 2
Syslom conlroI porl B, Ioyboard inlorfaco, NMI conlroI and
ballory-bacIod RAM porls
DMA pago rogislors, IS/2 compalibiIily porl
IrogrammabIo inlorrupl conlroIIor (IIC) numbor 2
DMA conlroIIor (DMAC) numbor 2
InloI 80X87 numoric coprocossor
-
Many ISA I/O cards porform an inadoqualo I/O addross docodo. Appondix C
providos a doscriplion of llis probIom.

--


-
Tlo basics of microprocossor communicalion lavo boon inlroducod. Tlis in-
cIudos concopl of llo bus cycIo and llo lypos of dovicos llal llo microprocossor
communicalos vill (momory and I/O), aIong vill lov lloso dovicos aro ad-
drossod.
-
Tlis claplor providos a doscriplion of llo 80286 microprocossor. Implasis is
pIacod on llo lardvaro inlorfaco bolvoon llo 80286 microprocossor and llo
romaindor of llo syslom. Momory addross formalion in roaI modo is covorod in
dolaiI and an inlroduclion lo proloclod modo is providod.

Tlo noxl claplor providos a doscriplion of llo six possibIo sourcos for various
rosol signaIs found in ISA sysloms and llo offocl oacl of llom las on llo sys-
lom. Il aIso oxpIains llo aclions laIon vlon ClrI/AIl/DoIolo aro doprossod.
-
Any microprocossor is roaIIy a syslom consisling of a numbor of funclionaI
unils. Iacl unil las a spocific job lo do and aII of llo unils vorIing logollor
compriso llo microprocossor. Iiguro 5-1 iIIuslralos llo unils vlicl maIo up llo
80286 microprocossor.

-


--

Rofor lo 5-1. Wlon llo microprocossor slarls oporalion, il viII aulomalicaIIy
bogin folcling (roading) inslruclions from momory. Il is llo bus unil's lasI lo
porform llo bus cycIos roquirod lo folcl aII inslruclions from momory. Inslruc-
lions aro road from momory ovor llo dala bus and pIacod inlo llo inslruclion
Irofolcl Quouo. Irom lloro lloy go lo llo inslruclion unil vloro lloy aro do-
codod and sonl lo llo oxoculion unil ono al a limo for procossing.

Ixoculion of somo inslruclions roquiros llal dala bo road from or vrillon lo
momory or I/O dovicos. If a momory dovico is spocifiod, llo oxoculion unil di-
rocls llo addross unil lo form llo momory addross of llo Iocalion spocifiod by
llo inslruclion. I/O addrossos spocifiod by an inslruclion do nol roquiro spociaI
addross formalion as do momory addross. Insload lloy aro sonl diroclIy from
llo oxoculion unil lo llo bus unil lo run llo bus cycIo spocifiod by llo inslruc-
lion.

Data
Transceivers
Processor Extension
lnterface
Bus Control
lnstruction
Prefetcher
6-Byte
Prefetch Queue
lnstruction
Decoder
Decoded
lnstruction
Queue (3 deep)
Execution
Unit
(EU)
lnstruction Unit (lU)
Bus Unit (BU)
Address Latches
and Drivers
-- -
-
-

--

In summary, lvo lypos of informalion may bo road inlo llo microprocossor, in-
slruclions (codo) and dala. Inslruclions aro road from momory ovor llo dala
bus, go llrougl llo dala lranscoivors, and aro pIacod inlo llo profolcl quouo.
Dala lo bo procossod is road from oillor momory or I/O dovicos ovor llo dala
bus and is lransforrod via llo dala lranscoivors lo llo oxoculion unil.

An inslruclion may aIso spocify llal dala bo vrillon lo a momory or I/O Ioca-
lion, in vlicl caso dala is sonl from llo oxoculion unil lo llo dala lranscoivors
for lransfor ovor llo dala bus.

In slorl, llo 80286 microprocossor consisls of four funclionaI unils:

1. - . Docodos llo inslruclion prior lo passing il lo llo oxocu-
lion unil for oxoculion.
2. . HandIos llo acluaI oxoculion of llo inslruclion.
3. -- . Wlon llo microprocossor musl addross a momory Iocalion,
llo addross unil forms llo momory addross llal is drivon oul onlo llo ad-
dross bus by llo bus unil during llo bus cycIo.
4. - . HandIos communicalion vill llo vorId oulsido llo microprocos-
sor clip (by porforming bus cycIos).

Tlo foIIoving soclions provido a moro dolaiIod doscriplion of oacl of lloso
unils.
-
Ono al a limo, llo 80286 inslruclion unil pops (roads) inslruclions from llo pro-
folcl quouo, docodos llom inlo lloir compononl parls and pIacos llom inlo llo
docodod inslruclion quouo lo bo forvardod lo llo oxoculion unil.

Inslruclions aro oxoculod by llo 80286 oxoculion unil. In gonoraI, inslruclions
causo oillor inlornaI procossing of dala aIroady slorod villin llo oxoculion unil
rogislors, or roading dala from or vriling dala lo dovicos oxlornaI lo llo micro-
procossor.

Wlon llo curronlIy oxoculing inslruclion roquiros vriling or roading a momory
or I/O Iocalion, llo oxoculion unil issuos a bus cycIo roquosl lo llo bus unil.
Tlo oxoculion unil llon slaIIs unliI llo bus unil compIolos llo roquoslod dala
lransfor.

-


Tvo lypos of informalion may bo road inlo llo microprocossor: inslruclions
(codo) or dala. Inslruclions aro aIvays road from momory and aro pIacod inlo
llo inslruclion profolcl quouo. Irom lloro, lloy aro roulod lo llo inslruclion
unil vloro lloy aro docodod and sonl lo llo oxoculion unil for procossing. Dala
lo bo procossod goos diroclIy lo rogislors insido llo oxoculion unil. Tloso rogis-
lors lavo sovoraI funclions as doscribod in llo foIIoving paragrapls.

A rogislor can bo llougll of as a slorago Iocalion villin llo microprocossor.
Somo rogislors can onIy bo road from, and somo can onIy bo vrillon lo, vliIo
ollors aro boll roadabIo and vrilabIo. Rogislors villin llo oxoculion unil aro
usod by llo programmor or llo microprocossor ilsoIf for llo foIIoving pur-
posos:

lo lomporariIy loId vaIuos lo bo usod in caIcuIalions
lo rocoivo dala boing road from an oxlornaI momory or I/O Iocalion
lo provido llo dala lo bo vrillon lo an oxlornaI momory or I/O Iocalion
lo Ioop lracI of llo microprocossor's curronl slalus
lo conlroI corlain aspocls of llo microprocossor's oporalion

AIllougl lloy aro slorago Iocalions, llo programmor rofors lo llo microprocos-
sor's rogislors by namos (rallor llon by llo lox addrossos usod lo addross ox-
lornaI momory and I/O Iocalions). Mosl of llo 80286 rogislors aro 100
bacIvard-compalibIo vill llo 8086 and 8088 microprocossor's rogislors. Tlo
rogislors insido llo oxoculion unil can bo IogicaIIy dividod inlo lvo calogorios:

GonoraI Rogislors
Slalus and ConlroI Rogislors

Tlo foIIoving soclions doscribo oacl of llo rogislors in llo GonoraI and llo
Slalus and ConlroI rogislor sols.
--
Tlis soclion offors a doscriplion of oacl of llo gonoraI rogislors and oxampIos of
lloir usago. Iiguro 5-2 dolaiIs llo rogislors in llo gonoraI rogislor sol.


--

--

--Iacl of lloso four rogislors can loId 16
bils (lvo bylos) of informalion. As an oxampIo, llo foIIoving inslruclion viII
movo llo 16-bil vaIuo 1234l inlo llo AX rogislor:



In addilion, llo programmor can individuaIIy rofor lo oacl of llo 8-bil rogislors
llal maIo up llo uppor and Iovor laIf of oacl of lloso 16-bil rogislors. As an
oxampIo, llo AX rogislor acluaIIy consisls of lvo 8-bil rogislors: llo AI (Iovor
laIf of AX rogislor) and AH (uppor laIf of llo AX rogislor) rogislors. Tlo samo
is lruo of llo BX, CX and DX rogislors.

If llo programmor vanls lo movo onIy ono bylo of informalion, lo or slo
vouId spocify ono of llo 8-bil rogislors rallor llan a 16-bil rogislor. In llo foI-
Ioving oxampIo, llo programmor vanls lo vrilo llo vaIuo 02l inlo I/O Ioca-
lion 60l:


-

In llo oxampIo abovo, llo programmor firsl movos llo vaIuo 02l inlo llo 8-bil
AI rogislor and llon porforms an I/O vrilo inslruclion lo vrilo llo conlonls of
llo AI rogislor lo I/O Iocalion 60l. Tlis viII causo an I/O vrilo bus cycIo vill
addross 000060l on llo addross bus and 02l on llo Iovor parl of llo dala bus
AX
BX
CX
DX
BP
Sl
Dl
SP
0 7 0 7
General
Registers
AL AH
BL
CL
DL
BH
CH
DH

-

(soo cardinaI ruIo 3 Ialor in llis claplor llo 80286 aIvays usos Iovor dala
pall for dala lransfors vill ovon addrossos).
In gonoraI, llo AX, BX, CX and DX rogislors aro usod for llo foIIoving pur-
posos:

lo lomporariIy loId vaIuos lo bo usod in caIcuIalions
lo rocoivo dala boing road from an oxlornaI momory or I/O Iocalion
lo provido llo dala lo bo vrillon lo an oxlornaI momory or I/O Iocalion
lo loId vaIuos lo bo usod in caIcuIaling a momory addross

-AIllougl avaiIabIo for gonoraI uso by llo programmor, llo
Baso Ioinlor (BI) rogislor is froquonlIy usod in forming a momory addross. Tlo
programmor pIacos llo slarl addross of a labIo of dala iloms in momory (oflon
roforrod lo as a dala slrucluro) inlo llo BI rogislor. A movo inslruclion is llon
oxoculod llal adds an indox vaIuo lo llis baso addross lo form llo oxacl ad-
dross of a dala ilom in llo labIo in momory. Tlis is Inovn as indoxing inlo a
labIo. Tlo BX rogislor can aIso bo usod in llo samo mannor. Tlo BI rogislor is
oflon usod lo accoss llo slacI villoul affocling llo conlonls of llo SI rogislor.

--Tlo lvo indox rogislors aro:

llo Sourco indox (SI) rogislor
llo Doslinalion indox (DI) rogislor

Tloso lvo rogislors aro froquonlIy usod lo impIomonl slring oporalions. Tlis is
an oporalion llal is porformod on a slring of Iocalions, rallor llan jusl ono. A
cIassic oxampIo vouId bo llo movo slring oporalion vloro llo programmor
vanls lo porform a sorios of momory roads and vrilos lo lransfor a bIocI of
dala from ono aroa of momory lo anollor. To accompIisl llis, llo programmor
vouId codo (vrilo) llo foIIoving inslruclions:

- -- -
- - --
-
- -


In llis oxampIo, llo programmor pIacos llo slarl momory addross of llo aroa of
momory conlaining llo sourco dala inlo llo SI rogislor and llo slarl momory
addross of llo doslinalion aroa in momory inlo llo DI rogislor. Tlo numbor of
bylos lo movo is pIacod inlo CX, vlicl acls as llo counl rogislor in llis conloxl.

--

Tlo programmor llon oxoculos llo Ropoal Movo Slring of Bylos (RII MOVSB)
inslruclion. Wlon oxoculod, llis inslruclion porforms a momory road from llo
momory addross spocifiod in llo SI rogislor. Tlo bylo rocoivod from llis Ioca-
lion is llon vrillon lo llo momory Iocalion spocifiod in llo DI rogislor. Tlo CX
rogislor is llon docromonlod and llo SI and DI rogislors aro incromonlod. Wlon
llo counl in llo CX rogislor is oxlauslod, aII of llo bylos lavo boon movod and
llo RII MOVSB inslruclion las compIolod oxoculion. Tlo noxl inslruclion is
llon oxoculod. If llo counl is nol oxlauslod, lovovor, llo RII MOVSB is ro-
poalod as many limos as nocossary unliI llo movo is compIolod.
- --
Tlis soclion doscribos llo IIag and Maclino Slalus Word rogislors. Tlroo rogis-
lors compriso llo Slalus and ConlroI Rogislor group as slovn in 5-3.
- --

-Rofor lo figuro 5-4. Tlo 16 bils in llo IIag rogislor may bo
dividod inlo llroo fioIds, or groups:

1. Slalus IIag bils. GonoraIIy spoaIing, lloso bils rofIocl llo rosuIl of llo pro-
viousIy oxoculod inslruclion.
2. ConlroI IIag bils. By solling or cIoaring lloso bils, llo programmor can
modify corlain of llo microprocossor's oporalions.
3. Syslom IIag fioIds. Tloso llroo bils aro roIalod lo proloclod modo oporalion
and aro oulsido llo scopo of llis booI.

Rofor lo labIo 5-1 for llo dofinilion of llo slalus, conlroI and syslom fIag bils.




F
lP
MSW
0
15
Status
and
Control
Registers

-








-- - - -

NT lOPL OF DF lF TF SF ZF
AF
PF CF
Carry
Parity
Auxiliary Carry
Zero
Sign
Overflow
Trap Flag
lnterrupt Enable
Direction Flag
l/O Privilege Level
0 15

--

-- - - -
-
CI Slalus Carry IIag. Indicalos a carry or a borrov from llo ligl-ordor bil
in llo rosuIl. Causod by an arillmolic oporalion.
II Slalus Iarily IIag. Sol lo 1 if Iov-ordor 8 bils of rosuIl conlains an ovon
numbor of 1 bils. CIoarod lo 0 ollorviso.
AI Slalus AuxiIiary Carry IIag. Indicalos a carry or a borrov on llo Iov-
ordor 4 bils of llo AI. Causod by an arillmolic oporalion.
ZI Slalus Zoro IIag. Sol lo 1 if rosuIl is 0. CIoarod lo 0 ollorviso.
SI Slalus Sign IIag. Sol oquaI lo llo ligl-ordor bil of llo rosuIl. 0 = posilivo
rosuIl, 1 = nogalivo rosuIl.
OI Slalus OvorfIov IIag. Sol lo 1 if llo posilivo numoric rosuIl is loo Iargo
(or llo nogalivo rosuIl is loo smaII) lo fil in llo doslinalion rogis-
lor.
TI ConlroI Trap IIag. AIso caIIod llo SingIo-Slop IIag. Wlon sol lo 1, causos
a SingIo-Slop Ixcoplion Inlorrupl aflor llo oxoculion of oacl in-
slruclion. OnIy usod by Dobug programs lo aid in program do-
bugging.
II ConlroI Inlorrupl IIag. Wlon sol lo 1, llo microprocossor viII rocognizo
inlorrupls on llo INTR Iino. Irogrammor can sol by oxoculing STI
inslruclion and cIoar via llo CII inslruclion.
DI ConlroI Diroclion IIag. Wlon cIoarod lo 0, causos slring inslruclions lo
incromonl SI and DI. Tloy aro docromonlod vlon DI is sol lo 1.
IOII Syslom I/O IriviIogo IovoI. 2-bil fioId. Causos llo procossor lo gonoralo
an oxcoplion boforo accossos lo spocifiod I/O dovicos if llo cur-
ronlIy running lasIs priviIogo IovoI is Ioss priviIogod llan llo
IOII during proloclod modo oporalion.
NT Syslom Noslod TasI IIag. Wlon sol lo 1 during proloclod modo opora-
lion, indicalos llal llo curronlIy oxoculing lasI (llo noslod lasI)
vas slarlod by a CAII or inlorrupl vliIo anollor lasI vas run-
ning.

- -Rofor lo figuro 5-5. Tlo 80286
MSW rogislor is a 16-bil rogislor, bul onIy llo Iovor four bils aro usod. Tloy aro
dofinod in labIo 5-2.

Wlon RISIT is assorlod, llo vaIuo III0l is forcod inlo llo MSW rogislor. Tlis
moans llal llo microprocossor oporalos in roaI modo, no Numoric Coprocossor
is inslaIIod and llo microprocossor viII nol omuIalo fIoaling-poinl inslruclions.
RoaI modo is doscribod Ialor in llis claplor.

-

- -
-
II Irolocl InabIo. Wlon cIoarod lo 0, llo 80286 oporalos in RoaI Modo (aIso
Inovn as RoaI-addross Modo). Wlon sol lo 1, microprocossor oporalos in
Iroloclod Modo.
MI Monilor Numoric Coprocossor. Wlon sol lo a 1, llo microprocossor viII
clocI llo 80287 Numoric Coprocossors BUSY# signaI boforo forvarding aII
fIoaling-poinl inslruclions lo llo coprocossor for oxoculion. Doscribod in do-
laiI in llo Claplor onlilIod, Tlo Numoric Coprocossor.
IM ImuIalo Numoric Coprocossor. Wlon sol lo a 1, rocognilion of a fIoaling-
poinl inslruclion causos an Ixcoplion 7 Inlorrupl. Tlo Inlorrupl Sorvico Rou-
lino, vlicl landIos llis oxcoplion inlorrupl, omuIalos llo parlicuIar fIoaling-
poinl inslruclion llal vouId lavo boon oxoculod by llo Numoric Coprocos-
sor if il voro prosonl. Soo llo Claplor onlilIod, Tlo Numoric Coprocossor
for dolaiIs.
TS TasI Svilcl. Tlis bil is roIalod lo proloclod modo oporalion and is oulsido
llo scopo of llis booI.


- -

not used TS EM MP PE
0 1 2 3 4 15
Task Switch
Emulate Numeric Coprocessor
Monitor Numeric Coprocessor
Protected Mode Enable

--

--
Wlon llo microprocossor noods lo road or vrilo a momory Iocalion, llo ad-
dross unil forms llo addross lo bo pIacod on llo addross bus during llo bus cy-
cIo.
--
Iour sogmonl rogislors oxisl in llo 80286. Tlo purposo of llo sogmonl rogislor
is lo poinl lo llo slarl addross of an aroa of momory conlaining a spocific lypo
of informalion (for oxampIo, a program or llo dala usod by a program).

Wlon InloI dosignod llo 8086 and 8088 microprocossors (circa 1978), a pro-
gramming discipIino commonIy roforrod lo as slruclurod programming vas
bocoming vory popuIar. Irogrammors voro paying moro allonlion lo buiIding
programs in a IogicaI faslion.

To aid llo programmor in organizing compIox programs, InloI croalod llo
sogmonl rogislors. Tlo idoa vas lo idonlify a parlicuIar aroa (sogmonl) of mom-
ory lo loId llo program, anollor lo loId llo dala upon vlicl llo program
acls, a scralclpad aroa of momory Inovn as llo slacI and a fourll aroa
Inovn as llo oxlra dala sogmonl.

In ordor lo impIomonl llis foaluro, InloI incIudod four 16-bil rogislors Inovn as
llo sogmonl rogislors:

Codo Sogmonl (CS) rogislor
Dala Sogmonl (DS) rogislor
SlacI Sogmonl (SS) rogislor
Ixlra Sogmonl (IS) rogislor
- -
Tlo foIIoving doscriplion providos a dolaiIod viov of lov llo microprocossor
oporalos vlon in roaI modo. A doscriplion of lov llo sogmonl rogislors aro
usod vlon llo microprocossor is in proloclod modo can bo found in llis clap-
lor in llo soclion onlilIod Iroloclod Modo.

Wlon an 80286-, 80386-, 80486- or Ionlium procossor-basod syslom is povorod
up, RISIT is assorlod unliI llo povor las slabiIizod. Tlo assorlod IovoI on RI-
SIT causos corlain dofauIl vaIuos lo bo forcod inlo llo microprocossor's inlornaI

-

rogislors. Tlo facl llal llo microprocossor aIvays slarls vill llo samo vaIuos in
ils rogislors causos il lo bogin oxoculion in oxaclIy llo samo vay ovory limo llo
syslom is povorod up. Tlo conlonls of llo Maclino Slalus Word (MSW) rogis-
lor is forcod lo III0l by RISIT. Bil 0 in llis rogislor is llo II (Irolocl InabIo)
bil. Tlo facl llal llis bil aIvays slarls off cIoarod lo 0 onsuros llal llo micro-
procossor viII aIvays como up in roaI modo.

Wlon in roaI modo, ISA maclinos basod on llo 80286, 80386, 80486 and Ion-
lium microprocossors oporalo simiIarIy as an 8086 or 8088 microprocossor. In
ollor vords, aIllougl lloy plysicaIIy lavo moro llan llo lvonly addross Iinos
possossod by an 8086 or 8088 microprocossor, lloy aron'l abIo lo uso aII of lloso
addilionaI Iinos vlon running programs vrillon for llo 8086 or 8088. Tlo
80286 las a Iimilod abiIily lo produco addrossos abovo 1MB in roaI modo, bul
Iogic on ISA syslom boards dofoals llis abiIily so llal llo 80286 acls as an 8086
or 8088. Tlis is dono lo onsuro soflvaro compalibiIily. (Soo llo soclion onlilIod,
Accossing Ixlondod Momory in RoaI Modo.) Tlis roslricls llo microprocos-
sor lo gonoraling momory addrossos from 000000l lo 0IIIIIl. Tlo uppor ad-
dross bils abovo A19 aro forcod lo 0. Tlo microprocossor is lloroforo Iimilod lo
llo Iovor 1MB of momory addross spaco.

Tlo 80386 and liglor microprocossors can addross aII of lloir plysicaI momory
addross spaco vliIo in roaI modo, so Iong as lloy lavo al Ioasl onco boon
svilclod lo proloclod modo and bacI lo roaI modo sinco llo Iasl rosol. Tlo
80286 IacIs llis capabiIily sinco il cannol bo svilclod from Iroloclod lo roaI
modo villoul rosolling llo microprocossor and llus cIoaring llo conlonls of
llo sogmonl rogislors.

Tlo addross pIacod in oacl of llo sogmonl rogislors poinls lo llo acluaI slarl
addross of llo sogmonls in momory. Sinco oacl of llo sogmonl rogislors is onIy
a 16-bil rogislor, lovovor, you can onIy pIaco an addross bolvoon 0000l and
IIIIl inlo a sogmonl rogislor. On llo surfaco, llis vouId moan llal llo slarl
addross of oacl sogmonl musl bo somovloro in llo firsl 64KB of momory ad-
dross spaco (Iocalions 0000l lo IIIIl). Rofor lo figuro 5-6. AIllougl llo 8086
and 8088 microprocossors can acluaIIy addross 1MB of momory addross spaco,
llis vouId moan llal llo program, dala, slacI and oxlra sogmonls vouId bo
Iimilod lo llo firsl 64KB of llis spaco and llo rosl of llo momory vouId bo in-
accossibIo.

In acluaIily, llo addross llo programmor pIacos in a sogmonl rogislor is llo
four ligl-ordor lox digils of llo addross. Tlo Ioasl-significanl digil is imagi-
nary and aIvays considorod lo bo zoro. IIacing 1000l in a sogmonl rogislor
causos il lo poinl lo llo momory sogmonl (aroa) slarling al addross 10000l

--

(1000l + imaginary 0l). Tlis moans llal a 16-bil sogmonl rogislor can bo usod
lo poinl lo llo slarl addross of an aroa in momory anyvloro from Iocalion
00000l lo IIII0l. Tlis oncompassos aII bul llo Iasl 16 Iocalions of llo 1MB
momory addross rango of llo 8086 and 8088 microprocossors.


- -- - -

ES
SS
DS
CS


-



-- -- -

In summary, llon, llo sogmonl rogislors loII llo microprocossor llo slarl ad-
dross of llo Codo, Dala, SlacI and Ixlra sogmonls in momory. Iiguro 5-7 iIIus-
lralos lov llo four sogmonl rogislors aro usod lo idonlify llo four sogmonls

ES
SS
DS
CS


--

avaiIabIo lo a programmor. Tlo usago of oacl of llo sogmonl rogislors is do-
finod in llo foIIoving soclions.
- --
Inslruclions aro froquonlIy roforrod lo as codo. Tlo Codo Sogmonl (CS) rogislor
is aIvays usod in conjunclion vill anollor rogislor caIIod llo inslruclion
Ioinlor (II) rogislor. Togollor, lloir onIy lasI is lo poinl lo llo momory Iocalion
llo microprocossor slouId folcl ils noxl inslruclion from.

Rofor lo figuro 5-8. Tlo CS rogislor poinls lo llo slarl addross of llo codo sog-
monl in momory, vliIo llo 16-bil II rogislor poinls lo llo oxacl Iocalion villin
llo codo sogmonl vloro llo noxl inslruclion slouId bo road from.

Tlo vaIuo in llo CS rogislor suppIios llo SIGMINT porlion of llo addross,
vliIo llo II rogislor suppIios llo OIISIT, or oxacl Iocalion, villin llo sog-
monl. InloI aImosl aIvays rofors lo momory addrossos using llo SIG-
MINT:OIISIT formal, using llo coIon as a soparalor. Ior inslanco, if llo
curronl conlonls of CS and II aro 3000:0010, llis moans llal llo noxl inslruclion
viII bo folclod (road) from momory Iocalion 0010l in llo codo sogmonl vlicl
slarls al momory addross 30000l. Tlo 10ll (lox) Iocalion in llo sogmonl slarl-
ing al 30000l is 30010l. Iocalion 30010l is llo acluaI momory addross llo mi-
croprocossor viII pIaco on llo addross bus lo road llo noxl inslruclion from.
Tlo addross pIacod on llo addross bus is caIIod llo plysicaI addross.

A sovoro Iimilalion of llo sogmonlalion sclomo usod by llo 8086 and 8088 is
liod lo llo vidll of llo II rogislor. Tlis rogislor is onIy 16 bils vido and is usod
lo poinl lo llo oxacl Iocalion (in llo codo sogmonl) from vlicl llo noxl inslruc-
lion viII bo folclod. Tlo facl llal il's onIy 16 bils vido moans llal il's plysicaIIy
impossibIo lo poinl lo any Iocalion villin llo sogmonl groalor llan 64KB from
llo sogmonl's slarl addross (llo sogmonl rogislor vaIuo). In ollor vords, IIIIl
is llo Iargosl vaIuo llal couId bo pIacod in llo II rogislor. Tlo rosuIl sog-
monls aro Iimilod lo 64KB in Iongll.

-


--

Tlis moans llal an onliro program vouId lavo lo fil in 64KB of momory
(unIoss il rosidos in moro llan ono sogmonl). In ordor lo lavo a program biggor
llan 64KB, llo program musl occupy sovoraI 64KB bIocIs of momory and llo
programmor musl conslanlIy bo avaro of vlicl sogmonl of momory llo noxl
inslruclion lo oxoculo rosidos in. Tlo slarl addross of llo momory sogmonl

CS

lP

The next instruction


will be fetched from
1000th (hex) location
in the code segment
that begins at location
080000h.
8000:1000 = 80000h + 1000h = 81000h

--

musl llon bo Ioadod inlo llo CS rogislor. Tlo offsol of llo acluaI inslruclion
villin llo nov sogmonl is Ioadod inlo llo II rogislor.

Nov vaIuos aro Ioadod inlo llo CS and II rogislors by oxoculing }UMI inslruc-
lions. A }UMI lo a Iocalion villin llo samo codo sogmonl Ioads a nov vaIuo
(llo offsol of llo noxl inslruclion) inlo llo II rogislor. Bocauso llo }UMI is
villin llo samo sogmonl, llis is caIIod a NIAR }UMI.

A }UMI lo a Iocalion villin a difforonl codo sogmonl Ioads nov vaIuos inlo
boll llo CS (Ioadod vill slarl addross of llo nov codo sogmonl) and II
(Ioadod vill llo offsol of llo inslruclion lo jump lo in llo nov codo sogmonl)
rogislors. Bocauso you'ro jumping lo a difforonl codo sogmonl, llis is caIIod a
IAR }UMI.
-
Rofor lo figuro 5-9. Tlo DS rogislor poinls lo llo aroa of momory llal loIds dala
associalod vill llo program poinlod lo by llo CS rogislor. As an oxampIo, as-
sumo llal llo microprocossor oxoculos llo foIIoving inslruclions:


-
-

Tlis sorios of inslruclions viII firsl pIaco llo vaIuo 2000l inlo llo DS rogislor.
Il's iIIogaI lo movo a vaIuo diroclIy inlo llo DS rogislor, so il musl bo movod
firsl inlo AX and llon inlo DS from AX. Tlo dala sogmonl llon slarls al Ioca-
lion 20000l in momory.

Tlo MOV AI,|0100] inslruclion is llon inlorprolod as movo llo conlonls of
momory Iocalion 0100l in llo dala sogmonl inlo llo AI rogislor. As a rosuIl,
llo microprocossor oxoculos a momory road bus cycIo from plysicaI momory
Iocalion 20100l (20000l + 0100l) and llo bylo road viII bo pIacod inlo llo mi-
croprocossor's AI rogislor. Tlo bracIols aro road as llo conlonls of momory
Iocalion.

Wlon a MOVI inslruclion doosn'l spocify vlal sogmonl, llo microprocossor
aIvays assumos llo dala sogmonl. Tlo vaIuo pIacod villin llo bracIols is llo
OIISIT villin llo sogmonl. }usl as llo OIISIT porlion of llo addross is ro-
slriclod lo 16 bils in llo codo sogmonl (by llo sizo of llo II rogislor), il is in llo
ollor sogmonls as voII. Il is iIIogaI lo spocify an OIISIT addross Iargor llan
IIIIl villin llo bracIols.

-


-

-
Tlo oxlra sogmonl rogislor is usod in llo samo mannor as llo dala sogmonl rog-
islor. Tlo foIIoving sorios of inslruclions is llo samo as llal usod in llo dala
sogmonl oxampIo abovo, vill ono smaII clango:

DS

offset

The contents of memory


location 020100h is read and
placed in the AL register.
2000:0100 = 20000h + 0100h = 020100h
MOV AL, [0100|

--


-
-


Tlo IS: addod jusl boforo llo bracIols is caIIod a Sogmonl Ovorrido. In llis
vay, llo programmor loIIs llo microprocossor lo uso llo IS rogislor lo suppIy
llo sogmonl porlion of llo addross, rallor llan llo dofauIl DS rogislor. Tlo ond
rosuIl of oxoculing llis sorios of inslruclions vouId bo oxaclIy llo samo as llo
sorios iIIuslralod for llo dala sogmonl abovo.
--
Tlo aroa of momory dosignalod as llo slacI is usod as scralcl-pad momory
by llo programmor and llo microprocossor. Wlonovor llo programmor noods
lo savo a vaIuo for a IillIo vliIo and gol il bacI Ialor, llo slacI is froquonlIy
usod for llis purposo. Tlo programmor doosn'l nood lo spocify a momory ad-
dross vlon vriling lo or roading from slacI momory. Tlis maIos il a vory oasy
mollod for lomporariIy sloring informalion.

Tlo SlacI Sogmonl (SS) rogislor poinls lo llo slarl addross of llo aroa of mom-
ory lo bo usod as llo slacI. Tlo SlacI Ioinlor (SI) rogislor providos llo OIISIT
porlion of llo addross and poinls lo llo oxacl Iocalion in llo slacI sogmonl
vloro llo Iasl ilom vas slorod. Al llo boginning of a program, llo programmor
pIacos llo slarl addross of llo program's slacI sogmonl in llo SS rogislor. As
dala iloms aro slorod in llo program's slacI, llo slacI grovs dovnvard lo-
vards llo slacI sogmonl slarl addross spocifiod in llo SS rogislor. Tlo vaIuo
pIacod in llo SI rogislor dolorminos llo sizo of llo program's slacI. As an ox-
ampIo, if llo programmor vislos llis program's slacI lo bo 512 bylos in sizo,
llo SI rogislor slouId bo iniliaIizod lo 0200l lo poinl lo llo fivo-lundrod-
lvoIfll Iocalion in llo slacI.

-




Rofor lo figuro 5-10. Wlon llo programmor vanls lo sloro a vaIuo on llo slacI,
a IUSH inslruclion is oxoculod. As an oxampIo, IUSH AX viII causo llo con-
lonls of llo AX rogislor lo bo vrillon inlo slacI momory vloro SS:SI is cur-
ronlIy poinling. Assumo llal llo SS rogislor conlains 8000l and llo slacI is
omply. Tlo SI rogislor conlains IIIIl. AIso assumo llal llo AX rogislor cur-
ronlIy conlains 1234l and BX conlains AA55l. Nov considor llo foIIoving:

1. Wlon llo IUSH AX is oxoculod, llo microprocossor firsl docromonls llo
SI by 2. Il llon vrilos llo lvo bylos from AX, 12l and 34l, inlo momory
slarling al 8IIIDl (80000l + IIIDl). AI is slorod in momory Iocalion
8IIIDl and AH is slorod in 8IIIIl bocauso of llo IillIo-Indian Bylo-
Ordoring ruIo vlicl is doscribod Ialor in llis claplor.

SS

SP

8000:FFFF = 80000h + FFFFh = 08FFFFh



--

2. If BX voro nov puslod onlo llo slacI, llo SI is firsl docromonlod by 2 and
llo lvo bylos from BX, AAl and 55l, aro llon slorod in momory slarling al
Iocalion 8IIIBl.
3. Iacl limo llo microprocossor oxoculos a subsoquonl pusl oporalion, il viII
firsl docromonl llo SI by 2 and llon sloro llo dala inlo slacI momory.

As you can soo, llo slacI grovs dovnvard in momory from llo liglosl mom-
ory Iocalion in llo slacI lovards llo sogmonl slarl addross.

To road dala bacI from llo slacI, llo programmor usos llo IOI inslruclion.
Wlon llo programmor oxoculos a IOI inslruclion, sucl as IOI BX, llo micro-
procossor roads lvo bylos off llo slacI using llo curronl vaIuo in SS:SI lo form
llo momory addross.

1. Conlinuing llo oxampIo usod abovo, a IOI BX vouId causo llo micro-
procossor lo road llo lvo bylos (55l and AAl) from Iocalions 8IIIBl and
8IIICl and pIaco llom inlo llo BX rogislor.
2. Tlo microprocossor llon incromonls SI by lvo, so SS:SI aro nov poinling
al 8000:IIID.
3. A IOI AX vouId llon causo llo microprocossor lo road llo lvo bylos (34l
and 12l) from Iocalions 8IIIDl and 8IIIIl and pIaco llom inlo llo AX
rogislor.
4. Tlo microprocossor llon incromonls SI by lvo, so SS:SI aro nov poinling
al 8000:IIII, llo lop of llo slacI.

As impIomonlod by llo InloI x86 microprocossors, llo slacI is a IIIO (Iasl In,
Iirsl Oul) buffor llo Iasl objocl in is llo firsl oul.

If llo programmor allompls lo pop moro dala off llo slacI llan vas puslod
onlo il, llo microprocossor viII gonoralo a spociaI lypo of inlorrupl caIIod a
SlacI UndorfIov Ixcoplion inlorrupl lo indicalo llal llo slacI is omply. Con-
vorsoIy, if llo programmor puslos dala onlo llo slacI unliI llo onliro 64KB
slacI sogmonl (maximum possibIo sizo) is fuII and llon allompls lo pusl ono
moro vord onlo llo slacI, llo microprocossor viII gonoralo a SlacI OvorfIov
Ixcoplion inlorrupl. Inlorrupls aro covorod in llo claplor onlilIod Inlorrupl
Subsyslom.

Wlon llo microprocossor vrilos lvo bylos from a 16-bil rogislor lo momory,
llon lloro aro lvo possibiIilios for lov llo dala couId appoar in momory. As-

-

sumo llal llo dala sogmonl slarls al 000000l (DS rogislor conlains 0000l) and
considor llo foIIoving codo:


-
-


AH conlains 12l and AI conlains 34l aflor llo firsl inslruclion is oxoculod.
Wlon llo microprocossor oxoculos llo socond inslruclion, il viII fiII in momory
vill llo foIIoving vaIuos:


--
000200l 34l
000201l 12l

Nolico llal llo ollor possibiIily is llal llo microprocossor lloorolicaIIy couId
lavo pul dala bylo 12l al momory addross 000200l and bylo 34l al addross
000201l. Tlals onIy lloorolicaI, bocauso llo x86 microprocossors uso llo IillIo-
Indian Bylo-Ordoring RuIo lo dolormino vlicl bylo goos vloro, so onIy ono
vay is acluaIIy usod. IillIo-Indian Bylo Ordoring roquiros llal llo Ioasl-
significanl bylo musl bo associalod vill llo Iovosl addross. In llis caso, llo
Iovosl addross is 000200l and llo Ioasl-significanl bylo is 34l.

Tlo ollor bylo-ordoring mollod is Big-Indian Bylo Ordoring, vlicl is usod on
mosl non-x86-basod compulors. Tlo Big-Indian Bylo-Ordoring RuIo roquiros
llal llo mosl significanl bylo musl bo associalod vill llo Iovosl addross. TabIo
5-4 slovs lov llo dala vouId appoar in momory.

-
--
000200l 12l
000201l 34l

Wlon llo x86 microprocossor roads dala from momory, il onco again usos llo
IillIo-Indian Bylo-Ordoring RuIo lo roulo llo dala bylos lo llo propor onds of
llo rogislors. Ior oxampIo, considor llo foIIoving codo and momory conlonls:


--

-
--
001003l 56l
001004l 78l

-
-


Wlals in AX vlon llo inslruclion is finislod` Tlo IillIo-Indian RuIo says llal
llo Ioasl-significanl ond of AX (AI) musl bo associalod vill llo Iovosl addross
(1003l), so AX conlains 7856l.

An oasy vay lo romombor llo IillIo-Indian Bylo-Ordoring RuIo is IillIo Ind
Iirsl. (Tlo Big-Indian Bylo-Ordoring RuIo is Big Ind Iirsl.) Nolo llal llo
IillIo-Indian Bylo-Ordoring RuIo appIios lo I/O accossos as voII as lo momory
accossos.

Rofor lo figuro 5-11. SimpIy pul, oxlondod momory is any momory llal rosidos
al addross 1MB or liglor (abovo addross 0IIIIIl). Momory in llo Iovor 1MB
(000000l lo 0IIIIIl) is froquonlIy roforrod lo as convonlionaI momory. Sinco
llo 8086 and 8088 microprocossors onIy lavo lvonly addross Iinos, lloy aro
onIy capabIo of addrossing momory in convonlionaI momory spaco. Tlis moans
llal oxlondod momory doosn'l oxisl in maclinos basod on lloso microprocos-
sors.

UnIoss llo microprocossor las boon sol lo proloclod modo al Ioasl onco sinco
llo Iasl rosol, llon llo 80286/80386/80486/Ionlium microprocossors cannol
accoss Ixlondod Momory, vill ono oxcoplion. Tlo noxl soclion doscribos llo
oxcoplion.


-



--
Il is possibIo lo accoss a smaII amounl of oxlondod momory (momory abovo
1MB) vliIo in roaI modo. Considor llo foIIoving oxampIo:

Extended
Memory
Conventional
Memory

--


-
- -


In ordor lo form llo plysicaI momory addross lo pIaco on llo addross bus
vlon oxoculing llo llird inslruclion, llo microprocossor vouId pIaco a 0 on
llo ond of llo dala sogmonl vaIuo (IIIIl) lo poinl lo llo slarl addross of llo
dala sogmonl (IIII0l). Il vouId llon add llo offsol (0010l) lo llo dala sog-
monl slarl addross lo croalo llo plysicaI momory addross:



- --

Rofor lo figuro 5-12. Tlo microprocossor llon porforms a momory road bus cy-
cIo, driving llo rosuIlanl plysicaI momory addross, 100000l, onlo llo addross
bus. Nolico llal llo 21sl addross bil, A20, is ligl. Tlo procossor is addrossing
llo firsl momory Iocalion of llo 2nd mogabylo of momory addross spaco. Tlis
is oxlondod momory and llo procossor is addrossing il in roaI modo

Nov considor llis oxampIo:


-
--


}usl as boforo, in ordor lo form llo plysicaI momory addross lo pIaco on llo
addross bus vlon oxoculing llo llird inslruclion, llo microprocossor vouId
pIaco a 0l on llo ond of llo dala sogmonl vaIuo (IIIIl) lo poinl lo llo slarl
addross of llo dala sogmonl (IIII0l). Il vouId llon add llo offsol (IIIIl) lo
llo dala sogmonl slarl addross lo croalo llo plysicaI momory addross:



- --


-




Tlo microprocossor llon porforms a momory road bus cycIo, driving llo rosuI-
lanl plysicaI momory addross, 10IIIIl, onlo llo addross bus. Will llo vaIuo
IIIIl in llo sogmonl rogislor and by suppIying any offsol in llo rango 0010l
lo IIIIl, vo aro abIo lo accoss any oxlondod momory Iocalion from 100000l lo
10IIIIl. Tlis is a lolaI of 65520 oxlondod momory Iocalions vo can accoss
vliIo sliII in roaI modo.
A23
A22
A21
A20
A19
A18
A17
A16
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1h
0h
0h
0h
0h
0h
80286

--

Tlis mollod is usod by many MS-DOS momory managomonl programs lo ac-
coss oxlondod momory vliIo romaining in roaI modo. Tlis momory aroa is
usuaIIy roforrod lo as llo Higl Momory Aroa (HMA).

Tlo 80386 and liglor microprocossors can addross aII of lloir plysicaI momory
addross spaco vliIo in roaI modo, so Iong as lloy lavo al Ioasl onco boon
svilclod lo proloclod modo and bacI lo roaI modo sinco llo Iasl rosol. Tlo
80286 IacIs llis capabiIily sinco il cannol bo svilclod from Iroloclod lo roaI
modo villoul rosolling llo microprocossor and llus cIoaring llo conlonls of
llo sogmonl rogislors.

Nolico llal llo codo fragmonls slovn abovo aro vaIid lo oxoculo on an 8086 or
8088 microprocossor. Tlo rosuIls aro difforonl, lovovor. If an 8086 or 8088 oxo-
culos llal codo, addross bil A20 viII nol bo ligl sinco llo 8086 and 8088 do nol
lavo sucl a bil. Tloroforo, llo 8086 or 8088 producos an addross llal is bo-
lvoon 00000l and 0IIIIl, for llo oxampIos slovn abovo. Tlis is caIIod ad-
dross vraparound or sogmonl vraparound. Tlo addross spaco of llo sogmonl
vraps around from llo liglosl plysicaI addrossos lo llo Iovosl plysicaI ad-
drossos.

Somo programs vrillon for llo 8086 and 8088 may bo doponding on llo sog-
monl vraparound lo occur so llal lloy can accoss dala llal is in llo Iov ad-
drossos, sucl as llo Inlorrupl TabIo or llo BIOS Dala Aroa. If lloso programs
aro oxoculod on an 80286 or liglor microprocossor, lloy viII faiI lo oporalo cor-
roclIy bocauso lloy viII nol bo accossing llo samo momory Iocalions llal lloy
voro oxpocling lo accoss. In ordor for maclinos basod on llo 80286 and liglor
microprocossors lo bo compalibIo vill sucl oId codo, llo microprocossors ad-
dross musl bo lruncalod (cul off) lo simuIalo llo 20-bil addross of llo 8086 and
8088.

Nolico llal llo liglosl addross bil llal vas sol vlon llo Iargosl sogmonl vaIuo
and Iargosl offsol voro usod is addross bil 20, A20. Tloroforo, onIy A20 noods
lo bo lruncalod. A23, A22 and A21 viII nol bo ligl vlon oxoculing llo oId
codo. Rofor lo figuro 5-13. On llo syslom board, oulsido llo microprocossor,
A20 is connoclod lo ono inpul of an AND galo. Tlo ollor inpul of llo AND
galo is A20 GATI (aIso namod A20 MASK#, IORCI A20, olc.). Tlo oulpul of
llo AND galo bocomos llo nov A20 addross bil llal is broadcasl vill llo rosl
of llo microprocossors addross bils lo llo syslom. Wlon A20 GATI is doas-
sorlod (Iov), llo AND galos oulpul is Iov, so llo sysloms A20 bil is Iov,
simuIaling an addross coming from an 8086 or 8088. Tlo A20 GATI signaI
comos from llo Ioyboard conlroIIor. Soo llo claplor onlilIod Tlo Koy-
board/Mouso Inlorfaco for moro informalion.

-



0
1
A23
A22
A21
A20
A19
A18
A17
A16
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0h
0h
0h
0h
0h
0h
Keyboard
Controller
A20 GATE

--

-
Wlonovor llo 80286 microprocossor musl communicalo vill an oxlornaI do-
vico, llo bus unil porforms llo roquirod bus cycIo using llo addross, dala and
conlroI busos. Tlo bus unil consisls of llo foIIoving sub-unils:

Addross Ialclos and Drivors
Inslruclion profolclor
Irocossor Ixlonsion Inlorfaco
Bus ConlroI Iogic
Dala Transcoivors
6-bylo profolcl quouo

Tlo foIIoving soclions doscribo llo purposo of oacl of llo sub-unils llal com-
priso llo bus unil.
-- - -
Wlon llo microprocossor musl pIaco an addross on llo addross bus, llo ad-
dross is Ialclod inlo (loId by) llo bus unil's inlornaI addross Ialcl. Tlis slouId
nol lo bo confusod vill llo oxlornaI addross Ialcl llal is discussod in a subso-
quonl claplor. Tlo addross drivors llon drivo llo Ialclod addross oul onlo llo
addross bus.
-
As doscribod in claplor ono, llo microprocossor is porforming in-Iino (soquon-
liaI) codo folclos (inslruclion folcling) on an on-going basis. OnIy jump
inslruclions aIlor program fIov and lloy aro slalislicaIIy raro. InloI dosignod
llo inslruclion profolclor lo laIo advanlago of llis claraclorislic. Rallor llan
vail for llo oxoculion unil lo roquosl llo noxl inslruclion folcl, llo profolclor
gambIos llal llo noxl inslruclion folcl roquoslod viII bo from llo noxl
soquonliaI momory Iocalion and, on ils ovn, porforms a momory road bus cycIo
lo gol llo noxl inslruclion. Tlo 80286 inslruclion profolclor aIvays folclos lvo
bylos al a limo vlon folcling inslruclions from momory. Il llon pIacos lloso
lvo inslruclion bylos inlo llo 6-bylo profolcl quouo.

Sinco llo quouo isn'l fuII yol, llo profolclor inilialos anollor momory road bus
cycIo lo gol llo noxl lvo inslruclion bylos. Tloso lvo bylos aro aIso pIacod inlo
llo profolcl quouo. Tlo profolclor llon inilialos a llird momory road bus cycIo

-

lo gol llo noxl lvo bylos and pIacos llom inlo llo profolcl quouo. Tlo quouo is
nov fuII.

Tlo inslruclions aro docodod by llo inslruclion unil and pIacod inlo llo do-
codod inslruclion quouo ono al a limo. Tlis laIos pIaco in paraIIoI vill inslruc-
lion oxoculion by llo oxoculion unil and profolcling.

Onco llo profolcl quouo is fuII, llo inslruclion profolclor coasos profolcling in-
slruclions. If llo curronlIy oxoculing inslruclion isn'l a }UMI inslruclion, upon
oxoculion compIolion llo oxoculion unil gols llo noxl docodod inslruclion from
llo inslruclion unil's docodod inslruclion quouo. Tlo inslruclion unil llon, in
lurn, gols llo noxl inslruclion from llo 6-bylo profolcl quouo, docodos il and
pIacos il inlo llo docodod inslruclion quouo. Wlon lvo or moro bylos opon up
in llo profolcl quouo, llo inslruclion profolclor rosumos oporalion lo fiII llo
quouo bacI up again.

Mosl of llo limo, llo oxoculion unil's roquosl for llo noxl inslruclion can bo
fiIIod from llo on-clip quouos rallor llan forcing llo microprocossor lo por-
form a momory road bus cycIo lo gol llo noxl inslruclion.

Wlon llo oxoculion unil oxoculos a }UMI inslruclion, lovovor, llo profolcl
quouo and docodod inslruclion quouo aro fIuslod. In ollor vords, llo pro-
folclor gambIod and Iosl. AII of llo onlrios in llo lvo quouos aro marIod as in-
vaIid. Tlo inslruclion profolclor musl llon inilialo a momory road bus cycIo lo
gol llo roquoslod inslruclion from momory. Tlis slaIIs llo oxoculion unil unliI
llo noxl inslruclion bocomos avaiIabIo.

Onco llo inslruclion las boon folclod and pIacod in llo profolcl quouo, llo
profolclor bogins lo profolcl onco again lo gol aload of llo gamo.

Sinco }UMI inslruclions roaIIy don'l occur vory froquonlIy in mosl programs,
llo oxoculion unil may food off llo docodod inslruclion quouo mosl of llo limo
villoul laving lo vail for momory road bus cycIos lo bo porformod. In llo
ovoraII sclomo of llings, llo limo Iosl vlon llo quouo musl bo fIuslod is
minimaI vlon comparod vill llo advanlago gainod by profolcling.
-- -
Tlis bus unil Iogic aIIovs llo microprocossor lo communicalo vill llo numoric
coprocossor (if il is inslaIIod). Tlis subjocl is discussod in llo claplor onlilIod
Tlo Numoric Coprocossor.

--

-
Tlis is llo bus unil's slalo maclino llal porforms bus cycIos upon roquosl. Bus
cycIos aro porformod undor llo foIIoving circumslancos:

Momory road bus cycIo roquosl from llo inslruclion profolclor.
Roquosl from llo oxoculion unil lo porform a momory road, momory vrilo,
I/O road or I/O vrilo bus cycIo.
In rosponso lo an inlorrupl roquosl (rofor lo llo claplor onlilIod Tlo Inlor-
rupl Subsyslom).
--
A lranscoivor is a dovico llal passos dala llrougl ilsoIf from Iofl lo rigll or visa
vorsa. During road bus cycIos, llo bus unil's dala lranscoivors pass llo dala
coming from llo curronlIy addrossod dovico inlo llo microprocossor. During
vrilo bus cycIos, llo lranscoivors pass dala from llo microprocossor onlo llo
dala bus lo bo vrillon lo llo curronlIy addrossod dovico.
-
Tlis soclion providos a dolaiIod doscriplion of llo signaI Iinos llo 80286 micro-
procossor usos lo communicalo vill llo rosl of llo syslom. Tloy lavo boon
groupod inlo llo foIIoving calogorios:

Addross Bus
Dala Bus
ConlroI Bus
-- -
Tlo 80286 microprocossor's addross bus consisls of lvonly-fivo signaI Iinos:

lvonly-four addross Iinos, A|23:0]
BHI# (Bus Higl InabIo)

Iiguro 5-14 iIIuslralos llo 80286 addross bus.

During a bus cycIo, llo microprocossor pIacos llo fuII 24-bil addross of llo lar-
gol Iocalion on llo addross Iinos, A|23:0]. A 24-bil addross bus givos llo 80286

-

llo abiIily lo addross any of 16,777,216 individuaI addrossos from Iocalion
000000l lo IIIIIIl.

In addilion, llo microprocossor assorls BHI# (Iov) vlon porforming a dala
lransfor bolvoon ilsoIf and an odd addross.

-- -
A23
A22
A21
A20
A19
A18
A17
A16
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0h
0h
0h
1h
0h
5h
80286
BHE
0

--

--- -
During a bus cycIo, llo 80286 microprocossor can addross jusl an ovon-
addrossod Iocalion, jusl an odd-addrossod Iocalion, or an ovon Iocalion and llo
noxl soquonliaI odd-addrossod Iocalion simuIlanoousIy.

Rofor lo labIo 5-6. Addross bil 0 (A0), las a voigllod vaIuo of 1. Wlon llo mi-
croprocossor oulpuls an addross, a 0 on A0 indicalos llal llo addross is an ovon
addross and a 1 on A0 indicalos llal il is an odd addross. Ior oxampIo, addross
000100l is an ovon addross (A0 = 0), vliIo addross 000509l is an odd addross
(A0 = 1).

Sinco llo microprocossor can onIy pIaco ono 24-bil addross on llo addross bus
al a limo, il is incapabIo of loIIing oxlornaI Iogic llal il vanls lo addross an ovon
addross and an odd addross during llo samo bus cycIo. A0 vouId lavo lo bo
Iov and ligl al llo samo limo, an impossibiIily.

To indicalo llal il vislos lo addross an ovon and an odd addross simuIlano-
ousIy, llo 80286 microprocossor pIacos llo ovon addross oul on llo addross bus
and assorls ils BHI# oulpul (Bus Higl InabIo). IxlornaI Iogic inlorprols llis lo
moan llal llo microprocossor vislos lo porform a dala lransfor vill llo cur-
ronlIy addrossod ovon addross and llo noxl soquonliaI odd addross during llo
samo bus cycIo.

Tlo dala lo bo lransforrod bolvoon llo microprocossor and llo ovon addross
viII bo roulod ovor llo Iovor dala pall, D|7:0], vliIo llo dala lo bo lransforrod
vill llo odd addross viII bo lransforrod ovor llo uppor dala pall, D|15:8]. Tlis
is slalod as RuIo 3 in llo noxl soclion onlilIod, Tlo CardinaI RuIos of llo InloI
WorId.

Wlon llo microprocossor oulpuls an addross al llo slarl of a bus cycIo, oxlor-
naI Iogic inlorprols A0 and BHI# as indicalod in labIo 5-7. Romombor llal
BHI# is assorlod vlon Iov.


-

--

--




A0 1
A1 2
A2 4
A3 8
A4 16
A5 32
A6 64
A7 128
A8 256
A9 512
A10 1024
A11 2048
A12 4096
A13 8192
A14 16384
A15 32768
A16 65536
A17 131072
A18 262144
A19 524288
A20 1048576
A21 2097152
A22 4194304
A23 8388608


--

-
-
0 0 Tlo microprocossor is addrossing an ovon addross (A0=0) and viII
lloroforo uso llo Iovor dala pall lo lransfor llo dala bylo bolvoon
ilsoIf and llo addrossod Iocalion. Sinco llo microprocossor onIy usos
llo uppor dala pall lo lransfor dala bolvoon ilsoIf and odd ad-
drossos, llo assorlod IovoI on BHI# indicalos llal il vanls lo porform
a dala lransfor vill llo odd Iocalion immodialoIy foIIoving llo ovon
addross il is oulpulling. Tlis is a 16-bil dala lransfor using boll dala
palls.
0 1 Tlo microprocossor is addrossing an ovon addross (A0 = 0) and viII
lloroforo uso llo Iovor dala pall lo lransfor llo dala bylo bolvoon
ilsoIf and llo addrossod Iocalion. Tlo doassorlod IovoI on BHI# indi-
calos llal llo microprocossor viII nol bo using llo uppor dala pall lo
laII lo an odd addross. Tlis is lloroforo an 8-bil dala lransfor using
llo Iovor dala pall.
1 0 Tlo microprocossor is addrossing an odd addross (A0 = 1) and viII
lloroforo uso llo uppor dala pall lo lransfor llo dala bylo bolvoon
ilsoIf and llo addrossod Iocalion. Tlo assorlod IovoI on BHI# indi-
calos llal llo microprocossor viII uso llo uppor dala pall lo laII lo
llo odd addross. Tlis is an 8-bil dala lransfor using llo uppor dala
pall.
1 1 IIIogaI (viII nol occur).

-
AIllougl il is loclnicaIIy corrocl lo say llal llo 80286 microprocossor las a 16-
bil dala bus, il is moro corrocl lo say llal il las lvo 8-bil dala palls. Tlo Iovor
dala pall consisls of dala Iinos D|7:0], vliIo llo uppor pall consisls of D|15:8].
RuIo llroo doscribos llo usago of lloso lvo dala palls. Iiguro 5-15 iIIuslralos
llom.



-

-
-
Tlo llroo ruIos slalod in llis soclion appIy diroclIy lo llo oporalion of llo 80286
and llo 80386SX microprocossors. Tlo 80386DX, 80486 and Ionlium micro-
procossors uso a sIigll varialion on ruIo numbor llroo. Tlo claplor on llo
80386 microprocossor oxpIains llo difforoncos.

-- - --- -
- - --

Tlo lomplalion is groal lo say llal slorago Iocalions in a syslom basod on llo
80286 microprocossor oacl conlain ono vord (lvo bylos) of informalion. Many
poopIo llinI llis is llo caso bocauso llo 80286 las a 16-bil dala bus and can
lransfor a vord al a limo. Ils 16-bil dala bus givos llo 80286 llo abiIily lo accoss
80286

Upper Data Path

--

lvo Iocalions simuIlanoousIy. Tlis doosn'l aIlor llo facl llal oacl Iocalion con-
lains ono bylo of informalion.

-- - - --
--

Wlon llo 80286 microprocossor musl road dala from or vrilo dala lo an oxlor-
naI dovico, il bogins a bus cycIo. Tlo addross is pIacod on llo addross bus sig-
naI Iinos. Iogic oxlornaI lo llo microprocossor IooIs al llo Ioasl-significanl
addross Iino, A0, lo dolormino if llo addross is ovon or odd. Considor llo
sampIo addrossos in labIo 5-8.

- ---
-- --
000000l 0 Ivon
000001l 1 Odd
0AIC12l 0 Ivon
I12345l 1 Odd
101003l 1 Odd


In oacl caso vloro A0 is 0, llo addross is ovon. Tlo addross is odd if A0 is a 1.

In ilsoIf, llis ruIo may nol soom imporlanl, bul in Iigll of RuIo 3, il assumos a
groal doaI of imporlanco.

-- - - --
- -
-- - -
-
Tlo conlroI bus consisls of aII llo 80286 signaI Iinos ollor llan llo addross bus
and llo dala bus. Tlo conlroI bus signaI Iinos can bo soparalod inlo llo foIIov-
ing subcalogorios:


-

Bus CycIo Dofinilion Iinos
Bus Masloring Iinos
Roady Iino
Inlorrupl Iinos
Irocossor Ixlonsion Iinos
Tlo CIocI Iino
Tlo Rosol Iino

Tlo foIIoving soclions doscribo oacl of lloso signaI groups.
- -
Wlon llo 80286 bus unil musl road dala from or vrilo dala lo an oxlornaI Ioca-
lion, il musl run a bus cycIo lo do so. During llo bus cycIo, llo microprocossor
indicalos llo lypo of bus cycIo by pIacing llo propor pallorn on llo bus cycIo
dofinilion signaI Iinos. TabIo 5-9 indicalos oacl lypo of bus cycIo and llo rospoc-
livo pallorn vlicl is oulpul onlo llo bus cycIo dofinilion Iinos.

-
-
0 0 0 Inlorrupl AcInovIodgo
0 0 1 I/O Road
0 1 0 I/O Wrilo
1 0 0 HaIl or Sluldovn
1 0 1 Momory Road
1 1 0 Momory Wrilo

ToclnicaIIy spoaIing, lloro is a fourll bus cycIo dofinilion Iino, COD/INTA#. Il
is llo Codo or Inlorrupl AcInovIodgo Iino and las somolling in common vill
your appondix if you Iosl il you vouIdn'l miss il. A syslom onIy noods lo uso
llis Iino if il musl difforonlialo bolvoon a momory road lo gol dala vorsus a
momory road lo gol an inslruclion. In mosl sysloms, llis pin isn'l ovon looIod
up.
- - -
Mosl of llo limo, llo microprocossor on llo syslom board ovns llo llroo
busos and usos llom lo communicalo vill oxlornaI dovicos. Tlo microprocos-
sor is llo Bus Maslor. Hovovor, lloro aro silualions vloro il is nocossary lo
surrondor llo busos lo ollor bus maslors.

--

Wlon a dovico ollor llan llo microprocossor vislos lo uso llo busos lo com-
municalo vill anollor dovico, il assorls llo microprocossor's HOID (HoId Ro-
quosl) inpul. Wlon HOID is assorlod, llo mannor in vlicl llo microprocossor
rosponds doponds on vlollor or nol a microprocossor bus cycIo (dala lransfor)
is curronlIy in progross.

If a bus cycIo is in progross vlon HOID is assorlod by llo prospoclivo bus
maslor, llo microprocossor compIolos llo curronl bus cycIo prior lo rosponding
lo llo HOID. If a bus cycIo isn'l in progross, llo microprocossor rosponds lo
llo loId roquosl immodialoIy.

In rosponso lo HOID, llo microprocossor oIoclricaIIy disconnocls ilsoIf from
llo addross, dala and conlroI busos. Il's jusl as if llo microprocossor opons doz-
ons of svilclos, disconnocling ilsoIf from llo oxlornaI busos. Tlis disconnocl
procoss is commonIy roforrod lo as fIoaling llo busos.

Tlo microprocossor llon assorls ils HoId AcInovIodgo (HIDA) oulpul lo in-
form llo roquosling bus maslor llal il nov ovns llo busos and is lloroforo bus
maslor. Tlo nov bus maslor may nov uso llo busos lo run ono or moro bus cy-
cIos. Il may Ioop llo busos as Iong as nocossary by Iooping HOID assorlod.
Wlon il no Iongor roquiros llo uso of llo busos, llo bus maslor roIoasos HOID.
In rosponso, llo microprocossor's bus unil ro-allaclos ilsoIf lo llo busos and ini-
lialos a bus cycIo (if il las ono ponding).

In addilion lo HOID and HIDA, lloro is a llird microprocossor Iino invoIvod
in bus masloring. In a syslom dosignod lo laIo advanlago of il, llo 80286's
IOCK# oulpul can bo usod by llo programmor lo provonl ollor bus maslors
from sloaIing llo busos avay from llo microprocossor. Rofor lo figuro 5-16.

Tlo microprocossor aulomalicaIIy assorls llo IOCK# signaI during corlain op-
oralions llal roquiro muIlipIo bus cycIos lo compIolo sucl as:

Inlorrupl AcInovIodgo Bus CycIos
Ixoculion of Ixclango inslruclions
Sogmonl Doscriplor Roads

Tloro aro limos vlon llo programmor musl forco llo microprocossor lo assorl
llo IOCK# signaI. Tloso silualions aro doscribod in llo noxl soclion.




-





-- -
Tvo procossos (programs in a muIli-lasIing syslom) or lvo procossors (in a
muIli-procossing syslom) may nood lo accoss a slarod rosourco al llo samo
limo. Slarod rosourcos aro llings llal oacl of llo procossos or procossors can
accoss, sucl as llo prinlor and dala slrucluros in momory. Assumo llal lvo mi-
croprocossors, CIU A and CIU B, nood lo prinl a fiIo. In ordor for CIU A and
CIU B lo slaro llo prinlor, lloy musl slaro llo bus llal connocls lo llo prinlor.
An arbilor provonls bus conlonlion bolvoon CIU A and CIU B by conlroIIing
llo HOID inpuls lo boll microprocossors. OnIy ono microprocossor ovns llo
bus al a limo.

If CIU A voro granlod llo busos by llo arbilor, il couId slarl vriling lo llo
prinlor. Il may laIo CIU A sovoraI bus cycIos lo vrilo llo onliro fiIo lo llo
prinlor. CIU B migll roquosl llo busos from llo arbilor boforo CIU A finislod
vriling llo onliro fiIo lo llo prinlor. If llo arbilor granlod llo busos lo CIU B,
llon CIU A vouId lavo lo givo up llo busos. Wlon CIU B slarlod vriling lo
llo prinlor, llo rosuIl vouId bo a misl-masl of prinloul from CIU A and CIU
B, aII mixod up.
80286
LOCK
lnt ernal
Hold
HOLD
HLDA

--


CIU B noods lo bo loId lo vail unliI CIU A las finislod llo prinl job. Tlis is
usuaIIy landIod by somaploros, moaning sign boarors. (Did you roaIizo
youd Ioarn GrooI vliIo roading llis`) Somovloro in momory, a somaploro
indicalos vlollor llo prinlor is avaiIabIo for uso. Donl confuso llis vill llo
prinlor slalus bylo vlicl indicalos vlollor llo prinlor is busy or oul of papor.
Tlo somaploro is IiIo a rosorvalionisl. Boll microprocossors vouId lavo lo
clocI llo somaploro boforo boginning a prinl job.

CIU A vouId road a copy of llo somaploro inlo ono of ils inlornaI rogislors.
CIU A vouId llon losl llo copy in ils rogislor lo soo if llo prinlor is avaiIabIo.
If llo prinlor is avaiIabIo, CIU A vouId sol llo vaIuo in ils rogislor. Tlon CIU
A vouId vrilo llo rogislors vaIuo (llo nov somaploro vaIuo) bacI lo llo
somaploros Iocalion in momory. Tlis is somolimos roforrod lo as a road-
modify-vrilo oporalion and llo modify porlion of llo oporalion may bo a
losl-and-sol oporalion.

Onco CIU A las vrillon llo nov vaIuo of llo somaploro bacI lo momory, il
may slarl vriling lo llo prinlor, so Iong as llo arbilor las sliII granlod llo busos
lo CIU A.

CIU B las lo oboy llo samo ruIos llal CIU A doos, so boforo CIU B vrilos lo
llo prinlor, il musl road and losl llo somaploro. CIU A las aIroady vrillon a
nov vaIuo bacI lo llo somaploro in momory, so vlon CIU B roads llo soma-
ploro, CIU B viII soo llal llo prinlor is nol avaiIabIo. CIU B viII go inlo a
spin Ioop, somolimos roforrod lo as a spin IocI, ro-roading llo somaploro
occasionaIIy unliI il soos llal llo prinlor is onco again avaiIabIo. Tlis soIvos llo
misl-masl probIom, or so il sooms.

If CIU A and CIU B noodod lo vrilo lo llo prinlor al llo samo limo, lloy
vouId boll nood lo accoss llo somaploro al llo samo limo. Tlo arbilor vouId
onIy aIIov ono of llom lo uso llo busos al a limo. Assumo CIU A las liglor
priorily, so llo arbilor granls llo busos lo CIU A, and CIU A roads llo soma-
ploro firsl. Iols slarl off assuming llal llo somaploro las a 0 in il lo indicalo
llal llo prinlor is avaiIabIo. CIU A losls llo somaploro and finds il lo bo 0,
moaning llo prinlor is avaiIabIo. CIU A llon sols ils copy of llo somaploro (ils
gonoraI purposo rogislor) lo 1, lo indicalo llal llo prinlor is unavaiIabIo. WliIo
CIU A is losling and solling ils copy of llo somaploro, il doos nol nood lo uso
llo busos, sinco llo losl and sol oporalions occur onliroIy villin ils gonoraI
purposo rogislors vlicl aro insido llo microprocossor. During llis limo, CIU B
is sliII roquosling llo busos, so llo arbilor granls llo busos lo CIU B. CIU A
lasnl lad a clanco lo vrilo llo somaploro bacI lo momory yol. CIU B roads a

-

copy of llo somaploro and bogins lo losl il. Tlo somaploro in momory is sliII 0,
so vlon CIU B losls il, CIU B llinIs llal llo prinlor is avaiIabIo.

CIU A las dolorminod llal llo prinlor is avaiIabIo and roquosls llo busos from
llo arbilor so il can vrilo llo nov vaIuo of llo somaploro lo momory. CIU A
llon roquosls llo busos so il can bogin vriling lo llo prinlor. MoanvliIo, CIU
B las aIso dolorminod llal llo prinlor is avaiIabIo bocauso llo somaploro vas 0
vlon CIU B road il. CIU B boIiovos llal il ovns llo prinlor and vo lavo llo
samo misl-masl probIom llal vo slarlod vill.

Tlo inlondod oporalion vas for CIU A lo road llo somaploro, losl il, sol il and
vrilo il bacI villoul inlorforonco from CIU B. Tloso oporalions voro inlondod
lo bo indivisibIo, or alomic (yos, ils GrooI). Tlals ono of llo purposos of
IOCK#. By assorling IOCK#, CIU A provonls llo arbilor from granling llo
busos lo CIU B unliI aflor CIU A las vrillon llo updalod somaploro lo mom-
ory. Aflor vriling llo somaploro, CIU A doassorls IOCK# and llo arbilor can
granl llo busos lo CIU B. Nov, vlon CIU B roads llo somaploro, il soos llal
llo prinlor is nol avaiIabIo and il goos inlo a spin Ioop.

If llo programmor doosn'l vanl llo microprocossor lo givo up llo busos during
a sorios of inslruclions, oacl of llo inslruclions slouId bo profacod by a IOCK
profix. Iacl limo llal llo microprocossor soos a IOCK profix in fronl of an in-
slruclion, il viII assorl llo IOCK# oulpul vliIo llo inslruclion is oxoculod. Tlo
Iov on llo IOCK# Iino viII forco llo microprocossor's inlornaI HoId roquosl lo
romain doassorlod and llo HIDA oulpul viII aIso romain doassorlod, provonl-
ing any bus maslor from sloaIing llo busos.

Tlo procoding discussion of alomic oporalions is jusl an oxampIo lo iIIuslralo
llo IocI moclanism of llo x86 microprocossors. Tlo momory addrossos of llo
somaploros and llo moanings of llo somaploros aro syslom soflvaro issuos.
Tloro aro ollor vays of prolocling accoss lo slarod rosourcos ollor llan using
IOCK#. AIso, il is raro for ISA maclinos lo lavo muIlipIo procossors in llom.
Tlo DMA conlroIIors (vlicl aro non-inloIIigonl bus maslors) slouId nol accoss
somaploros sinco lloy cannol maIo docisions on lloir conlonls.

Tlo RIADY# inpul aIIovs sIov accoss dovicos lo slrolcl oul llo microprocos-
sor's bus cycIos lo malcl lloir ovn sIov rosponso limo. Tlis subjocl vas inlro-
ducod in llo claplor onlilIod Inlroduclion lo llo Bus CycIo and is oxpIorod in
moro dopll in llo claplor onlilIod DolaiIod Viov of llo Bus CycIo.

--

-
Tlo 80286 microprocossor las lvo inpuls usod by oxlornaI Iogic lo inlorrupl llo
microprocossor's program oxoculion. Tloso lvo inpuls aro INTR and NMI.

Tlo microprocossor's Inlorrupl Roquosl inpul (INTR) is froquonlIy roforrod lo
as masIabIo inlorrupl roquosl. INTR is gonoralod by llo InloI 8259A Irogram-
mabIo Inlorrupl ConlroIIor vlon an oxlornaI lardvaro dovico roquiros sorvic-
ing (for oxampIo, llo Ioyboard inlorfaco las a IoyslroIo for llo
microprocossor).

INTR is caIIod llo masIabIo inlorrupl roquosl inpul bocauso llo programmor
las llo abiIily lo masI oul, or ignoro, llis inpul. If llo programmor las a soc-
lion of crilicaI codo (sorios of inslruclions) llal lo or slo doosn'l vanl inlor-
ruplod, llo inslruclions can bo profacod vill a CII (CIoar Inlorrupl InabIo)
inslruclion. Onco llo microprocossor oxoculos llis inslruclion, il viII ignoro llo
INTR inpul unliI rocognilion of oxlornaI lardvaro inlorrupls is onco again ro-
onabIod by llo programmor. Wlon llo crilicaI sorios of inslruclions las boon
oxoculod villoul inlorruplion, llo programmor slouId llon oxoculo llo STI
(Sol Inlorrupl InabIo) inslruclion, ro-onabIing rocognilion of oxlornaI lardvaro
inlorrupls on llo INTR inpul Iino.

Sinco inlorrupls arriving on llo INTR Iino viII nol bo rocognizod vliIo llo pro-
grammor las inlorrupls disabIod, llo programmor slouIdn'l disabIo inlorrupl
rocognilion for oxlondod poriods of limo. If INTR is ignorod for loo Iong, im-
porlanl ovonls can bo missod by llo microprocossor.

Tlo Non-MasIabIo Inlorrupl roquosl (NMI) inpul lo llo microprocossor is lypi-
caIIy usod by oxlornaI Iogic lo aIorl llo microprocossor llal a crilicaI lardvaro
or soflvaro faiIuro las boon doloclod (for oxampIo, a momory parily orror). Il's
caIIod llo non-masIabIo inlorrupl roquosl Iino bocauso llo programmor las no
vay of masIing oul rocognilion of NMI if il slouId bocomo assorlod. Tlo mi-
croprocossor viII sorvico NMI inlorrupls immodialoIy.

A compIolo oxpIanalion of boll masIabIo and non-masIabIo inlorrupls can bo
found in llo claplor onlilIod Tlo Inlorrupl Subsyslom.
-- - -
Irocossor oxlonsion is anollor namo for llo numoric coprocossor. Tloso four
signaI Iinos aro usod lo connocl llo numoric coprocossor lo llo microprocossor.


-

Rofor lo figuro 5-17. Irocossor Ixlonsion Roquosl (IIRIQ) is an oulpul from
llo numoric coprocossor and an inpul lo llo microprocossor. Il is usod by llo
numoric coprocossor lo asI llo microprocossor lo porform a momory lransfor.
Irocossor Ixlonsion AcInovIodgo (IIACK#) is an oulpul from llo microproc-
ossor and an inpul lo llo numoric coprocossor. Tlo microprocossor usos
IIACK# lo rospond lo llo IIRIQ issuod by llo numoric coprocossor. Il in-
forms llo numoric coprocossor llal llo roquoslod momory lransfor is in pro-
gross.


- -- --

BUSY# is an oulpul from llo numoric coprocossor lo llo microprocossor. Tlo
numoric coprocossor assorls BUSY# vlon il bogins oxoculion of an inslruclion
rocoivod from llo microprocossor. WliIo BUSY# is assorlod, llo microprocossor
slouIdn'l forvard any moro inslruclions lo llo numoric coprocossor.

IRROR# is an oulpul from llo numoric coprocossor lo llo microprocossor. Il
informs llo microprocossor llal llo numoric coprocossor las incurrod an orror
vliIo oxoculing an inslruclion. In ISA maclinos, llo numoric coprocossor's IR-
80287
Numeric
Coprocessor
80286
Microprocessor
PEREQ
PEREQ
PEACK PEACK
BUSY BUSY
ERROR
lRQ13
ERROR
+5Vdc

--

ROR# oulpul isn'l connoclod lo llo IRROR# inpul of llo microprocossor. In-
sload, IBM closo lo allacl llo IRROR# oulpul lo IRQ13 (Inlorrupl Roquosl
IovoI 13). In ollor vords, inlorrupls aro usod lo roporl numoric coprocossor or-
rors.

Tlis subjocl is covorod in moro dopll in llo claplors onlilIod Tlo Numoric
Coprocossor and Tlo Inlorrupl Subsyslom. Iiguro 5-17 iIIuslralos llo inlor-
faco bolvoon llo microprocossor and llo numoric coprocossor.

IroquonlIy roforrod lo as CIK2, llis is llo microprocossor's doubIo-froquoncy
cIocI inpul. InlornaIIy, llo microprocossor llon dividos CIK2 by lvo lo yioId
ICIK, llo roaI loarlboal of llo microprocossor.
-
Among llo possibIo RISIT sourcos, llo RISIT inpul lo llo microprocossor is
dorivod from llo povor suppIy's IOWIRGOOD oulpul signaI. In addilion,
RISIT aIso fans oul and is appIiod lo many ollor syslom compononls, incIud-
ing cards pIuggod inlo llo ISA sIols. Wlon llo povor suppIy is firsl lurnod on,
ils oulpul voIlagos aro nol yol slabIo. Tlo povor suppIy viII Ioop llo IOWIR-
GOOD signaI doassorlod unliI povor las slabiIizod. WliIo IOWIRGOOD is
doassorlod, RISIT viII bo assorlod. Wlon llo povor suppIy oulpul voIlagos
lavo slabiIizod, llo IOWIRGOOD signaI is assorlod and RISIT is doassorlod.

WliIo RISIT is assorlod, il las lvo offocls on llo microprocossor and ollor
syslom compononls:

1. Koops any aclivily from occurring unliI povor las slabiIizod.
2. Irosols llo microprocossor and ollor syslom dovicos lo a Inovn slalo prior
lo Iolling llom bogin lo do lloir job. Tlis onsuros llal llo maclino viII aI-
vays slarl up llo samo vay.

Rofor lo figuro 5-18. In ordor lo guaranloo propor oporalion of llo microprocos-
sor, llo RISIT inpul musl clango slalo in synclronism vill llo doubIo-
froquoncy cIocI. Tlo Rosol Sync fIip-fIop in llo iIIuslralion accompIislos llis
lasI. On oacl rising-odgo of CIK2, llo oulpul of llo fIip-fIop is sol lo llo oppo-
silo slalo of llo IOWIRGOOD inpul. During llo poriod immodialoIy foIIoving
syslom povor-up, IOWIRGOOD is doassorlod and RISIT viII lloroforo bo
assorlod (bocauso llo fIip-fIop is conlinuousIy cIocIing onos llrougl lo llo RI-
SIT Iino). Wlon llo povor suppIy oulpul voIlagos lavo slabiIizod, lovovor,

-

llo IOWIRGOOD signaI goos ligl and llo fIip-fIop bogins lo conlinuousIy
cIocI zoros onlo llo RISIT Iino.

-

Moro informalion rogarding RISIT's offocl on llo microprocossor can bo found
in llo claplor onlilIod Tlo Iovor-Up Soquonco.

Tlis soclion providos a doscriplion of lov llo 80286 microprocossor forms
plysicaI momory addrossos vlon proloclod modo is onabIod. Il doos nol pro-
POWERGOOD
CLK2
D
RESET
Q
Reset
Sync
Power
Supply
80286

--

vido an in-dopll programmor's guido lo aII aspocls of proloclod modo opora-
lion. Ior lvo roasons, llal subjocl is oulsido llo scopo of llis booI:

Il is puroIy a programming issuo and las absoIuloIy nolling lo do vill llo
lardvaro inlorfaco bolvoon llo microprocossor and llo rosl of llo syslom.
To provido an in-dopll doscriplion vouId roquiro a soparalo voIumo of
sizabIo proporlions. Sinco lloro aro aIroady a numbor of good booIs avaiI-
abIo on llo subjocl, il vouId bo an unnocossary dupIicalion of offorl.
-
--
Tlo 80286 microprocossor's proloclod modo vas dosignod lo faciIilalo llo im-
pIomonlalion of muIlilasIing oporaling sysloms IiIo OS/2 and UNIX. UnIiIo
MS-DOS, vlicl vas dosignod lo landIo a singIo-lasI (appIicalions program) al
a limo, a muIlilasIing oporaling syslom is dosignod lo run and Ioop lracI of
muIlipIo lasIs.

A muIlilasIing oporaling syslom viII lypicaIIy Iol a lasI run unliI oillor:

a prodolorminod poriod of limo las oIapsod or
llo lasI roquiros somolling llal isn'l immodialoIy avaiIabIo.

Assumo llal an appIicalions program roforrod lo as lasI A las nol yol run for
ils aIIollod poriod of limo, bul il roquiros somolling llal isn'l immodialoIy
avaiIabIo. Good oxampIos vouId bo vailing for a IoyslroIo or llo compIolion
of a disI road oporalion. Sinco lloso oporalions viII laIo somo limo, il vouId bo
vaslofuI lo lavo llo microprocossor vail for llo oporalion lo compIolo. In-
sload, llo oporaling syslom viII sloro aII of llo microprocossor's rogislors in a
spociaI sogmonl of momory, Inovn as a TasI Slalo Sogmonl (TSS). Tloro is a
soparalo TSS for ovory program llal llo microprocossor is running. Tlis slorod
informalion viII Ialor aIIov llo microprocossor lo picI up vloro il lad sus-
pondod TasI A onco llo roquoslod oporalion las compIolod.

Having slorod lasI A's TasI Slalo, llo microprocossor can llon givo conlroI lo a
lasI vlicl vas proviousIy suspondod vliIo vailing for compIolion of somo
ollor oporalion. Wo'II caII llis lasI B. Tlo microprocossor Ioads aII of llo mi-
croprocossor's rogislors from llo TSS boIonging lo lasI B. Tlis TSS loIds llo in-
formalion doscribing llo microprocossor's slalo al llo poinl vlon lasI B vas
suspondod.


-

TasI B viII llon run unliI oillor ils aIIollod limo las oIapsod or il again noods
somolling il las lo vail for, al vlicl poinl il viII bo suspondod and conlroI
viII pass lo anollor lasI. A muIlilasIing oporaling syslom can bo viovod as a
juggIor vlo las lo Ioop a numbor of baIIs in llo air villoul dropping any.

Will llo loIp of llo 80286's proloclod modo foaluros, llo oporaling syslom
musl:

1. Irolocl appIicalion programs from oacl ollor. In ollor vords, don'l aIIov
ono appIicalion program lo pIay vill anollor appIicalion program's dala
or codo sogmonls. Any allompl on llo parl of ono appIicalion program lo
accoss anollor program's aroas of momory slouId rosuIl in an Ixcoplion
Inlorrupl vlicl viII bo landIod by llo oporaling syslom soflvaro.
2. Irolocl ilsoIf from llo appIicalion programs il is suporvising.
3. Irovido llo inlorfaco bolvoon appIicalions programs and I/O dovicos. Il
couId bo calaslroplic if an appIicalion program manipuIalos an I/O dovico
(for oxampIo, a disI) villoul llo Oporaling Syslom's InovIodgo. Tlo op-
oraling syslom vouIdn'l Inov dala on a disI or llo slalo of an I/O dovico
lad boon aIlorod.

In ordor lo provonl llis possibiIily, any allompl on llo parl of an appIicalion
program lo oxoculo an I/O road or vrilo viII causo an Ixcoplion Inlorrupl
vlon llo IOII bil in llo fIag rogislor is sol. Tlis informs llo oporaling syslom
of llo allompl lo accoss an I/O dovico. Ho may llon clooso lo casl oul llo do-
mon appIicalion program vlo las vioIalod sacrod ground.

In proloclod modo, sogmonls can bo doscribod as:

1. boIonging lo (accossibIo by) aII programs. Tlis is roforrod lo as a GIobaI
Sogmonl.
2. boIonging lo a parlicuIar appIicalion program. Tlis is roforrod lo as a IocaI
Sogmonl bocauso il's IocaI lo llo curronlIy running appIicalion program.
Any allompl by a program ollor llan llo appIicalion program llal ovns
llis IocaI Sogmonl or llo oporaling syslom lo accoss a IocaI Sogmonl viII
causo an Ixcoplion Inlorrupl.
3. boIonging lo llo oporaling syslom soflvaro. Tlis is roforrod lo as a Syslom
Sogmonl. Any allompl by a program ollor llan llo oporaling syslom lo ac-
coss a Syslom Sogmonl viII causo an Ixcoplion Inlorrupl.
4. road-onIy sogmonls. Any allompl lo vrilo lo a road-onIy sogmonl viII
causo an Ixcoplion Inlorrupl.
5. oxoculo-onIy codo sogmonls. Any allompl lo accoss an oxoculo-onIy sog-
monl for anylling ollor llan an inslruclion folcl viII causo an Ixcoplion

--

Inlorrupl. Ivon an allompl lo road llo inslruclions as dala (using MOV in-
slruclions) viII causo llis oxcoplion. Tlis moans llal anollor program can'l
disassombIo llo inslruclions in a program's codo sogmonl lo figuro oul
vlal maIos il licI.
6. road/vrilo sogmonls. Tlis vouId bo a normaI dala sogmonl.
7. onIy accossibIo by programs vill a priviIogo IovoI oquaI lo or groalor llan
llo sogmonl's priviIogo IovoI.

As viII bo soon in llo noxl soclion, llo oporaling syslom soflvaro mainlains a
group of labIos in momory llal doscribo:

llo GIobaI sogmonls llal anyono can accoss. Tlo GIobaI Doscriplor TabIo
(GDT) rosidos in momory. Iacl onlry conlains a sogmonl doscriplor, do-
scribing a gIobaIIy accossibIo sogmonl.
llo IocaI sogmonls llal boIong lo a parlicuIar appIicalion program. Tlo
IocaI Doscriplor TabIo (IDT) rosidos in momory. Iacl onlry conlains a
sogmonl doscriplor, doscribing a sogmonl boIonging lo a parlicuIar pro-
gram.
Inlorrupl Sorvico Roulinos. Tlo Inlorrupl Doscriplor TabIo (IDT) rosidos in
momory. Iacl onlry conlains an Inlorrupl Doscriplor vlicl doscribos llo
Iocalion and accossibiIily of llo Inlorrupl Sorvico Roulino.
- -
Tlo microprocossor can bo pIacod in proloclod modo by solling bil 0, llo II bil,
in llo MSW rogislor. Irior lo acluaIIy solling llis bil, lovovor, llo programmor
musl vrilo corlain labIos of informalion inlo momory. IaiIuro lo do so viII
causo aII loII lo broaI Iooso vlon proloclod modo is onabIod.

Will llo ono oxcoplion aIroady doscribod, il is impossibIo lo addross oxlondod
momory (momory abovo 1MB) vliIo in roaI modo. In roaI modo, llo sogmonl
rogislors can onIy bo usod lo form a 5-digil addross, llus Iimiling you lo ad-
drossos in llo rango 000000l lo 0IIIIIl (llo Iovor 1MB). Sinco llo 80286 mi-
croprocossor acluaIIy las 24 addross Iinos, A|23:0], il is capabIo of gonoraling
momory addrossos from 000000l lo IIIIIIl (a 16MB addross rango). Tlo
80286 musl bo svilclod inlo proloclod modo lo do llis, lovovor.

Wlon in proloclod modo, llo vaIuo in llo sogmonl rogislor is inlorprolod dif-
foronlIy llan vlon in roaI modo. In roaI modo, llo vaIuo in llo sogmonl rogislor
(vill llo imaginary 0l on llo ond) vas llo acluaI slarl addross of llo rospoc-
livo sogmonl (CS, DS, SS or IS) in momory. In proloclod modo, llougl, llo

-

vaIuo pIacod in llo sogmonl rogislor (usuaIIy roforrod lo as llo Sogmonl SoIoc-
lor vlon in proloclod modo) acluaIIy conlains llo foIIoving informalion:

Roquoslor IriviIogo IovoI (RII) fioId
TabIo Indicalor (TI) bil
TabIo indox fioId

Rofor lo figuro 5-19. Tlo RII fioId indicalos llo priviIogo IovoI of llo program
llal is allompling lo accoss llo largol sogmonl. Tlo TabIo Indicalor (TI) bil
poinls lo ono of lvo labIos in momory:

0 = llo GIobaI Doscriplor TabIo
1 = llo IocaI Doscriplor TabIo

Tlo indox porlion of llo vaIuo pIacod in llo sogmonl rogislor (or sogmonl soIoc-
lor) providos an indox inlo llo labIo indicalod by llo TabIo Indicalor bil.






In addilion lo llo sogmonl rogislors, llo 80286 aIso las llroo rogislors Inovn as
llo GIobaI Doscriplor TabIo Rogislor (GDTR), llo IocaI Doscriplor TabIo Rogis-
lor (IDTR) and llo Inlorrupl Doscriplor TabIo Rogislor (IDTR). Tlo oporaling
syslom programmor musl Ioad llo slarl momory addrossos of oacl of llo llroo
labIos inlo lloso rogislors.

Ioading a nov vaIuo inlo a sogmonl rogislor causos llo 80286 microprocossor
lo aulomalicaIIy gonoralo a sorios of four momory road bus cycIos lo gol llo 8-
Table lndex Tl RPL
0 1 2 3 15
Table lndicator (0 = Global, 1 = Local)
Requestor Privilege Level

--

bylo sogmonl doscriplor from llo indicalod onlry in llo labIo idonlifiod by llo
TI bil. Tlo microprocossor compulos llo slarl momory addross of llo 8-bylo
sogmonl doscriplor by muIlipIying llo indox by 8 (bocauso oacl labIo onlry is 8-
bylos Iong) and adding llo rosuIling offsol lo llo conlonls of llo rospoclivo Do-
scriplor TabIo Rogislor (oillor GIobaI or IocaI).

Tlo 8-bylo sogmonl doscriplor road from momory is Ioadod inlo a spociaI mi-
croprocossor rogislor Inovn as a doscriplor caclo rogislor. Tloro is a corro-
sponding caclo rogislor for oacl of llo four sogmonl rogislors.

As an oxampIo, vlon a vaIuo is Ioadod inlo llo CS rogislor, llo microprocossor
usos llo TI bil lo idonlify llo labIo lo accoss (GIobaI or IocaI), muIlipIios llo in-
dox by oigll and adds il lo llo labIo slarl addross from llo GDTR or IDTR. Tlo
8-bylo codo sogmonl doscriplor is road inlo llo microprocossor's codo sogmonl
caclo rogislor. OnIy vlon llo microprocossor las llo sogmonl doscriplor can il
add llo offsol suppIiod by II rogislor lo llo codo sogmonl's acluaI slarl addross
and gonoralo llo bus cycIo lo accoss llo dosirod momory Iocalion in llo codo
sogmonl.

Tlis rallor invoIvod procoss may soom lromondousIy inofficionl, and vouId bo
if llo microprocossor lad lo go llrougl aII of llis ovory limo il noodod lo ac-
coss a momory Iocalion. In acluaIily, llo microprocossor onIy las lo road a
sogmonl doscriplor from momory vlon a nov vaIuo is pIacod in a sogmonl rog-
islor by llo programmor. AII subsoquonl momory accossos villin llo samo
sogmonl lappon quicIIy bocauso aII of llo sogmonl's doscriplivo informalion is
aIroady on-board llo microprocossor clip in llo caclo rogislor and can bo usod
immodialoIy in forming llo acluaI plysicaI momory addross.

Rofor lo figuro 5-20. A sogmonl doscriplor is 8 bylos in Iongll and doscribos
ovorylling you ovor vanlod lo Inov aboul llo sogmonl:

1. Tlo 24-bil slarl addross of llo sogmonl in momory. Tlis moans llo pro-
grammor can spocify a slarl momory addross anyvloro in llo microproc-
ossor's 16MB addross rango.
2. UnIiIo roaI modo, vloro llo sogmonl Iongll is fixod al 64KB, llo Iongll of
llo sogmonl can bo spocifiod as anyvloro bolvoon 1 bylo and 64KB.
3. Sogmonl accoss riglls bylo. Tlo bils in llis bylo aIIov llo oporaling syslom
lo spocify proloclion foaluros associalod vill llo sogmonl boing doscribod.

-




-

Bylos 0 and 1, llo firsl lvo bylos in llo doscriplor, spocify llo sizo of llo sog-
monl boing doscribod. Tlo noxl llroo bylos suppIy llo acluaI slarl addross of
llo sogmonl in momory. Sinco llis is a 24-bil vaIuo, llo slarl addross may bo
anyvloro in llo 16MB momory addross spaco of llo 80286 microprocossor. Tlo
noxl bylo is roforrod lo as llo allribulo bylo and dofinos llo foIIoving claraclor-
islics of llo sogmonl:

Lower Byte of Size
Upper Byte of Size
Lower Byte of Base Address
Middle Byte of Base Address
Upper Byte of Base Address
Not used by 80286
Not used by 80286
P DPL S Type A Attribute Byte
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7

--





-
A Accossod bil. Tlis bil viII bo 0 if llo sogmonl las nol boon accossod.
TYII Tlis 3-bil fioId dofinos llo lypo of sogmonl. Using llis fioId, llo sogmonl
may bo dofinod as:
an oxoculabIo codo sogmonl (onIy inslruclion folclos may bo porformod
from llo sogmonl). Tlis provonls anollor program from roading lloso in-
slruclions so lloy can bo disassombIod.
a codo sogmonl llal may bo road as dala or inslruclions. Tlis codo sog-
monl may bo road by anollor program so il can bo disassombIod.
a road/vrilabIo dala sogmonl.
a road-onIy dala sogmonl.
S S = 1 for a Dala or codo sogmonl. S = 0 for a ConlroI Doscriplor.
DII Doscriplor IriviIogo IovoI. Tlo program allompling lo accoss llo sogmonl
musl lavo a Roquoslor IriviIogo IovoI (RII) oquaI lo or groalor llan llo
DII spocifiod loro.
I If 0, doscriplor isn'l vaIid (doosn'l doscribo a sogmonl of momory). If 1, do-
scriplor is vaIid.

Nolo: An in-dopll doscriplion of sogmonl doscriplors and ollor Iroloclod
Modo subjocls is oulsido llo scopo of llis booI.


-


-
Tlo firsl fivo claplors inlroducod llo concopls of microprocossor communica-
lions and provido a dolaiIod undorslanding of llo 80286 microprocossors inlor-
faco signaIs.
-
ISA producls usuaIIy lavo six soparalo sourco for rosol, lvo of vlicl aro gon-
oralod onIy by lardvaro and four llal can bo inilialod by soflvaro commands.
Tlis claplor dolaiIs llo rosol sourcos villin lypicaI ISA sysloms.

Tlo noxl claplor oxpIains llo soquonco of ovonls llal occur immodialoIy aflor
an ISA syslom is povorod on.
-
Tlo povor suppIy providos llo oporaling voIlagos nocossary for syslom opora-
lion. Wlon llo povor svilcl is firsl pIacod in llo on posilion, il laIos somo
limo for llo povor suppIys oulpul voIlagos lo roacl lloir propor oporaling
IovoIs. If llo syslom compononls voro aIIovod lo bogin oporaling boforo llo
voIlagos slabiIizod, il vouId rosuIl in orralic oporalion.

Ivory IC povor suppIy producos an oulpul signaI commonIy caIIod IOWIR-
GOOD. On llo syslom board, llo IOWIRGOOD signaI is usod lo produco llo
RISIT signaI. During llo poriod roquirod for slabiIizalion of llo oulpul voIl-
agos, llo IOWIRGOOD signaI is Iopl doassorlod by llo povor suppIy. WliIo
IOWIRGOOD is doassorlod, llo RISIT signaI is Iopl assorlod.

WliIo RISIT is assorlod, il las lvo offocls on llo microprocossor and ollor
syslom compononls:


-

1. Koops any aclivily from occurring unliI povor las slabiIizod.
2. Irosols llo microprocossor and ollor syslom dovicos lo a Inovn slalo prior
lo Iolling llom bogin lo do lloir job. Tlis onsuros llal llo maclino viII aI-
vays slarl up llo samo vay.

Wlon IOWIRGOOD bocomos assorlod, llo RISIT signaI is doassorlod and llo
microprocossor can bogin lo folcl and oxoculo inslruclions. Tlo firsl inslruclion
is aIvays folclod from llo povor-on roslarl addross vlicl is aIvays Iocalod 16
Iocalions from llo vory lop of llo momory addross spaco. Ior llo 8088 micro-
procossor, llis vouId bo IIII0l, IIIII0l for llo 80286 and 80386SX, and
IIIIIII0l for llo 80386DX, 80486 and Ionlium microprocossors. Tlis Iocalion
conlains llo firsl inslruclion of llo IOST.
-
Somo sysloms provido a momonlary-conlacl svilcl vlicl llo usor may pross
lo forco llo RISIT signaI lo bo assorlod lo llo microprocossor and lo llo rosl of
llo syslom. Tlo offocl on llo syslom is llo samo as doassorling IOWIRGOOD
from llo povor suppIy, bul llo povor suppIy is nol acluaIIy lurnod off.

Wlon llo microprocossor dolocls an oxcoplion vliIo allompling lo oxoculo llo
landIor for a prior oxcoplion, llo lvo oxcoplions aro gonoraIIy landIod soriaIIy.
Corlain combinalions of oxcoplions cannol bo landIod soriaIIy, lovovor. Tloso
oxcoplions aro causod by proloclion vioIalions in proloclod modo. Ior oxampIo,
in proloclod modo, if an appIicalion allompls lo accoss dala llal is oulsido ils
dala sogmonl, llo microprocossor viII slarl running llo gonoraI proloclion fauIl
oxcoplion landIor. If, say, a slacI ovorfIov voro lo occur vliIo llo microproc-
ossor ran llo gonoraI proloclion fauIl oxcoplion landIor, llo microprocossor
vouId nol bo abIo lo landIo llo lvo fauIls soriaIIy. Tlo microprocossor vouId
invoIo llo doubIo-fauIl oxcoplion insload.

If llo microprocossor dolocls anollor oxcoplion vliIo allompling lo sorvico llo
doubIo-fauIl, il goos inlo a sluldovn condilion. Tlis is somolimos roforrod lo
as a lripIo fauIl. Tlo microprocossor indicalos llo sluldovn condilion lo oxlor-
naI Iogic by running llo laIl or sluldovn bus cycIo. Sinco llo microprocossor
las abnormaIIy coasod lo folcl and oxoculo inslruclions, il canl run a program
lo inform llo usor llal a sovoro orror las occurrod. Tloroforo, in an ISA ma-
clino, llo sluldovn dolocl Iogic oulsido llo microprocossor dolocls llo slul-

-

dovn and loggIos llo microprocossors RISIT Iino, causing llo syslom lo ro-
bool.

Soo llo claplors onlilIod DolaiIod Viov of llo 80286 Bus CycIo and DolaiIod
Viov of llo 80386 Bus CycIo for addilionaI informalion on llo laIl or slul-
dovn bus cycIo.
-
MS-DOS vas vrillon spocificaIIy for llo InloI 8088 microprocossor using 8088-
spocific inslruclions. Sinco llo 8088 onIy las 20 addross Iinos, il is incapabIo of
gonoraling a momory addross groalor llan IIIIIl, or 1MB. Iurllormoro, pro-
loclod modo vasnl inlroducod unliI llo advonl of llo 80286 microprocossor.
ConsoquonlIy, MS-DOS can onIy addross llo Iovor 1MB and doosnl undor-
sland proloclod modo.

Wlon an 80286 is povorod up, il oporalos in roaI modo. In ollor vords, il op-
oralos as if il voro an 8088. Tlis moans llal, aIllougl llo 80286 las lvonly-
four addross Iinos and can plysicaIIy addross up lo 16MB of momory addross
spaco, il is Iimilod lo llo Iovor 1MB vlon in roaI modo.

Mosl curronl appIicalions programs aro vrillon lo run undor MS-DOS. Many
of lloso programs roquiro accoss lo moro momory spaco llan aIIovod undor
MS-DOS. As an oxampIo, many Iolus 1-2-3 sproadslools roquiro vory Iargo
amounls of momory spaco, voII in oxcoss of llal aIIovod undor MS-DOS and
llo 8088 microprocossor.

If a syslom is basod on llo 80286 microprocossor, llo probIom can bo soIvod by
svilcling llo microprocossor inlo proloclod modo. Tlis aIIovs llo microproc-
ossor lo accoss up lo 16MB of momory spaco, bul MS-DOS prosonls a probIom.
Il doosnl undorsland proloclod modo and is lloroforo incapabIo of gonoraling
addrossos abovo 1MB.

SpociaI soflvaro llal undorslands proloclod modo oporalion proparos llo sog-
monl doscriplor labIos in momory prior lo svilcling inlo proloclod modo. Il
aIso musl savo llo addross of llo noxl inslruclion lo bo oxoculod vlon llo mi-
croprocossor rolurns lo roaI modo so MS-DOS can conlinuo lo run al llo poinl
vloro il vonl lo proloclod modo. Tlo 80286 is llon svilclod inlo proloclod
modo and llo oxlondod momory abovo 1MB accossod (for oxampIo, lo sloro
sproadslool dala).
Onco llo oxlondod momory accoss las boon compIolod, llo microprocossor
musl bo svilclod bacI inlo roaI modo so llo appIicalions program can conlinuo

-

lo run undor MS-DOS. Horos vloro llo probIom comos in. In ordor lo svilcl
llo 80286 microprocossor from proloclod lo roaI modo, llo microprocossor
musl bo rosol.

To do llis, llo foIIoving aclions musl bo laIon:

1. Tlo programmor sloros an addross poinlor llal poinls lo llo addross of llo
roaI modo inslruclions llal aro rosponsibIo for rosloring llo syslom lo ils
provious oporaling condilion. Tlis poinlor is slorod in Iocalions 0040:0067
lo 0040:006A. Tlo conlonls of lloso Iocalions viII bo usod Ialor vlon llo
procossor rolurns lo roaI modo lo find llo addross in momory vloro llo
roaI modo inslruclions rosido.
2. A spociaI vaIuo (05l or 0Al) is slorod in llo configuralion CMOS RAM Io-
calion (0Il) lo indicalo llo roason for llo rosol. Rofor lo labIo 6-1 for dofini-
lions of llo rosol bylo in CMOS RAM.
3. Tlo syslom las nov boon proparod lo rolurn lo roaI modo. Tlo Hol Rosol
command musl nov bo issuod lo llo Ioyboard/mouso inlorfaco. Tlis is
accompIislod by vriling a IIl lo llo Ioyboard/mouso inlorfacos com-
mand porl al I/O addross 0064l.
4. In rosponso, llo Ioyboard/mouso inlorfaco puIsos ils Hol Rosol oulpul ono
limo, causing llo lardvaro lo gonoralo a rosol lo llo 80286.
5. Wlon rosol bocomos doassorlod, llo microprocossor bogins lo folcl and
oxoculo inslruclions al llo povor-on roslarl addross oxaclIy as if a povor-
up lad jusl occurrod.
6. Al llo boginning of llo IOST, llo programmor roads llo vaIuo slorod in
llo configuralion RAM Iocalion lo ascorlain llo rosols causo. In llis caso,
llo vaIuo (05l or 0Al) indicalos llal il vas causod by Hol Rosol lo gol bacI
lo roaI modo and conlinuo program oxoculion.
7. IOST llon rolriovos llo proviousIy slorod roaI modo addross poinlor found
al Iocalion 0040:0067 and jumps lo llo indicalod addross and picIs up
vloro il Iofl off in roaI modo.

Somo manufaclurors ompIoy a Hol Rosol inlorcopl vloro oxlornaI circuilry
rocognizos an IIl vrillon lo llo Ioyboard conlroIIor and immodialoIy gonor-
alos a Iasl Hol Rosol. Tlis providos a faslor rosol signaI comparod lo llo sIovor
gonoralion via a command lo llo Ioyboard conlroIIor. Ialor vorsions of InloIs
microconlroIIors (lypicaIIy usod as Ioyboard conlroIIors) provido an inlornaI in-
lorcopl llal aIso rosuIls in a fasl Hol Rosol.

Anollor mollod usod lo produco a fasl Hol Rosol is lo causo llo microprocos-
sor lo go inlo llo sluldovn condilion by inlonlionaIIy causing fauIls using
soflvaro. Tlis causos llo sluldovn dolocl Iogic lo rosol llo microprocossor.

-

- -
Tlo AIlornalo or Iasl Hol Rosol command is found in somo ISA sysloms llal
impIomonl syslom conlroI porl A al I/O addross 0092l, somolimos caIIod llo
IS/2 compalibiIily porl. AIlornalo Hol Rosol porforms llo samo funclion as llo
Hol Rosol command. Hovovor, llo microprocossor is rosol moro quicIIy using
llis mollod llan vlon using Hol Rosol. Tlo Hol Rosol command musl bo in-
lorprolod by llo ROM-basod program insido of llo Ioyboard/mouso inlorfaco,
vliIo llo AIlornalo Hol Rosol command is oxoculod by llo lardvaro mucl
moro quicIIy.

AIlornalo Hol Rosol is gonoralod by solling bil 0 in syslom conlroI porl A lo a
ono. Tlis gonoralos a puIso on llo AIlornalo Hol Rosol signaI Iino vlicl, in
lurn, causos a puIso on llo Hol Rosol signaI. Tlis rosols llo microprocossor. Ior
a moro oxlonsivo oxpIanalion of Hol Rosol, soo llo provious soclion.
-
Wlon llo conlroI and aIlornalo Ioys aro doprossod and loId, foIIovod by llo
doIolo Ioy boing doprossod, llroo maIo codos for lloso Ioys aro slorod in llo
Ioyboard buffor in momory. Wlon llo soquonco of maIo codos aro doloclod
by llo Ioyboard inlorrupl sorvico roulino, llo sofl rosol roulino is invoIod. Tlo
sofl rosol roulino causos llo syslom lo:

1. IIaco llo vaIuo 1234l inlo llo rosol fIag Iocalion (0040:0072) in main mom-
ory. Tlis vaIuo loIIs llo syslom lo sIip a porlion of llo IOST vlon robool-
ing.
2. Sloro a spociaI vaIuo (00l)in configuralion RAM lo indicalo llal a Con-
lroI/AIlornalo/DoIolo is causing llo rosol (aIso usod for povor-on rosol).
3. Doponding on llo compulor modoI and manufacluror ono of lvo mollods
is lypicaIIy usod lo rosol llo procossor.
Wrilo a IIl lo porl 64l, causing a CIU rosol. Wlon llo rosol is ro-
movod, llo microprocossor bogins lo folcl and oxoculo codo from Ioca-
lion IIII0l, llo boginning of IOST.
}ump lo Iocalion IIII0l and bogin program oxoculion.
4. Noar llo boginning of llo IOST, llo programmor roads llo vaIuo slorod in
llo configuralion RAM Iocalion lo ascorlain llo rosols causo. In llis caso,
llo vaIuo indicalos llal il vas causod by ConlroI/AIlornalo/DoIolo or
povor-on rosol.

-

5. Noxl, llo rosol fIag al Iocalion 0040:0072 is clocIod for llo vaIuo 1234l.
1234l indicalos a ClrI-AIl-DoI las causod llo rosol condilion and as a ro-
suIl, onIy a subsol of llo IOST is oxoculod.

-

00l NormaI Iovor-Up rosol or ClrI-AIl-DoI rosol doponding on llo vaIuo of llo Rosol fIag vord in
momory al Iocalion 0040:0072. Wlon llo rosol fIag conlains llo vaIuo 1234l, llo IOST mom-
ory losl is sIippod.
04l IOST is sIippod. Causos DOS lo bo Ioadod from disI.
05l IOST is sIippod and momory prosorvod. Tlo 80286 microprocossor cannol bo svilclod from
proloclod modo inlo roaI modo villoul rosolling llo procossor. Tlis prosonls probIoms vlon
llo programmor vislos lo lomporariIy svilcl lo proloclod modo lo accoss oxlondod momory
and llon svilcl bacI inlo roaI modo lo conlinuo oxoculion. Wlon a program musl lomporar-
iIy Ioavo roaI modo and onlor proloclod modo, llo programmor firsl sloros a four bylo momory
addross (poinlor) inlo momory Iocalion 0040:0067. Tlis poinlor spocifios llo addross al vlicl
roaI modo oxoculion viII rosumo. Having dono llis, llo program may svilcl llo procossor
inlo proloclod modo and accoss oxlondod momory. Upon compIoling llo proloclod modo
funclion, llo programmor musl pIaco llo vaIuo 05l or 0Al inlo llo rosol codo bylo in CMOS
RAM and llon rosol llo 80286 microprocossor. Wlon rosol goos avay, llo procossor is in roaI
modo and bogins oxoculing llo IOST. Tlo IOST codo clocIs for a 05l or a 0Al in llo rosol
codo bylo, and, if prosonl, jumps lo llo momory addross spocifiod in momory slarling al Ioca-
lion 0040:0067 lo rosumo oxoculion al llo poinl vloro il Iofl off in roaI modo. In addilion, if
llo rosol codo bylo vaIuo is 05l, an IOI command is issuod lo llo inlorrupl conlroIIor.
09l BIocI-movo rolurn. Tlis vaIuo is pIacod in llo rosol codo bylo by a BIOS caII lo INT 15l lo
movo a bIocI of informalion bolvoon convonlionaI and oxlondod momory. In ordor lo ac-
compIisl llis movo, llo procossor musl svilcl inlo proloclod modo. On an 80286-basod sys-
lom, llo INT 15l roulino sols llo rosol codo bylo lo 09l prior lo rosolling llo procossor lo
rolurn lo roaI modo aflor llo bIocI movo. Wlon rosol, llo procossor slarls oxoculing llo IOST,
clocIs llo rosol codo bylo vaIuo, and llon porforms an inlorrupl rolurn, or IRIT, inslruclion
lo rolurn lo llo originaI program aflor compIolion of llo caII lo llo INT 15l BIOS roulino.
0Al }ump lo roaI modo poinlor 0040:0067 villoul issuing IOI. Soo llo oxpIanalion for rosol codo
bylo = 05l.





-
Tlo provious claplor, Tlo Rosol Iogic, providod a dolaiIod doscriplion of llo
possibIo sourcos for RISIT.
-
Tlis claplor providos a doscriplion of llo ISA maclino povor-up soquonco
from llo momonl povor is appIiod unliI llo microprocossor bogins lo folcl and
oxoculo inslruclions.

Tlo noxl claplor, Tlo 80286 Syslom KornoI: llo Ingino, doscribos llo sup-
porl Iogic nocossary lo aIIov llo 80286 microprocossor lo communicalo vill 8-
and 16-bil dovicos.
-
Tlo povor suppIy providos llo oporaling voIlagos nocossary for syslom opora-
lion. Wlon llo povor svilcl is firsl pIacod in llo on posilion, a poriod of limo
is roquirod for llo povor suppIy's oulpul voIlagos lo roacl lloir propor oporal-
ing IovoIs. If llo syslom compononls aro aIIovod lo bogin oporalion boforo llo
suppIy voIlagos lavo slabiIizod, orralic oporalion vouId rosuIl.

Iiguro 7-1 iIIuslralos llo povor suppIy-roIalod Iogic llal producos llo micro-
procossor's RISIT signaI. Ivory ISA IC povor suppIy producos an oulpul sig-
naI commonIy caIIod IOWIRGOOD. On llo syslom board, llo RISIT signaI is
dorivod from llo IOWIRGOOD signaI. In ordor lo guaranloo propor oporalion
of llo microprocossor, llo RISIT inpul musl clango slalo in synclronism vill
llo CIK2 signaI (llo microprocossor's doubIo-froquoncy cIocI inpul). On oacl
rising odgo of CIK2, llo slalo of llo IOWIRGOOD inpul is Ialclod by llo fIip-
fIop, invorlod lo ils opposilo slalo, and prosonlod on llo fIip-fIop's oulpul, RI-
SIT. During llo poriod roquirod for slabiIizalion of llo oulpul voIlagos, llo

-

IOWIRGOOD signaI is loId doassorlod by llo povor suppIy. WliIo IOWIR-
GOOD is doassorlod, llo RISIT signaI is loId assorlod. Tlo fIip-fIop in llo fig-
uro providos a RISIT oulpul llal is synclronizod vill CIK2 and is llo invorl
of llo IOWIRGOOD signaI from llo povor suppIy.



-

WliIo RISIT is assorlod, il las lvo offocls on llo microprocossor and ollor
syslom compononls:

1. Koops any aclivily from occurring unliI povor las slabiIizod.
2. Irosols llo microprocossor and ollor syslom dovicos lo a Inovn slalo prior
lo Iolling llom bogin normaI oporalion. Tlis onsuros llal llo maclino viII
aIvays slarl up llo samo vay.





- --
TabIo 7-1 dofinos llo vaIuos forcod inlo llo 8086 and 8088 microprocossor's rog-
islors vlon RISIT is assorlod.

- - -- --
- -
IIAGS
MSW
II
CS
DS
IS
SS

WliIo RISIT is assorlod, llo microprocossor cannol folcl and oxoculo inslruc-
lions and ils oulpuls aro sol as iIIuslralod in labIos 7-2 and 7-3.

- - --

IOCK, D/C, ADS, A|31:2] ligl
W/R, M/IO, HIDA, BI|3:0] Iov
D|31:0] lri-slalo (fIoaling)


- - --

A|23:0], S0, S1, IIACK, BHI, IOCK ligl
M/IO, COD/INTA, HIDA Iov
D|15:0] lri-slalo (fIoaling)
-- -
Wlon llo povor suppIy oulpul voIlagos lavo slabiIizod, llo IOWIRGOOD
signaI is assorlod and llo Iogic on llo syslom board rosponds by doassorling
RISIT. Tlo doassorlod IovoI on RISIT aIIovs llo microprocossor lo bogin
funclioning. Il slouId bo nolod llal llo 386, 486 and Ionlium microprocossors
can porform a soIf-losl vlon RISIT bocomos doassorlod. DolaiIs of llo procos-
sor soIf-losl aro discussod in llo claplor onlilIod Tlo 80386DX and SX Micro-

-

procossors and in llo MindSlaro Arclilocluro Sorios booIs -
and -- - pubIislod by Addison-
WosIoy. Tlo microprocossor inilialos llo folcling and oxoculing of inslruclions
from momory, using llo codo sogmonl (CS) and inslruclion poinlor (II) rogislor
conlonls lo poinl lo llo momory Iocalion conlaining llo firsl inslruclion.

WliIo RISIT vas assorlod, llo maclino slalus vord (MSW) rogislor lad III0l
forcod inlo il. Sinco llo prolocl onabIo bil, bil 0, is lloroforo 0, llo microprocos-
sor aIvays bogins oporalion in roaI modo. In roaI modo, llo microprocossor aI-
vays apponds an oxlra 0l on llo ond of llo CS rogislor conlonls, I000l,
rosuIling in a codo sogmonl slarl addross of I0000l. Il llon adds llo offsol por-
lion of llo addross, III0l, conlainod in llo II rogislor, lo llo sogmonl slarl ad-
dross:



- --

Tlo rosuIlanl momory addross, IIII0l, is roforrod lo as llo povor-on roslarl
addross. Sinco llo addross is formod oxaclIy llo samo vay ovory limo llo sys-
lom is povorod up, llo 8086 or 8088 microprocossor aIvays folclos ils firsl in-
slruclion from llo povor-on roslarl addross.
- -
Tlo microprocossor llon inilialos a momory road bus cycIo lo folcl llo firsl in-
slruclion from llo povor-on roslarl addross in momory. Tlo povor-on roslarl
addross is aIvays Iocalod in llo bool ROMs. Tlis is bocauso llo firsl inslruclion
musl bo Iocalod in . If llo firsl inslruclion voro folclod
from RAM momory, llo informalion rolurnod vouId bo junI. Tlis is bocauso
RAM momory is .

Tlo firsl inslruclion folclod from llo povor-on roslarl addross is aIvays llo
firsl inslruclion of llo povor-on soIf-losl, or IOST. Tlo IOST program is con-
lainod in llo bool ROMs and is aIvays llo firsl program lo bo run.

AIllougl lloy aIvays bogin oporalion in roaI modo and slouId lloroforo func-
lion as a fasl 8086, llo 286, 386, 486 and Ionlium microprocossors lavo moro
llan lvonly addross Iinos. Wlon llo 286 or liglor microprocossors pIaco llo
povor-on roslarl addross on A|19:0] of llo addross bus, llo addross Iinos abovo
A19 aro aulomalicaIIy sol ligl. Tlis rosuIls in addross IIIII0l boing pIacod



on llo 286 and 386SX addross bus, rallor llan 0IIII0l. Tlo 386DX, 486 and
Ionlium procossors pIaco IIIIIII0l on llo addross bus.

Tlo procossor Ioops lloso uppor addross Iinos ligl unliI llo program porforms
a jump lo anollor codo sogmonl, in ollor vords, unliI a nov vaIuo is Ioadod
inlo llo CS rogislor. A jump inslruclion llal roIoads boll llo CS and llo II rog-
islors is roforrod lo as an inlor-sogmonl jump or a far jump. Tlo uppor ad-
dross Iinos aro llon sol Iov and romain Iov unIoss llo procossor is svilclod
inlo Iroloclod Modo by llo program. In praclico, llo firsl inslruclion oxoculod
from syslom ROM is aIvays a jump inslruclion, llus a nov CS vaIuo is immo-
dialoIy Ioadod vlon llo firsl inslruclion is oxoculod.

Aflor llo uppor bils aro sol Iov, lloy viII nol bo sol ligl again vliIo llo proc-
ossor romains in roaI modo. Tlis moans llal llo procossor cannol accoss ox-
londod momory (momory abovo llo Iovor mogabylo) vliIo in roaI modo. Tloro
is ono oxcoplion lo llis ruIo. Il is discussod in llo claplor onlilIod Tlo 80286
Microprocossor undor llo loading Accossing Ixlondod Momory in RoaI
Modo.


-


-
Tlo procoding claplors lavo oxpIainod lov llo 80286 microprocossor commu-
nicalos vill momory and I/O dovicos and lov llo 80286 inlorfacos vill oxlor-
naI dovicos. Sourcos of syslom rosol and llo povor-up soquonco lavo aIso boon
covorod.
-
Tlis claplor inlroducos and oxpIains llo oxlornaI Iogic roquirod by llo 80286
microprocossor lo communicalo vill 8- and 16-bil dovicos. AddilionaI Iogic
noodod lo synclronizo momory and I/O dovicos of varying spoods is aIso cov-
orod. A llorougl undorslanding of llis claplor is cruciaI lo undorslanding llo
80386 IornoI.

Tlo noxl claplor providos a dolaiIod IooI al llo bus cycIos llal an 80286 can
run. Tlo claplor incIudos liming diagrams and oxpIanalions for road, vrilo,
and llo laIl or sluldovn bus cycIos.
-
In ordor lo porform aII of llo aclions roquirod lo compIolo a bus cycIo, llo
80286 microprocossor roquiros llo aid of oxlornaI Iogic. Ono of llo major piocos
of Iogic invoIvod in llis procoss is roforrod lo as llo bus conlroI Iogic. Rofor lo
figuro 8-1.

Iogic oxlornaI lo llo microprocossor can dolocl llo boginning of a bus cycIo by
IooIing al llo 80286's bus cycIo dofinilion oulpuls. Wlon oillor S0 or S1 is
doloclod going Iov, llis indicalos llo slarl of llo bus cycIo. Tlis lriggors llo bus
conlroI Iogic's slalo maclino llal vorIs vill llo microprocossor's Bus Unil lo
accompIisl a dala lransfor during a bus cycIo. Tlo bus conlroI Iogic usos CIK2,
llo doubIo froquoncy cIocI, lo dofino limo sIols for ils slalo maclino. Al llo

-

propor poinls during a bus cycIo, llo bus conlroI Iogic porforms llo appropri-
alo aclions lo accompIisl llo bus cycIo.

Tlo funclions porformod by llo bus conlroI Iogic aro doscribod in llis claplor.


-

-


--
Rofor lo figuro 8-2. InloI diclalos llal ovory 80286-basod syslom musl incorpo-
ralo an oxlornaI dovico Inovn as an addross Ialcl. Wlon llo microprocossor
oulpuls llo addross onlo ils IocaI addross bus during a bus cycIo, llo bus con-
lroI Iogic signaI AII (addross Ialcl onabIo) commands llo addross Ialcl lo loId
(Ialcl) llo addross and romombor il. Onco Ialclod, llo addross Ialcl oulpuls
llo addross lo llo syslom on llo syslom addross (SA) bus, SA|19:1]. Addross
docodors llrougloul llo syslom can llon oxamino llo Ialclod addross lo soo if
llo microprocossor is allompling lo communicalo vill lloir rospoclivo dovico.






-

--

Tlo addross Ialcl and IA Iinos (IalclabIo addross Iinos) musl bo incIudod lo
supporl llo 80286's addross pipoIining capabiIily. Nolico llal addross Iinos
A|23:20] aro nol Ialclod. Tloso addross Iinos go diroclIy lo llo IA bus llrougl
a buffor, aIong vill addross Iinos A|19:17]. Irom llo buffor, llo IA bus is con-
noclod diroclIy lo llo 16-bil sIols on llo ISA bus. Tlo purposo of llo IA bus
viII bo doscribod Ialor.

Nolico llal llo addross Ialcl onIy Ialclos A|19:1], bul nol A0 (addross bil A0).
Tlo roason for llis is cIarifiod Ialor. Rallor llan going lo llo addross Ialcl, A0
goos lo llo bus conlroI Iogic vloro il is aIIovod lo pass llrougl onlo SA0 al llo
samo limo as A|19:1] aro Ialclod and prosonlod on SA|19:1].
80286
Bus
Control
Logic
CHRDY
NOW S
M16
l O1 6
S0
S1
M/l O
A0
CLK2
RESET
CPU READY
BHE
ALE
SBHE
Address
Latch
LA Bus
Buffer


-

--
Wlon llo 80286 microprocossor musl porform bacI-lo-bacI momory lransfors,
il usos addross pipoIining. Tlis invoIvos pIacing llo addross for llo noxl cycIo
on llo microprocossor's IocaI addross bus during llo curronl bus cycIo. Tlis is
possibIo bocauso llo curronl addross viII lavo boon Ialclod on llo syslom ad-
dross bus (SA Bus) and loId for llo duralion of llo curronl bus cycIo. As a ro-
suIl, llo addross for llo noxl bus cycIo can bo oulpul by llo microprocossor
sinco llo addross for llo curronl bus cycIo las aIroady boon Ialclod.

A porlion of llo noxl bus cycIo's addross, IA|23:17], goos diroclIy lo llo ISA
bus via an addross buffor. IA|23:17] (llo IalclabIo addross bus) aro simpIy a
bufforod vorsion of llo uppormosl bils of llo microprocossor's addross bus. 16-
bil momory oxpansion boards aro dosignod lo docodo llo IA addross Iinos.
Tlis aIIovs 16-bil momory oxpansion boards lo clip soIocl lloir momory do-
vicos mucl oarIior llan vouId bo possibIo if lloy vailod for llo Ialclod ad-
dross (SA Iinos).

Al llo ond of addross limo of llo noxl bus cycIo, llo bus conlroI Iogic again
puIsos llo addross Ialcl onabIo (AII) Iino, commanding llo addross Ialcl lo
Ialcl addross Iinos SA|19:0] and SBHI. Sinco llo ligl ordor bils (IA|23:17])
lavo aIroady boon usod lo gonoralo llo clip soIocl, addross docoding can bo
compIolod vory quicIIy. AddilionaI informalion rogarding addross pipoIining
can bo found in llo claplor onlilIod DolaiIod Viov of llo Bus CycIo.

AIllougl llo 80286 microprocossor pipoIinos oul ils onliro 24-bil addross, llo
ISA bus onIy providos sovon of lloso Iinos, IA|23:17]. Il vouId lavo boon moro
oxponsivo lo incIudo aII 24 of llo pipoIinod addross Iinos and syslom dosignors
aro aIvays IooIing for vays lo roduco cosl vliIo mainlaining or improving
porformanco. If llo dosignors lad providod aII 24 Iinos, llo cosl vouId lavo
gono up bul llo porformanco vouId nol lavo improvod. Tloro aro lvo roasons
for llis: 1) llo vasl majorily of bus cycIos aro momory roads sinco llo procossor
is conslanlIy folcling inslruclions and 2) llo 4164 momory clip vas popuIar
vlon llo IC/AT vas dosignod. Tlo 4164 las 64Kbils of informalion in il, bul
ils onIy ono bil vido. Sixloon 4164s aro noodod lo maIo a banI of momory for
llo 80286 microprocossor. Sixloon limos 64Kbils yioIds 128KB, vlicl is llo
smaIIosl bIocI of addrossos llal can bo producod using IA|23:17]. Will
IA|23:17], llo momory subsyslom las onougl informalion lo soIocl llo propor
banI of momory clips. AddilionaI informalion aboul momory banIs can bo
found in llo claplor onlilIod RAM Momory: Tloory of Oporalion.


-

AII I/O addrossos aro boIov 128K, so llo IA bus aIvays las zoros on il vlon
I/O dovicos aro addrossod. Tloroforo, I/O dovicos canl bonofil from llo IA
bus bocauso llo I/O addross docodors donl soo onougl addross Iinos lo dislin-
guisl ono I/O dovico from anollor. AIllougl llo I/O dovicos couId, in lloory,
lavo bonofilod from sooing llo rosl of llo pipoIinod addross, llal bonofil vouId
lavo boon loo sIigll lo juslify llo incroasod cosl.
- --
Rofor lo figuro 8-3. In addilion lo llo addross Ialcl, InloI aIso roquiros llo incIu-
sion of lvo dovicos Inovn as --.


-


- --

80286
Bus
Control
Logic
CHRDY
NOWS
M16
l O16
S0
S1
M/lO
A0
CLK2
RESET
CPU READY
BHE
ALE
SBHE
Address
Latch
LA Bus
Buffer

l ORC
l OWC
SA0
MRDC
MWTC
ENABLE
LOWER
ENABLE
UPPER
DT/R

Upper
Data Bus
Transceiver

Lower
Data Bus
Transceiver


-

As can bo soon in figuro 8-3, oacl of llo lvo dala bus lranscoivors is connoclod
bolvoon llo CIU's IocaI dala bus and llo syslom dala (SD) bus. Ono of llo
lranscoivors is roforrod lo as llo Iovor dala bus lranscoivor and llo ollor as llo
uppor dala bus lranscoivor.

During a road bus cycIo, llo bus conlroI Iogic pIacos llo lranscoivors inlo ro-
coivo modo lo pass dala from rigll-lo-Iofl. In llis vay, llo dala fIovs from llo
curronlIy-addrossod dovico, ovor llo syslom dala bus, llrougl llo lranscoivors
lo llo microprocossor. During a vrilo bus cycIo, llo microprocossor drivos dala
onlo ils IocaI dala bus. Tlo lranscoivors aro pIacod in lransmil modo by llo bus
conlroI Iogic, lloroby aIIoving llo dala lo fIov onlo llo syslom dala bus so il
can bo vrillon lo llo curronlIy-addrossod dovico.

A lranscoivor las lvo conlroI Iinos llal aIIov llo bus conlroI Iogic lo conlroI ils
aclions.

1. . Dala lransmil or rocoivo is sol ligl lo pIaco llo lranscoivor in lrans-
mil modo (Iofl-lo-rigll) during vrilo bus cycIos. Il is sol Iov during road bus
cycIos lo pIaco il in rocoivo modo (rigll-lo-Iofl).
2. . Wlon assorlod (ligl), dala onabIo aIIovs llo lranscoivor
lo acluaIIy pass llo dala in llo diroclion soIoclod by llo slalo of llo DT/R
conlroI Iino. Nolo llal llo Iinos aro caIIod
for llo uppor dala lranscoivor and for llo Iovor dala
lranscoivor.

Al llo propor momonl during a bus cycIo, llo bus conlroI Iogic aIvays sols llo
diroclion Iino (DT/R) lo llo approprialo IovoI, and llon assorls llo appropri-
alo dala onabIo conlroI Iino sIigllIy aflorvards lo onabIo ono or boll of llo dala
bus lranscoivors.
-
Rofor lo figuro 8-4. Sinco 8-bil dovicos aro nol connoclod lo llo uppor dala pall,
any dala lransfor bolvoon llo microprocossor and an 8-bil dovico musl laIo
pIaco ovor llo Iovor dala pall, ono bylo por bus cycIo. Tlo 80286 microprocos-
sor, lovovor, lransfors dala ovor llo Iovor and uppor dala palls in accordanco
vill llo cardinaI ruIos. RocaII llal llo microprocossor lransfors dala bolvoon
ilsoIf and odd Iocalions using onIy llo uppor pall. Tlis moans llal vlon an
odd Iocalion is invoIvod in a lransfor vill an 8-bil dovico llal oxlornaI Iogic
musl sloor llo dala bolvoon llo uppor and Iovor pall. Tlis onsuros llal
boll llo microprocossor and llo 8-bil dovico lransfor dala ovor llo oxpoclod
dala pall.

-



-
80286
Bus
Control
Logic
CHRDY
NOWS
M16
lO16
S0
S1
M/lO
A0
CLK2
RESET
CPU READY
BHE
ALE
SBHE
Address
Latch
LA Bus
Buffer

lORC
lOW C
SA0
MRDC
MWTC
ENABLE
LOWER
ENABLE
UPPER
DT/R

Upper
Data Bu s
Tr anscei ve r

Lower
Data Bu s
Tr anscei ve r
Data Bu s
Steer ing Logic
LATCH LOW
ENABLE LOW
ENABLE COPY


-

Wlonovor an addross docodor associalod vill a 16-bil dovico dolocls an ad-
dross villin ils assignod rango, in addilion lo clip-soIocling ils rospoclivo do-
vico il aIso assorls llo ISA signaI M16 (Momory sizo 16) or IO16 (I/O sizo 16).
Tlis loIIs llo bus conlroI Iogic llal llo microprocossor is communicaling vill a
16-bil dovico (as opposod lo an 8-bil dovico). Nolo llal llo bus conlroI Iogic
sampIos oillor llo M16 or IO16 signaI doponding on vlollor llo bus cycIo is
roforoncing a momory or I/O Iocalion. SampIing llo approprialo signaI is im-
porlanl bocauso boll llo M16 and IO16 signaI may bo assorlod al llo samo
limo, sinco llo gonoralion of M16 is nol quaIifiod by vlollor llo accoss is lo a
momory Iocalion or nol.

Sinco lvo bylos can bo lransforrod bolvoon llo microprocossor and a 16-bil do-
vico during oacl bus cycIo, dala can bo lransforrod lvico as fasl as il can vill 8-
bil dovicos and can bo dono villoul dala pall slooring.

Circumslancos roquiring llo uso of llo dala bus slooring Iogic aro doscribod in
llo foIIoving paragrapls.
--

Assumo llal llo microprocossor oxoculos llo foIIoving inslruclions:

-
-

Tlo firsl of lloso lvo inslruclions (MOV DX,03I0l) causos llo vaIuo 03I0l lo
bo pIacod in llo microprocossor's DX rogislor. Tlis is llo I/O addross of llo
fIoppy disI conlroIIor's slalus rogislor.

Tlo socond inslruclion (IN AI,DX) viII causo llo microprocossor lo porform an
I/O road bus cycIo from llo I/O addross spocifiod in llo DX rogislor (I/O Ioca-
lion 03I0l). Tlo dala bylo road from llo slalus rogislor is pIacod in llo micro-
procossor's AI rogislor.

WliIo oxoculing llo socond inslruclion, llo microprocossor inilialos an I/O
road bus cycIo, pIacing addross 0003I0l on llo addross bus vill BHI doas-
sorlod and solling llo bus cycIo dofinilion Iinos lo llo foIIoving:


-

M/IO = 0, indicalos an I/O oporalion
S0 = 1, doassorlod, so il's nol a vrilo oporalion
S1 = 0, assorlod, so il's a road oporalion

Tlo bus conlroI Iogic puIsos llo addross Ialcl onabIo (AII) signaI, causing llo
addross lo bo Ialclod inlo llo addross Ialcl and prosonlod on llo syslom ad-
dross (SA) bus. Addross docodors llrougloul llo syslom oxamino llo addross,
bul onIy llo fIoppy disI conlroIIor Iogic is clip-soIoclod. Tlo bus conlroI Iogic
docodos llo microprocossor's bus cycIo dofinilion oulpuls and assorls ils IORC
(I/O Road Command Iino). Sinco il is a road oporalion, llo fIoppy disI conlroI-
Ior's slalus is pIacod onlo llo dala bus by llo fIoppy disI conlroIIor. Tlo fIoppy
disI conlroIIor is an 8-bil dovico, so llo bylo of slalus informalion is pIacod on
llo onIy parl of llo dala bus avaiIabIo lo an 8-bil dovico, SD|7:0].

RocaII llal, according lo ruIo llroo, llo microprocossor oxpocls dala road from
ovon-addrossod Iocalions lo como bacI ovor llo Iovor dala pall. Tlo bus con-
lroI Iogic sonsos llal llo microprocossor is communicaling vill an 8-bil I/O
dovico bocauso IO16 is nol assorlod. Sinco llo dala from llo fIoppy disI con-
lroIIor slalus rogislor is aIroady on llo propor pall (SD|7:0]), llo bus conlroI
Iogic sols llo Iovor dala bus lranscoivor lo rocoivo modo (DT/R = 0) and on-
abIos il lo pass llo dala llrougl (INABII IOWIR = 1) lo llo microprocossor.
Tlo bylo fIovs llrougl llo Iovor dala bus lranscoivor onlo llo Iovor dala pall
on llo microprocossor's IocaI dala bus.

Al llo ond of dala limo, CIU RIADY is sampIod assorlod by llo microprocos-
sor. Tlo microprocossor roads llo dala bylo off llo Iovor dala pall and llo bus
cycIo onds. Tlo slalus bylo is pIacod in llo microprocossor's AI rogislor, com-
pIoling llo oxoculion of llo IN inslruclion.

In llis oxampIo, ovorylling vorIod jusl fino and no addilionaI Iogic vas ro-
quirod lo compIolo llo dala lransfor.
--

Assumo llal llo microprocossor oxoculos llo foIIoving inslruclion:

-

I/O porl (addross) 61l is an 8-bil I/O addross llal llo programmor roads lo as-
corlain llo causo of a Non-MasIabIo Inlorrupl (NMI). Tlo microprocossor viII

-

inilialo an I/O road bus cycIo, pIacing addross 000061l on llo addross bus vill
BHI assorlod and solling llo bus cycIo dofinilion Iinos lo llo foIIoving slalos:

M/IO = 0, indicalos an I/O oporalion
S0 = 1, nol assorlod, so il's nol a vrilo oporalion
S1 = 0, assorlod, so il's a road oporalion

Tlo bus conlroI Iogic puIsos llo addross Ialcl onabIo (AII) signaI, causing llo
addross lo bo Ialclod inlo llo addross Ialcl and lo bo prosonlod on llo syslom
addross (SA) bus. Addross docodors llrougloul llo syslom oxamino llo ad-
dross, bul onIy llo porl 61l Iogic is clip-soIoclod. Sinco porl 61l is an 8-bil do-
vico, llo bylo of informalion boing road is pIacod on llo onIy parl of dala bus
avaiIabIo lo an 8-bil dovico, SD|7:0].

According lo cardinaI ruIo numbor llroo, llo microprocossor oxpocls dala road
from odd-addrossod Iocalions lo como bacI ovor llo uppor dala pall. Tlo bus
conlroI Iogic dolorminos llal llo microprocossor is communicaling vill an 8-
bil I/O dovico bocauso IO16 is nol assorlod. Sinco llo dala coming from porl
61l is on llo vrong pall, somolling musl bo dono. Hov vouId you fix llis
probIom` AII you lavo lo do is copy llo dala lo llo propor dala pall. Anollor
lranscoivor is addod in bolvoon llo uppor and Iovor syslom dala bus palls.
Tlis is roforrod lo as llo .

Tlo bus conlroI Iogic sols llo uppor pall dala bus lranscoivor lo rocoivo modo
(DT/R = 0) and onabIos il lo pass llo dala llrougl (INABII UIIIR = 1) lo
llo microprocossor. Tlo Iov on DT/R aIso sols up llo Hi/Io Bylo Copior lo
pass dala from llo Iovor dala pall lo llo uppor. Tlo bus conlroI Iogic llon as-
sorls llo INABII COIY Iino. Tlis onabIos llo Hi/Io Bylo Copior lo pass llo
dala bylo lo llo uppor syslom dala bus pall, SD|15:8].

Tlo bylo fIovs llrougl llo uppor dala bus lranscoivor onlo llo uppor dala
pall on llo microprocossor's IocaI dala bus. Al llo ond of dala limo, CIU
RIADY is sampIod assorlod by llo microprocossor. Tlo microprocossor roads
llo dala bylo off llo uppor dala pall and llo bus cycIo onds. Tlo bylo is pIacod
in llo microprocossor's AI rogislor, compIoling llo oxoculion of llo IN inslruc-
lion.

In llis oxampIo, llo addilionaI Iogic roforrod lo as llo dala bus slooring Iogic
vas roquirod lo compIolo llo dala lransfor. Tlo dala bus slooring Iogic consisls
of:


-

1. Iogic in llo bus conlroI Iogic llal sonsos vlollor llo bus cycIo is lo a mom-
ory or I/O Iocalion, and sampIos llo approprialo dala sizo 16 signaI Iino
(oillor M16 or IO16) so il can loII if llo microprocossor is communicaling
vill an 8- or 16-bil dovico.
2. Iogic in llo bus conlroI Iogic llal obsorvos llo A0 and BHI oulpuls of llo
microprocossor lo soo vlal Iind of lransfor llo microprocossor is allompl-
ing lo porform (8-bil lransfor vill an ovon addross, 8-bil lransfor vill an
odd addross, 16-bil lransfor slarling al an ovon addross).
3. Hi/Io Bylo Copior.
--

Assumo llal llo microprocossor oxoculos llo foIIoving inslruclions.

- --


Wlon oxoculing llo OUT inslruclion, llo microprocossor oulpuls llo bylo lo bo
vrillon lo llo odd addross on llo uppor pall of llo IocaI dala bus (ruIo numbor
llroo). Tlo bus conlroI Iogic sols llo DT/R conlroI Iino ligl, pIacing llo dala
bus lranscoivors inlo lransmil (Iofl-lo-rigll) modo and assorls llo INABII
UIIIR signaI lo onabIo llo uppor dala bus lranscoivor. Tlo bylo fIovs from llo
uppor pall of llo IocaI dala bus lo llo uppor pall of llo syslom dala (SD) bus.
Tlo bus conlroI Iogic aIso docodos llo microprocossor's bus cycIo dofinilion
oulpuls and assorls ils IOWC (I/O Wrilo command) Iino.

Tlo bus conlroI Iogic oxaminos A0 and BHI and dolorminos llal llo micro-
procossor is porforming a ono bylo lransfor ovor llo uppor dala pall, and do-
lorminos llal llo curronlIy-addrossod dovico is an 8-bil dovico by clocIing
IO16. Tlis moans llal il musl onabIo llo Hi/Io Bylo Copior lo copy llo dala
bylo from llo uppor lo llo Iovor dala pall so il can bo vrillon lo llo 8-bil do-
vico. To accompIisl llis, llo bus conlroI Iogic assorls ils INABII COIY oul-
pul.

Bocauso DT/R is sol lo lransmil modo during vrilo oporalions, llo Hi/Io
Bylo Copior copios llo bylo boing oulpul by llo microprocossor on SD|15:8]
dovn lo SD|7:0] on llo syslom dala bus. Tlis aIIovs llo dala bylo lo gol lo llo
curronlIy-addrossod 8-bil dovico, vlicl viII pIaco llo bylo inlo llo odd-
addrossod Iocalion.

-


Assumo llal llo microprocossor oxoculos llo foIIoving inslruclions:

- --
-

Tlo microprocossor drivos llo lvo bylos from llo AX rogislor onlo llo lvo
dala palls, pIacos I/O addross 03I4l on llo addross bus and assorls BHI. Tlo
bus conlroI Iogic sols DT/R ligl lo sol llo dala bus lranscoivors lo pass from
Iofl lo rigll. Il aIso assorls INABII IOWIR and INABII UIIIR, aIIoving
boll lranscoivors lo pass llo lvo dala bylos onlo llo SD bus.

Tlo dala bus slooring Iogic rocognizos llal llo curronl bus cycIo is a 16-bil
lransfor by llo Iovs on addross bil A0 and BHI. During llis singIo bus cycIo,
llo microprocossor viII porform a 16-bil vrilo lransfor using boll laIvos of llo
dala bus simuIlanoousIy. Wlon llo bus conlroI Iogic sampIos IO16 and finds il
doassorlod, lovovor, il musl porform lvo soparalo ono-bylo lransfors ovor llo
Iovor dala pall.

IniliaIIy, A0 is aIIovod lo fIov llrougl llo bus conlroI Iogic onlo SA0 and llo
IOWC Iino is assorlod. Tlo fIoppy disI conlroIIor is clip-soIoclod and llo dala
bylo on llo Iovor dala pall is vrillon inlo Iocalion 03I4l in llo fIoppy disI
conlroIIor. Aflor llo bus conlroI Iogic sampIos CHRDY assorlod, il bIocIs A0
and forcos SA0 lo a ono. Tlis incromonls llo addross on llo SA bus lo 03I5l.
Tlo bus conlroI Iogic aIso momonlariIy doassorls and llon assorls llo IOWC
Iino lo fooI llo fIoppy conlroIIor inlo llinIing anollor bus cycIo las slarlod.
INABII IOWIR is doassorlod, bIocIing llo dala bylo on llo Iovor dala pall
from golling llrougl llo Iovor dala bus lranscoivor. INABII COIY is assorl-
od and llo dala bylo on llo uppor laIf of llo SD bus is copiod dovn lo SD|7:0]
so il can gol lo llo fIoppy conlroIIor. Tlo dala bylo is llon vrillon inlo Iocalion
03I5l in llo fIoppy conlroIIor. Wlon llo bus conlroI Iogic sampIos CHRDY as-
sorlod, il llon sols CIU RIADY assorlod, aIIoving llo microprocossor lo ond
llo bus cycIo.

AIllougl il may appoar llal llis vas lvo bus cycIos, il vas roaIIy ono pro-
Iongod bus cycIo llal vas slrolclod oul by doassorling CIU RIADY unliI llo
oporalions voro compIolod.

-


Assumo llal llo microprocossor oxoculos llo foIIoving inslruclions:

- --
- -

Tlo microprocossor pIacos I/O addross 03I4l vill BHI assorlod on llo ad-
dross bus and sols llo bus cycIo dofinilion Iinos lo indicalo llal an I/O road bus
cycIo is in progross. Tlo bus conlroI Iogic sols DT/R Iov lo sol llo dala bus
lranscoivors lo pass from rigll lo Iofl. Il aIso assorls INABII IOWIR and
INABII UIIIR, aIIoving boll lranscoivors lo pass llo lvo dala bylos from
llo SD bus lo llo CIU's IocaI dala bus.

Tlo dala bus slooring Iogic rocognizos llal llo curronl bus cycIo is a 16-bil
lransfor by llo Iovs on addross bil A0 and BHI. During llis singIo bus cycIo,
llo microprocossor viII porform a 16-bil road lransfor using boll laIvos of llo
dala bus simuIlanoousIy. Wlon llo bus conlroI Iogic sampIos IO16 and finds il
doassorlod, lovovor, il musl porform lvo, soparalo ono-bylo lransfors ovor llo
Iovor dala pall.

IniliaIIy, A0 is aIIovod lo fIov llrougl llo bus conlroI Iogic onlo SA0 and llo
IORC Iino is assorlod. Tlo fIoppy disI conlroIIor is clip-soIoclod and llo dala
bylo from Iocalion 03I4l in llo fIoppy disI conlroIIor is drivon onlo SD|7:0].
Aflor llo bus conlroI Iogic sampIos CHRDY assorlod, il assorls IATCH IOW,
causing llo Iovor dala bus lranscoivor lo Ialcl llo dala bylo from Iocalion 03I4
and loId il in an inlornaI rogislor.

Tlo bus conlroI Iogic bIocIs A0 and forcos SA0 lo a ono. Tlis incromonls llo
addross on llo SA bus lo 03I5l. Tlo bus conlroI Iogic aIso momonlariIy doas-
sorls and llon assorls llo IORC Iino lo fooI llo fIoppy conlroIIor inlo llinIing
anollor bus cycIo las slarlod. INABII COIY is assorlod and llo dala bylo on
llo Iovor laIf of llo SD bus is copiod up lo SD|15:8] so il can gol lo llo micro-
procossor on llo corrocl dala pall. Wlon llo bus conlroI Iogic sampIos CHRDY
assorlod, il assorls INABII UIIIR and INABII IOW simuIlanoousIy, caus-
ing llo uppor bylo lo pass llrougl llo lranscoivor lo llo microprocossor and
llo Iovor bylo lo bo oulpul lo llo microprocossor from llo Iovor dala bus
lranscoivor's inlornaI rogislor.


-

Tlo bus conlroI Iogic llon assorls CIU RIADY, aIIoving llo microprocossor
lo road llo lvo bylos and ond llo bus cycIo. Tlo lvo bylos aro llon pIacod in
llo AX rogislor, onding llo oxoculion of llo IN inslruclion.

AIllougl il may appoar llal llis vas lvo bus cycIos, il vas roaIIy ono pro-
Iongod bus cycIo llal vas slrolclod oul by doassorling CIU RIADY unliI llo
oporalions voro compIolod.

No inlorvonlion roquirod by llo dala bus slooring Iogic.

No inlorvonlion roquirod by llo dala bus slooring Iogic.

No inlorvonlion roquirod by llo dala bus slooring Iogic.

No inlorvonlion roquirod by llo dala bus slooring Iogic.

--
Tlo -- for a dovico is boll dovico and manufacluror-dopondonl. Tlis
moans llal llo accoss limo for difforonl lypos of RAM, ROM and I/O dovicos
viII diffor. Tlis boing llo caso, you vouId oxpocl oacl dovico lypo lo lavo a
RIADY oulpul pin llal viII bo assorlod vlon llo dovico is roady lo compIolo
a dala lransfor. In roaIily, llougl, lloy lavo no sucl pin.

Iiguro 8-5 iIIuslralos llo concopl of accoss limo.

-



--
-
Wlon you bogin lo accoss a sIov accoss dovico, llo microprocossor's bus cycIo
musl bo slrolclod oul lo malcl llo accoss limo of llo dovico. Tlis is llo pur-
poso of llo CIU RIADY inpul on llo microprocossor. Sinco lloro is no roady
oulpul from I/O or momory dovicos, somo ollor mollod for doassorling llo
CIU RIADY signaI unliI llo curronlIy-addrossod dovico is roady lo compIolo
llo bus cycIo lad lo bo dovisod.

ISA sysloms uso a singIo DofauIl Timor for llo difforonl lypos of dovicos in llo
syslom. Tlis dofauIl limor is Iocalod on llo syslom board and is usuaIIy om-
boddod villin llo bus conlroI Iogic. TabIo 8-1 iIIuslralos llo numbor of vail
slalos llal aro insorlod inlo a bus cycIo by llo dofauIl limor vlon accossing I/O
and momory.

-
-
16-bil RAM 1
16-bil I/O 1
8-bil RAM 4
8-bil I/O 4

Access Time
Device chip-selected
READY sampled asserted
and bus cycle completed

-

Il slouId bo nolod llal llo vaIuos slalod in labIo 8-1 aro basod on an 80286 run-
ning al 8MHz. Tlis vas llo spood of llo procossor in llo vorsion of llo IBM
IC/AT llal bocamo llo induslry slandard. In ollor vords, a bus cycIo accoss-
ing an 8-bil dovico vouId causo llo DofauIl Roady Timor lo doassorl llo 8MHz
procossor's CIU RIADY inpul Iong onougl lo insorl four vail slalos in llo
bus cycIo. Al 8MHz, a vail slalo is 125ns in duralion. Tlo lolaI duralion of llo
bus cycIo vouId lloroforo consisl of addross limo pIus dala limo pIus four vail
slalos, for a lolaI of 6 x 125ns = 750ns. A bus cycIo accossing a 16-bil dovico
vouId causo llo DofauIl Roady Timor lo doassorl llo 8MHz microprocossor's
CIU RIADY inpul Iong onougl lo insorl ono vail slalo in llo bus cycIo. Tlo
lolaI duralion of llo bus cycIo vouId lloroforo consisl of addross limo pIus
dala limo pIus ono vail slalo, for a lolaI of 3 x 125ns = 375ns.

In Ialor ISA maclinos, llo procossors aro usuaIIy running subslanliaIIy faslor
llan 8MHz, lovovor, llo acluaI liming of llo ISA bus is govornod by llo bus
conlroI Iogic lo provido llo samo liming as an 80286 microprocossor running al
8MHz lo 8.33MHz. Tlis moans llal llo acluaI numbor of vail slalos insorlod in
llo microprocossor's bus cycIo by llo DofauIl Roady Timor vlon communical-
ing vill 8- and 16-bil dovicos may bo subslanliaIIy groalor llan lloso slalod in
labIo 8-1.

Tlis dofauIl liming is basod on compalibiIily roquiromonls for 8-bil boards do-
signod for llo originaI 8088-basod IBM IC and on llo spood of lypicaI RAM
clips al llo limo llo IBM IC/AT vas dosignod. Tlo 8088 laIos four licIs of ils
4.77MHz cIocI lo run a 0-vail-slalo bus cycIo, so a 0-vail-slalo bus cycIo laIos
838ns (4 x 209.5ns = 838ns). Cards buiIl for llo originaI IC considorod 838ns lo
bo 0-vail-slalo porformanco, so llo DofauIl Roady Timor providos approxi-
maloIy llal samo doIay (750nsoc) as a dofauIl for 8-bil cards. Tlo DofauIl Roady
Timor vas aIso dosignod sucl llal dosignors of ISA oxpansion boards couId
modify llo dofauIl liming using cuslom roady limors as doscribod in llo foI-
Ioving soclion.
- -
Dosignors of ISA oxpansion boards may nood lo oxlond llo dofauIl liming if llo
accoss limo of lloir dovico is loo Iong for llo ISA dofauIls or lloy may vanl lo
slorlon llo dofauIl liming if lloir accoss limo is slorlor llan llo ISA dofauIl.
SignaIs providod on llo ISA bus pormil dosignors fIoxibiIily in soIocling dovicos
vill difforing accoss limos. Tlo acluaI liming diffors bolvoon 8- and 16-bil do-
vicos. Rofor lo figuro 8-6. Tlo foIIoving Iisl slovs llo possibIo numbor of ISA
vail slalos llal can bo acliovod vill boll 8- and 16-bil dovicos.


-

Slorlonod 8-bil dovico bus cycIo: 1, 2 or 3 vail slalos
Slrolclod 8-bil dovico bus cycIo: moro llan 4 vail slalos
Slorlonod 16-bil dovico ISA bus cycIo (Momory onIy): 0 vail slalo
Slrolclod 16-bil dovico ISA bus cycIo: moro llan 1 vail slalo


-


Wlon dosigning an ISA card, llo accoss limo for llo dovico may bo Iongor llan
llo roady limooul providod by llo DofauIl Roady Timor. Dosignors can ovor-
rido llo dofauIl limor and slrolcl oul llo bus cycIo by llo roquirod numbor of
vail slalos lo malcl llo accoss limo of llo dovico. Tlis is impIomonlod vill llo
CHRDY signaI (ClannoI Roady) on llo ISA bus.
lSA Expansion Connectors
READY
M16
lO16
NOWS
CHRDY
Microprocessor
Default
Ready
Timer
Logic
+5Vdc

-

Wlon llo addross docodor on an ISA card docodos an addross assignod lo ils
rospoclivo dovico, il nol onIy clip-soIocls llo dovico, bul aIso lriggors llo cus-
lom roady limor on llo card. Wlon lriggorod, llo limor forcos llo normaIIy as-
sorlod CHRDY signaI lo bocomo doassorlod. Wlon llo dofauIl limor Iogic on
llo syslom board soos CHRDY bocomo doassorlod, llo dofauIl limor is ovorrid-
don and CIU RIADY viII nol bo assorlod lo llo microprocossor unliI llo
CHRDY signaI is soon lo bocomo assorlod again. Wlon llo accoss limo for llo
card las oIapsod, llo cuslom limor viII llon aIIov CHRDY lo bocomo assorlod
again. Tlo dofauIl roady limor Iogic on llo syslom board viII llon immodialoIy
assorl CIU RIADY, llus informing llo microprocossor llal il's OK lo ond llo
bus cycIo. In llis vay, llo dosignor of an add-in card can insorl any numbor of
addilionaI vail slalos inlo a bus cycIo vlon a parlicuIar dovico is addrossod.

Tlo NOWS (No Wail Slalo) Iino providos a mollod lo roduco llo numbor of
vail slalos associalod vill llo dofauIl liming. Wlon a fasl ISA board is capabIo
of doIivoring dala faslor llan llo dofauIl liming caIIs for, llo board can assorl
llo NOWS Iino as soon as il rocognizos il is boing addrossod, lovovor, onIy
16-bil momory boards aro capabIo of onding an ISA bus cycIo in zoro vail
slalos. Tlo dofauIl limor gonoralos llo CIU RIADY signaI as soon as il soos
llo NOWS Iino bocomo assorlod, lloroby onding llo cycIo oarIior llan llo do-
fauIl limo. Nolo llal NOWS doosnl nocossariIy or aIvays moan vail
slalos, il moans vail slalos. Rofor lo llo Claplor onlilIod ISA Bus Cy-
cIos for dolaiIod informalion and liming roquiromonls.

Tlo IBM IC/AT vas dosignod lo pormil zoro-vail-slalo accossos onIy lo 16-bil
momory dovicos bocauso onIy lloy can docodo llo IA (IalclabIo Addross)
Iinos. Tlo IA Iinos aro prosonl on llo ISA bus oarIior llan llo Ialclod Syslom
Addross (SA) Iinos, moaning 16-bil momory dovicos can docodo llo addross
oarIior llan 16-bil I/O and 8-bil dovicos. Dosignors of 16-bil momory dovicos
slouId Ialcl llo rosuIl of llo curronl docodo in llo ovonl of llo IA Iinos boing
pipoIinod prior lo llo ond of llo curronl bus cycIo. IaiIuro lo do so migll causo
llo curronl dovico lo bo dosoIoclod vlon llo nov addross is pIacod on llo IA
bus.

-


-
Irovious claplors lavo covorod lov llo microprocossor communicalos vill
momory and I/O dovicos and lavo oxpIainod llo supporl Iogic noodod lo aIIov
llo microprocossor lo communicalo vill boll 8- and 16-bil dovicos.
-
Tlo oxacl liming of road and vrilo bus cycIos for boll momory and I/O aro
covorod in llis claplor. DolaiIod oxpIanalions of llo laIl and sluldovn bus cy-
cIos, aIong vill llo causos of oacl aro aIso covorod.

Tlo noxl sovoraI claplors dolaiI llo 80386 microprocossor and llo supporl cir-
cuilry roquirod for llo 80386 IornoI.

-- -
Tlo concopl of llo bus cycIo vas inlroducod in llo claplor onlilIod Inlroduc-
lion lo llo Bus CycIo. Tlo microprocossor porforms a bus cycIo vlon il las lo
lransfor informalion bolvoon ilsoIf and a momory or I/O Iocalion. Tlo micro-
procossor's bus unil usos llo addross, dala and conlroI busos lo addross a do-
vico, indicalo llo lypo of lransaclion in progross and lo lransfor llo dala
bolvoon llo microprocossor and llo curronlIy addrossod Iocalion.

Tlo microprocossor usos llo bus cycIo dofinilion Iinos lo indicalo llo lypo of
lransaclion. Tlo lypos of bus cycIos aro indicalod in labIo 9-1.

Will llo oxcoplion of llo inlorrupl acInovIodgo bus cycIo, llis claplor pro-
vidos a dolaiIod doscriplion of oacl bus cycIo lypo. Tlo inlorrupl acInovIodgo
bus cycIo is doscribod in llo claplor onlilIod Tlo Inlorrupl Subsyslom.


-

-
-
0 0 0 Inlorrupl AcInovIodgo
0 0 1 I/O Road
0 1 0 I/O Wrilo
1 0 0 HaIl or Sluldovn
1 0 1 Momory Road
1 1 0 Momory Wrilo

Wlon il musl porform a bus cycIo, llo microprocossor's bus unil Ioavos llo idIo
slalo and onlors addross limo. During llis licI of ICIK, llo microprocossor
pIacos llo addross and bus cycIo dofinilion on llo busos. Addross docodors
llrougloul llo syslom slarl docoding llo addross during llis limo sIol.

Addross limo is aIvays foIIovod by dala limo. During llis slalo, llo micro-
procossor oxpocls llo dala lo bo lransforrod bolvoon ilsoIf and llo curronlIy
addrossod dovico.

In roaIily, lloso aron'l llo slalo namos InloI usos for llo 80286 and 80386 bus
unil slalos. TabIo 9-2 Iisls llo slalo namos usod by InloI:

- -

Addross Timo Ts T1
Dala Timo Tc T2

Tloso slalos voro ronamod for cIarily's saIo bocauso llo namos Ts and Tc pro-
vido IillIo informalion rogarding llo aclions llal occur during lloso slalos. InloI
caIIs addross limo Ts, moaning Sond Slalus limo, bocauso ono of llo llings
llal occurs during Ts is llo oulpul of llo bus cycIo dofinilion on M/IO, S0,
and S1. InloI rofors lo S0 and S1 as llo microprocossor's slalus oulpuls,
lonco llo namo Sond Slalus limo. Dala limo is caIIod Tc, Iorform Com-
mand limo, bocauso il's limo lo porform llo command, or dala lransfor, llal
llo microprocossor inilialod.

Tlo various aclions llal musl laIo pIaco during a bus cycIo lavo boon do-
scribod in provious claplors. Tlis claplor providos an in-dopll IooI al llo so-
quonco and oxacl liming of lloso aclions in roIalion lo oacl ollor.

-

-
Will llo oxcoplion of llo M/IO oulpul, I/O and momory road bus cycIos aro
idonlicaI. Tlis soclion doscribos llo oxacl liming of llo aclions porformod dur-
ing a road bus cycIo. Iiguro 9-1 is a liming diagram iIIuslraling a sorios of lypi-
caI 80286 road bus cycIos.

ICIK las boon pIacod across llo lop of llo liming diagram as a poinl of rofor-
onco. Romombor llal oacl cycIo of ICIK dofinos llo duralion of ono bus unil
slalo. VorlicaI dollod Iinos lavo boon suporimposod on llo diagram lo dofino
oacl cycIo of ICIK (and, lloroforo, oacl slalo). In addilion, llo namo of oacl
slalo is vrillon across llo lop of llo diagram.

A gonoraI idoa of llo informalion prosonlod can bo dorivod from llo slalo
namos across llo lop. In llis oxampIo, llo soquonco of slalos is as foIIovs:

Tc Dala Timo
Ts Addross Timo
Tc Dala Timo
Ts Addross Timo
Tc Dala Timo
Tc Dala Timo
Ts Addross Timo

Ivory bus cycIo consisls of al Ioasl an addross limo and dala limo pair. Addi-
lionaI dala limos (vail slalos) may bo insorlod in llo bus cycIo if llo microproc-
ossor sampIos ils RIADY inpul doassorlod al llo ond of dala limo. Basod on
lloso ruIos, llo slalos iIIuslralod on llo diagram can bo inlorprolod as foIIovs:

Tc Dala Timo ond of provious bus cycIo
Ts Addross Timo slarl of bus cycIo A
Tc Dala Timo 1sl dala limo of bus cycIo A
Ts Addross Timo slarl of bus cycIo B
Tc Dala Timo 1sl dala limo of bus cycIo B
Tc Dala Timo vail slalo insorlod in bus cycIo B
Ts Addross Timo slarl of noxl bus cycIo

In ollor vords, llo diagram iIIuslralos llo ond of a bus cycIo foIIovod by a 0-
vail-slalo bus cycIo (bus cycIo A), a 1-vail-slalo bus cycIo (bus cycIo B) and llo
slarl of anollor bus cycIo.

-

Wlon roading a liming diagram, ono scans from Iofl-lo-rigll (from oarIior in
limo lo Ialor in limo) IooIing for llo signaIs llal clango firsl, socond, and so on.
Sinco ICIK slouId aIvays bo puIsing (clanging), il's nol nocossary lo nolo llo
facl llal il clangos.


-


-

Iiguro 9-2 slovs llo 80286 syslom ongino. Roforoncing boll llo liming dia-
gram and llo funclionaI bIocI diagram viII loIp lio llo liming and funclions
logollor for a moro compIolo undorslanding.





-
80286
Bus
Control
Logic
CHRDY
NOWS
M16
lO16
S0
S1
M/lO
A0
CLK2
RESET
CPU READY
BHE
ALE
SBHE
Address
Latch
LA Bus
Buffer

lORC
lOW C
SA0
MRDC
MWTC
ENABLE
LOWER
ENABLE
UPPER
DT/R

Upper
Data Bus
Transceiver

Lower
Data Bus
Transceiver
Data Bus
Steering Logic
LATCH LOW
ENABLE LOW
ENABLE COPY


-

-
Bus cycIo A slarls al roforonco poinl lvo, llo boginning of llo Ts limo sIol (ad-
dross limo). Scanning from Iofl-lo-rigll, lovovor, llo addross and M/IO
clango slalo prior lo llo slarl of bus cycIo A. HaIfvay llrougl llo firsl Tc limo
in llo provious bus cycIo (al roforonco poinl 1), llo microprocossor slarls lo
oulpul llo addross for llo up-coming bus cycIo (bus cycIo A) boforo llo acluaI
slarl of bus cycIo A. Tlo addross clango is iIIuslralod by llo crossovor poinl al
roforonco poinl 1, llo crossovor indicaling llal llo addross slarls lo clango lo
llo nov addross al llis poinl. Tlis oarIy addross oulpul is causod by llo
80286's addross pipoIining capabiIily. Rofor lo Iiguro 9-2.

Sinco llo addross for llo curronl bus cycIo las aIroady boon Ialclod inlo llo
addross Ialcl, llo microprocossor can safoIy oulpul a nov addross onlo ils IocaI
addross bus during llo curronl bus cycIo villoul inlorforing vill llo curronl
bus cycIo. Ils addross is aIroady Ialclod and boing prosonlod lo llo rosl of llo
syslom on llo Syslom Addross (SA) bus for oxaminalion. Tlo IalclabIo addross
(IA) bus is onIy usod by 16-bil ISA momory boards and providos oarIy docod-
ing for lloso oxpansion dovicos. Tlo oarIy addross clango on llo IA bus doos
nol inlorforo vill llo curronl cycIo bocauso 16-bil boards aro dosignod lo do-
codo llo IA Iinos and Ialcl llo clip soIocl for llo curronl cycIo. Sinco llo clip
soIocl for llo curronl bus cycIo is Ialclod, llo noxl IA addross can bo docodod
and Ialclod onco llo curronl cycIo is compIolod.

In addilion lo oulpulling llo addross for llo up-coming bus cycIo oarIy, llo mi-
croprocossor aIso sols llo M/IO Iino (roforonco poinl ono) lo llo approprialo
slalo for llo up-coming bus cycIo. Tlis viII bo a ono for a momory oporalion or
a zoro for an I/O oporalion.

Al roforonco poinl lvo, bus cycIo A acluaIIy bogins. Tlo 80286 oulpuls llo ro-
maindor of llo bus cycIo dofinilion on S0 and S1. In llo caso of a road bus cy-
cIo, S1 viII bo assorlod (Iov) and S0 viII slay ligl. In addilion, 16-bil
oxpansion boards aro froo lo oxamino llo IA addross lo dolormino if il is lloir
addross.

Al roforonco poinl llroo (llo midpoinl of Ts), llo bus conlroI Iogic assorls ad-
dross Ialcl onabIo (AII) and Ioops il assorlod unliI llo ond of Ts. Tlo addross
Ialcl Ialclos llo addross on llo faIIing odgo of AII (vlon il goos Iov again).
Onco Ialclod, llo addross is conlinuousIy prosonlod on llo syslom addross
(SA) bus vloro il can bo oxaminod by addross docodors llrougloul llo syslom.
Al llis poinl, llo microprocossor can safoIy oulpul llo addross for llo noxl bus

-

cycIo villoul laving any offocl on llo Ialclod addross. If llo microprocossor
doos lavo anollor bus cycIo lo porform, il viII slarl lo oulpul llo addross laIf-
vay llrougl Tc (al roforonco poinl oigll). In llis oxampIo, llo microprocossor
is, in facl, porforming bacI-lo-bacI bus cycIos, so you can soo llo addross
clanging al roforonco poinl oigll.

Al roforonco poinl four, llo microprocossor romovos llo assorlod IovoI from llo
S1 Iino. Tlo bus conlroI Iogic slouId lavo aIroady docodod llo microprocos-
sor's bus cycIo dofinilion Iinos and dolorminod llo lypo of bus cycIo curronlIy in
progross.

Al roforonco poinl fivo, llo bus conlroI Iogic sols llo DT/R Iino (Dala Transmil
or Rocoivo) Iino Iov bocauso llis is a rocoivo (road) oporalion. Tlis pro-
condilions llo Dala Bus Transcoivors lo pass llo dala boing road from llo cur-
ronlIy addrossod dovico from rigll-lo-Iofl llrougl llo Dala Bus Transcoivors lo
llo microprocossor. SIigllIy aflor solling llo DT/R Iino Iov (al roforonco poinl
six), llo bus conlroI Iogic assorls INABII UIIIR and/or INABII IOWIR
(lranscoivor onabIos), onabIing ono or boll of llo Dala Bus Transcoivors lo ac-
luaIIy pass llo dala. Tlo bus conlroI Iogic assorls ono of ils command oulpuls
(IORC, IOWC, MRDC or MWTC). Al llis poinl (roforonco poinl sovon), llo
dala coming from llo curronlIy addrossod dovico may bogin lo slov up on llo
microprocossor's IocaI dala bus.

Tlo microprocossor oxpocls llo curronlIy addrossod dovico lo compIolo llo
dala lransfor during Tc. Al llo ond of Tc, in bus cycIo A, llo microprocossor
sampIos ils RIADY inpul assorlod (Iov) al roforonco poinl nino. Tlis loIIs llo
microprocossor llal llo curronlIy addrossod dovico is roady lo ond llo bus cy-
cIo. Sinco llis is a road oporalion, llo microprocossor viII road llo dala llo do-
vico is suppIying (al roforonco poinl lon) and ond llo bus cycIo. Tlis compIolos
bus cycIo A.
-
Ivon llougl ils addross and M/IO solling aro oulpul during bus cycIo A (al
roforonco poinl oigll, duo lo pipoIining), bus cycIo B acluaIIy bogins al rofor-
onco poinl oIovon vill llo oulpul of S0 and S1. Sinco llis is anollor road bus
cycIo, S1 viII bo assorlod (Iov) and S0 doassorlod (ligl).

Bus cycIo B procoods llo samo as bus cycIo A rigll up unliI llo ond of Tc limo
(roforonco poinl lvoIvo). Wlon llo 80286 microprocossor sampIos RIADY al
llis poinl, llo curronlIy addrossod dovico lasn'l yol assorlod il lo indicalo ils

-

roadinoss lo ond llo bus cycIo. SampIing RIADY doassorlod loIIs llo micro-
procossor lo slrolcl llo bus cycIo by insorling anollor Tc limo (vail slalo).

Tlo microprocossor Ioavos aII signaIs oxaclIy llo samo, vailing unliI llo ond of
llis oxlra Tc lo sampIo RIADY again. Al llo lraiIing odgo (llo ond) of llo ox-
lra Tc (roforonco poinl llirloon), llo microprocossor sampIos RIADY again.
Tlis limo il is sampIod assorlod (Iov), loIIing llo microprocossor llal il can
safoIy road llo dala from ils IocaI dala bus and ond llo bus cycIo.

Sinco anollor Ts limo sIol foIIovs llis bus cycIo, anollor bus cycIo is boginning.
-
During a vrilo bus cycIo, jusl as vill llo road bus cycIo, I/O and momory
vrilo bus cycIos aro idonlicaI vill llo oxcoplion of llo M/IO solling. Tlis soc-
lion doscribos llo oxacl liming of llo aclions porformod during a vrilo bus cy-
cIo. Iiguro 9-3 is a liming diagram iIIuslraling a lypicaI 80286 vrilo bus cycIo.

A gonoraI idoa of llo informalion prosonlod can bo dorivod from llo slalo
namos across llo lop. In llis oxampIo, llo soquonco of slalos is as foIIovs:

Tc Dala Timo ond of provious bus cycIo
Ts Addross Timo slarl of bus cycIo
Tc Dala Timo ond of bus cycIo
Ts Addross Timo slarl of noxl bus cycIo
Tc Dala Timo 1sl dala limo of bus cycIo
Tc Dala Timo vail slalo
Ts Addross Timo slarl of noxl bus cycIo

Tlis liming diagram iIIuslralos ono 0-vail-slalo bus cycIo bracIolod by llo ond
of llo provious bus cycIo and llo slarl of llo noxl bus cycIo.

Tlo addross and M/IO solling for llo bus cycIo is pipoIinod oul oarIy al rofor-
onco poinl ono. Al llo slarl of llo bus cycIo (roforonco poinl lvo), llo micro-
procossor oulpuls llo romaindor of llo bus cycIo dofinilion on S0 and S1. S0
is assorlod (Iov) lo indicalo a vrilo oporalion and S1 is doassorlod.

Bocauso llis is a lransmil (vrilo) oporalion, llo bus conlroI Iogic sols DT/R
(Dala Transmil or Rocoivo) ligl al roforonco poinl llroo. Sinco llo quiosconl
(idIo) slalo for llo DT/R Iino is ligl, no clango is acluaIIy soon on llis Iino,
bul il is nonolloIoss imporlanl llal il is ligl al llis poinl. Tlis pro-condilions
llo Dala Bus Transcoivors lo pass llo dala boing oulpul by llo microprocossor

-

(on llo IocaI dala bus) lo llo syslom dala, or SD, bus. ImmodialoIy aflor solling
DT/R ligl, llo bus conlroI Iogic assorls INABII UIIIR and/or INABII
IOWIR (lranscoivor onabIos), onabIing ono or boll of llo Dala Bus Transcoiv-
ors lo pass llo dala onlo llo syslom dala bus (roforonco poinl four). Al llo samo
limo, llo microprocossor bogins lo oulpul llo dala lo bo vrillon lo llo dovico
(roforonco poinl fivo).


-


-

Addross Ialcl onabIo (AII) is puIsod by llo bus conlroI Iogic al roforonco poinl
six, causing llo addross lo bo Ialclod inlo llo addross Ialcl (al llo lraiIing odgo
of AII). Tlo Ialclod addross is nov prosonlod on llo syslom addross (SA) bus
for oxaminalion by aII addross docodors in llo syslom.
Tc Ts Tc Ts Tc Tc Ts
Bus Cycle A Bus Cycle B
PCLK
A23:A0
SA19:SA0
ALE
M/lO
S1
S0
DT/R
Tranceiver
Enable
D15:D0
READY
1 8
6
2 7
3
4
5
10
9

-

Al roforonco poinl sovon, llo microprocossor doassorls llo S0 Iino. Tlo bus
conlroI Iogic and Iogic associalod vill llo curronlIy addrossod dovico slouId
lavo docodod llo bus cycIo dofinilion Iinos by nov lo dolormino llo lypo of
bus cycIo (vrilo).

If llo microprocossor is going lo run anollor bus cycIo immodialoIy aflor llis
ono, il viII pipoIino llo noxl addross oul al roforonco poinl oigll.

Al llo lraiIing odgo of Tc (roforonco poinl nino), llo microprocossor viII sampIo
ils RIADY inpul lo soo if llo curronlIy addrossod dovico las accoplod llo dala
yol. In llis oxampIo, RIADY is sonsod assorlod (Iov), so llo microprocossor
onds llo bus cycIo.

Il slouId bo nolod, lovovor, llal llo bus conlroI Iogic conlinuos lo Ioop IN-
ABII IOWIR and/or INABII UIIIR assorlod, and llo microprocossor con-
linuos lo drivo llo dala onlo llo IocaI dala bus for laIf a ICIK licI Iongor. Tlo
microprocossor pIacod llo dala on llo dala bus oarIy (roforonco poinl fivo) and
Ioops il oul lloro aflor llo acluaI ond of llo bus cycIo (roforonco poinl lon) for
llo roason doscribod in llo foIIoving paragrapls.

To guaranloo llal informalion is rocoivod corroclIy by llo dovico boing vrillon
lo, ovory digilaI dovico capabIo of rocoiving dala roquiros llal a manufacluror-
spocifiod solup limo and loId limo bo salisfiod. In ollor vords, llo dala musl
bo prosonl on llo dovico's inpuls for al Ioasl llo spocifiod solup limo boforo llo
Ialcl poinl and musl romain prosonl for al Ioasl llo spocifiod loId limo aflor
llo Ialcl poinl or llo dovico may nol rocoivo llo dala corroclIy.

Sinco llo microprocossor las no idoa vlal llo solup and loId limos aro for llo
individuaI dovico lypos il may bo vriling lo, InloI's dosign laIos vorsl-caso
solup and loId limos inlo accounl by pIacing llo dala oul vory oarIy in llo bus
cycIo and Iooping il oul lloro as Iong as possibIo aflor llo acluaI ond of llo bus
cycIo.

Conlinuing lo drivo llo dala onlo llo dala bus for laIf of a ICIK licI inlo llo
noxl bus cycIo viII nol dislurb llo noxl bus cycIo. Il laIos limo for an addross
docodor lo dolocl an addross and clip-soIocl llo noxl dovico. Tlo facl llal llo
dala from llo provious vrilo bus cycIo is sliII prosonl on llo dala bus can'l af-
focl a dovico vlicl lasn'l ovon boon clip-soIoclod yol.

-

-
Wlon llo microprocossor oxoculos a laIl or sluldovn bus cycIo, llo bus cycIo
dofinilion Iinos and viII rofIocl llo foIIoving slalos:

S1 and S0 aro assorlod (Iov).
M/IO is sol ligl.

Nolico lloro is no vay lo dislinguisl bolvoon a laIl or sluldovn during llo
bus cycIo vlon IooIing onIy al llo bus cycIo dofinilion Iinos. Hovovor, llo
slalo of addross bil 1 (A1) indicalos vlollor a laIl or sluldovn bus cycIo is in
progross.

A1=1 for a laIl
A1=0 for a sluldovn

During a laIl or sluldovn, llo 80286 may sorvico IIRIQ (procossor oxlonsion
roquosl) or HOID roquosls. Ior furllor informalion on IIRIQ and HOID, ro-
for lo llo claplors onlilIod Tlo Numoric Coprocossor and Dirocl Momory
Accoss (DMA) rospoclivoIy.

Iillor NMI (non-masIabIo inlorrupl roquosl) or RISIT viII forco llo 80286 oul
of oillor a laIl or a sluldovn. If inlorrupls aro onabIod, an INTR (masIabIo in-
lorrupl roquosl) viII aIso forco llo microprocossor oul of a laIl (bul nol oul of
sluldovn). Ior informalion on inlorrupls, rofor lo llo claplor onlilIod Tlo In-
lorrupl Subsyslom.

Wlon llo microprocossor oxoculos a HIT inslruclion, il viII inilialo a laIl or
sluldovn bus cycIo and coaso folcling and oxoculing inslruclions. Tlo micro-
procossor indicalos il is running a laIl bus cycIo by pIacing llo vaIuos on llo
bus cycIo dofinilion Iinos and addross bil 1 as slovn abovo.

Il slouId bo nolod llal S0 and S1 aro onIy Iov during llo bus cycIo ilsoIf. Tlo
bus cycIo onds vlon llo microprocossor sampIos RIADY assorlod al llo ond
of dala limo. Aflor llo bus cycIo las ondod, llo laIl condilion can bo rocog-
nizod oxlornaIIy by llo foIIoving signs:


-

S1 and S0 aro ligl.
M/IO is ligl.
Addross bil 1 is ligl.

Tloso condilions aro slalic llal is, lloy aro conslanl, and lloroforo oasiIy roc-
ognizabIo.

Tlo indicalions of a sluldovn aro llo samo as lloso for a laIl (slovn abovo),
vill llo oxcoplion llal Addross bil A1 is Iov.

Wlon llo 80286 microprocossor dolocls an oxcoplion vliIo allompling lo oxo-
culo llo landIor for a prior oxcoplion, llo lvo oxcoplions aro gonoraIIy landIod
soriaIIy. Corlain combinalions of oxcoplions cannol bo landIod soriaIIy, lov-
ovor. Tloso oxcoplions aro causod by proloclion vioIalions in proloclod modo.
Ior oxampIo, in proloclod modo, if an appIicalion allompls lo accoss dala llal is
oulsido ils dala sogmonl, llo microprocossor viII slarl running llo gonoraI pro-
loclion fauIl oxcoplion landIor. If, say, a slacI ovorfIov voro lo occur vliIo llo
80286 microprocossor ran llo gonoraI proloclion fauIl oxcoplion landIor, llo
microprocossor vouId nol bo abIo lo landIo llo lvo fauIls soriaIIy. Tlo micro-
procossor invoIos llo doubIo-fauIl oxcoplion insload.

If llo 80286 microprocossor dolocls anollor oxcoplion vliIo allompling lo sor-
vico llo doubIo-fauIl, il goos inlo a sluldovn condilion. Tlis is somolimos ro-
forrod lo as a lripIo fauIl. Tlo microprocossor indicalos llo sluldovn condilion
lo oxlornaI Iogic by running llo laIl or sluldovn bus cycIo. In an ISA maclino,
llo sluldovn dolocl Iogic oulsido llo microprocossor dolocls llo sluldovn
and loggIos llo microprocossor's RISIT Iino, causing llo syslom lo robool.


---


-
A dolaiIod anaIysis of llo 80286 microprocossor, llo IornoI Iogic nocossary lo
inlorfaco il lo oxlornaI dovicos, and ils bus cycIo lypos voro covorod in prior
claplors.
-
Tlis claplor providos a dolaiIod doscriplion of llo 80386DX and SX microproc-
ossors. Il covors llo funclionaI unils, procossor soIf-losl, onlancomonls lo pro-
loclod modo, virluaI paging, virluaI 8086 modo, and llo procossor's lardvaro
inlorfaco lo oxlornaI dovicos.

Tlo noxl claplor, Tlo 80386 Syslom KornoI, dofinos llo supporl Iogic nocos-
sary lo inlorfaco llo 80386DX and SX microprocossors lo oxlornaI dovicos.

Tlis claplor doscribos llo 80386DX and SX microprocossors. Tlo 80386DX and
SX microprocossors aro idonlicaI inlornaIIy and onIy diffor in lloir inlorfaco lo
oxlornaI dovicos. Tlis claplor is lloroforo dividod inlo llroo parls:

a discussion of llo inlornaI slrucluro and oporalion of llo 80386 microproc-
ossor.
a discussion of llo 80386DX inlorfaco lo oxlornaI dovicos.
a discussion of llo 80386SX inlorfaco lo oxlornaI dovicos.

-

-

Iiguro 10-1 iIIuslralos llo unils llal maIo up llo 80386 microprocossor.

--

---

Tlo 80386 microprocossor consisls of fivo funclionaI unils:

Bus Unil. HandIos communicalion vill dovicos oxlornaI lo llo microproc-
ossor clip.
Codo Irofolcl Unil. Iolclos inslruclions from momory boforo llo micro-
procossor acluaIIy roquosls llom.
Inslruclion Docodo Unil. Docodos llo inslruclion prior lo passing il lo llo
oxoculion unil for oxoculion.
Ixoculion Unil. HandIos llo acluaI oxoculion of llo inslruclion.
Momory Managomonl Unil (MMU). Wlon llo microprocossor musl ad-
dross a momory Iocalion, llo MMU forms llo plysicaI momory addross
llal is drivon oul onlo llo addross bus by llo bus unil during a bus cycIo.

Tlo codo profolcl unil capilaIizos on llo prodiclabiIily of program oxoculion.
SlalislicaIIy, program inslruclions aro folclod from momory soquonliaIIy mosl
of llo limo. OnIy jump inslruclions aIlor program fIov, causing il lo jump lo
anollor aroa of momory. Onco llo fIov aIloralion las occurrod, lovovor, llo
program rolurns lo soquonliaI inslruclion procossing unliI anollor jump in-
slruclion is oncounlorod.

Wlon llo bus unil isn'l porforming bus cycIos for llo oxoculion unil, llo codo
profolcl unil usos llo bus unil lo folcl llo noxl soquonliaI inslruclion from
momory and sloros il in llo 16-bylo profolcl quouo. Tlo codo profolcl unil aI-
vays allompls lo maximizo llo bus unil's llrouglpul by folcling an onliro
doubIovord (four bylos) al a limo. Tlo profolclod inslruclions aro pIacod in llo
profolcl quouo lo avail procossing by llo inslruclion docodo unil.

Codo profolcl roquosls aro givon a Iovor priorily by llo bus unil llan roquosls
from llo oxoculion unil. Tlis onsuros llal llo oxoculion unil viII nol bo slaIIod
vliIo vailing for a momory or I/O dala lransfor lo compIolo. Ior aII praclicaI
purposos, inslruclion profolcling roducos llo limo llo oxoculion unil sponds
vailing for llo noxl inslruclion lo zoro.
-
Tlo inslruclion docodo unil laIos an inslruclion from llo 16-bylo profolcl
quouo, convorls il inlo microcodo and sloros il in a llroo-doop docodod inslruc-
lion quouo for uso by llo oxoculion unil. Any immodialo dala and offsol associ-

-

alod vill llo inslruclion is aIso laIon from llo profolcl quouo and slorod in llo
docodod inslruclion quouo.

Tlo oxoculion unil oxoculos oacl inslruclion rocoivod from llo docodod in-
slruclion quouo. Il communicalos vill llo ollor microprocossor funclionaI
unils on an as noodod basis in ordor lo oxoculo oacl inslruclion. Tlo oxoculion
unil is comprisod of llroo sub-unils:

Tlo conlroI unil's microcodo and spociaI paraIIoI lardvaro spoods muIli-
pIios, dividos and offoclivo addross caIcuIalion.
Tlo dala unil conlains llo arillmolic Iogic unil, or AIU, oigll gonoraI-
purposo rogislors and a 64-bil barroI sliflor. Tlo dala unil porforms dala
oporalions roquoslod by llo conlroI unil.
Tlo proloclion losl unil clocIs for sogmonlalion vioIalions.
--
Tlo 80386 oxoculion unil incorporalos llo foIIoving rogislors:

Tlo gonoraI rogislors
Tlo slalus and conlroI rogislors
Tlo dobug rogislors
Tlo losl rogislors

Tlo foIIoving soclions doscribo oacl of lloso rogislor groups.
--
Tlo gonoraI rogislors impIomonlod in llo 80386 microprocossor aro a suporsol
of lloso found in llo oarIior impIomonlalions of llo X86 procossor famiIy. Iig-
uro 10-2 iIIuslralos llo gonoraI rogislors.

---




--

Ixlondod vorsions of llo AX, BX, CX, DX, BI, SI, DI and SI rogislors aro nov
avaiIabIo lo llo programmor. Tlo namos of oacl of llo oxlondod rogislors slarls
vill llo Iollor I. Roforring lo llo IAX, IBX, ICX or IDX rogislors villin a
MOV inslruclion aIIovs llo programmor lo spocify a doubIovord, or 32-bil,
objocl lo bo movod. Ixlonding llo vidll of BI, SI, DI and SI rogislors lo 32 bils
pormils llo programmor lo spocify any momory addross villin llo 4GB ad-
drossing rango of llo microprocossor villoul clanging llo conlonls of llo
sogmonl rogislors.
- - --
Iiguro 10-3 iIIuslralos llo 80386's slalus and inslruclion rogislors.
AH AL
BL
CL
DL
BH
CH
DH
BP
Sl
Dl
SP
EAX
EBX
ECX
EDX
EBP
ESl
EDl
ESP
AX
BX
CX
DX
0 7 8 15 23 31

-



- - --

An oxlondod vorsion of llo 80286 IIags rogislor, llo IfIags rogislor, conlains
lvo nov conlroI bils:

Tlo RI, or rosumo fIag, bil aIIovs llo programmor lo disabIo dobug oxcop-
lions so llal llo inslruclion can bo roslarlod aflor a dobug oxcoplion vill-
oul immodialoIy causing anollor dobug oxcoplion.
Tlo VM, or virluaI modo, bil aIIovs llo programmor lo onabIo or disabIo
virluaI 8086 modo. VirluaI 8086 modo is discussod Ialor in llis claplor.

ConlroI rogislor 0, or CR0, is a suporsol of llo 80286 maclino slalus vord
(MSW) rogislor. CR0 conlains lvo nov bils nol found in MSW. Tlo oxlonsion
lypo, or IT, bil (bil 4) indicalos llo lypo of numoric coprocossor prosonl in llo
syslom (80287 or 80387). Tlo IT bil is sol lo ono vlon an 80387 coprocossor is
doloclod. Tlo paging bil, IG (bil 31), onabIos virluaI paging vlon llo bil is sol
lo ono. VirluaI paging is doscribod Ialor in llis claplor in llo soclion onlilIod
Iago TransIalion.

Aflor rosol, llo 80386 MSW rogislor las a vaIuo of 0000l in il. Tlo 80286 MSW
rogislor las III0l in il aflor rosol. Sinco llo uppor bils in llo rogislor aron'l
usod by oillor procossor, llo difforonco las no offocl.
lP
ElP
0 31
MSW
ET TS EM MP PE PG
CR0
0
31
Flags
EFlags
VM RF
0 31

---

--
Iiguro 10-4 iIIuslralos llo 80386 dobug rogislors. Tloso rogislors supporl llo
impIomonlalion of boll codo and dala broaIpoinls. In llo caso of a codo broaI-
poinl, llo microprocossor monilors ovory inslruclion folcl for a malcl on llo
spocifiod momory addross. Wlon a malcl is doloclod, a dobug oxcoplion occurs
and aIorls llo programmor. In llo caso of a dala broaIpoinl, llo microprocossor
monilors for a dala road from or a dala vrilo lo llo spocifiod momory addross
dofinod by llo programmor. Wlon a malcl is doloclod, a dobug oxcoplion oc-
curs and aIorls llo programmor.


--

Dobug rogislor 7, or DR7, is llo dobug conlroI rogislor. Il is usod lo dofino up lo
four broaIpoinls as boing onabIod or disabIod. If onabIod, a broaIpoinl may
laIo ono of llroo forms:

broaI on inslruclion oxoculion onIy.
broaI on dala vrilos onIy.
broaI on dala roads or vrilos, bul nol on inslruclion roads.

In addilion, bils in DR7 may bo usod lo dofino a broaIpoinl as IocaI lo a par-
licuIar lasI or gIobaI in naluro.

DR0
DR1
DR2
DR3
DR4
DR5
DR6
DR7
Linear Breakpoint Address 0
Linear Breakpoint Address 3
Linear Breakpoint Address 2
Linear Breakpoint Address 1
Reserved
Reserved
Breakpoint Status
Breakpoint Control

-

Tlo dobug slalus rogislor, DR6, pormils llo programmor lo dolormino vlicl
broaIpoinl condilion las boon mol. DR4 and DR5 aron'l usod by llo 80386. DR0
llrougl DR3 aro usod lo spocify up lo four broaIpoinl addrossos.

Ior addilionaI informalion aboul llo dobug rogislors, rofor lo Claplor 12 of In-
loI's - , ordor numbor 230985.
- --
Tlo 80386 losl rogislors aro usod lo losl llo paging unil's lransIalion IooIasido
buffor, or TIB. Iiguro 10-5 iIIuslralos llo lvo rogislors.


- --

TR6 is llo command rogislor for TIB accossos, vliIo TR7 is llo dala rogislor.
Addrossos and commands aro vrillon lo llo TIB using llo command rogislor,
vliIo dala is road from or vrillon lo llo TIB using llo dala rogislor.

Ior furllor informalion aboul llo losl rogislors, rofor lo Claplor 12 of InloI's
, ordor numbor 231732.

Tlo microprocossor musl accoss momory undor llo foIIoving circumslancos:

To folcl llo noxl inslruclion for llo codo profolcl unil.
Wlon llo oxoculion unil musl road dala from momory lo salisfy a MOV in-
slruclion.
Wlon llo oxoculion unil musl vrilo dala lo momory lo salisfy a MOV in-
slruclion.
To folcl a sogmonl doscriplor from momory vlon a sogmonl rogislor is
Ioadod vill a nov vaIuo in proloclod modo.
To folcl a pago diroclory or pago labIo onlry from momory.

TR6
TR7
TLB Test Control
TLB Test Status

---

Wlon llo microprocossor musl accoss momory, llo sogmonlalion unil forms
llo momory addross by adding llo offsol villin llo largol sogmonl lo llo sog-
monl slarl addross conlainod villin llo rospoclivo sogmonl rogislor. Tlo rosuIl-
ing 32-bil momory addross, Inovn as llo Iinoar addross, is llon oillor
submillod lo llo paging unil (if paging is onabIod) or oulpul onlo llo addross
bus during llo rosuIling momory bus cycIo.

Rofor lo figuro 10-6. In roaI modo, aII of llo sogmonl rogislors, incIuding IS and
GS, aro avaiIabIo lo llo programmor. Tlo IS and GS sogmonl rogislors givo llo
programmor llo abiIily lo croalo lvo nov dala sogmonls in addilion lo llo DS
and IS dala sogmonls avaiIabIo in llo oarIior procossors. Tlo programmor aIso
las accoss lo llo dobug, conlroI and losl rogislors vliIo in roaI modo.

A doscriplion of sogmonl rogislor usago in boll roaI and proloclod modos can
bo found in llo claplor onlilIod Tlo 80286 Microprocossor. Tlo difforoncos in
proloclod modo oporalion on llo 80286 and 80386 microprocossors aro dis-
cussod Ialor in llis claplor.

--

A doscriplion of llo paging unil can bo found Ialor in llis claplor undor llo
loading Iago TransIalion.
CS
DS
SS
ES
0 15
Segment
Registers
FS
GS

-

-
Tlo bus unil providos llo inlorfaco bolvoon llo microprocossor and oxlornaI
momory and I/O dovicos. Wlon llo microprocossor musl road informalion
from or vrilo informalion lo an oxlornaI dovico, llo bus unil usos llo addross,
dala, and conlroI busos lo run ono or moro bus cycIos. Tlo bus unil runs bus
cycIos vlon a roquosl is rocoivod from:

Ixoculion unil lo run an I/O or momory road or vrilo.
llo codo profolcl unil lo road llo noxl inslruclion from momory.
llo oxoculion unil lo folcl a sogmonl doscriplor from momory vlon a sog-
monl rogislor is Ioadod vill a nov vaIuo in proloclod modo.
llo paging unil lo folcl a pago diroclory or pago labIo onlry from momory.

Tlo bus unil aIso providos llo inlorfaco bolvoon llo microprocossor and llo
numoric coprocossor. A doscriplion of procossor/coprocossor inlor-
communicalion can bo found in llo claplor onlilIod Numoric Coprocossor.

Iiguro 10-7 iIIuslralos llo sogmonl doscriplor formal in llo 80286 proloclod
modo onvironmonl. Bylos 0 and 1 doscribo llo Iongll, or Iimil, of llo sogmonl.
Sinco llis is onIy a 16-bil fioId, llo 80286 can onIy doscribo sogmonls up lo
64KB in Iongll. Bylos 2, 3 and 4 suppIy llo slarl addross of llo sogmonl, aIIov-
ing llo sogmonl lo slarl anyvloro in llo 16MB momory spaco of llo 80286 mi-
croprocossor. Bylo 5 is llo allribulo bylo and doscribos various claraclorislics of
llo sogmonl. Bylos 6 and 7 aro nol usod by llo 80286.

Iiguro 10-8 iIIuslralos llo sogmonl doscriplor formal in llo 80386 proloclod
modo onvironmonl. Bylos 0 and 1 and llo Iovor four bils of bylo 6 spocify llo
Iongll of llo sogmonl. Will a 20-bil fioId, a sogmonl Iongll of from ono bylo lo
1Mbylo (1,048,576) can bo spocifiod. In addilion, bil 7 of bylo 6 is usod lo fur-
llor dofino llo sogmonl Iongll. Knovn as llo granuIarily, or G, bil, il indicalos
lov llo Iimil (sogmonl Iongll) fioId is lo bo inlorprolod. If G = 0, llo Iongll is
in bylos. Tlis aIIovs a sogmonl lo bo anyvloro from ono bylo lo 1MB Iong. If G
= 1, llo Iongll is spocifiod as llo numbor of 4KB pagos of momory. Tlis aIIovs
a sogmonl lo bo anyvloro from 4KB lo 4GB in Iongll.

Bylos 2, 3, 4 and 7 aro usod lo spocify llo slarl addross of llo sogmonl, aIIoving
llo sogmonl lo bo Iocalod anyvloro in llo 4GB addross rango of llo micro-
procossor.

---


A doscriplion of llo proloclod modo concopl can bo found in llo claplor onli-
lIod Tlo 80286 Microprocossor.




-

Lower Byte of Size
Upper Byte of Size
Lower Byte of Base Address
Middle Byte of Base Address
Upper Byte of Base Address
Not used by 80286
Not used by 80286
P DPL S Type A Attribute Byte
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7

-


-
-

Tlo 80386 microprocossor incorporalos Iogic lo faciIilalo llo impIomonlalion of
virluaI paging (aIso roforrod lo as domand paging) in an oporaling syslom.

Iaging is onabIod by solling llo IG bil in CR0 (bil 31). Wlon onabIod, llo ad-
dross producod by llo sogmonlalion unil, caIIod llo Iinoar addross, is usod as
an inpul lo llo paging unil. Tlo Iinoar addross oulpul by llo sogmonlalion unil
is usod by llo paging unil lo idonlify a pago labIo, a pago doscribod villin llal
labIo, and an offsol villin llal pago.

Boforo doscribing llo funclion porformod by llo paging unil, llo concopl of llo
pago slouId bo dofinod.

Tlo 80386 paging syslom providos an indoxing syslom lo Ioop lracI of llo Ioca-
lion and slalus of up lo 1,048,576 four IiIobylo pagos (a lolaI of 4GB) of pro-
Lower Byte of Size
Middle Byte of Si ze
Lower Byte of Base Address
Lower Mi ddle Byte
of Base Address
Upper Mi ddle Byte
of Base Address
P DPL S Type A Attribute Byte
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Upper Nibble
of Size G
Upper Byte of Base Address

---

gram and/or dala llal boIongs lo a lasI (appIicalions program). Al a givon
momonl in limo, a pago of program and/or dala can bo:

on disI or
on disI and in main momory

Wlon paging is onabIod, llo paging unil usos llo Iinoar addross producod by
llo sogmonlalion unil lo Iocalo:

llo pago diroclory onlry llal poinls lo llo rospoclivo pago labIo.
llo pago labIo onlry llal doscribos llo pago conlaining llo Iocalion llo pro-
grammor is allompling lo accoss.
llo offsol villin llo main momory pago.

As iIIuslralod Ialor in llis loxl, oacl 32-bil pago labIo onlry conlains a pago pro-
sonl bil llal dofinos vlollor or nol llo dosirod pago is curronlIy rosidonl in
main momory. If il is, llo onlry aIso dofinos llo slarl addross of llo dosirod
pago in main momory. Tlo Iovor parl of llo Iinoar addross from llo sogmonla-
lion unil is llon usod lo idonlify llo offsol of llo dosirod Iocalion in llo largol
main momory pago and a bus cycIo is gonoralod lo accoss llo dosirod main
momory Iocalion. If llo onlry indicalos llo dosirod pago isn'l curronlIy prosonl
in main momory, a pago fauIl (oxcoplion 14) occurs, causing llo 80386 lo jump
lo llo pago fauIl landIor program. In addilion, llo microprocossor aIso puslos
a 16-bil orror codo onlo llo slacI.

In llo pago fauIl landIor, llo oporaling syslom can llon road CR2 (soo figuro
10-9) lo ascorlain llo acluaI 32-bil Iinoar addross llal causod llo pago fauIl. Tlo
Iinoar addross can bo usod lo Iocalo llo pago labIo onlry llal dofinod llo pago
as nol prosonl. Sinco onIy ono bil of llo 32-bil onlry vas usod lo dofino llo
pago as nol prosonl, llo oporaling syslom can uso llo ollor 31 bils lo dofino a
disI addross vloro llo acluaI 4KB pago of codo and/or dala can bo found on
llo disI. Tlo pago fauIl landIor can llon Iocalo an unusod pago in main mom-
ory and road llo dosirod pago inlo llo rospoclivo main momory pago. Tlo pago
labIo onlry viII llon bo updalod lo marI llo pago prosonl in main momory and
poinl lo llo pago's slarl addross in main momory. Tlo acluaI bus roquosl lo ac-
coss llo dosirod codo or dala is llon inilialod.

Wlon a lasI bogins oxoculion, CR3 (soo figuro 10-9) is aulomalicaIIy Ioadod
vill llo slarl addross of llo pago diroclory in main momory. OnIy llo uppor 20
bils, 31:12, of llo pago diroclory slarl addross aro acluaIIy found in CR3 (llo
Ioasl-significanl 12 bils of llo slarl addross aro assumod lo bo 0).

-


--

Iiguro 10-10 iIIuslralos llo pago diroclory, pago labIos, and llo lransIalion of
llo sogmonlalion unil's Iinoar addross oulpul lo llo plysicaI momory addross.
Tlo pago diroclory slarls al llo Iocalion spocifiod in CR3 and is ono pago (4KB)
in sizo. Il can conlain up lo 1K (1,024) 32-bil pago diroclory onlrios, oacl con-
sisling of 32 bils. Bils 31:22 of llo Iinoar addross idonlify vlicl of llo 1,024 32-
bil pago diroclory onlrios lo uso. A pago diroclory onlry las llo formal iIIus-
lralod in labIo 10-1. Il slouId bo nolod llal pago diroclory and pago labIo on-
lrios lavo llo samo formal.

OnIy llo uppor 20 bils, 31:12, of llo pago labIo slarl addross aro acluaIIy found
in bils 31:12 of llo pago diroclory onlry (llo Ioasl-significanl 12 bils of llo slarl
addross aro assumod lo bo 0). Tlo ollor bils in llo pago labIo onlry aro dofinod
in labIo 10-1.

CR2
0 31
Page Fault Register
0 12 31
Page Directory
Base Register
0 0
0 0 0 0 0 0 0 0 0 0
CR3

---


- -- - --
0 11 12 21 31 22
Page Di rectory
Entry (1 of 1024)
Page Table Entry
(1 of 1024)
Locati on in Page
(1 of 4096)
lndex
lndex
lndex
Page Table
start address
Memory Page
start address
Page Directory
start address
CR3
Linear Address from Segment Unit
Page
Directory
Page Tables
Memory
Pages
(4KB each)
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P

-


-
- -
0 I Iago Irosonl bil. Sol lo ono if llo largol pago is
curronlIy rosidonl in main momory. CIoarod lo
zoro if llo pago conlaining llo largol pago labIo
musl bo road from disI.
1 R/W Road/Wrilo bil. Wlon sol lo ono, il is pormillod
lo boll road and vrilo llo largol pago. CIoarod lo
zoro, llo pago can onIy bo road.
2 U/S Usor/Suporvisor bil. A ono in llis bil indicalos
llal llo pago is accossibIo by boll llo oporaling
syslom and appIicalions programs. CIoarod lo
zoro, il indicalos llal llo pago may onIy bo ac-
cossod by llo oporaling syslom.
4:3 nono InloI rosorvod, do nol uso (dofinod on 80486).
5 A Accossod bil. Sol lo ono by lardvaro boforo a
road or vrilo accoss lo llo largol pago. Tlo opor-
aling syslom can uso llo slalo of llis bil lo do-
lormino vlollor llo pago las boon usod
(accossod). If nol, llo oporaling syslom may
clooso lo road a difforonl pago from disI inlo
llis 4KB pago of main momory.
6 D Dirly bil. Tlis bil is undofinod in a pago diroclory
onlry. In a pago labIo onlry, llo dirly bil is sol
boforo a vrilo lo llo pago doscribod by llo pago
labIo onlry. Wlon sol, il indicalos llal llo oporal-
ing syslom slouId insuro llal llo pago is vrillon
bacI lo disI lo mainlain coloroncy bolvoon disI
and main momory.
8:7 nono InloI rosorvod, do nol uso.
11:9 nono Tloso llroo bils aron'l usod by llo 80386 micro-
procossor. Tloy may bo usod by llo sysloms pro-
grammor in a programmor-spocifiod faslion.

As slalod abovo, llo pago diroclory onlry doscribos llo pago vlicl conlains llo
pago labIo. Tlo uppor 20 bils (31:12) poinl lo llo slarl addross of llo pago labIo.

Bils 21:12 of llo Iinoar addross aro llon usod lo indox inlo llo pago labIo
poinlod lo by llo pago diroclory onlry. Slarling al llis addross, llo pago labIo
can conlain up lo 1,024 32-bil onlrios. Tlo formal of llo pago labIo onlry is idon-

---

licaI lo llal of llo pago diroclory onlry doscribod in labIo 10-1. If llo pago is
prosonl in momory (I = 1), bils 31:12 of llo pago labIo onlry poinl lo llo acluaI
slarl addross of llo pago in main momory. Bils 11:0 of llo Iinoar addross pro-
vido llo offsol villin llo main momory pago. Tlo slarl addross of llo pago and
llo offsol villin llo pago aro llon combinod lo form llo plysicaI momory ad-
dross llal viII bo drivon onlo llo addross bus.

As slalod oarIior, if llo pago labIo doscribing llo pago or llo pago ilsoIf isn'l
curronlIy in momory, a pago fauIl viII bo gonoralod and llo pago can llon bo
road from disI inlo an avaiIabIo pago of main momory.

Iiguro 10-11 slovs anollor viov of llo pago diroclory, pago labIos and mom-
ory pagos. Tlo pago diroclory and pago labIos form a lroo llal providos llo
slarl addrossos of llo momory pagos. Nolico llal if llo prosonl bil, llo Ioasl
significanl bil of a pago diroclory onlry, is sol lo ono, llon llal onlry conlains
llo slarl addross of ono of llo pago labIos. If llo bil is cIoarod lo zoro, llo onlry
is nol curronlIy in uso and llo onlry doosnl poinl lo anylling. IiIoviso, if llo
prosonl bil of a pago labIo onlry is ono, llal onlry conlains llo slarl addross of a
momory pago. Romombor llal llo bils of llo Iinoar addross aro usod lo soIocl
llo pago diroclory and pago labIo onlrios, as slovn in figuro 10-10.

-


- -
- -
Iorformanco vouId dogrado subslanliaIIy if llo microprocossor lad lo accoss
lvo IovoIs of momory-basod labIos oacl limo momory lad lo bo accossod. To
soIvo llis probIom, llo 80386 microprocossor mainlains an on-clip caclo of llo
mosl roconlIy accossod pago labIo onlrios. Tlis caclo is caIIod llo lransIalion
IooIasido buffor (TIB).

Rofor lo figuro 10-12. Tlo TIB is a four-vay sol-associalivo 32-onlry pago labIo
caclo (sol-associalivo caclos aro doscribod in llo claplor onlilIod Caclo
Momory Concopls). Tlo TIB aulomalicaIIy Ioops llo mosl-roconlIy-usod pago
labIo onlrios on-board llo procossor. Tlo 32-onlry TIB coupIod vill a 4KB
pago sizo rosuIls in covorago of up lo 128KB of momory addrossos.

Ior many muIli-lasIing oporaling sysloms, llo TIB viII oxlibil a lil ralo of
aboul 98. Tlis moans llal llo procossor viII onIy lavo lo accoss llo lvo-IovoI
pago slrucluro on 2 of aII momory roforoncos.
0 0 0 0
0
Page
Directory
Page
Tables
Memory
Pages
1
0
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
1
0
0
(only one)
(up to
1,024)
(up to
1,024)

---



- -

Roading a nov onlry inlo llo TIB (roforrod lo as a TIB Rofrosl) is a lvo slop
procoss landIod by llo 80386 microprocossor lardvaro. Tlo soquonco of dala
cycIos lo porform a TIB rofrosl aro:

Road llo corrocl pago diroclory onlry, as poinlod lo by llo pago baso rogis-
lor (CR3) and llo uppor lon bils of llo Iinoar addross. OplionaIIy porform a
IocIod road/vrilo lo sol llo accossod bil in llo pago diroclory onlry. Tlo
pago diroclory onlry viII acluaIIy gol road lvico if llo 80386 microprocos-
sor noods lo sol any of llo bils in llo onlry. If llo pago diroclory onlry
clangos bolvoon llo lvo roads, llo dala rolurnod from llo socond road
viII bo usod.
Road llo corrocl onlry in llo pago labIo and pIaco llo onlry in llo TIB. Op-
lionaIIy porform a IocIod road/vrilo lo sol llo accossod and/or dirly bils
in llo pago labIo onlry. Again, nolo llal llo pago labIo onlry viII acluaIIy
gol road lvico if llo 80386 microprocossor noods lo sol any of llo bils in llo
onlry. If llo pago labIo onlry clangos bolvoon llo lvo roads, llo dala ro-
lurnod from llo socond road viII bo usod.


-

Nolo llal llo TIB conlains pago labIo onlrios onIy. Il doos nol conlain pago di-
roclory onlrios. NovorlloIoss, if lloro is a miss on llo TIB, llo microprocossor
musl accoss boll llo pago diroclory onlry and llo pago labIo onlry in ordor lo
rofrosl llo TIB. Tlis is bocauso llo pago diroclory onlry conlains llo slarl ad-
dross of llo pago labIo. Sinco boll labIos aro boing accossod on a TIB miss,
pago fauIls can bo signaIod from oillor llo pago diroclory road or llo pago la-
bIo road.

Tlo paging unil lardvaro rocoivos a 32-bil Iinoar addross from llo
sogmonlalion unil. Tlo uppor 20 Iinoar addross bils aro comparod vill four on-
lrios in llo TIB (llo onlrios in llo four-vay-associalod sol) lo dolormino if lloro
is a malcl. If lloro is a malcl (a lil), llon llo 32-bil plysicaI addross is caIcu-
Ialod and viII bo pIacod on llo addross bus.

Tlo 80386 microprocossor can oxoculo 8086 codo in oillor of lvo modos:

RoaI modo
VirluaI 8086 modo

VirluaI 8086 Modo oslabIislos an 8086 oxoculion onvironmonl villin llo pro-
loclod modo onvironmonl of llo 80386. Wloro roaI modo govorns ovorylling
llal llo 80386 doos, virluaI 8086 modo can bo appIiod lo soIoclod 80386 lasIs.
Wlon oxoculing a virluaI 8086 modo lasI, llo procossor bolavos IiIo an 8086,
bul upon a svilcl lo a normaI lasI, llo procossor oporalos as an 80386. Tlus,
virluaI 8086 modo onabIos an oporaling syslom lo supporl llo oxoculion of
8086, 80286 and 80386 lasIs concurronlIy.

Tlo VM fIag bil in llo IfIags rogislor, vlicl is Ioadod from llo lss (lasI slalo
sogmonl), dofinos llo running lasI's virluaI procossor as an 8086 or as an 80386.
Wlon llo 80386 Ioads ils rogislors from a TSS vloso VM fIag bil is sol, llo
procossor onlors virluaI 8086 modo. Wlon, on a subsoquonl lasI svilcl, llo
procossor Ioads ils rogislors from a TSS vloro llo VM bil is cIoar, il Ioavos vir-
luaI 8086 modo. Tlus, on a lasI-by-lasI basis, llo procossor omuIalos an 80386
or an 8086 according lo llo vaIuo of llo VM bil. Tlo 80386 aIso Ioavos virluaI
8086 modo vlon il raisos an oxcoplion or is inlorruplod, maIing llo fuII ro-
sourcos of llo arclilocluro avaiIabIo lo inlorrupl and oxcoplion landIors. On ro-
lurn from a landIor invoIod vliIo in virluaI 8086 modo, llo 80386
aulomalicaIIy ro-onlors virluaI 8086 modo vlon llo IfIags rogislor is roIoadod
from llo slacI.

---

Bocauso llo addross spaco of an 8086 is ono mogabylo, llo IogicaI addrossos
gonoralod by a virluaI 8086 modo lasI faII inlo llo firsl mogabylo of llo 80386
Iinoar addross spaco. MuIlipIo virluaI 8086 modo lasIs couId inlorforo vill
oacl ollor, sinco lloy vouId aII slaro llo Iov mogabylo of llo Iinoar addross
spaco. An oporaling syslom can uso 80386 paging lo roIocalo llo Iinoar addross
spacos of virluaI 8086 modo lasIs lo difforonl aroas of llo plysicaI addross
spaco. Using paging in llis vay nol onIy provonls inlorforonco bolvoon virluaI
8086 modo lasIs, bul onabIos a virluaI momory oporaling syslom lo svap llo
pagos of virluaI 8086 modo lasIs jusl as if lloy voro 80386 lasIs.

A virluaI 8086 modo lasI may oxoculo a program llal vas vrillon for oxocu-
lion on a singIo-lasI porsonaI compulor. Sucl a program can conlain inslruc-
lions llal aro polonliaIIy disruplivo if oxoculod in a muIli-lasIing onvironmonl.
Ior oxampIo, aIIoving a virluaI 8086 modo lasI lo oxoculo llo cIoar inlorrupl
onabIo (CII) inslruclion, lloroby disabIing rocognilion of inlorrupls, couId
bring llo onliro syslom lo a laIl. To provonl sucl disruplions, llo 80386 raisos
an oxcoplion vlon a virluaI 8086 modo lasI allompls lo oxoculo an I/O or in-
lorrupl-roIalod inslruclion. Tloso inslruclions aro roforrod lo as sonsilivo bo-
causo lloir oxoculion doponds on (is sonsilivo lo) llo slalo of llo I/O priviIogo
IovoI bils in llo IfIag rogislor.

I/O inslruclions aro provonlod from boing oxoculod vlon in virluaI 8086 modo
on llo basis of an I/O pormission map incIudod as parl of llo TSS. Wlon a roaI
modo program allompls lo accoss an I/O Iocalion, llo procossor clocIs llo ad-
dross againsl onlrios villin llo I/O pormission map. Iacl bil in llo pormission
map roprosonls a singIo I/O Iocalion. If llo corrosponding bil for an I/O Ioca-
lion is sol, accoss is aIIovod. Tlo firsl bil in llo map is assignod lo I/O addross
zoro, llo socond bil lo I/O Iocalion ono, and so forll up lo 64Kbils (8KB). In
llis vay, aII of llo possibIo 64KB of I/O addrossos can bo mappod lo aIIov or
dony accoss.

Irovonling llo oxoculion of sucl inslruclions prolocls llo rosl of llo syslom
from a virluaI 8086 modo lasI, bul doos nol salisfy llo virluaI 8086 modo lasI's
nood lo oxoculo llo inslruclions. Tlo soIulion is lo simuIalo llo sonsilivo in-
slruclions in an oporaling syslom procoduro Inovn as a virluaI maclino moni-
lor. Wlon an oxcoplion landIor is invoIod, il can inspocl llo VM fIag bil in llo
IfIags imago on llo slacI lo dolormino if llo sourco of llo oxcoplion is a virluaI
8086 modo lasI, if so, llo oxcoplion landIor can caII llo virluaI maclino moni-
lor vlicl can simuIalo llo inslruclion and rolurn lo llo virluaI 8086 modo lasI.
Nolo llal a virluaI maclino monilor program simuIalos onIy a fov 8086 in-
slruclions and llal boll llo simuIalod inslruclions and lloso llo 80386 oxo-

-

culos diroclIy bonofil from llo mucl liglor porformanco of llo 80386 com-
parod lo llo 8086.

WorIing logollor, llo 80386 and a virluaI maclino monilor impIomonl llo fuII
8086 inslruclion sol, and paging can provido oacl virluaI 8086 modo lasI vill
ils ovn proloclod addross spaco. Hovovor, mosl 8086 programs nood addi-
lionaI rosourcos providod by an oporaling syslom and poriploraI lardvaro. An
oxampIo of llo formor lypo of rosourco is a fiIo syslom, an oxampIo of llo Iallor
is a dispIay conlroIIor manipuIalod diroclIy by an appIicalions program. Tloso
rosourcos may nol oxisl in llo samo form in llo 80386-basod syslom as lloy did
in llo syslom for vlicl llo 8086 program vas dosignod. To simpIify llo job of
providing lloso rosourcos in a difforonl onvironmonl, llo 80386 can lrap opor-
aling syslom and poriploraI roforoncos mado by virluaI 8086 modo lasIs.

Ior oxampIo, mosl 8086 oporaling sysloms uso llo INT (Inlorrupl) inslruclion
lo impIomonl oporaling syslom caIIs. If a virluaI 8086 modo lasI's curronl privi-
Iogo IovoI is Ioss priviIogod llan llo lasIs IOII (I/O priviIogo IovoI), llo 80386
raisos an oxcoplion vlon llo virluaI 8086 modo lasI allompls lo oxoculo an INT
inslruclion. Tlo virluaI maclino monilor can llon lransIalo llo 8086 oporaling
syslom caII inlo a caII on llo 80386 oporaling syslom.

IoriploraI roforoncos mado by a virluaI 8086 modo lasI using IN and OUT in-
slruclions aro aIvays clocIod againsl llo I/O pormission map, rogardIoss of
llo IOII. Tlo 80386 paging faciIily can bo usod lo rodirocl roforoncos lo mom-
ory-mappod poriploraIs lo ollor addrossos, if nocossary. Sucl roforoncos can
aIso bo lrappod by marIing llo corrosponding pagos as road-onIy (lo lrap
vrilos), or nol-prosonl (lo lrap boll roads and vrilos).
-
Tlo 80386 microprocossor las llo abiIily lo porform a soIf-losl of ils llroo major
Iogic arrays and lo vorify llo conlonls of ils inlornaI microcodo conlroI ROM.
Tlo aulomalic soIf-losl is inilialod by assorling llo microprocossor's BUSY in-
pul during iniliaIizalion (vliIo llo RISIT signaI is assorlod). Tlo losl rosuIl is
slorod in llo IAX rogislor, and viII bo non-zoro if an orror vas incurrod. Tlo
soIf-losl providos 100 covorago of singIo-bil fauIls, vlicl slalislicaIIy com-
priso a ligl porconlago of lolaI fauIls.

Tlo RISIT inpul lo llo 80386 musl romain assorlod for al Ioasl 80 CIK2 pori-
ods if llo soIf-losl is lo bo porformod. On llo ligl-lo-Iov lransilion of RISIT,
llo BUSY inpul is sampIod. If assorlod, llo microprocossor inilialos llo soIf-
losl vlicl viII laIo approximaloIy 2
20
+ 60 CIK2 cycIos lo compIolo. Wlon llo

---

losl compIolos, llo microprocossor inilialos program oxoculion villoul oxamin-
ing llo losl rosuIls.

Tlis soclion providos a dolaiIod doscriplion of llo signaI Iinos llo 80386DX mi-
croprocossor usos lo communicalo vill llo rosl of llo syslom. Many of lloso
signaI Iinos sorvo llo samo purposo as on llo 80286 microprocossor. Tloso sig-
naIs aro Iislod in labIo 10-2.

- ---
-
CIK2 DoubIo Iroquoncy cIocI inpul
M/IO Momory or I/O oulpul
IOCK IocI oulpul
RIADY Roady inpul
HOID HoId Roquosl inpul
HIDA HoId AcInovIodgo oulpul
IIRIQ Irocossor Ixlonsion Roquosl inpul
BUSY Irocossor Ixlonsion Busy inpul
IRROR Irocossor Ixlonsion Irror inpul
INTR Inlorrupl Roquosl inpul
NMI Non-MasIabIo Inlorrupl Roquosl inpul
RISIT Rosol inpul

Tlo romaindor of llo 80386DX signaIs lavo boon groupod inlo llo foIIoving
calogorios:

Addross Bus
Dala Bus
ConlroI Bus
-- -
Tlo 80386DX addross bus consisls of lvo sols of signaI Iinos:

llo addross bus, consisling of 30 signaI Iinos dosignalod A|31:2].
llo bylo onabIo bus, consisling of llo 4 signaI Iinos dosignalod BI|3:0].


-

As domonslralod Ialor in llis claplor, llo 80386DX usos llo addross bus,
A|31:2], lo idonlify a group of four Iocalions, Inovn as a doubIovord.

Tlo 80386DX usos llo bylo onabIo Iinos lo idonlify ono or moro of llo four Ioca-
lions il acluaIIy vislos lo porform a dala lransfor vill.

InlornaIIy, llo 80386DX microprocossor acluaIIy gonoralos 32-bil addrossos. A
32-bil addross bus givos il llo abiIily lo addross any ono of 4GB (4 gigabylos,
4,096 mogabylos) individuaI momory Iocalions. Wlon llo microprocossor al-
lompls lo pIaco llis 32-bil addross on llo addross bus, lovovor, llo lvo Ioasl-
significanl addross bils, A0 and A1, gol slrippod off. Tlis is bocauso lloso lvo
addross Iinos don'l plysicaIIy oxisl on an 80386DX microprocossor.

Wlon dosigning an 80386DX basod syslom, ono slouId aIvays assumo llal,
vlonovor llo microprocossor oulpuls an addross during a bus cycIo, A0 and
A1 aro aIvays 0. Iol's oxamino llo rosuIl. TabIo 10-3 iIIuslralos a numbor of
addrossos boing oulpul by llo 80386DX. Romombor llal addross bils 0 and 1
aro slrippod off during addross oulpul and aro aIvays assumod lo bo 0.


---

---
-- -- -- -





















Tlo rosuIl of aIvays forcing A0 and A1 lo 0 is llal llo 80386DX microprocossor
is onIy capabIo of oulpulling ovory fourll addross. Il is plysicaIIy incapabIo of
addrossing any of llo inlorvoning addrossos. Wlon llo 80386DX oulpuls an
addross, il is roaIIy idonlifying a group of four Iocalions, caIIod a doubIovord,
slarling al llo addross prosonlod on llo addross bus.

In addilion lo idonlifying llo doubIovord addross on A|31:2], llo microprocos-
sor aIso assorls ono or moro of llo bylo onabIo Iinos lo indicalo vlicl of llo
four Iocalions il roaIIy vanls lo communicalo vill during llo curronl bus cycIo.
Assorling a bylo onabIo Iino aIso idonlifios vlicl of llo 80386DX's four dala
palls viII bo usod lo communicalo vill llo idonlifiod Iocalion(s) in llo dou-
bIovord.


-

Tlo BI0 Iino is associalod vill llo firsl Iocalion in llo group of four (doubIo-
vord) and vill llo Iovosl dala pall, D|7:0]. BI1 is associalod vill llo socond
Iocalion in llo doubIovord and vill llo socond dala pall, D|15:8]. BI2 is as-
socialod vill llo llird Iocalion in llo doubIovord and vill llo llird dala
pall, D|23:16]. BI3 is associalod vill llo fourll Iocalion in llo doubIovord
and vill llo fourll dala pall, D|31:24]. TabIo 10-4 iIIuslralos llis roIalionslip.

- - - -
--



-
--

BI0 D|7:0] firsl
BI1 D|15:8] socond
BI2 D|23:16] llird
BI3 D|31:24] fourll

Iiguro 10-13 iIIuslralos llis samo roIalionslip. A|31:2] idonlify llo doubIovord.
Tlo assorlod bylo onabIo Iinos idonlify llo Iocalion(s) villin llo addrossod
doubIovord and llo dala pall(s) lo bo usod vlon communicaling vill llom.

---


-- -

TabIo 10-5 summarizos llo roIalionslip bolvoon llo addross and bylo onabIos
by sloving llo addross spocifiod by llo programmor (in boll binary and lox)
aIong vill llo addross and bylo onabIos llal llo microprocossor oulpuls.

80386DX

BE0
BE1
BE2
BE3
Doublewords

-

- --- -


-- --

--

--

--

-- -






















TabIo 10-6 iIIuslralos sovoraI oxampIo addrossos and a doscriplion of lov lloy
aro inlorprolod by oxlornaI Iogic.

-- -
--










- --


1 1 1 0 0
0 0 1 1 2, 3
0 0 0 0 0,1,2,3
1 0 0 1 1, 2

In llo firsl oxampIo, llo microprocossor is idonlifying llo doubIovord slarling
al Iocalion 00001000l. By assorling llo BI0 Iino, il indicalos ils inlonlion lo
communicalo vill llo firsl Iocalion in llo doubIovord using llo firsl dala pall
(D|7:0]).

In llo socond oxampIo, llo microprocossor is idonlifying llo doubIovord slarl-
ing al Iocalion IA026504l. By assorling llo BI2 and BI3 Iinos, il indicalos ils

---

inlonlion lo communicalo vill llo llird and fourll Iocalions in llo doubIo-
vord using llo llird (D|23:16]) and fourll (D|31:24]) dala palls.
In llo llird oxampIo, llo microprocossor is idonlifying llo doubIovord slarling
al Iocalion 00000108l. By assorling aII four of llo bylo onabIo Iinos, il indicalos
ils inlonlion lo communicalo vill aII four Iocalions in llo doubIovord using aII
four dala palls.

In llo fourll oxampIo, llo microprocossor is idonlifying llo doubIovord slarl-
ing al Iocalion 01AD0I0Cl. By assorling llo BI1 and BI2 Iinos, il indicalos
ils inlonlion lo communicalo vill llo socond and llird Iocalions in llo dou-
bIovord using llo socond (D|15:8]) and llird (D|23:16]) dala palls.

Tlo 80386DX microprocossor is capabIo of porforming 8-, 16-, 24- and 32-bil
lransfors. Wlon assorling muIlipIo bylo onabIos, il may onIy assorl adjaconl
bylo onabIos, lovovor. TabIo 10-7 slovs llo vaIid and invaIid combinalions of
bylo onabIos llal can bo gonoralod during a bus cycIo.

-
- -
1 1 1 1 invaIid
1 1 1 0 8-bil lransfor vill ono Iocalion
1 1 0 1 8-bil lransfor vill ono Iocalion
1 1 0 0 16-bil lransfor vill lvo Iocalions
1 0 1 1 8-bil lransfor vill ono Iocalion
1 0 1 0 invaIid
1 0 0 1 16-bil lransfor vill lvo Iocalions
1 0 0 0 24-bil lransfor vill llroo Iocalions
0 1 1 1 8-bil lransfor vill ono Iocalion
0 1 1 0 invaIid
0 1 0 1 invaIid
0 1 0 0 invaIid
0 0 1 1 16-bil lransfor vill lvo Iocalions
0 0 1 0 invaIid
0 0 0 1 24-bil lransfor vill llroo Iocalions
0 0 0 0 32-bil lransfor vill four Iocalions

TabIo 10-8 slovs llo addross and bylo onabIos gonoralod in llo bus cycIo
causod by oxoculion of llo indicalod inslruclion. AII oxampIos assumo llal llo
dala sogmonl rogislor las 0000l in il.


-

-- - ---
- -- -
1 1 1 0 8-bil lransfor
1 1 0 1 8-bil lransfor
1 0 1 1 8-bil lransfor
0 1 1 1 8-bil lransfor
1 1 0 0 16-bil lransfor
1 0 0 1 16-bil lransfor
0 0 1 1 16-bil lransfor
0 0 0 0 32-bil lransfor

Will rogard lo llo Iasl labIo onlry, llo IAX rogislor is llo 80386's 32-bil vorsion
of llo AX rogislor. Il slands for oxlondod AX rogislor.

A 24-bil lransfor occurs if llo programmor allompls lo porform a lransfor llal
crossos a doubIovord addross boundary. As an oxampIo, assumo llo DS rogis-
lor conlains 0000l and llo programmor allompls lo oxoculo llo foIIoving in-
slruclion:



Tlis loIIs llo 80386DX lo vrilo llo four bylos in llo 32-bil IAX rogislor lo
momory slarling al Iocalion 00000101l. To do llis, llo microprocossor musl
vrilo llo Iovor llroo bylos in llo IAX rogislor lo Iocalions 00000101l lo
00000103l in llo doubIovord slarling al 00000100l. Il musl llon vrilo llo
mosl-significanl bylo in llo IAX rogislor lo llo firsl Iocalion (00000104l) in llo
doubIovord slarling al Iocalion 00000104l. Bocauso il can'l addross lvo dou-
bIovords al llo samo limo, llis causos llo microprocossor lo gonoralo lvo
bacI-lo-bacI bus cycIos.

During llo firsl bus cycIo, llo microprocossor pIacos llo doubIovord addross,
00000104l, on llo addross bus. Tlis idonlifios llo doubIovord slarling al
momory Iocalion 00000104l. Sinco llo programmor inslruclod llo microprocos-
sor lo vrilo llo four bylos in llo IAX rogislor lo momory Iocalions 00000101l
lo 00000104l, llo microprocossor nov assorls onIy BI0. Tlis loIIs oxlornaI
Iogic llal llo microprocossor vanls lo communicalo vill llo firsl Iocalion in
llo doubIovord, bul nol llo uppor llroo. Tlo mosl-significanl bylo in llo IAX
rogislor is drivon oul onlo llo Iovosl dala pall, D|7:0], by llo microprocossor
and is vrillon inlo momory Iocalion 00000104l. Tlis compIolos llo socond bus
cycIo and aIso llo oxoculion of llo MOV inslruclion.


---

Aflor llo firsl bus cycIo, llo microprocossor aulomalicaIIy pIacos addross
00000101l on llo addross bus, bul A0 and A1 aro slrippod off on llo vay oul.
Tlo rosuIlanl addross pIacod on llo addross bus is 00000100l. Tlis idonlifios
llo doubIovord slarling al momory Iocalion 00000100l. Sinco llo programmor
inslruclod llo microprocossor lo vrilo llo four bylos in llo IAX rogislor lo
momory slarling al Iocalion 00000101l, llo microprocossor assorls BI1, BI2
and BI3 (bul nol BI0) during llo firsl bus cycIo. Tlis loIIs oxlornaI Iogic llal
llo microprocossor vanls lo communicalo vill llo uppor llroo Iocalions in llo
doubIovord (00000101l lo 00000103l), bul nol llo firsl ono (00000100l). Tlo
Ioasl-significanl llroo bylos in llo IAX rogislor aro drivon oul onlo llo uppor
llroo dala palls by llo microprocossor and aro vrillon inlo momory Iocalions
00000101l lo 00000103l.

Tlo 80386DX microprocossor is inofficionl vlon allompling lransfors llal cross
doubIovord addross boundarios. To oblain oplimum dala llrouglpul (lransfor
spood), InloI lloroforo urgos programmors lo porform dala lransfors llal don'l
cross doubIovord addross boundarios.
-
Tlo 80386DX microprocossor las a 32-bil dala bus. Il is moro corrocl, lovovor,
llo llinI of il as laving four 8-bil dala palls:

Dala Iall 0 is comprisod of D|7:0]
Dala Iall 1 is comprisod of D|15:8]
Dala Iall 2 is comprisod of D|23:16]
Dala Iall 3 is comprisod of D|31:24]

Rofor lo figuro 10-14. Ivory doubIovord consisls of four Iocalions and slarls al
an ovon addross llal is divisibIo by four. Tlo microprocossor communicalos
vill llo firsl Iocalion ovor dala pall 0 (D|7:0]), llo socond ovor dala pall 1
(D|15:8]), llo llird ovor dala pall 2 (D|23:16]) and llo fourll ovor dala pall 3
(D|31:24]).


-



-
-
Tlo conlroI bus consisls of aII llo 80386DX signaI Iinos ollor llan llo addross
bus, bylo onabIos and llo dala bus. Tloso signaI Iinos can bo soparalod inlo llo
foIIoving subcalogorios:

Bus cycIo dofinilion oulpuls
CIocI inpul
Rosol inpul
Roady inpul
Bus masloring Iinos
Inlorrupl inpuls
Irocossor oxlonsion Iinos
Addross slalus oulpul
IipoIining conlroI inpul
Bus sizo 16 inpul
Tlo foIIoving paragrapls onIy doscribo llo 80386DX signaI Iinos llal aro dif-
foronl from llo 80286's conlroI bus Iinos.
80386DX

---

- -
To road dala from or vrilo dala lo an oxlornaI Iocalion, llo 80386DX bus unil
musl run a bus cycIo. During llo bus cycIo, llo microprocossor indicalos llo
lypo of bus cycIo by pIacing llo propor pallorn on llo bus cycIo dofinilion sig-
naI Iinos. TabIo 10-9 slovs oacl lypo of bus cycIo and llo rospoclivo pallorn
vlicl viII bo oulpul onlo llo bus cycIo dofinilion Iinos.

-
-
0 0 0 Inlorrupl AcInovIodgo
0 1 0 I/O Road
0 1 1 I/O Wrilo
1 0 0 Momory Codo (inslruclion) Road
1 1 0 Momory Dala Road
1 1 1 Momory Dala Wrilo
1 0 1 HaIl or Sluldovn
-- - -
Will ono oxcoplion, llo 80386 microprocossor usos llo samo signaI Iinos as llo
80286 microprocossor lo inlorfaco lo llo numoric coprocossor. Tlo IIACK
(procossor oxlonsion acInovIodgo) signaI Iino las boon oIiminalod and llo
RIADY Iino is nov connoclod lo llo 80387 coprocossor as voII as lo llo 80386
microprocossor. A dolaiIod doscriplion of llo procossor oxlonsion signaI Iinos
can bo found in llo claplor onlilIod Numoric Coprocossor.
-- -
Al llo slarl of a bus cycIo, during Addross Timo, llo 80386 microprocossor
pIacos llo addross on llo addross bus and llo bus cycIo dofinilion on llo con-
lroI bus. Il aIso assorls llo addross slalus (ADS) oulpul lo indicalo llal a vaIid
addross and bus cycIo dofinilion aro prosonl on llo busos.

Discussion of 80286 addross pipoIining can bo found in llo claplor onlilIod
DolaiIod Viov of llo Bus CycIo. Tlo 80386 landIos addross pipoIining diffor-
onlIy llan llo 80286. Tlo 80386 microprocossor las an inpul caIIod NA (noxl
addross). Tlo foIIoving aclions occur during a bus cycIo:


-

1. Tlo microprocossor oulpuls llo addross of llo dovico il vislos lo commu-
nicalo vill.
2. Tlo dovico's addross docodo Iogic docodos llo addross on llo addross bus
and clip-soIocls ils dovico.
3. Iogic associalod vill llo addrossod dovico Ialclos llo docodod clip-soIocl
and Iovor addross bils on llo addross bus.
4. Sinco llo addrossod dovico's Iogic las nov Ialclod llo addross informa-
lion, il no Iongor noods llo addross llo microprocossor is prosonling on llo
bus. Il llon assorls llo 80386's NA (noxl addross) signaI, aIorling llo mi-
croprocossor llal il can pIaco llo addross for llo noxl bus cycIo onlo llo
addross bus oarIy (during llo curronl bus cycIo). Tlis is a varialion on llo
addross pipoIining sclomo usod by llo 80286 microprocossor. Iormilling
llo microprocossor lo pIaco llo addross for llo upcoming bus cycIo onlo
llo addross bus oarIy aIIovs llo noxl dovico lo bo addrossod lo soo ils ad-
dross oarIy. Tlis aIIovs llo dosignor lo uso roIalivoIy sIov accoss dovicos.
Tlo oarIy docoding of llo addross and soIoclion of llo addrossod dovico aI-
Iovs llo sIov dovico lo bo roady lo compIolo llo bus cycIo oarIior llan if il
ladn'l rocoivod llo addross for docoding unliI llo microprocossor lad
causod llo addross lo bo Ialclod inlo llo oxlornaI addross Ialcl.

Wlon addrossod dovicos aIIov llo microprocossor lo pIaco llo noxl addross on
llo bus oarIy for a numbor of bacI-lo-bacI bus cycIos, llo 80386 microprocossor
is using llo busos lo lloir fuIIosl polonliaI. Tloso bacI-lo-bacI, pipoIinod bus
cycIos provido llo liglosl bandvidll (lransfor ralo) on llo busos.
-
Tlo 80386DX microprocossor's bus sizo 16 (BS16) inpul is usod lo inform llo
80386DX llal llo curronlIy addrossod dovico is a 16-bil dovico rallor llan a 32-
bil dovico. Wlon BS16 is sampIod assorlod, llo 80386DX porforms dala lrans-
fors vill llo addrossod dovico using onIy llo Iovor lvo dala palls, D|7:0] and
D|15:8]. Tlis foaluro is Inovn as dynamic bus sizing. In casos vloro llo
80386DX roquiros llo lransfor of moro llan 16 bils, llo microprocossor viII
aulomalicaIIy gonoralo addilionaI bus cycIos lo fuIfiII llo dala lransfor roquosl
if BS16 is sampIod assorlod.

As an oxampIo, considor llo aclions causod by llo oxoculion of llo foIIoving
inslruclion (assumo DS = 0000l and llo procossor is in roaI modo):




---

Assumo llal llo addrossod dovico is a 16-bil dovico. Tlo programmor is ro-
quosling llo lransfor of a doubIovord (llo IAX rogislor is four bylos in sizo)
slarling al momory Iocalion 00001I08l. Al llo boginning of llo firsl bus cycIo,
llo microprocossor pIacos addross 00001I08l on llo addross bus (A|31:2]) and
assorls aII four bylo onabIo oulpuls. Wlon llo curronlIy addrossod dovico's ad-
dross docodor dolocls llo addross, il assorls BS16, informing llo microprocos-
sor llal llo curronlIy addrossod dovico is onIy capabIo of communicaling ovor
llo Iovor lvo dala palls.

Tlo conlonls of Iocalion 00001I08l is pIacod on D|7:0] and llo conlonls of Ioca-
lion 00001I09l is pIacod on D|15:8] by llo addrossod 16-bil momory dovico. Al
llo ond of llo bus cycIo, vlon RIADY is sampIod assorlod, llo microprocos-
sor roads llo lvo dala bylos and pIacos llom in llo Iovor lvo bylos of llo IAX
rogislor.

Tlo microprocossor llon aulomalicaIIy bogins a socond bus cycIo vill llo samo
addross (00001I08l) on llo addross bus and BI2 and BI3 assorlod. Tlo ad-
drossod 16-bil dovico's addross docodor onco again assorls BS16, and llo con-
lonls of 00001I0Al and 00001I0Bl aro lransforrod bacI lo llo microprocossor
ovor llo lvo Iovor dala palls. Al llo ond of llo bus cycIo, llo microprocossor
roads llo lvo dala bylos from llo lvo Iovor dala palls and pIacos llom inlo
llo uppor lvo bylos of llo IAX rogislor, compIoling llo ovoraII lransfor. Moro
oxampIos of dynamic bus sizing can bo found in llo claplor onlilIod Tlo
80386 Syslom KornoI.

-
IunclionaIIy, llo 80386SX is idonlicaI lo llo 80386DX microprocossor. Tlo
80386SX microprocossor's inlorfaco lo oxlornaI dovicos diffors from llal of llo
80386DX in llo slrucluro of ils addross and dala busos. TabIo 10-10 dolaiIs llo
difforoncos.


-

-
--
- -
Addross Bus UnIiIo llo DX addross bus consisling of A|31:2] and llo four bylo
onabIo Iinos, llo SX addross bus consisls of A|23:0] and BHI. In
ollor vords, ils addross bus and ils addrossing sclomo is idonlicaI
lo llal of llo 80286 microprocossor.
Dala Bus IiIo llo 80286 microprocossor, llo SX onIy las lvo dala palls, vor-
sus four for llo DX microprocossor.
BS16 Sinco llo SX doos nol lavo a 32-bil dala bus, llo BS16 inpul isn'l
nocossary.


Tlo A0 oulpul of llo 80386SX is caIIod BII. Tlis is bocauso llo 80386SX usos
llo samo ruIos as llo 80286 rogarding llo usago of ils lvo dala palls. Tlis bo-
ing llo caso, llo 80386SX usos ils Iovor dala pall lo communicalo vill ovon-
addrossod Iocalions. Sinco aII ovon addrossos lavo A0 sol lo a zoro, a Iov on A0
indicalos llal llo SX viII uso ils Iovor dala pall during a bus cycIo. A0 can
lloroforo bo llougll of as BII, or bus Iov onabIo.
-- - -
Considor llo foIIoving inslruclion:



Assumo llal llo procossor is in roaI modo and llo DS rogislor curronlIy is sol lo
0000l. Wlon oxoculod, llis inslruclion viII inslrucl llo microprocossor lo
lransfor four bylos of informalion from momory slarling al Iocalion 0100l inlo
llo microprocossor's IAX rogislor. Wloro llo 80386DX microprocossor vouId
onIy lavo lo run ono bus cycIo lo addross aII four Iocalions and lransfor aII four
bylos simuIlanoousIy, llo 80386SX musl run lvo bus cycIos lo accompIisl llo
four bylo movo.

Iirsl, llo addross 000100l is pIacod on llo addross bus, A|23:0], and llo BHI
signaI is assorlod. Tlo 16-bil momory viII inlorprol llis as a road from Iocalion
000100l and llo noxl soquonliaI odd Iocalion, 000101l. Tlo addrossod momory
viII pIaco llo conlonls of llo ovon addross, 000100l, on llo Iovor dala pall

---

and llal of llo odd addross, 000101l, on llo uppor dala pall. Al llo ond of llo
bus cycIo, llo microprocossor inpuls llo lvo bylos and pIacos llom in llo Iovor
lvo Iocalions in llo largol rogislor, AI and AH. HaIf of llo roquoslod dala las
nov boon movod from momory inlo llo largol rogislor.

Nov, llo 80386SX microprocossor inilialos a socond bus cycIo, pIacing llo ad-
dross 000102l on llo addross bus, A|23:0], and assorling llo BHI signaI again.
Tlo 16-bil momory viII inlorprol llis as a road from Iocalion 000102l and llo
noxl soquonliaI odd Iocalion, 000103l. Tlo addrossod momory viII pIaco llo
conlonls of llo ovon addross, 000102l, on llo Iovor dala pall and llal of llo
odd addross, 000103l, on llo uppor dala pall. Al llo ond of llo bus cycIo, llo
microprocossor inpuls llo lvo bylos and pIacos llom in llo uppor lvo Ioca-
lions in llo largol rogislor. AII of llo roquoslod dala las nov boon movod from
momory inlo llo largol rogislor.

Il slouId aIso bo nolod llal llo 80386SX microprocossor is Iimilod lo a maxi-
mum of 16MB of inslaIIod momory. Tlis is llo maximum amounl of momory
llal can bo addrossod vill a 24-bil addross bus.
--
Duo lo a coupIo of faclors, llo 80386SX microprocossor las subslanliaIIy sIovor
llrouglpul llon an 80386DX.

Tvo dala palls vorsus four. Tlis moans llal, al llo samo cIocI ralo, llo
80386DX las lvico llo llrouglpul as llal of llo SX. Tlis is lruo ovon if llo
DX is running 80286 codo llal doosn'l allompl any 32-bil roads or vrilos,
bocauso llo inslruclion profolclor aIvays folclos four bylos al a limo.
Tlo 80386DX microprocossor is avaiIabIo in subslanliaIIy liglor cIocI ralos
llan llo SX. Wloro llo SX is avaiIabIo in cIocI ralos up lo 25MHz, llo DX
is avaiIabIo in cIocI ralos up lo 40MHz.

Tlo 80386SX and DX microprocossors aro boll capabIo of running any codo
vrillon for llo 8086, 80286 or 80386 microprocossors. Tlo 80286 microprocos-
sor, on llo ollor land, cannol run codo vrillon for llo 80386 microprocossor.


-


-
Tlo provious claplor, Tlo 80386DX and SX Microprocossors, providod a do-
laiIod doscriplion of lloso procossors.
-
Tlis claplor providos a dolaiIod doscriplion of llo IornoI supporl Iogic nocos-
sary lo inlorfaco llo 80386DX and SX procossors lo llo rosl of llo syslom. Sam-
pIo inslruclions aro usod lo iIIuslralo llo aclions of llo procossor and supporl
Iogic vlon porforming various lypos of lransfors. Inlorfacing issuos aro covorod
for llo 80386DX vill and villoul dynamic bus sizing impIomonlod.

Tlo noxl claplor, DolaiIod Viov of llo 80386 Bus CycIo, providos a dolaiIod
doscriplion of bus cycIo liming vlon llo 80386 is porforming a road or vrilo
lransfor. Tlo ollor lypos of bus cycIos aro discussod as voII.

Tlis claplor covors llo ossonliaI Iogic llal musl surround an 80386 microproc-
ossor in ordor lo aIIov il lo communicalo vill 8-, 16- and 32-bil dovicos. Tlis is
Inovn as llo IornoI Iogic. Tlroo varialions aro covorod:

Tlo 80386SX syslom IornoI
Tlo 80386DX syslom IornoI vill dynamic bus sizing impIomonlod
Tlo 80386DX syslom IornoI villoul dynamic bus sizing impIomonlod

-

-
Iiguro 11-1 iIIuslralos llo IornoI Iogic surrounding an 80386SX microprocossor.
Il slouId bo immodialoIy apparonl llal il is virluaIIy idonlicaI vill llo 80286
IornoI Iogic dolaiIod in llo claplor onlilIod Tlo 80286 Syslom KornoI: llo In-
gino. Tlo onIy difforoncos aro llo ronamod bus cycIo dofinilion signaIs, W/R
and D/C, and llo ADS signaI is usod lo lriggor llo bus conlroI Iogic al llo
slarl of a bus cycIo. In an 80286-basod IornoI, llo faIIing odgo of S0 or S1 is
usod lo lriggor llo bus conlroI Iogic al llo slarl of a bus cycIo.




-



-

-

-
- -

Iiguro 11-2 iIIuslralos llo IornoI Iogic surrounding an 80386DX microprocos-


sor. In llis impIomonlalion, llo dosignor las laIon advanlago of llo 80386DX's
dynamic bus sizing capabiIily by looIing up llo microprocossor's BS16 inpul.

If llo dovico addrossod during a bus cycIo is a 16-bil momory or I/O dovico, il
viII assorl oillor llo M16 or IO16 signaI. An assorlod IovoI on oillor of lloso
signaIs causos an assorlod IovoI lo bo pIacod on llo microprocossor's BS16 in-
pul. Wlon llo microprocossor sampIos BS16 assorlod al llo ond of T1, dy-
namic bus sizing is aclivalod and muIlipIo bus cycIos aro porformod as
nocossary lo lransfor llo objocl. Tlo lransfor laIos pIaco onIy ovor llo Iovor
lvo dala palls vlon communicaling vill a 16-bil dovico. A dolaiIod doscrip-
lion of dynamic bus sizing can bo found in llo claplor onlilIod Tlo 80386DX
and SX Microprocossors.

Wlon llo 80386DX microprocossor inilialos a bus cycIo, llo largol doubIovord
addross is oulpul onlo A|31:2] and llo approprialo bylo onabIo oulpuls aro as-
sorlod. 32-bil dovicos rocognizo llis addross formal, bul 8- and 16-bil dovicos
roquiro addilionaI addross informalion. In addilion lo A|31:2], 8-bil dovicos ro-
quiro A0 and A1, vliIo 16-bil dovicos roquiro A0, A1 and BHI. Sinco llo
80386DX microprocossor is incapabIo of producing lloso signaIs, llo bus con-
lroI Iogic musl convorl llo microprocossor's bylo onabIo oulpuls inlo lloso
llroo signaIs.

Ivory doubIovord consisls of four Iocalions. Tlo firsl of lloso Iocalions is aI-
vays an ovon addross, llo socond an odd addross, llo llird ovon and llo
fourll odd. If llo microprocossor inlonds lo communicalo vill llo firsl Ioca-
lion in llo doubIovord, an ovon addross, il assorls ils BI0 oulpul. Wlon
communicaling vill llo socond Iocalion in llo doubIovord, an odd addross, il
assorls ils BI1 oulpul, and so on for llo llird and fourll Iocalions.

Wlon a bus cycIo is inilialod, llo bus conlroI Iogic oxaminos llo microprocos-
sor's bylo onabIo oulpuls and dolorminos llo Iocalions villin llo largol dou-
bIovord llal llo microprocossor is communicaling vill. Tlo foIIoving
paragrapls doscribo llo inloraclion bolvoon llo microprocossor and 8-, 16- and
32-bil dovicos. Iiguro 11-2 iIIuslralos llo IornoI of an 80386DX-basod syslom
vill dynamic bus sizing impIomonlod. In aII of llo oxampIo inslruclions, il is

-

assumod llal llo microprocossor is in RoaI Modo and llo Dala Sogmonl (DS)
rogislor conlains 0000l.

- -

-
W/R
D/C
M/lO
ADS
M16
lO16
M32
CPU READY
MRDC
MWTC
lORC
lOWC
SA0
SA1
SBHE
Bus
Control
Logic
1st
Data
Bus
Xcvr
2nd
Data
Bus
Xcvr
3rd
Data
Bus
Xcvr
4th
Data
Bus
Xcvr

Data Bus Steering Logic

LA
Bus
Buffer

80386
DX
BS16
NOWS
CHRDY
Address
Latch


-



In llis oxampIo, llo foIIoving inslruclion is addrossing an 8-bil dovico.



Tlo microprocossor musl road llo conlonls of momory Iocalion 00000100l and
pIaco llo rosuIling bylo in llo AI rogislor. Addross 00000100l is pIacod on
A|31:2] and BI0 is assorlod. In llis vay, llo microprocossor indicalos llal il
vislos lo communicalo vill Iocalion 00000100l in llo doubIovord llal slarls
al Iocalion 00000100l. Wlon llo microprocossor is addrossing oillor of llo firsl
lvo Iocalions in a doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus con-
lroI Iogic aIso sols SA0 lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal
llo microprocossor is addrossing llo firsl ovon addross in llo largol doubIo-
vord. BI1 is doassorlod, indicaling llal llo microprocossor isn'l addrossing
llo odd Iocalion immodialoIy foIIoving llo addrossod ovon Iocalion. As a ro-
suIl, llo bus conlroI Iogic doassorls SBHI.

Sinco llo largol dovico is an 8-bil dovico, M16 romains doassorlod. As a rosuIl,
llo microprocossor finds BS16 doassorlod vlon sampIod al llo mid-poinl of
llo procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is
communicaling vill a 32-bil dovico. Nolo llal llo 80386DX microprocossor can
onIy sonso llal il is communicaling vill 16-bil or 32-bil dovicos and las no
InovIodgo of 8-bil dovicos. If BS16 is assorlod, llo 80386DX Inovs il is com-
municaling vill a 16-bil dovico. If BS16 isn'l assorlod, llo 80386DX assumos
llal il is communicaling vill a 32-bil dovico.

Tlo 80386DX assumos il is communicaling vill a 32-bil dovico and runs a sin-
gIo bus cycIo. Sinco llo largol dovico is an 8-bil momory dovico, il assorls noi-
llor M16 nor M32. Tlo bus conlroI Iogic sampIos M16 and M32 al llo ond
of ISA addross limo and finds llom doassorlod. Nolo llal llo bus conlroI Iogic
doos nol sampIo IO16 bocauso il las proviousIy sampIod M/IO and Inovs
llal a momory Iocalion is boing accossod.

Sonsing noillor M16 nor M32 assorlod, llo bus conlroI Iogic dolorminos llal
il is communicaling vill an 8-bil momory dovico and llal llo dala viII lloro-
foro bo sonl bacI ovor llo Iovor dala pall. Tlo 8-bil dovico soos addross
00000100l on llo addross bus and llo MRDC Iino assorlod and rolurns llo ro-
quoslod bylo ovor llo Iovor dala pall. Tlo bus conlroI Iogic galos llo bylo
llrougl llo Iovor dala bus lranscoivor lo llo microprocossor and assorls llo

-

CIU RIADY Iino. Wlon llo microprocossor sampIos CIU RIADY assorlod,
il roads llo bylo from llo Iovor dala pall and pIacos il in llo largol rogislor,
AI, compIoling llo oxoculion of llo MOV inslruclion.

In llis oxampIo, llo foIIoving inslruclion is addrossing an 8-bil momory do-
vico.



Tlo microprocossor musl road llo conlonls of momory Iocalions 00000100l and
00000101l and pIaco llo rosuIling vord in llo AX rogislor. Addross 00000100l
is pIacod on A|31:2] and BI0 and BI1 aro assorlod. In llis vay, llo micro-
procossor indicalos llal il vislos lo communicalo vill Iocalions 00000100l and
00000101l in llo doubIovord llal slarls al Iocalion 00000100l. Wlon llo mi-
croprocossor is addrossing oillor of llo firsl lvo Iocalions in a doubIovord, llo
bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI Iogic aIso sols SA0 lo a 0 bo-
causo llo assorlod IovoI on BI0 indicalos llal llo microprocossor is addrossing
llo firsl ovon addross in llo largol doubIovord. Sinco BI1 is aIso assorlod, llo
microprocossor is aIso addrossing llo odd Iocalion immodialoIy foIIoving llo
addrossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Sinco llo largol dovico is an 8-bil dovico, M16 romains doassorlod. As a rosuIl,
llo microprocossor finds BS16 doassorlod vlon sampIod al llo mid-poinl of
llo procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is
communicaling vill a 32-bil dovico. Nolo llal llo 80386DX microprocossor can
onIy sonso llal il is communicaling vill 16-bil or 32-bil dovicos and las no
InovIodgo of 8-bil dovicos. If BS16 is assorlod, llo 80386DX Inovs il is com-
municaling vill a 16-bil dovico. If BS16 isn'l assorlod, llo 80386DX assumos
llal il is communicaling vill a 32-bil dovico.

Tlo 80386DX assumos il is communicaling vill a 32-bil dovico and runs a sin-
gIo bus cycIo. Sinco llo largol dovico is an 8-bil momory dovico, il assorls noi-
llor M16 nor M32. Tlo bus conlroI Iogic sampIos M16 and M32 al llo ond
of ISA addross limo and finds llom doassorlod. Nolo llal llo bus conlroI Iogic
doos nol sampIo IO16 bocauso il las proviousIy sampIod M/IO and Inovs
llal a momory Iocalion is boing accossod.

Sonsing noillor M16, IO16, nor M32 assorlod, llo bus conlroI Iogic dolor-
minos llal il is communicaling vill an 8-bil dovico and llal llo dala viII lloro-
foro bo rolurning ovor llo Iovor dala pall. Tlis aIso moans llal llo dovico can

-

onIy rolurn ono bylo al a limo. Tlo 8-bil dovico soos addross 00000100l on llo
addross bus and llo MRDC Iino assorlod and rolurns llo roquoslod bylo ovor
llo Iovor dala pall. Tlo bus conlroI Iogic Ialclos llo bylo inlo llo Iovor dala
bus lranscoivor. Il llon incromonls llo addross by pIacing a 1 on llo SA0 Iino.
Tlo MRDC Iino is momonlariIy doassorlod and llon roassorlod again lo lricI
llo addrossod dovico inlo llinIing a socond bus cycIo las bogun. Tlo dovico
llon pIacos llo conlonls of momory Iocalion 00000101l on llo Iovor dala pall.
Tlo bus conlroI Iogic causos llo dala bus slooring Iogic lo copy llo bylo lo llo
socond dala pall. AII of llo roquoslod informalion las nov boon assombIod, so
llo bus conlroI Iogic simuIlanoousIy onabIos llo Iovor dala bus lranscoivor lo
oulpul llo firsl bylo lo llo microprocossor on llo Iovor dala pall, vliIo ona-
bIing llo socond dala bus lranscoivor lo pass llo ollor bylo llrougl lo llo mi-
croprocossor on llo socond dala pall.

Il llon assorls llo CIU RIADY Iino. Wlon llo microprocossor sampIos CIU
RIADY assorlod, il roads llo lvo bylos from llo lvo Iovor dala palls and
pIacos llom in llo largol rogislor, AX. Tlo bylo from Iocalion 00000100l is
pIacod in AI and llal from 00000101l in AH.

In llis oxampIo, llo foIIoving inslruclion is addrossing an 8-bil momory do-
vico.



Tlo microprocossor musl road llo conlonls of momory Iocalions 00000100l
llrougl 00000103l and pIaco llo rosuIling doubIovord in llo IAX rogislor.
Addross 00000100l is pIacod on A|31:2] and aII four bylo onabIos aro assorlod.
In llis vay, llo microprocossor indicalos llal il vislos lo communicalo vill
Iocalions 00000100l llrougl 00000103l in llo doubIovord llal slarls al Ioca-
lion 00000100l. Wlon llo microprocossor is addrossing oillor of llo firsl lvo
Iocalions in a doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI
Iogic aIso sols SA0 lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal llo
microprocossor is addrossing llo firsl ovon addross in llo largol doubIovord.
Sinco BI1 is aIso assorlod, llo microprocossor is aIso addrossing llo odd Ioca-
lion immodialoIy foIIoving llo addrossod ovon Iocalion. As a rosuIl, llo bus
conlroI Iogic assorls SBHI.

Sinco llo largol dovico is an 8-bil dovico, M16 romains doassorlod. As a rosuIl,
llo microprocossor finds BS16 doassorlod vlon sampIod al llo mid-poinl of
llo procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is

-

communicaling vill a 32-bil dovico. Nolo llal llo 80386DX microprocossor can
onIy sonso llal il is communicaling vill 16-bil or 32-bil dovicos and las no
InovIodgo of 8-bil dovicos. If BS16 is assorlod, llo 80386DX Inovs il is com-
municaling vill a 16-bil dovico. If BS16 isn'l assorlod, llo 80386DX assumos
llal il is communicaling vill a 32-bil dovico.

Tlo 80386DX assumos il is communicaling vill a 32-bil dovico and runs a sin-
gIo bus cycIo. Sinco llo largol dovico is an 8-bil momory dovico, il assorls noi-
llor M16 nor M32. Tlo bus conlroI Iogic sampIos M16 and M32 al llo ond
of ISA addross limo and finds llom doassorlod. Nolo llal llo bus conlroI Iogic
doos nol sampIo IO16 bocauso il las proviousIy sampIod M/IO and Inovs
llal a momory Iocalion is boing accossod.

Sonsing noillor M16 nor M32 assorlod, llo bus conlroI Iogic dolorminos llal
il is communicaling vill an 8-bil momory dovico and llal llo dala viII lloro-
foro bo rolurning ovor llo Iovor dala pall. Tlis aIso moans llal llo dovico can
onIy rolurn ono bylo al a limo. Tlo 8-bil dovico soos addross 00000100l on llo
addross bus and llo MRDC Iino assorlod and rolurns llo roquoslod bylo ovor
llo Iovor dala pall. Tlo bus conlroI Iogic Ialclos llo bylo inlo llo Iovor dala
bus lranscoivor. Il llon incromonls llo addross by pIacing a 1 on llo SA0 Iino.
Tlo MRDC Iino is momonlariIy doassorlod and llon roassorlod again, lricIing
llo addrossod dovico inlo llinIing a socond bus cycIo las bogun. Tlo dovico
llon pIacos llo conlonls of momory Iocalion 00000101l on llo Iovor dala pall.
Tlo bus conlroI Iogic causos llo dala bus slooring Iogic lo copy llo bylo lo llo
socond dala pall and commands llo socond dala bus lranscoivor lo Ialcl and
loId llo bylo.

Tvo of llo four roquoslod bylos lavo nov boon assombIod and llo bus conlroI
Iogic musl addross llo noxl lvo bylos llal lavo boon roquoslod. BI2 is assorl-
od, indicaling llal llo microprocossor is roquosling llo bylo from llo socond
ovon addross in llo doubIovord. Tlo bus conlroI Iogic lloroforo sols SA0 lo a 0.
Sinco llis Iocalion is in llo socond vord of llo doubIovord, llo bus conlroI
Iogic sols SA1 lo a 1. Tlo microprocossor las aIso assorlod BI3, indicaling llal
il vanls llo conlonls of llo odd Iocalion immodialoIy foIIoving llo ovon Ioca-
lion addrossod by BI2. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Tlo bus conlroI Iogic again doassorls and llon roassorls llo MRDC Iino lo
lricI llo 8-bil dovico inlo llinIing anollor bus cycIo las boon inilialod. Tlo 8-
bil dovico nov soos addross 00000102l. Il pIacos llo roquoslod bylo on llo
Iovor dala pall and llo bus conlroI Iogic commands llo dala bus slooring Iogic
lo copy il lo llo llird dala pall, vloro il is Ialclod by llo llird dala bus lrans-
coivor.

-


Tlo bus conlroI Iogic llon incromonls llo addross by ono by solling SA0 lo a 1,
and again doassorls and llon roassorls llo MRDC Iino lo lricI llo 8-bil dovico
inlo llinIing anollor bus cycIo las boon inilialod. Tlo 8-bil dovico nov soos
addross 00000103l. Il pIacos llo roquoslod bylo on llo Iovor dala pall and llo
bus conlroI Iogic commands llo dala bus slooring Iogic lo copy il lo llo fourll
dala pall.

AII of llo roquoslod informalion las nov boon assombIod, so llo bus conlroI
Iogic simuIlanoousIy onabIos llo firsl, socond and llird dala bus lranscoivors lo
pass llo firsl llroo bylos lo llo microprocossor on llo llroo Iovor dala palls,
and aIso onabIos llo fourll dala bus lranscoivor lo pass llo ollor bylo llrougl
lo llo microprocossor on llo fourll dala pall.

Il llon assorls llo CIU RIADY Iino. Wlon llo microprocossor sampIos CIU
RIADY assorlod, il roads llo four bylos from aII four dala palls and pIacos
llom in llo largol rogislor, IAX. Tlo bylo from Iocalion 00000100l is pIacod in
AI and llal from 00000101l in AH, olc. Tlis compIolos llo oxoculion of llo
MOV inslruclion.


In llis oxampIo, llo foIIoving inslruclion is addrossing an 8-bil momory do-
vico.



Tlo microprocossor musl vrilo llo bylo in llo AI rogislor lo momory Iocalion
00000100l. Addross 00000100l is pIacod on A|31:2] and BI0 is assorlod. In
llis vay, llo microprocossor indicalos llal il is addrossing Iocalion 00000100l
in llo doubIovord llal slarls al Iocalion 00000100l. Tlo dala bylo from llo AI
rogislor is drivon oul onlo dala pall 0, D|7:0], by llo microprocossor slarling al
llo midpoinl of T1. Wlon llo microprocossor is addrossing oillor of llo firsl
lvo Iocalions in a doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus con-
lroI Iogic aIso sols SA0 lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal
llo microprocossor is addrossing llo firsl ovon addross in llo largol doubIo-
vord. Sinco BI1 is doassorlod, llo microprocossor isn'l addrossing llo odd Io-
calion llal immodialoIy foIIovs llo addrossod ovon Iocalion. As a rosuIl, llo
bus conlroI Iogic doassorls SBHI.


-

Sinco llo largol dovico is an 8-bil dovico, M16 romains doassorlod. As a rosuIl,
llo microprocossor finds BS16 doassorlod vlon sampIod al llo mid-poinl of
llo procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is
communicaling vill a 32-bil dovico. Nolo llal llo 80386DX microprocossor can
onIy sonso llal il is communicaling vill 16-bil or 32-bil dovicos and las no
InovIodgo of 8-bil dovicos. If BS16 is assorlod, llo 80386DX Inovs il is com-
municaling vill a 16-bil dovico. If BS16 isn'l assorlod, llo 80386DX assumos
llal il is communicaling vill a 32-bil dovico.

Tlo 80386DX assumos il is communicaling vill a 32-bil dovico and runs a sin-
gIo bus cycIo. Sinco llo largol dovico is an 8-bil momory dovico, il assorls noi-
llor M16 nor M32. Tlo bus conlroI Iogic sampIos M16 and M32 al llo ond
of ISA addross limo and finds llom doassorlod. Nolo llal llo bus conlroI Iogic
doos nol sampIo IO16 bocauso il las proviousIy sampIod M/IO and Inovs
llal a momory Iocalion is boing accossod.

Sonsing noillor M16 nor M32 assorlod, llo bus conlroI Iogic dolorminos llal
il is communicaling vill an 8-bil momory dovico and llal llo dala musl lloro-
foro bo sonl lo llo dovico ovor llo Iovor dala pall. Tlo 8-bil dovico soos ad-
dross 00000100l on llo addross bus and llo MWTC Iino assorlod and accopls
llo bylo from llo Iovor dala pall. Tlo bus conlroI Iogic assorls llo CIU
RIADY Iino. Wlon llo microprocossor sampIos CIU RIADY assorlod, il
onds llo bus cycIo. Tlis compIolos llo oxoculion of llo MOV inslruclion.

In llis oxampIo, llo foIIoving inslruclion is addrossing an 8-bil momory do-
vico.



Tlo microprocossor musl vrilo llo lvo bylos in llo AX rogislor lo momory Io-
calions 00000100l and 00000101l. Addross 00000100l is pIacod on A|31:2] and
BI0 and BI1 aro assorlod. In llis vay, llo microprocossor addrossos Ioca-
lions 00000100l and 00000101l in llo doubIovord llal slarls al Iocalion
00000100l. Tlo lvo bylos from llo AX rogislor aro drivon oul onlo llo lvo
Iovor dala palls slarling al llo midpoinl of T1. Tlo conlonls of llo AI rogislor
is drivon oul onlo D|7:0], vliIo llo conlonls of AH is drivon oul onlo D|15:8].
Wlon llo microprocossor is addrossing oillor of llo firsl lvo Iocalions in a
doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI Iogic aIso sols
SA0 lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal llo microprocossor
is addrossing llo firsl ovon addross in llo largol doubIovord. Sinco BI1 is aIso

-

assorlod, llo microprocossor is aIso addrossing llo odd Iocalion immodialoIy
foIIoving llo addrossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls
SBHI.

Sinco llo largol dovico is an 8-bil dovico, M16 romains doassorlod. As a rosuIl,
llo microprocossor finds BS16 doassorlod vlon sampIod al llo mid-poinl of
llo procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is
communicaling vill a 32-bil dovico. Nolo llal llo 80386DX microprocossor can
onIy sonso llal il is communicaling vill 16-bil or 32-bil dovicos and las no
InovIodgo of 8-bil dovicos. If BS16 is assorlod, llo 80386DX Inovs il is com-
municaling vill a 16-bil dovico. If BS16 isn'l assorlod, llo 80386DX assumos
llal il is communicaling vill a 32-bil dovico.

Tlo 80386DX assumos il is communicaling vill a 32-bil dovico and runs a sin-
gIo bus cycIo. Sinco llo largol dovico is an 8-bil momory dovico, il assorls noi-
llor M16 nor M32. Tlo bus conlroI Iogic sampIos M16 and M32 al llo ond
of addross limo and finds llom doassorlod.

Sonsing noillor M16 nor M32 assorlod, llo bus conlroI Iogic dolorminos llal
il is communicaling vill an 8-bil momory dovico and llal llo dala musl lloro-
foro bo lransforrod ovor llo Iovor dala pall. Tlis aIso moans llal llo dovico
can onIy accopl ono bylo al a limo. Tlo bus conlroI Iogic galos llo lvo bylos
llrougl llo lvo Iovor dala bus lranscoivors. Tlo 8-bil dovico dolocls addross
00000100l on llo addross bus and llo MWTC Iino assorlod, accopls llo bylo
from llo Iovor dala pall and vrilos il inlo Iocalion 00000100l. Tlo bus conlroI
Iogic llon incromonls llo addross by pIacing a 1 on llo SA0 Iino. Tlo MWTC
Iino is momonlariIy doassorlod and llon roassorlod again, lricIing llo ad-
drossod dovico inlo llinIing a socond bus cycIo las bogun. Tlo bus conlroI
Iogic aIso disabIos llo Iovor dala bus lranscoivor and commands llo dala bus
slooring Iogic lo copy llo socond bylo from llo socond dala pall lo llo firsl.
Tlo dovico dolocls a vrilo lo addross 00000101l and accopls llo dala bylo from
llo Iovor pall and vrilos il inlo Iocalion 00000101l.

AII of llo roquoslod informalion las nov boon vrillon lo llo largol dovico, so
llo bus conlroI Iogic assorls llo CIU RIADY Iino. Wlon llo microprocossor
sampIos CIU RIADY assorlod, il onds llo bus cycIo, compIoling llo oxoculion
of llo MOV inslruclion.

-


In llis oxampIo, llo foIIoving inslruclion is addrossing an 8-bil momory do-
vico.



Tlo microprocossor musl vrilo llo conlonls of llo IAX rogislor lo momory Io-
calions 00000100l llrougl 00000103l. Addross 00000100l is pIacod on A|31:2]
and aII four bylo onabIos aro assorlod. In llis vay, llo microprocossor indicalos
llal il is addrossing Iocalions 00000100l llrougl 00000103l in llo doubIovord
llal slarls al Iocalion 00000100l. Tlo four bylos from llo IAX rogislor aro
drivon oul onlo llo four dala palls slarling al llo midpoinl of T1. Wlon llo
microprocossor is addrossing oillor of llo firsl lvo Iocalions in a doubIovord,
llo bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI Iogic aIso sols SA0 lo a 0 bo-
causo llo assorlod IovoI on BI0 indicalos llal llo microprocossor is addrossing
llo firsl ovon addross in llo largol doubIovord. Sinco BI1 is aIso assorlod, llo
microprocossor is aIso addrossing llo odd Iocalion immodialoIy foIIoving llo
addrossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Sinco llo largol dovico is an 8-bil dovico, M16 romains doassorlod. As a rosuIl,
llo microprocossor finds BS16 doassorlod vlon sampIod al llo mid-poinl of
llo procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is
communicaling vill a 32-bil dovico. Nolo llal llo 80386DX microprocossor can
onIy sonso llal il is communicaling vill 16-bil or 32-bil dovicos and las no
InovIodgo of 8-bil dovicos. If BS16 is assorlod, llo 80386DX Inovs il is com-
municaling vill a 16-bil dovico. If BS16 isn'l assorlod, llo 80386DX assumos
llal il is communicaling vill a 32-bil dovico.

Tlo 80386DX assumos il is communicaling vill a 32-bil dovico and runs a sin-
gIo bus cycIo. Sinco llo largol dovico is an 8-bil momory dovico, il assorls noi-
llor M16 nor M32. Tlo bus conlroI Iogic sampIos M16 and M32 al llo ond
of ISA addross limo and finds llom doassorlod.

Sonsing noillor M16 nor M32 assorlod, llo bus conlroI Iogic dolorminos llal
il is communicaling vill an 8-bil momory dovico and llal llo dala musl lloro-
foro bo lransforrod ovor llo Iovor dala pall. Tlis aIso moans llal llo dovico
can onIy accopl ono bylo al a limo. AII four dala bus lranscoivors aro onabIod by
llo bus conlroI Iogic, aIIoving aII four dala bylos lo bo drivon onlo llo four
Syslom Dala Bus palls (SD bus) by llo microprocossor.


-

Tlo 8-bil dovico dolocls addross 00000100l on llo addross bus and llo MWTC
Iino assorlod, accopls llo bylo from llo Iovor dala pall and vrilos il inlo Ioca-
lion 00000100l. Tlo bus conlroI Iogic llon incromonls llo addross by pIacing a
1 on llo SA0 Iino. Tlo MWTC Iino is momonlariIy doassorlod and llon roas-
sorlod again, lricIing llo addrossod dovico inlo llinIing a socond bus cycIo las
bogun. Tlo bus conlroI Iogic aIso disabIos llo firsl dala bus lranscoivor and on-
abIos llo dala bus slooring Iogic lo copy llo bylo from llo socond pall lo llo
firsl. Tlo dovico llon accopls llo dala bylo from llo Iovor pall and vrilos il
inlo momory Iocalion 00000101l.

Tvo of llo four roquoslod bylos lavo nov boon lransforrod and llo bus conlroI
Iogic musl addross llo noxl lvo Iocalions in llo doubIovord. BI2 is assorlod,
indicaling llal llo microprocossor is vriling lo llo socond ovon addross in llo
doubIovord. Tlo bus conlroI Iogic lloroforo sols SA0 lo a 0. Sinco llis Iocalion
is in llo socond vord of llo doubIovord, llo bus conlroI Iogic aIso sols SA1 lo a
1. Tlo microprocossor las aIso assorlod BI3, indicaling llal il is vriling lo llo
odd addross immodialoIy foIIoving llo ovon Iocalion addrossod by BI2. As a
rosuIl, llo bus conlroI Iogic assorls SBHI.

Tlo socond dala bus lranscoivor is disabIod and llo bus conlroI Iogic com-
mands llo dala bus slooring Iogic lo copy llo bylo from llo llird dala pall lo
llo firsl. Il again doassorls and llon roassorls llo MWTC Iino, lricIing llo 8-bil
dovico inlo llinIing anollor bus cycIo las boon inilialod. Tlo 8-bil dovico nov
dolocls addross 00000102l, accopls llo bylo on llo Iovor dala pall and vrilos
il inlo Iocalion 00000102l. Tlo bus conlroI Iogic llon incromonls llo addross by
solling SA0 lo a 1, again lricIing llo 8-bil dovico inlo llinIing anollor bus cy-
cIo las boon inilialod by doassorling and roassorling llo MWTC Iino. Tlo 8-bil
dovico nov dolocls addross 00000103l. Tlo llird dala bus lranscoivor is dis-
abIod and llo dala bus slooring Iogic is commandod lo copy llo bylo from llo
fourll dala pall lo llo firsl dala pall. Tlo addrossod dovico accopls llo fourll
and finaI dala bylo and vrilos il inlo momory Iocalion 00000103l.

AII of llo roquoslod informalion las nov boon vrillon lo llo largol dovico, so
llo bus conlroI Iogic llon assorls llo CIU RIADY Iino. Wlon llo microproc-
ossor sampIos CIU RIADY assorlod, il onds llo bus cycIo, compIoling oxocu-
lion of llo MOV inslruclion.

-



In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor viII road llo conlonls of momory Iocalions 00000102l and
00000103l and pIaco llo rosuIling vord in llo AX rogislor. Addross 00000100l
is pIacod on A|31:2] and BI2 and BI3 aro assorlod. In llis vay, llo micro-
procossor indicalos llal il is addrossing Iocalions 00000102l and 00000103l in
llo doubIovord llal slarls al Iocalion 00000100l. Wlon llo microprocossor is
addrossing oillor of llo Iasl lvo Iocalions in a doubIovord, llo bus conlroI
Iogic sols SA1 lo 1. Tlo bus conlroI Iogic sols SA0 lo a 0 bocauso llo assorlod
IovoI on BI2 indicalos llal llo microprocossor is addrossing an ovon addross
in llo addrossod doubIovord. Sinco BI3 is aIso assorlod, llo microprocossor is
aIso addrossing llo odd Iocalion immodialoIy foIIoving llo addrossod ovon Io-
calion. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Sinco llo largol dovico is a 16-bil momory dovico, il assorls M16. As a rosuIl,
llo microprocossor finds BS16 assorlod vlon sampIod al llo mid-poinl of llo
procossor's firsl dala limo. Tlis indicalos lo llo microprocossor llal il is com-
municaling vill a 16-bil dovico. Tlo bus conlroI Iogic sampIos M16 al llo ond
of ISA addross limo and finds il assorlod. Sinco llis is a road bus cycIo, boll llo
microprocossor and llo bus conlroI Iogic llon oxpocl llo dala lo como bacI
ovor llo lvo Iovor dala palls.

Tlo 16-bil dovico soos addross 00000102l on llo addross bus vill SBHI as-
sorlod and llo MRDC Iino assorlod and rolurns llo lvo roquoslod bylos ovor
llo lvo Iovor dala palls. Tlo bus conlroI Iogic passos llo bylos llrougl llo
lvo Iovor dala bus lranscoivors lo llo microprocossor.

Tlo bus conlroI Iogic llon assorls llo CIU RIADY Iino. Wlon llo microproc-
ossor sampIos CIU RIADY assorlod, il roads llo lvo bylos from llo lvo
Iovor dala palls and pIacos llom in llo largol rogislor, AX. Tlo bylo from Ioca-
lion 00000102l is pIacod in AI and llal from 00000103l in AH. Tlis compIolos
oxoculion of llo MOV inslruclion.

-


In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor viII road llo conlonls of momory Iocalions 00000100l
llrougl 00000103l and pIaco llo rosuIling doubIovord in llo IAX rogislor.
Addross 00000100l is pIacod on A|31:2] and aII four bylo onabIos aro assorlod.
In llis vay, llo microprocossor indicalos llal il is addrossing Iocalions
00000100l llrougl 00000103l in llo doubIovord llal slarls al Iocalion
00000100l. Wlon llo microprocossor is addrossing oillor of llo firsl lvo Ioca-
lions in a doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI Iogic
sols SA0 lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal llo microproc-
ossor is addrossing llo firsl ovon addross in llo largol doubIovord. Sinco BI1
is aIso assorlod, llo microprocossor is aIso addrossing llo odd Iocalion immo-
dialoIy foIIoving llo addrossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic
assorls SBHI.

Sinco llo largol dovico is a 16-bil momory dovico, il assorls M16. As a rosuIl,
llo microprocossor finds BS16 assorlod vlon sampIod al llo mid-poinl of llo
procossor's firsl dala limo, indicaling lo llo microprocossor llal il is communi-
caling vill a 16-bil dovico. Tlo bus conlroI Iogic sampIos M16 al llo ond of
ISA addross limo and finds il assorlod. Sinco llis is a road bus cycIo, boll llo
microprocossor and llo bus conlroI Iogic llon oxpocl llo dala lo como bacI
ovor llo lvo Iovor dala palls. Tlis aIso moans llal llo dovico can onIy rolurn
lvo bylos al a limo. Sinco llo microprocossor las roquoslod four bylos, il musl
run lvo bacI-lo-bacI bus cycIos lo gol aII four bylos.

Tlo 16-bil dovico dolocls addross 00000100l on llo addross bus vill SBHI
and llo MRDC Iino assorlod and rolurns llo firsl lvo of llo roquoslod bylos
ovor llo lvo Iovor dala palls. Tlo bus conlroI Iogic passos boll bylos llrougl
llo Iovor lvo dala bus lranscoivors lo llo microprocossor and assorls CIU
RIADY. Wlon llo microprocossor sampIos CIU RIADY assorlod al llo ond
of llo curronl dala limo, il roads llo lvo bylos from llo bus and sloros llom in
llo Iovor lvo bylos of llo largol IAX rogislor. Tlis compIolos llo firsl of llo
lvo bus cycIos nocossary lo fuIfiII llo roquosl. AIllougl llo microprocossor
lad assorlod aII four bylo onabIo Iinos, il oxpoclod jusl lvo bylos on llo Iovor
dala palls bocauso BS16 vas sampIod assorlod.

Tvo of llo roquoslod four bylos lavo nov boon road and llo microprocossor
inilialos a socond bus cycIo using llo samo addross. Tlo samo doubIovord is

-

addrossod, 00000100l on A|31:2], bul onIy BI2 and BI3 aro nov assorlod.
BI2 is assorlod, indicaling llal llo microprocossor is roquosling llo bylo from
llo socond ovon addross in llo doubIovord. Tlo bus conlroI Iogic lloroforo sols
SA0 lo a 0. Sinco llis Iocalion is in llo socond vord of llo doubIovord, llo bus
conlroI Iogic sols SA1 lo a 1. Tlo microprocossor las aIso assorlod BI3, indi-
caling llal il musl aIso road llo conlonls of llo odd addross immodialoIy foI-
Ioving llo ovon Iocalion addrossod by BI2. As a rosuIl, llo bus conlroI Iogic
assorls SBHI.

Wlon llo microprocossor and bus conlroI Iogic sampIo lloir rospoclivo sizo in-
puls, llo 16-bil momory dovico boing addrossod las assorlod M16. Tlo assorl-
od IovoI on llo microprocossor's BS16 inpul indicalos llal llo 16-bil dovico
viII rolurn llo lvo roquoslod bylos ovor llo Iovor lvo dala palls, rallor llan
llo uppor lvo as oxpoclod. Tlo assorlod IovoI on llo M16 inpul lo llo bus con-
lroI Iogic indicalos llal llo addrossod dovico is a 16-bil momory dovico and llo
roquoslod dala viII bo lransforrod ovor llo Iovor lvo dala palls.

Tlo bus conlroI Iogic assorls llo MRDC Iino. Tlo 16-bil dovico nov soos ad-
dross 00000102l and SBHI assorlod and pIacos llo lvo roquoslod bylos on llo
lvo Iovor dala palls. Tlo bus conlroI Iogic passos llo lvo bylos llrougl llo
Iovor lvo dala bus lranscoivors lo llo microprocossor and assorls llo CIU
RIADY Iino. Wlon llo microprocossor sampIos CIU RIADY assorlod al llo
ond of llo curronl dala limo, il roads llo lvo bylos from llo dala bus and sloros
llom in llo uppor lvo bylos of llo largol IAX rogislor. Tlis onds llo socond
bus cycIo, compIoling llo oxoculion of llo MOV inslruclion.


In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor musl vrilo llo conlonls of llo AX rogislor (2 bylos) lo
momory Iocalions 00000102l and 00000103l. Addross 00000100l is pIacod on
A|31:2] and BI2 and BI3 aro assorlod. In llis vay, llo microprocossor indi-
calos llal il is addrossing Iocalions 00000102l and 00000103l in llo doubIo-
vord slarling al Iocalion 00000100l. Wlon llo microprocossor is addrossing
oillor of llo Iasl lvo Iocalions in a doubIovord, llo bus conlroI Iogic sols SA1
lo 1. Tlo bus conlroI Iogic sols SA0 lo a 0 bocauso llo assorlod IovoI on BI2 in-
dicalos llal llo microprocossor is addrossing llo socond ovon addross in llo

-

largol doubIovord. Sinco BI3 is aIso assorlod, llo microprocossor is aIso ad-
drossing llo odd Iocalion immodialoIy foIIoving llo addrossod ovon Iocalion.
As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Tlo lvo bylos from AX rogislor aro nol onIy drivon onlo llo lvo uppor dala
palls by llo 80386DX microprocossor, bul aro aIso dupIicalod on llo Iovor lvo
palls.

Sinco llo largol dovico is a 16-bil momory dovico, il assorls M16. As a rosuIl,
llo microprocossor finds BS16 assorlod vlon sampIod al llo mid-poinl of llo
procossor's firsl dala limo. Tlo bus conlroI Iogic sampIos M16 al llo ond of
ISA addross limo and finds il assorlod. Tlis indicalos lo boll llo microprocos-
sor and llo Bus ConlroIIor Iogic llal lloy aro communicaling vill a 16-bil do-
vico.

Sonsing M16 assorlod, llo bus conlroI Iogic dolorminos llal il is communical-
ing vill a 16-bil momory dovico and llal llo dala musl lloroforo bo lrans-
forrod lo llo dovico ovor llo lvo Iovor dala palls. Tlo lvo Iovor dala bus
lranscoivors aro onabIod, aIIoving llo lvo bylos from llo AX rogislor lo bo
drivon oul onlo SD|7:0] and SD|15:8]. Tlo 16-bil dovico soos addross 00000102l
on llo addross bus vill SBHI assorlod and llo MWTC Iino assorlod and ac-
copls llo lvo bylos from llo lvo Iovor dala palls.

AII of llo informalion las nov boon vrillon lo llo largol dovico, so llo bus con-
lroI Iogic assorls llo CIU RIADY Iino. Wlon llo microprocossor sampIos
CIU RIADY assorlod, il onds llo bus cycIo, compIoling oxoculion of llo MOV
inslruclion.

In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.


Tlo microprocossor musl vrilo llo conlonls of llo IAX rogislor (4 bylos) lo
momory Iocalions 00000100l llrougl 00000103l. Addross 00000100l is pIacod
on A|31:2] and aII four bylo onabIo Iinos aro assorlod. In llis vay, llo micro-
procossor indicalos llal il is addrossing Iocalions 00000100l llrougl 00000103l
in llo doubIovord slarling al Iocalion 00000100l. Wlon llo microprocossor is
addrossing oillor of llo firsl lvo Iocalions in a doubIovord, llo bus conlroI
Iogic sols SA1 lo 0. Tlo bus conlroI Iogic aIso sols SA0 lo a 0 bocauso llo assorl-
od IovoI on BI0 indicalos llal llo microprocossor is addrossing llo firsl ovon
addross in llo largol doubIovord. Sinco BI1 is aIso assorlod, llo microprocos-

-

sor is aIso addrossing llo odd Iocalion immodialoIy foIIoving llo addrossod
ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls SBHI. Tlo four bylos
from IAX rogislor aro drivon onlo llo four dala palls by llo 80386DX micro-
procossor.

Sinco llo largol dovico is a 16-bil momory dovico, il assorls M16. As a rosuIl,
llo microprocossor finds BS16 assorlod vlon sampIod al llo mid-poinl of llo
procossor's firsl dala limo, indicaling lo llo microprocossor llal il is communi-
caling vill a 16-bil dovico. Tlo bus conlroI Iogic sampIos M16 al llo ond of
ISA addross limo and finds il assorlod.

Sonsing M16 assorlod, llo bus conlroI Iogic dolorminos llal il is communical-
ing vill a 16-bil momory dovico and llal llo dala musl lloroforo bo lrans-
forrod lo llo dovico ovor llo lvo Iovor dala palls. AII four dala bus
lranscoivors aro onabIod, aIIoving llo four bylos from llo IAX rogislor lo bo
drivon oul onlo llo four SD palls. Tlo 16-bil dovico soos addross 00000100l on
llo addross bus vill SBHI assorlod and llo MWTC Iino assorlod and ac-
copls llo lvo bylos from llo lvo Iovor dala palls.

Tlo bus conlroI Iogic assorls CIU RIADY lo llo microprocossor. Wlon llo
microprocossor sampIos CIU RIADY assorlod al llo ond of llo curronl dala
limo, ils assorlod slalo aIIovs llo microprocossor lo ond llo firsl bus cycIo. Tvo
of llo four bylos from llo IAX rogislor lavo boon vrillon lo llo largol 16-bil
dovico.

Tlo socond bus cycIo is aulomalicaIIy inilialod by llo microprocossor. Addross
00000100l is pIacod on A|31:2] and BI2 and BI3 aro assorlod. In llis vay,
llo microprocossor indicalos llal il is addrossing Iocalions 00000102l and
00000103l in llo doubIovord slarling al Iocalion 00000100l. Wlon llo micro-
procossor is addrossing oillor of llo Iasl lvo Iocalions in a doubIovord, llo bus
conlroI Iogic sols SA1 lo 1. Tlo bus conlroI Iogic sols SA0 lo a 0 bocauso llo as-
sorlod IovoI on BI2 indicalos llal llo microprocossor is addrossing llo socond
ovon addross in llo largol doubIovord. Sinco BI3 is aIso assorlod, llo micro-
procossor is aIso addrossing llo odd Iocalion immodialoIy foIIoving llo ad-
drossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Tlo lvo uppor bylos from IAX rogislor aro nol onIy drivon onlo llo lvo uppor
dala palls by llo 80386DX microprocossor, bul aro aIso dupIicalod on llo
Iovor lvo palls.

Sinco llo largol dovico is a 16-bil momory dovico, il assorls M16. As a rosuIl,
llo microprocossor finds BS16 assorlod vlon sampIod al llo mid-poinl of llo

-

procossor's firsl dala limo, indicaling lo llo microprocossor llal il is communi-
caling vill a 16-bil dovico. Tlo bus conlroI Iogic sampIos M16 al llo ond of
ISA addross limo and finds il assorlod.

Sonsing M16 assorlod, llo bus conlroI Iogic dolorminos llal il is communical-
ing vill a 16-bil momory dovico and llal llo dala musl lloroforo bo lrans-
forrod lo llo dovico ovor llo lvo Iovor dala palls. Tlo lvo Iovor dala bus
lranscoivors aro onabIod, aIIoving llo lvo uppor bylos from llo IAX rogislor
lo bo drivon oul onlo SD|7:0] and SD|15:8]. Tlo 16-bil dovico soos addross
00000102l on llo addross bus vill SBHI assorlod and llo MWTC Iino as-
sorlod and accopls llo lvo bylos from llo lvo Iovor dala palls.

AII of llo informalion las nov boon vrillon lo llo largol dovico, so llo bus con-
lroI Iogic assorls llo CIU RIADY Iino. Wlon llo microprocossor sampIos
CIU RIADY assorlod al llo ond of llo curronl dala limo, il onds llo bus cycIo,
compIoling oxoculion of llo MOV inslruclion.

In an ISA syslom, llo onIy 32-bil dovico is llo syslom board RAM momory.
Wlon addrossod, il assorls llo M32 signaI lo indicalo llal il is a 32-bil dovico.
In llis oxampIo, llo foIIoving inslruclion is addrossing a 32-bil momory dovico.



Tlo microprocossor musl road llo conlonls of llo momory Iocalions 00000100l
llrougl 00000103l inlo llo IAX rogislor. Addross 00000100l is pIacod on
A|31:2] and aII four bylo onabIo Iinos aro assorlod. In llis vay, llo microprocos-
sor indicalos llal il is addrossing Iocalions 00000100l llrougl 00000103l in llo
doubIovord slarling al addross 00000100l. Wlon llo microprocossor is ad-
drossing oillor of llo firsl lvo Iocalions in a doubIovord, llo bus conlroI Iogic
sols SA1 lo 0. Tlo bus conlroI Iogic aIso sols SA0 lo a 0 bocauso llo assorlod
IovoI on BI0 indicalos llal llo microprocossor is addrossing llo firsl ovon ad-
dross in llo largol doubIovord. Sinco BI1 is aIso assorlod, llo microprocossor
is aIso addrossing llo odd Iocalion immodialoIy foIIoving llo addrossod ovon
Iocalion. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Sinco llo dovico is a 32-bil momory dovico, il assorls M32. Wlon llo micro-
procossor clocIs ils BS16 inpul al llo mid-poinl of llo firsl dala limo, il is
sonsod doassorlod. Wlon llo bus conlroI Iogic clocIs M16 and M32 al llo
ond of addross limo, M32 is sonsod assorlod. Sinco llis is a road bus cycIo,
boll llo microprocossor and llo bus conlroI Iogic llon oxpocl llo dala lo como

-

bacI ovor aII four dala palls. Tlis aIso moans llal llo dovico can rolurn four
bylos al a limo. Sinco llo microprocossor las roquoslod four bylos, il musl onIy
run ono bus cycIo lo gol aII four bylos.

Tlo bus conlroI Iogic sols MRDC assorlod. Wlon llo 32-bil momory dolocls
addross 00000100l vill aII four bylo onabIos assorlod, il sonds llo conlonls of
aII four Iocalions in llo doubIovord bacI lo llo microprocossor ovor llo four
dala palls. Tlo bus conlroI Iogic onabIos aII four dala bus lranscoivors, aIIov-
ing llo four bylos of dala lo fIov llrougl lo llo microprocossor.

Tlo bus conlroI Iogic llon assorls CIU RIADY. Wlon llo microprocossor
sampIos CIU RIADY assorlod al llo ond of llo curronl dala limo, il roads llo
four bylos from llo four dala palls, pIacos llom in llo IAX rogislor, and onds
llo bus cycIo. Tlis compIolos llo oxoculion of llo MOV inslruclion.

In an ISA syslom, llo onIy 32-bil dovico is llo syslom board RAM momory.
Wlon addrossod, il assorls llo M32 signaI lo indicalo llal il is a 32-bil dovico.
In llis oxampIo, llo foIIoving inslruclion is addrossing a 32-bil momory dovico.



Tlo microprocossor musl vrilo llo conlonls of llo IAX rogislor lo momory Io-
calions 00000100l llrougl 00000103l. Addross 00000100l is pIacod on A|31:2]
and aII four bylo onabIo Iinos aro assorlod. In llis vay, llo microprocossor indi-
calos llal il is addrossing Iocalions 00000100l llrougl 00000103l in llo dou-
bIovord slarling al addross 00000100l. Tlo four bylos from llo IAX rogislor
aro drivon oul onlo llo four dala palls by llo microprocossor.

Wlon llo microprocossor is addrossing oillor of llo firsl lvo Iocalions in a
doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI Iogic sols SA0
lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal llo microprocossor is
addrossing llo firsl ovon addross in llo largol doubIovord. Sinco BI1 is aIso
assorlod, llo microprocossor is aIso addrossing llo odd Iocalion immodialoIy
foIIoving llo addrossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls
SBHI.

Sinco llo dovico is a 32-bil momory dovico, il assorls M32. Wlon llo micro-
procossor clocIs ils BS16 inpul al llo mid-poinl of llo firsl dala limo, il is
sonsod doassorlod. Wlon llo bus conlroI Iogic clocIs M16 and M32 al llo
ond of addross limo, M32 is sonsod assorlod. Sinco llis is a vrilo bus cycIo,
boll llo microprocossor and llo bus conlroI Iogic llon oxpocl llo dala lo bo

-

lransforrod ovor aII four dala palls. Sinco llo microprocossor is communicaling
vill a 32-bil dovico, onIy ono bus cycIo is nocossary.

Tlo bus conlroI Iogic assorls MWTC and onabIos aII four dala bus lranscoiv-
ors, aIIoving llo four dala bylos lo pass llrougl onlo llo Syslom Dala (SD)
bus. Wlon llo 32-bil momory dolocls addross 00000100l vill aII four bylo on-
abIos and llo MWTC Iino assorlod, il accopls llo four dala bylos and sloros
llom in llo four Iocalions villin llo largol doubIovord. Tlo bus conlroI Iogic
assorls CIU RIADY. Wlon llo microprocossor sampIos CIU RIADY assorl-
od al llo ond of llo curronl dala limo, il onds llo bus cycIo, compIoling oxocu-
lion of llo MOV inslruclion.
- -

Iiguro 11-3 iIIuslralos llo IornoI Iogic surrounding an 80386DX microprocos-


sor. In llis impIomonlalion, llo dosignor las nol laIon advanlago of llo
80386DX microprocossor's dynamic bus sizing capabiIily (BS16 is doassorlod
by a puII-up rosislor lo Vcc). Tlo dala bus slooring Iogic is usod lo landIo
communicalion vill 8-, 16- and 32-bil dovicos.

Tlo IornoI of a DX-basod syslom villoul dynamic bus sizing oporalos idonli-
caIIy lo a IornoI vill llis foaluro, oxcopl vlon llo microprocossor is communi-
caling vill 16-bil dovicos. Tlo oxampIos for communicalion vill 8- and 32-bil
dovicos doscribod in llo soclion onlilIod, Tlo 80386DX Syslom KornoI vill
dynamic bus sizing ImpIomonlod, aro aIso lruo for llo DX-basod syslom vill-
oul dynamic bus sizing.

-


- -

-
W/R
D/C
M/lO
ADS
M16
lO16
M32
CPU READY
MRDC
MWTC
lORC
lOWC
SA0
SA1
SBHE
Bus
Control
Logic
1st
Data
Bus
Xcvr
2nd
Data
Bus
Xcvr
3rd
Data
Bus
Xcvr
4th
Data
Bus
Xcvr

Data Bus Steering Logic

LA
Bus
Buffer

80386
DX
BS16
+5Vdc
NOWS
CHRDY
Address
Latch


-



In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor viII road llo conlonls of momory Iocalions 00000102l and
00000103l and pIaco llo rosuIling vord in llo AX rogislor. Addross 00000100l
is pIacod on A|31:2] and BI2 and BI3 aro assorlod. In llis vay, llo micro-
procossor indicalos llal il is addrossing Iocalions 00000102l and 00000103l in
llo doubIovord llal slarls al Iocalion 00000100l. Wlon llo microprocossor is
addrossing oillor of llo Iasl lvo Iocalions in a doubIovord, llo bus conlroI
Iogic sols SA1 lo 1. Tlo bus conlroI Iogic sols SA0 lo a 0 bocauso llo assorlod
IovoI on BI2 indicalos llal llo microprocossor is addrossing an ovon addross
in llo addrossod doubIovord. Sinco BI3 is aIso assorlod, llo microprocossor is
aIso addrossing llo odd Iocalion immodialoIy foIIoving llo addrossod ovon Io-
calion. As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Sinco llo dovico is a 16-bil momory dovico, il assorls M16. Wlon llo micro-
procossor clocIs ils BS16 inpul al llo mid-poinl of llo procossor's firsl dala
limo, il is sonsod doassorlod (bocauso of llo puII-up lo Vcc). Wlon llo bus con-
lroI Iogic clocIs M16 al llo ond of addross limo, il is sonsod assorlod. Nolo
llal llo bus conlroI Iogic doos nol sampIo IO16 bocauso il las proviousIy sam-
pIod M/IO and Inovs llal a momory Iocalion is boing accossod.

SampIing BS16 doassorlod indicalos lo llo microprocossor llal il is communi-
caling vill a 32-bil dovico, vliIo llo bus conlroI Iogic rocognizos llal llo largol
is roaIIy a 16-bil momory dovico vlon il sampIos M16 assorlod. In llis road
bus cycIo, llo microprocossor oxpocls llo lvo roquoslod bylos lo como bacI
ovor llo uppor lvo dala palls, vliIo llo bus conlroI Iogic oxpocls llo dala lo
como bacI ovor llo lvo Iovor dala palls.

Tlo 16-bil dovico dolocls addross 00000102l on llo addross bus vill SBHI
and llo MRDC Iino assorlod and rolurns llo lvo roquoslod bylos ovor llo lvo
Iovor dala palls. Tlo bus conlroI Iogic commands llo dala bus slooring Iogic lo
copy llo lvo dala bylos from llo Iovor lvo lo llo uppor lvo dala palls. Tlo
bus conlroI Iogic llon onabIos llo lvo uppor dala bus lranscoivors, passing llo
bylos llrougl llo lvo uppor dala bus lranscoivors lo llo microprocossor.


-

Tlo bus conlroI Iogic llon assorls llo CIU RIADY Iino. Wlon llo microproc-
ossor sampIos CIU RIADY assorlod, il roads llo lvo bylos from llo lvo up-
por dala palls and pIacos llom in llo largol rogislor, AX. Tlo bylo from
Iocalion 00000102l is pIacod in AI and llal from 00000103l in AH, compIoling
oxoculion of llo MOV inslruclion.

In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor viII road llo conlonls of momory Iocalions 00000100l
llrougl 00000103l and pIaco llo rosuIling doubIovord in llo IAX rogislor.
Addross 00000100l is pIacod on A|31:2] and aII four bylo onabIos aro assorlod.
In llis vay, llo microprocossor indicalos llal il is addrossing Iocalions
00000100l llrougl 00000103l in llo doubIovord llal slarls al Iocalion
00000100l. Wlon llo microprocossor is addrossing oillor of llo firsl lvo Ioca-
lions in a doubIovord, llo bus conlroI Iogic sols SA1 lo 0. Tlo bus conlroI Iogic
sols SA0 lo a 0 bocauso llo assorlod IovoI on BI0 indicalos llal llo microproc-
ossor is addrossing llo firsl ovon addross in llo largol doubIovord. Sinco BI1
is aIso assorlod, llo microprocossor is aIso addrossing llo odd Iocalion immo-
dialoIy foIIoving llo addrossod ovon Iocalion. As a rosuIl, llo bus conlroI Iogic
assorls SBHI.

Sinco llo dovico is a 16-bil momory dovico, il assorls M16. Wlon llo micro-
procossor clocIs ils BS16 inpul al llo mid-poinl of llo procossor's firsl dala
limo, il is sonsod doassorlod (bocauso of llo puII-up lo Vcc). Wlon llo bus con-
lroI Iogic clocIs M16 al llo ond of ISA addross limo, il is sonsod assorlod.
Nolo llal llo bus conlroI Iogic doos nol sampIo IO16 bocauso il las proviousIy
sampIod M/IO and Inovs llal a momory Iocalion is boing accossod.

SampIing BS16 assorlod indicalos lo llo microprocossor llal il's communical-
ing vill a 32-bil dovico. Tlo bus conlroI Iogic, on llo ollor land, dolocls llal il
is communicaling vill a 16-bil momory dovico vlon il sampIos M16 assorlod.
Sinco llis is a road bus cycIo and llo microprocossor llinIs il's communicaling
vill a 32-bil dovico, llo il oxpocls aII four dala bylos lo bo rolurnod lo il simuI-
lanoousIy using aII four dala palls. Tlo bus conlroI Iogic oxpocls llo dala lo
como bacI ovor onIy llo lvo Iovor dala palls. Tlis aIso moans llal llo dovico
can onIy rolurn lvo bylos al a limo.


-

Bocauso llo microprocossor las roquoslod four bylos and viII onIy run ono bus
cycIo bocauso il llinIs il's communicaling vill a 32-bil dovico. Tlo bus conlroI
Iogic musl lricI llo 16-bil dovico inlo llinIing lvo soparalo bus cycIos lavo
boon gonoralod by llo microprocossor.

Tlo 16-bil dovico dolocls addross 00000100l on llo addross bus vill SBHI
and llo MRDC Iino assorlod and rolurns llo firsl lvo of llo roquoslod bylos
ovor llo lvo Iovor dala palls. Tlo bus conlroI Iogic causos lloso lvo bylos lo
bo Ialclod inlo llo Iovor lvo dala bus lranscoivors. Sooing llal llo uppor lvo
bylo onabIo Iinos aro aIso assorlod, llo bus conlroI Iogic sols SA1 lo 1, SA0 lo 0,
and assorls SBHI. Il aIso doassorls and llon roassorls llo MRDC Iino lo
simuIalo a socond bus cycIo.

Tlo 16-bil dovico nov dolocls addross 00000102l vill SBHI and MRDC as-
sorlod and rolurns llo conlonls of 00000102l and 00000103l on llo Iovor lvo
dala palls. Tlo bus conlroI Iogic llon causos llo dala bus slooring Iogic lo copy
llo lvo bylos lo llo uppor lvo palls. Il llon onabIos llo uppor lvo dala bus
lranscoivors lo pass llo uppor lvo bylos lo llo microprocossor and simuIlano-
ousIy commands llo Iovor lvo dala bus lranscoivors lo pass llo lvo provi-
ousIy Ialclod bylos lo llo procossor on llo Iovor lvo dala palls.

Tlo bus conlroI Iogic llon assorls CIU RIADY. Wlon llo microprocossor
sampIos CIU RIADY assorlod al llo ond of llo curronl dala limo, il roads llo
four bylos from llo bus and sloros llom in llo IAX rogislor. Tlis compIolos llo
bus cycIo and compIolos llo oxoculion of llo MOV inslruclion.


In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor musl vrilo llo conlonls of llo AX rogislor (2 bylos) lo
momory Iocalions 00000102l and 00000103l. Addross 00000100l is pIacod on
A|31:2] and BI2 and BI3 aro assorlod. In llis vay, llo microprocossor indi-
calos llal il is addrossing Iocalions 00000102l and 00000103l in llo doubIo-
vord slarling al Iocalion 00000100l. Wlon llo microprocossor is addrossing
oillor of llo Iasl lvo Iocalions in a doubIovord, llo bus conlroI Iogic sols SA1
lo 1. Tlo bus conlroI Iogic sols SA0 lo a 0 bocauso llo assorlod IovoI on BI2 in-
dicalos llal llo microprocossor is addrossing llo socond ovon addross in llo

-

largol doubIovord. Sinco BI3 is aIso assorlod, llo microprocossor is aIso ad-
drossing llo odd Iocalion immodialoIy foIIoving llo addrossod ovon Iocalion.
As a rosuIl, llo bus conlroI Iogic assorls SBHI.

Tlo lvo bylos from llo AX rogislor aro nol onIy drivon onlo llo lvo uppor dala
palls by llo 80386DX microprocossor, bul aro aIso dupIicalod on llo Iovor lvo
palls.

Sinco llo dovico is a 16-bil momory dovico, il assorls M16. Wlon llo micro-
procossor clocIs il BS16 inpul al llo mid-poinl of llo procossor's firsl dala
limo, il is sonsod doassorlod (bocauso of llo puII-up lo Vcc). Wlon llo bus con-
lroI Iogic clocIs M16 al llo ond of ISA addross limo, il is sonsod assorlod.
Nolo llal llo bus conlroI Iogic doos nol sampIo IO16 bocauso il las proviousIy
sampIod M/IO and Inovs llal a momory Iocalion is boing accossod. Sam-
pIing BS16 doassorlod indicalos lo llo microprocossor llal il's communicaling
vill a 32-bil dovico, vliIo llo bus conlroI Iogic dolocls llal il's communicaling
vill a 16-bil momory dovico vlon sampIing M16 assorlod.

Sonsing M16 assorlod, llo bus conlroI Iogic dolorminos llal il is communical-
ing vill a 16-bil momory dovico and llal llo dala musl lloroforo bo lrans-
forrod lo llo dovico ovor llo lvo Iovor dala palls. Bocauso llo 80386DX
dupIicalos llo dala from llo uppor palls on llo Iovor palls, llo lvo Iovor
dala bus lranscoivors aro onabIod, aIIoving llo lvo bylos from llo AX rogislor
lo bo drivon oul onlo SD|7:0] and SD|15:8]. Tlo 16-bil dovico soos addross
00000102l on llo addross bus vill SBHI assorlod and llo MWTC Iino as-
sorlod and accopls llo lvo bylos from llo lvo Iovor dala palls.

AII of llo informalion las nov boon vrillon lo llo largol dovico, so llo bus con-
lroI Iogic assorls llo CIU RIADY Iino. Wlon llo microprocossor sampIos
CIU RIADY assorlod, il onds llo bus cycIo, compIoling oxoculion of llo MOV
inslruclion.

-


In llis oxampIo, llo foIIoving inslruclion is addrossing a 16-bil momory dovico.



Tlo microprocossor musl vrilo llo conlonls of llo IAX rogislor (4 bylos) lo
momory Iocalions 00000100l llrougl 00000103l. Addross 00000100l is pIacod
on A|31:2] and aII four bylo onabIo Iinos aro assorlod. In llis vay, llo micro-
procossor indicalos llal il is addrossing Iocalions 00000100l llrougl 00000103l
in llo doubIovord slarling al Iocalion 00000100l. Wlon llo microprocossor is
addrossing oillor of llo firsl lvo Iocalions in a doubIovord, llo bus conlroI
Iogic sols SA1 lo 0. Tlo bus conlroI Iogic aIso sols SA0 lo a 0 bocauso llo assorl-
od IovoI on BI0 indicalos llal llo microprocossor is addrossing llo firsl ovon
addross in llo largol doubIovord. Sinco BI1 is aIso assorlod, llo microprocos-
sor is aIso addrossing llo odd Iocalion immodialoIy foIIoving llo addrossod
ovon Iocalion. As a rosuIl, llo bus conlroI Iogic assorls SBHI. Tlo four bylos
from IAX rogislor aro drivon onlo llo four dala palls by llo 80386DX micro-
procossor.

Sinco llo dovico is a 16-bil momory dovico, il assorls M16. Wlon llo micro-
procossor clocIs ils BS16 inpul al llo mid-poinl of llo procossor's firsl dala
limo, il is sonsod doassorlod (bocauso of llo puII-up lo Vcc). As a rosuIl, llo mi-
croprocossor llinIs llal il's communicaling vill a 32-bil dovico and can lrans-
for llo onliro doubIovord in ono bus cycIo. Hovovor, vlon llo bus conlroI
Iogic clocIs M16 al llo ond of addross limo il is sonsod assorlod. Tlis indi-
calos llal il is communicaling vill a 16-bil dovico. Tlis moans llal llo bus con-
lroI Iogic musl lricI llo 16-bil dovico inlo llinIing lvo soparalo bus cycIos
occur, vliIo llo microprocossor onIy porforms ono.

Sonsing M16 assorlod, llo bus conlroI Iogic dolorminos llal il is communical-
ing vill a 16-bil momory dovico and llal llo dala musl lloroforo bo lrans-
forrod lo llo dovico ovor llo lvo Iovor dala palls. AII four dala bus
lranscoivors aro onabIod, aIIoving llo four bylos from llo IAX rogislor lo bo
drivon oul onlo llo Syslom Dala (SD) bus. Tlo 16-bil dovico soos addross
00000100l on llo addross bus vill SBHI assorlod and llo MWTC Iino as-
sorlod and accopls llo lvo bylos from llo lvo Iovor dala palls.

Tlo bus conlroI Iogic nov doassorls and llon roassorls llo MWTC Iino lo lricI
llo 16-bil dovico inlo llinIing anollor bus cycIo las bogun. In addilion, llo bus
conlroI Iogic aIlors llo addross by solling SA1 lo 1, SA0 lo 0 and by assorling

-

SBHI. Tlis is dono bocauso llo microprocossor musl aIso vrilo llo uppor lvo
bylos inlo llo doubIovord and llo 16-bil dovico musl soo llo addross for lloso
lvo Iocalions. Tlo bus conlroI Iogic disabIos llo Iovor lvo dala bus lranscoiv-
ors and commands llo dala bus slooring Iogic lo copy llo uppor lvo bylos lo
llo lvo Iovor palls. Tlo 16-bil dovico llon accopls llo lvo bylos and vrilos
llom inlo llo addrossod Iocalions, 00000102l and 00000103l.

Tlo bus conlroI Iogic assorls CIU RIADY lo llo microprocossor. Wlon llo
microprocossor sampIos CIU RIADY assorlod al llo ond of llo curronl dala
limo, ils assorlod slalo aIIovs llo microprocossor lo ond llo bus cycIo. Tlo four
bylos from llo IAX rogislor lavo boon vrillon lo llo largol 16-bil dovico, com-
pIoling oxoculion of llo MOV inslruclion.


- -


-
Tlo claplors prior lo llis ono providod a dolaiIod doscriplion of llo 80386DX
and SX microprocossors, as voII as llo basic slrucluro and oporalion of llo Ior-
noI Iogic associalod vill lloso lvo varialions of llo 80386 microprocossor.
-
Tlis claplor providos a dolaiIod doscriplion of llo 80386 bus cycIo. Timing
diagrams aro usod lo iIIuslralo llo soquonco of ovonls during llo 80386 micro-
procossor's communicalion vill oxlornaI dovicos.

Iarl 2, Momory Subsysloms, foIIovs immodialoIy aflor llis claplor, provid-
ing a dolaiIod doscriplion of RAM momory, caclo arclilocluro and ROM mom-
ory. Sinco llo procossor sponds moro of ils limo accossing momory llon any
ollor subsyslom, il is imporalivo llal llo IinIago bolvoon momory and llo
procossor bo oplimizod lo provido llo faslosl possibIo llrouglpul. Tlo claplor
on caclo providos a dolaiIod IooI al llo mosl common mollod of aclioving llis
oplimizalion.
- -
Tlo 80386 microprocossor is capabIo of running procisoIy llo samo sovon lypos
of bus cycIos llal llo 80286 microprocossor can run:

Momory inslruclion road
Momory dala road
Momory dala vrilo
I/O dala road
I/O dala vrilo
Inlorrupl AcInovIodgo
HaIl or Sluldovn

-

--
Tlo subjocl of addross pipoIining vas discussod in llo claplor onlilIod Tlo
80386DX and SX Microprocossors. UnIiIo llo 80286 microprocossor, lovovor,
llo 80386 microprocossor can lurn addross pipoIining on and off on a bus-
cycIo-by-bus-cycIo basis. Tlis is accompIislod by assorling or doassorling llo
procossor's NA, noxl addross, inpul. During llo curronl bus cycIo, llo 80386
microprocossor sampIos NA lo dolormino vlollor or nol lo oulpul llo ad-
dross for llo upcoming bus cycIo oarIy. If NA is sampIod doassorlod, llo proc-
ossor viII nol oulpul llo addross and bus cycIo dofinilion for llo upcoming bus
cycIo unliI llo bus cycIo las acluaIIy bogun. If, on llo ollor land, NA is sam-
pIod assorlod during llo curronl bus cycIo, llo procossor viII pIaco llo addross
and bus cycIo dofinilion for llo upcoming bus cycIo on llo bus during llo cur-
ronl bus cycIo. Tlo foIIoving discussion of llo road and vrilo bus cycIos as-
sumos llal pipoIining is disabIod llo NA inpul is sampIod doassorlod
during oacl bus cycIo. Tlo soclion onlilIod, Addross IipoIining IxampIo,
providos a dolaiIod discussion of bus cycIo liming vlon llo 80386 microprocos-
sor is using addross pipoIining.
-
Iiguro 12-1 iIIuslralos llo soquonco of ovonls during a momory or an I/O road
bus cycIo. Tlo foIIoving numborod slops can bo cross-roforoncod lo llo num-
borod roforoncod poinls in llo liming diagram. Tlo 80386's addross limo is ro-
forrod lo as T1, vliIo dala limo is roforrod lo as T2. Tlo smaII, darI roclangIos
idonlify llo poinls al vlicl a signaI is sampIod.


- -


-

A31:A2
BE3:BE0
M/lO, D/C
Ti T1 T2 T1 T2 Ti
W/R
PCLK
ADS
NA
BS16
READY
D31:D0
1
2
2
3 3
4
4
5 5
6
6

-

1. Bocauso llo procossor's bus unil is in llo idIo slalo prior lo llis bus cycIo,
llo addross for llo noxl bus cycIo is nol oulpul oarIy. InloI documonlalion
slovs llal llo 80386s inlornaI cIocI (ICIK) is difforonl llan llo 80286s
ICIK. Tlo 80386s ICIK is invorlod vlon comparod lo llo 80286s.
2. Tlo procossor pIacos llo momory or I/O addross on A|31:2] and assorls llo
approprialo bylo onabIo Iinos al llo slarl of T1. Tlo microprocossor aIso in-
dicalos llo bus cycIo lypo on ils bus cycIo dofinilion Iinos and assorls ADS
lo indicalo llo slarl of llo bus cycIo and llo prosonco of a vaIid addross and
bus cycIo dofinilion.
3. Al llo ond of T1, llo microprocossor doassorls llo ADS signaI.
4. Al llo midpoinl of T2, llo microprocossor sampIos ils BS16 and NA in-
puls. In llis oxampIo, NA is sampIod doassorlod, causing llo microproc-
ossor lo mainlain llo addross for llo curronl bus cycIo on llo addross bus
unliI llo bus cycIo onds. In llis oxampIo, BS16 is sampIod doassorlod, in-
dicaling llal llo curronlIy addrossod dovico is a 32-bil dovico.
5. Tlo curronlIy addrossod dovico bogins lo drivo llo roquoslod dala onlo llo
dala bus. Tlo oxacl momonl llis occurs is dopondonl upon llo addrossod
dovico's accoss limo.
6. Al llo ond of T2, llo microprocossor sampIos ils RIADY inpul lo dolor-
mino if llo curronlIy addrossod dovico is roady lo ond llo bus cycIo. In llis
oxampIo, RIADY is sampIod assorlod. Tlo microprocossor roads llo ro-
quoslod dala from llo dala bus and onds llo bus cycIo. Tlo microprocossor
immodialoIy inilialos llo noxl bus cycIo, pIacing llo nov addross and bus
cycIo dofinilion on llo busos and assorling ADS again.

If RIADY lad boon sampIod doassorlod, llo microprocossor insorls a vail
slalo inlo llo bus cycIo lo provido addilionaI limo for llo addrossod dovico
lo rospond lo llo roquosl for dala. Tlo vail slalo consisls of an addilionaI
T2 limo.
-
Iiguro 12-2 iIIuslralos llo soquonco of ovonls during a momory or an I/O vrilo
bus cycIo. Tlo foIIoving numborod slops can bo cross-roforoncod lo llo num-
borod roforoncod poinls in llo liming diagram. Tlo 80386's addross limo is ro-
forrod lo as T1, vliIo dala limo is roforrod lo as T2. Tlo smaII, darI roclangIos
idonlify llo poinls al vlicl a signaI is sampIod.



- -


-

A31:A2
BE0:BE3
M/lO, D/C
Ti T1 T2 T1 T2 Ti
W/R
PCLK
ADS
NA
BS16
READY
D31:D0
1
2 2
3
7
7
4 4
5
5
6
6

-

1. Bocauso llo procossor's bus unil is in llo idIo slalo prior lo llis bus cycIo,
llo addross for llo noxl bus cycIo is nol oulpul oarIy. InloI documonlalion
slovs llal llo 80386s inlornaI cIocI (ICIK) is difforonl llan llo 80286s
ICIK. Tlo 80386s ICIK is invorlod vlon comparod lo llo 80286s.
2. Tlo procossor pIacos llo momory or I/O addross on A|31:2] and assorls llo
approprialo bylo onabIo Iinos al llo slarl of T1. Tlo microprocossor aIso in-
dicalos llo bus cycIo lypo on ils bus cycIo dofinilion Iinos and assorls ADS
lo indicalo llo slarl of llo bus cycIo and llo prosonco of a vaIid addross and
bus cycIo dofinilion.
3. Tlo microprocossor bogins lo drivo llo dala lo bo vrillon onlo llo dala bus
al llo midpoinl of T1.
4. Al llo ond of T1, llo microprocossor doassorls llo ADS signaI.
5. Al llo midpoinl of T2, llo microprocossor sampIos ils BS16 and NA in-
puls. In llis oxampIo, NA is sampIod doassorlod. Tlis causos llo micro-
procossor lo mainlain llo addross for llo curronl bus cycIo on llo addross
bus unliI llo bus cycIo onds. In llis oxampIo, BS16 is sampIod doassorlod,
indicaling llal llo curronlIy addrossod dovico is a 32-bil dovico.
6. Al llo ond of T2, llo microprocossor sampIos ils RIADY inpul lo dolor-
mino if llo curronlIy addrossod dovico is roady lo ond llo bus cycIo. In llis
oxampIo, RIADY is sampIod assorlod, indicaling llal llo curronlIy ad-
drossod dovico las accoplod llo dala boing vrillon by llo microprocossor.
Tlo microprocossor immodialoIy inilialos llo noxl bus cycIo, pIacing llo
nov addross and bus cycIo dofinilion on llo busos and assorling ADS
again. If RIADY lad boon sampIod doassorlod, llo microprocossor insorls
a vail slalo inlo llo bus cycIo lo provido addilionaI limo for llo addrossod
dovico lo rospond lo llo roquosl for dala. Tlo vail slalo consisls of an addi-
lionaI T2 limo.
7. Tlo microprocossor conlinuos lo drivo llo vrilo dala onlo llo dala bus un-
liI llo midpoinl of T1 in llo noxl bus cycIo, llus onsuring llal il salisfios llo
loId limo for llo largol dovico.
--
Iiguro 12-3 iIIuslralos llo lransilion from non-pipoIinod lo pipoIinod oporalion.
TabIo 12-1 dofinos llo slalos usod in llo oxampIo. Tlo smaII, darI roclangIos
idonlify llo poinls al vlicl a signaI is sampIod.

1. Tlo microprocossor's bus unil is idIo bocauso no inlornaI bus cycIo roquosls
aro ponding. Tlo profolcl quouo is fuII and llo curronlIy oxoculing inslruc-
lion doosn'l roquiro a bus cycIo. InloI documonlalion slovs llal llo 80386s
inlornaI cIocI (ICIK) is difforonl llan llo 80286s ICIK. Tlo 80386s ICIK
is invorlod vlon comparod lo llo 80286s.

- -

2. Al llo slarl of T1, llo microprocossor inilialos a bus cycIo lo fuIfiII an inlor-
naI bus cycIo roquosl from llo profolclor or llo oxoculion unil. Tlo micro-
procossor drivos llo addross and bus cycIo dofinilion onlo llo busos and
assorls ADS. W/R is sol ligl, indicaling llal llis is a vrilo bus cycIo.
Addross docodors bogin lo soo llo nov addross slorlIy aflor llo slarl of T1.
Addross pipoIining isn'l in offocl bocauso llo bus unil is jusl coming oul of
llo idIo slalo. Tlo addross can'l bo pIacod on llo addross bus during llo
prior bus cycIo bocauso lloro isn'l ono.
3. Al llo midpoinl of T1, llo microprocossor bogins lo drivo llo vrilo dala on
llo dala bus.
4. ADS is doassorlod al llo ond of T1. Addross docodors may Ialcl llo ad-
dross or lloir clip soIocl on llo rising odgo of ADS.
5. Al llo midpoinl of T2, llo microprocossor sampIos ils BS16 and NA in-
puls. Al llis poinl, llo doassorlod slalo of BS16 indicalos llal llo micro-
procossor is communicaling vill a 32-bil dovico. Tlo doassorlod slalo on
NA indicalos llal llo curronlIy addrossod dovico doos nol supporl ad-
dross pipoIining. As a rosuIl, llo microprocossor viII nol pIaco llo addross
and bus cycIo dofinilion for llo noxl bus cycIo on llo busos unliI llo ond of
llo curronl bus cycIo.
6. Tlo microprocossor sampIos RIADY assorlod al llo ond of T2, indicaling
llal llo curronlIy addrossod dovico las accoplod llo vrilo dala and is
roady lo ond llo bus cycIo. In rosponso, llo microprocossor onds llo bus
cycIo, bul conlinuos lo drivo llo dala onlo llo dala bus unliI llo midpoinl
of T1 in llo noxl bus cycIo lo onsuro llal llo dovico succossfuIIy Ialclos llo
dala. Tlo microprocossor inilialos llo noxl bus cycIo al llo slarl of T1. Tlis
bus cycIo is a road, as indicalod by llo Iov on W/R.
7. Al llo midpoinl of T2, llo microprocossor sampIos BS16 and NA. BS16
is again doassorlod, indicaling llal llo curronlIy addrossod dovico is a 32-
bil dovico. NA is assorlod, lovovor, indicaling llal llo curronlIy ad-
drossod dovico supporls addross pipoIining. Tlo microprocossor musl
lloroforo oulpul llo addross and bus cycIo dofinilion for llo upcoming bus
cycIo oarIy (during llis bus cycIo).

If RIADY is sampIod assorlod al llo ond of T2, lovovor, NA is ignorod
bocauso llo assorlod RIADY causos llo bus cycIo lo lorminalo.
8. RIADY is sampIod doassorlod, causing llo microprocossor lo insorl a vail
slalo (T2p) in llo bus cycIo.
9. Al llo Ioading odgo of T2p, llo microprocossor pIacos llo addross and bus
cycIo dofinilion for llo noxl bus cycIo on llo busos and assorls ADS. W/R
is sol ligl, indicaling llal llo noxl bus cycIo is a vrilo. Tlo pipoIining of
llo addross and bus cycIo lypo aIIovs llo dovico lo bo addrossod in llo

-

noxl bus cycIo lo bogin ils accoss oarIy so il viII bo roady lo ond llo bus cy-
cIo oarIior.
10. Al llo ond of T2p, llo microprocossor sampIos RIADY assorlod and roads
llo dala from llo dala bus, onding llo curronl bus cycIo. Tlo microprocos-
sor doassorls ADS and llo microprocossor's bus unil onlors llo T1p slalo.
Tlis is llo firsl ICIK cycIo of a pipoIinod bus cycIo.

ADS is onIy assorlod for ono ICIK cycIo vlon llo microprocossor oul-
puls a nov addross and bus cycIo lypo onlo llo busos. Sinco llo addross
and bus cycIo lypo for a pipoIinod bus cycIo aro oulpul during T2p of llo
provious bus cycIo, ADS isn'l assorlod during T1p.
11. Al llo midpoinl of T1p, llo microprocossor bogins lo drivo llo vrilo dala
onlo llo dala bus. Al llis poinl, llo microprocossor sampIos NA assorlod,
indicaling llal llo curronlIy addrossod dovico supporls addross pipoIining.
BS16 is sampIod doassorlod, indicaling llal llo dovico addrossod in llo
curronl bus cycIo is a 32-bil dovico.
12. Al llo Ioading odgo of T2p, llo microprocossor oulpuls llo addross and
bus cycIo lypo for llo upcoming bus cycIo and assorls ADS. W/R is sol
Iov, indicaling llal llo noxl bus cycIo is a road.
13. Al llo ond of T2p, llo microprocossor sampIos RIADY assorlod, indical-
ing llal llo dovico addrossod in llo curronl bus cycIo is roady lo ond llo
vrilo lransfor. Tlo microprocossor onds llo bus cycIo, bul conlinuos lo
drivo llo vrilo dala onlo llo dala bus lo onsuro llo dovico Ialclos llo dala
corroclIy. Tlo microprocossor doassorls ADS.
14. Tlo noxl bus cycIo bogins vill T1p.
15. Al llo midpoinl of T1p, llo microprocossor sampIos NA assorlod, indical-
ing llal llo curronlIy addrossod dovico supporls addross pipoIining. In llis
caso, lovovor, llo microprocossor's bus unil doosn'l lavo anollor bus cycIo
lo run, so llo noxl addross and bus cycIo lypo aro nol pipoIinod oul oarIy.
Tlo microprocossor sampIos BS16 doassorlod al llo midpoinl of T1p, indi-
caling llal llo dovico addrossod in llo curronl bus cycIo is a 32-bil dovico.
16. Tlo microprocossor's bus unil onlors llo T2i slalo. Tlis is dala limo and llo
bus unil is proparing lo go bacI lo llo idIo slalo aflor llis bus cycIo com-
pIolos. Al llo slarl of T2i, llo microprocossor coasos lo drivo llo addross
and bus cycIo lypo.
17. Al llo ond of T2i, llo microprocossor sampIos RIADY assorlod, indicaling
llal llo dovico addrossod in llo curronl bus cycIo is roady lo ond llo bus
cycIo. Tlo microprocossor roads llo dala from llo dala bus and onds llo
bus cycIo.
18. Tlo microprocossor's bus unil onlors llo idIo slalo unliI llo profolclor or
llo oxoculion unil roquosl anollor bus cycIo.


- -


-
Ti T1 T2 T1 T2 T2p T1p T2p T1p T2i Ti
A31:A2
BE3:BE0
M/lO, D/C
W/R
PCLK
ADS
NA
BS16
READY
D31:D0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

-

- -
-
Ti Tlo -. Tlo bus unil romains in llo idIo slalo vlon il las no bus cy-
cIos lo run (llo profolcl quouo is fuII and llo curronlIy oxoculing inslruclion
doos nol roquiro a bus cycIo).
T1 -- . Tlo microprocossor pIacos llo addross and bus cycIo lypo on
llo busos and assorls ADS. If pipoIining is in offocl, llo addross is oulpul
prior lo T1. If llis is a vrilo bus cycIo, llo microprocossor aIso bogins lo
drivo llo dala onlo llo dala bus al llo midpoinl of T1.
T2 . Timo poriod aIIocalod lo aIIov dala lo bo lransforrod bolvoon
llo microprocossor and llo largol dovico. NA is sampIo al llo T2 midpoinl
lo dolormino if llo procossor slouId inilialo oarIy addross oulpul (addross
pipoIining). BS16 is aIso sampIod al llo T2 midpoinl lo dolormino if llo
microprocossor is communicaling vill a 16- or 32-bil dovico. RIADY is
sampIod al llo ond of T2 lo dolormino if llo curronlIy addrossod dovico is
roady lo ond llo bus cycIo.
T1p -- - . NA is sampIod al llo T1p mid-
poinl lo dolormino if llo noxl addross and bus cycIo dofinilion slouId bo
oulpul oarIy (al llo slarl of T2p). BS16 is aIso sampIod al llo midpoinl of
T1p lo dolormino if llo curronlIy addrossod dovico is a 16- or 32-bil dovico.
If llis is a vrilo bus cycIo, llo microprocossor bogins lo drivo llo dala onlo
llo dala bus al llo midpoinl of T1p.
T2p - . Tlo addross and bus cycIo dofinilion
for llo upcoming bus cycIo aro pIacod on llo busos al llo slarl of T2p.
ADS is assorlod for llo duralion of T2p. RIADY is sampIod al llo ond of
T2p lo dolormino if llo curronlIy addrossod dovico is roady lo ond llo bus
cycIo.
-
Tlo inlorrupl acInovIodgo bus cycIo is discussod in llo claplor onlilIod Tlo
Inlorrupl Subsyslom.
-
Tlo procossor runs llo laIl or sluldovn bus cycIo undor oillor of llo foIIoving
circumslancos:


- -

Tlo HIT (HAIT) inslruclion causos llo microprocossor lo coaso folcling
and oxoculing inslruclions.
Tlo microprocossor dolocls a fauIl vliIo running llo doubIo-fauIl landIor.

Wlon llo microprocossor oxoculos llo HIT inslruclion, il runs llo laIl or
sluldovn bus cycIo lo indicalo ils inlonlion lo laIl lo oxlornaI Iogic. In an ISA
maclino, llis las no offocl on oxlornaI Iogic.

Wlon llo 80386 microprocossor dolocls an oxcoplion vliIo allompling lo oxo-
culo llo landIor for a prior oxcoplion, llo lvo oxcoplions aro gonoraIIy landIod
soriaIIy. Corlain combinalions of oxcoplions (incIuding pago fauIls and vlal In-
loI rofors lo as conlribulory oxcoplions) cannol bo landIod soriaIIy, lovovor,
so llo 80386 microprocossor invoIos a doubIo-fauIl oxcoplion insload. If llo
microprocossor dolocls an oxcoplion vliIo allompling lo sorvico llo doubIo-
fauIl, il goos inlo a sluldovn condilion. Il indicalos llis lo oxlornaI Iogic by
running llo laIl or sluldovn bus cycIo. In an ISA maclino, llo sluldovn do-
locl Iogic oulsido llo microprocossor dolocls llo sluldovn and loggIos llo mi-
croprocossor's RISIT Iino, causing llo syslom lo robool.

Tlo conlribulory oxcoplions aro moslIy causod by proloclion vioIalions in pro-
loclod modo. Ior oxampIo, in proloclod modo, if an appIicalion allompls lo ac-
coss dala llal is oulsido ils dala sogmonl, llo microprocossor viII slarl running
llo gonoraI proloclion fauIl oxcoplion landIor. If, say, a slacI ovorfIov voro lo
occur vliIo llo microprocossor ran llo gonoraI proloclion fauIl oxcoplion lan-
dIor, llo microprocossor vouId nol bo abIo lo landIo llo lvo fauIls soriaIIy.
Tlo microprocossor vouId invoIo llo doubIo-fauIl oxcoplion insload. If llo mi-
croprocossor doloclod anollor oxcoplion vliIo allompling lo sorvico llo dou-
bIo-fauIl, il vouId go inlo a sluldovn condilion. Tlis is somolimos roforrod lo
as a lripIo fauIl.

Tlo laIl or sluldovn bus cycIo is indicalod by ADS boing assorlod and:

M/IO and W/R drivon ligl.
D/C drivon Iov.

In addilion, llo microprocossor assorls BI0 lo indicalo a sluldovn, or assorls
BI2 lo indicalo a laIl. Tlo addross bus oulpuls aro drivon Iov.

During a laIl or sluldovn, llo 80386 may sorvico IIRIQ (procossor oxlonsion
roquosl) or HOID roquosls. Ior furllor informalion on IIRIQ and HOID, ro-
for lo llo claplors onlilIod Numoric Coprocossor and Dirocl Momory Ac-
coss (DMA) rospoclivoIy.

-


Iillor NMI (non-masIabIo inlorrupl roquosl) or RISIT viII forco llo 80386 oul
of oillor a laIl or a sluldovn. If inlorrupls aro onabIod, an INTR (masIabIo in-
lorrupl roquosl) viII aIso forco llo microprocossor oul of a laIl (bul nol oul of
sluldovn). Ior informalion on inlorrupls, rofor lo llo claplor onlilIod Tlo In-
lorrupl Subsyslom.









---
- ---- ---
- - - -
- -

- -


-


---- - --
-- --- -
-- - ---






-
Iarl 1 of llo booI providod a dolaiIod doscriplion of microprocossor communi-
calions and llo IornoI supporl Iogic.
-
Many momory dosigns can bo found in ISA sysloms. Tloso dosigns aro basod
on lvo broad cIassificalions of momory dovicos: dynamic RAM and slalic
RAM. Tlo primary omplasis of any momory dosign rovoIvos around porform-
anco and cosl, bul ollor faclors sucl as plysicaI spaco avaiIabIo, povor con-
sumplion, and oxlornaI supporl circuilry pIay imporlanl roIos in dolormining
llo dosign of a RAM subsyslom. Tlis claplor dolaiIs llo mosl commonIy found
momory lypos and momory impIomonlalions.

Claplor 14 oxpIains llo concopl of caclo momory.

Dynamic RAM (DRAM) momory is llo mosl commonIy usod RAM dovico in
ICs duo lo ils Iovor cosl vlon comparod lo slalic RAM, or SRAM. Tlougl ils
cosl is Ioss llan SRAM, DRAM clips aro mucl sIovor. Many innovalions lavo
occurrod in DRAM dosigns lo incroaso spood. As a rosuIl, mucl of llis claplor
focusos on llo various lypos of DRAM and associalod subsyslom dosign.

A DRAM momory clip conlains many slorago Iocalions. Doponding on llo
manufacluror and llo clip lypo, a DRAM momory clip may conlain 64K,
256K, 1M, 4M, or moro slorago Iocalions. InlornaIIy, llo slorago Iocalions aro
Iaid oul in rovs and coIumns.

As il is vill any ollor dovico in llo syslom, DRAM is accossod by llo curronl
bus maslor. Tlo curronl bus maslor is llo dovico llal curronlIy ovns llo ad-

-

dross, dala and conlroI busos. Il is llo dovico llal runs llo bus cycIo llal is cur-
ronlIy undor vay and il broadcasls llo addross. Il may bo llo syslom micro-
procossor, ono of llo DMA conlroIIors or a 16-bil bus maslor pIuggod inlo llo
ISA bus. In ordor lo idonlify llo spocific Iocalion llal llo curronl bus maslor
vanls lo communicalo vill, llo DRAM clip musl rocoivo llo addross in lvo
slops:

llo rov addross
llo coIumn addross

DRAM musl aIvays bo addrossod in llal ordor: rov, llon coIumn. Tlo inlor-
soclion of llo rov and coIumn dofinos llo oxacl Iocalion llo curronl bus maslor
vanls lo communicalo vill. Tlo slalo of llo DRAM's road/vrilo pin, ligl or
Iov, dofinos llo lypo of momory oporalion. Tlo dala bus is connoclod lo llo
DRAM clip so llal llo dala can bo lransforrod from llo DRAM clip lo llo cur-
ronl bus maslor during a road or from llo curronl bus maslor lo llo DRAM
clip during a vrilo.
--
Tlo foIIoving paragrapls doscribo llo oxacl soquonco of ovonls llal musl oc-
cur vlon addrossing a DRAM momory Iocalion. Rofor lo figuro 13-1.

1. Iirsl, llo rov addross musl bo roulod lo llo DRAM's addross pins on llo
momory addross bus.
2. Tlo RAS (rov addross slrobo) Iino musl llon bo assorlod by llo DRAM
addrossing Iogic. Tlis causos llo rov addross prosonl on llo DRAM's ad-
dross inpuls lo bo Ialclod inlo llo rov Ialcl insido llo DRAM. Tlo
DRAM's rov addross docodor bogins lo docodo llo Ialclod rov addross,
soIocling ono rov Iino lo bo aclivalod.
3. Tlo DRAM addrossing Iogic llon doIays a fixod amounl of limo boforo giv-
ing llo coIumn addross lo llo DRAM clip. Tlis is caIIod llo RAS/CAS do-
Iay and is doscribod Ialor in llis claplor.
4. Aflor llo RAS/CAS doIay las oIapsod, llo DRAM addrossing Iogic roulos
llo coIumn porlion of llo addross lo llo DRAM's addross inpuls on llo
momory addross bus and assorls CAS (coIumn addross slrobo). Tlis
causos llo coIumn addross lo bo Ialclod inlo llo coIumn addross Ialcl in-
sido llo DRAM clip.
5. Tlo DRAM clip nov las aII llo informalion il noods lo idonlify llo Ioca-
lion llal llo curronl bus maslor is allompling lo communicalo vill. Tlo
DRAM's inlornaI rov addross docodor las aIroady soIoclod llo spocifiod
rov Iino. Tlo DRAM's inlornaI coIumn addross docodor nov soIocls and



aclivalos llo spocifiod coIumn Iino. Tlo poinl al vlicl llo rov and llo coI-
umn Iinos inlorsocl idonlifios llo slorago Iocalion llal llo curronl bus mas-
lor is allompling lo communicalo vill.
6. Tlo slalo of llo DRAM's road/vrilo inpul pin indicalos vlollor llo cur-
ronl bus maslor is allompling lo road llo informalion slorod in llo spoci-
fiod slorago Iocalion or vrilo informalion inlo llal Iocalion.



CAS
RAS
-- -
Column Latch
Column Address Decoder
Row
Latch
Row
Address
Decoder
Data

-

If a road oporalion is in progross, llo conlonls of llo indicalod Iocalion aro
pIacod on llo dala bus by llo DRAM so lloy can bo road by llo curronl bus
maslor. If a vrilo oporalion is in progross, llo informalion llal llo curronl bus
maslor is prosonling on llo dala bus is vrillon inlo llo spocifiod slorago Ioca-
lion, compIoling llo bus cycIo.
--
Tlo facl llal llo DRAM oxpocls lo soo llo addross prosonlod in lvo slops, rov
and coIumn, prosonls a spociaI probIom. Tlo DRAM oxpocls llo addross in a
form ollor llan llal oulpul by llo curronl bus maslor. Tlis nocossilalos llo in-
cIusion of somo lypo of Iogic lo lransIalo llo addross boing oulpul by llo cur-
ronl bus maslor inlo a rov and coIumn addross. Tlis addross lransIalion Iogic
is commonIy roforrod lo as llo DRAM addrossing Iogic.

Bus maslors aIvays oulpul 24- (llo 80286 and 80386SX microprocossors) or 32-
bil (llo 80386DX, 80486 and Ionlium microprocossors) addrossos onlo llo ad-
dross Bus. Irom llo DRAM addrossing Iogic's porspoclivo, llo addross is
lroalod as llroo pacIols of informalion. Rofor lo figuro 13-2.

Tlo uppor-mosl bils on llo addross bus aro usod by llo DRAM addross do-
codor lo dolormino if llo addross curronlIy on llo bus is villin llo addross
rango assignod lo llo DRAM.
Tlo Iovor porlion of llo addross is dividod inlo lvo pacIols of oquaI sizo:
Tlo rov addross
Tlo coIumn addross





-- - -
--
As slalod oarIior, llo slops invoIvod in addrossing DRAM musl occur in an ox-
acl soquonco and al spocifiod inlorvaIs. A spociaI limor dovico is incIudod in llo
DRAM addrossing Iogic, soquoncing llo aclions of llo DRAM addrossing Iogic
al llo propor inlorvaIs. Tlis limor is usuaIIy impIomonlod using a limo doIay
dovico.

Tlo limo doIay dovico las ono inpul caIIod a lriggor and a sorios of oulpuls.
Onco lriggorod by an assorlod IovoI on ils lriggor inpul, llo limo doIay dovico
assorls oacl of ils oulpuls al prociso inlorvaIs. As an oxampIo, llo limo doIay
dovico slovn in figuro 13-3 las a lon nanosocond (10ns) rosoIulion. 10ns aflor il
is lriggorod, ils firsl oulpul is assorlod, 10ns Ialor llo socond oulpul is assorlod,
olc. By lapping off soIoclod oulpuls of llo limo doIay dovico, llo dosignor can
clooso llo oxacl momonl in limo (roIalivo lo llo lriggor poinl) for a spocific
ovonl lo occur.
To DRAM Address Decoder
Row Address
Column Address
A23
A22
A21
A20
A19
A18
A17
A16
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
Current
Bus Master

-




Tlo major compononls of llo DRAM addrossing Iogic aro:

llo DRAM addross docodor
llo limo doIay
llo DRAM addrossing muIlipIoxor, or MUX
llo RAS/CAS gonoralion Iogic

Rofor lo figuro 13-4. Tlo DRAM addross muIlipIoxor (MUX) las lvo sols of in-
puls and ono sol of oulpuls. Il las onIy ono conlroI Iino, caIIod a soIocl Iino, llal
conlroIs ils funclion, and llis Iino can bo sol oillor ligl or Iov. A Iov soIocls
llo A sol of inpuls lo bo galod llrougl lo llo MUX's oulpuls. Wlon llo so-
Iocl Iino is ligl, llo B sol of inpuls is soIoclod and galod llrougl lo llo
MUX's oulpuls. In ollor vords, a MUX is nolling moro llan a svilcl, in llis
caso a lvo posilion svilcl, llal can soIocl ono of lvo groups of inpul signaIs lo
galo llrougl lo ils oulpul Iinos.

Tlo uppor-mosl bils on llo addross bus aro connoclod lo llo DRAM addross
docodor so il can dolormino if llo addross curronlIy on llo bus faIIs villin
lloso assignod lo llis DRAM.
0ns
10ns
20ns
30ns
40ns
50ns
60ns
70ns
80ns
90ns
Trigger
lnput
Time
Delay
Device
chip-select from
DRAM address
decoder





--

Tlo Iovor bils on llo addross bus aro connoclod lo llo lvo sols of inpuls on llo
DRAM addross muIlipIoxor. Ono laIf of lloso bils aro connoclod lo llo MUX's
A sol of inpuls, and llo ollor laIf lo ils B sol of inpuls. IniliaIIy, llo soIocl
Iino on llo MUX is sol lo zoro, soIocling llo A sol of inpuls lo bo galod
llrougl lo llo MUX's oulpuls. Tlo oulpuls of llo MUX aro connoclod lo llo
momory addross bus, vlicl is allaclod lo llo addross inpuls of llo DRAM.
Current
Bus
Master
DRAM
Address
Decoder
DRAM
Address
MUX
Time
Delay
Device
Select
Chip
Select
RAS
CAS
D7
D6
D5
D4
D3
D2
D1
D0
DRAM
Memory
Bank
Portion of
DRAM Controller

-

- --
Tlo foIIoving paragrapls doscribo llo soquonco of ovonls during llo addross-
ing of a DRAM momory Iocalion. Rofor lo llo bIocI diagram in figuro 13-4 and
llo liming diagram iIIuslralod in figuro 13-5.

1. -- . Al llo boginning of llo bus cycIo, llo curronl bus
maslor pIacos llo addross on llo addross bus, and llo bus cycIo dofinilion
on llo bus cycIo dofinilion Iinos. Tlo DRAM addross docodor dolorminos
llal il is a momory addross by llo ligl on llo M/IO Iino, and docodos llo
uppor-mosl bils on llo addross bus lo dolormino if llo addross is villin llo
rango of addrossos assignod lo llo DRAM. If il is, llo DRAM addross do-
codor's clip-soIocl oulpul is assorlod, providing a lriggor lo llo limo doIay
dovico.
2. Tlo --. Wlon iniliaIIy lriggorod, llo limo doIay oulpuls aro aII
doassorlod, causing llo MUX's soIocl inpul lo bo sol Iov. Tlis soIocls llo
MUX's A sol of inpuls, addross bils A|19:10], lo bo galod onlo llo mom-
ory addross bus. Tlis porlion of llo addross providos llo rov addross lo
llo DRAM momory.
3. -- - (RAS). In llo oxampIo DRAM addrossing Iogic (fig-
uro 13-4), 10ns is aIIovod lo pormil llo rov addross lo sollIo on llo mom-
ory addross bus prior lo Ialcling il inlo llo DRAM clips. 10ns aflor llo
limo doIay vas lriggorod by llo clip-soIocl, llo firsl oulpul of llo limo do-
Iay is assorlod (ligl), causing RAS (rov addross slrobo) lo bo assorlod.
Tlo ligl-lo-Iov lransilion on llo RAS Iino causos llo DRAM's inlornaI
rov addross Ialcl lo Ialcl llo rov addross prosonlod lo il on llo momory
addross bus.
4. . Ior corrocl oporalion, llo dosignor musl doIay a DRAM-
spocific amounl of limo prior lo prosonling llo coIumn addross lo llo
DRAM clips. If llo coIumn addross is prosonlod loo soon, llo DRAM clips
viII nol funclion corroclIy. Tlis doIay bolvoon llo prosonlalion of llo rov
addross and llo prosonlalion of llo coIumn addross is Inovn as llo
RAS/CAS doIay. Tlo oxacl duralion of llo doIay is spocific lo llo lypo of
DRAM clips boing usod.
5. Tlo --. In llo oxampIo DRAM addrossing Iogic, 30 nanosoc-
onds aflor llo lriggor, llo limo doIay's socond oulpul is assorlod, solling llo
MUX's soIocl Iino lo a ono. Tlis soIocls llo MUX's B sol of inpuls, A|9:0],
lo bo galod onlo llo momory addross bus. Tlis porlion of llo addross pro-
vidos llo coIumn addross lo llo DRAM momory.
6. -- - (CAS). In llo oxampIo Iogic, 10ns is aIIovod lo
pass lo aIIov llo coIumn addross lo sollIo on llo momory addross bus prior
lo Ialcling il inlo llo DRAM clip. 10ns Ialor, llo limo doIay's llird oulpul



is assorlod, causing CAS (coIumn addross slrobo) lo bo assorlod (Iov). Tlo
ligl-lo-Iov lransilion on CAS causos llo DRAM clip's inlornaI coIumn
addross Ialcl lo Ialcl llo coIumn addross boing prosonlod lo il on llo
momory addross bus.
7. ` InlornaIIy, llo DRAM clip las nov Ialclod llo rov and
coIumn addrossos and aclivalos ono rov and ono coIumn Iino. Tlo poinl al
vlicl lloy inlorsocl dofinos llo Iocalion llo curronl bus maslor is allompl-
ing lo accoss. Tlo DRAM addrossing Iogic usos llo S0 and S1 (80286-
spocific Iinos, W/R if an 80386, 80486 or Ionlium procossor-basod syslom)
bus cycIo dofinilion Iinos (or signaIs dorivod from llom) lo dolormino if a
road or vrilo oporalion is in progross. Tlo road/vrilo conlroI inpul of llo
DRAM clip is sol accordingIy.
8. Tlo -. Assuming a road oporalion is in progross, llo conlonls of
llo addrossod DRAM slorago Iocalion aro pIacod on llo dala bus so lloy
may bo road by llo curronl bus maslor. If a vrilo oporalion, llo dala sonl lo
llo DRAM by llo curronl bus maslor is vrillon inlo llo addrossod slorago
Iocalion.

--
RAS
CAS
Memory
Address
Bus
Row Address Column Address
SELECT
R/W
Data
Bus
8
2
3
4
6
5
7
Access Time

-

-
A lypicaI DRAM Iocalion can onIy sloro ono bil of informalion, a ono or a zoro.
Tlis ono-bil slorago Iocalion is roforrod lo as a bil coII and consisls of a capaci-
lor and a lransislor. As an oxampIo, an oIoclricaI clargo is pIacod on llo capaci-
lor lo sloro a ono, vliIo llo capacilor is disclargod lo sloro a zoro in llo
Iocalion.

Tlo mosl imporlanl oporalionaI claraclorislic of a capacilor is ils londoncy lo
Ioso a clargo, or drain, ovor a poriod of limo. Tlo disclargo limo is roIalod
parlIy lo llo sizo of llo capacilor. Tlo capacilors in DRAM coIIs aro quilo smaII.
Tloy lavo a capacily of around 100 fomlofarads, or 10
-14
I. Wlon a bil is slorod
in a DRAM bil coII by pIacing a clargo on ils capacilor, lloroforo, llo capacilor
disclargos in a roIalivoIy slorl poriod of limo and Iosos llo bil slorod in il. Tlis
vouId appoar lo bo a liglIy inofficionl form of slorago.
-
To onsuro llal informalion slorod in DRAM momory isn'l Iosl, llo bil coIIs con-
laining clargos musl bo poriodicaIIy roclargod lo a good IovoI. Tlo procoss of
rojuvonaling DRAM Iocalions vill informalion slorod in llom is Inovn as ro-
frosling llo DRAM. DRAM momory is caIIod dynamic bocauso il musl bo
rofroslod on a dynamic, ongoing basis or il viII Ioso llo informalion slorod in
il.

Slorago Iocalions villin a rov in a lypicaI DRAM clip aro rofroslod by acliva-
lion of llo rov Iino. Wlon a rov Iino is aclivalod vill llo DRAM's road/vrilo
pin in llo road slalo, ovory bil coII (ovory slorago Iocalion) llal conlains a
clargo aIong llo rov is aulomalicaIIy roclargod up lo a good IovoI. In ollor
vords, il is rofroslod.

Sinco a rov Iino is aclivalod vlonovor any Iocalion aIong llo rov is addrossod,
ono vay lo rofrosl DRAM momory vouId bo lo croalo a program llal roads
from ono DRAM Iocalion villin oacl rov on an on-going basis. Tlis vouId
causo llo aclivalion of ovory rov Iino villin ovory DRAM clip and lloroforo
rofrosl ovory Iocalion. Tlis mollod for rofrosling DRAM isn'l foasibIo bocauso
llo microprocossor vouId bo liod up rofrosling DRAM momory aII of llo limo
and vouId nol lavo any limo Iofl ovor lo do any usofuI vorI.
- -



DRAM rofrosl is acluaIIy landIod by Iogic soparalo from llo microprocossor
Inovn as llo rofrosl Iogic. In ISA maclinos, llo rofrosl Iogic consisls mainIy of
a rofrosl rov counlor and limor 1, llo rofrosl limor. Rofor lo figuro 13-6.
Wlon llo syslom is firsl povorod up, llo syslom's RISIT signaI is assorlod un-
liI llo povor las como up and slabiIizod. Tlo assorlod IovoI on rosol causos llo
rofrosl rov counlor lo bo prosol lo a counl of zoro (rov zoro). Timor 1, llo ro-
frosl limor, is dosignod lo assorl RIIRISH TRIGGIR onco ovory 15 microsoc-
onds.

Wlon llo povor las slabiIizod and RISIT bocomos doassorlod, llo syslom bo-
gins lo run, moaning llo microprocossor bogins lo folcl and oxoculo inslruc-
lions. Iifloon microsoconds aflor llo syslom bogins lo run, llo rofrosl limor
assorls llo RIIRISH TRIGGIR signaI.

In ordor lo rofrosl a rov of DRAM momory, llo rofrosl Iogic musl sond a rov
addross lo llo DRAM and sol llo DRAM's road/vrilo conlroI Iino lo llo road
slalo. To do llis, llo rofrosl Iogic musl run a spociaI momory road bus cycIo. In
ollor vords, llo rofrosl Iogic musl bocomo bus maslor boforo running llo ro-
frosl bus cycIo. Tlo numborod Iisl llal foIIovs figuro 13 - 6 doscribos llo so-
quonco of ovonls invoIvod in DRAM rofrosl.

-


-

1. Tlo rofrosl limor sonds a RIIRISH TRIGGIR lo llo rofrosl Iogic on llo
syslom board.
2. Tlo rofrosl Iogic sonds a HoId Roquosl (HOID) lo llo microprocossor lo
roquosl llo busos and avails HIDA from llo CIU.
3. Tlo rofrosl Iogic assorls llo ISA bus cycIo dofinilion Iino MRDC lo indi-
calo llal a momory road bus cycIo is in progross.
Refresh
Timer
Refresh
Logic
Micro-
processor
Row
Counter
Refresh
Trigger
HOLD
HLDA
MRDC
REFRESH
RESET

--
To system board
RAM and lSA
RAM boards
66.4KHz



4. Tlo rofrosl rov counlor oulpuls ils curronl rov numbor (iniliaIIy, rov
zoro) onlo llo Iovor porlion of llo addross bus. Al llo samo limo, llo rov
counlor is inlornaIIy incromonlod by ono (lo rov ono).
5. Tlo ISA RIIRISH signaI informs ovory momory card in llo syslom llal a
rofrosl bus cycIo is in progross. ConsoquonlIy, on ovory momory card, llo
rov addross from llo rofrosl rov counlor is appIiod lo llo A sol of in-
puls of llo card's DRAM Addross MUX. Tlo rov addross, curronlIy rov
zoro, is galod llrougl ovory momory card's MUX onlo ils momory addross
bus. Tlo card's DRAM addrossing Iogic llon assorls RAS lo Ialcl llo rov
addross inlo ovory DRAM clip in llo syslom simuIlanoousIy.
6. Sinco llo ISA bus is indicaling a momory road bus cycIo is in progross, llo
road/vrilo pin on ovory DRAM clip viII bo sol lo llo road slalo.
7. Tlis sol of aclions causos llo oxacl samo rov Iino (iniliaIIy, rov zoro)
villin ovory DRAM clip in llo syslom lo bo aclivalod al llo samo limo,
lloroby rofrosling ovory Iocalion aIong llal rov in ovory DRAM clip.
8. Aflor compIolion of llo rofrosl bus cycIo, llo rofrosl Iogic rolurns bus
ovnorslip lo llo syslom board microprocossor by doassorling HOID.
9. Tlo microprocossor roconnocls ilsoIf lo llo busos and doassorls HIDA lo
indicalo llal il is bus maslor again. NormaI oporalion (program oxoculion)
llon rosumos and conlinuos unliI anollor fifloon microsoconds las oIapsod.
Al llal limo, llo rofrosl limor assorls RIIRISH TRIGGIR again lo roquosl
anollor rofrosl bus cycIo.
10. Wlon llo rofrosl Iogic las onco again boon granlod bus maslorslip, il
again oulpuls llo conlonls of llo rofrosl rov counlor (incromonlod by ono
during llo provious rofrosl bus cycIo) onlo llo porlion of llo addross bus
llal suppIios llo rov addross lo llo DRAMs.

In llis vay, llo noxl soquonliaI rov in ovory DRAM clip in llo syslom is ro-
froslod. Tlis aclion conlinuos onco ovory fifloon microsoconds as Iong as llo
syslom is povorod on. Wlon llo Iasl rov villin llo DRAM clips las boon ro-
froslod, llo rov counlor roIIs ovor lo aII zoros again and llo procoss slarls ovor
al llo firsl rov in llo DRAM clips.

Tlo aclions doscribod oarIior in slop 5 aro for vlals caIIod RAS-onIy rofrosl.
Tloro aro llroo ollor vays llal llo DRAM addrossing Iogic can landIo a ro-
frosl bus cycIo: CAS-boforo-RAS rofrosl, liddon rofrosl and soIf rofrosl.

-

-
A DRAM clip capabIo of doing CAS-boforo-RAS rofrosl (CBR rofrosl) las an
inlornaI rofrosl rov counlor, so il doos nol nood lo rocoivo a rov addross from
llo rofrosl Iogic. To rofrosl a CBR rofroslod DRAM, llo DRAM conlroIIor as-
sorls CAS firsl, llon RAS, villoul rogard lo llo rov or coIumn addross on
llo momory addross bus. Tlo DRAM clip rosponds by rofrosling llo rov
poinlod lo by ils inlornaI rofrosl rov counlor and llon incromonling llal rov
counlor.
-
Hiddon rofrosl is jusl a varialion of CBR rofrosl. NormaIIy, an accoss lo a
DRAM clip is lorminalod by doassorling boll RAS and CAS. Wlon CAS is
doassorlod al llo ond of a road cycIo, llo DRAM clip slops driving llo dala oul
on ils dala pin. Hovovor, if CAS is Iofl assorlod vlon RAS is doassorlod al
llo ond of llo accoss, llon a DRAM clip capabIo of liddon rofrosl viII gol
roady lo rofrosl llo rov poinlod lo by ils rofrosl rov counlor. Tlo DRAM clip
viII acluaIIy do llo rofrosl if RAS bocomos assorlod again vliIo CAS is sliII
assorlod. SimuIlanoousIy, llo DRAM clip viII conlinuo lo drivo llo dala from
llo proviousIy accossod bil coII onlo llo dala bus, as Iong as CAS romains as-
sorlod. Tlo DRAM is llus providing dala and doing rofrosl simuIlanoousIy,
llus llo rofrosl appoars lo bo liddon.
-
Iacl of llo procoding lypos of rofrosl roquiros inlorvonlion by llo syslom
board lo loII llo DRAM clip lo do llo rofrosl. SoIf-rofrosling DRAMs aro dif-
foronl. Tloy lavo llo abiIily lo do rofroslos basod on lloir inlornaI rofrosl rov
counlors and basod on lloir ovn inlornaI rofrosl limor, villoul vailing for a
signaI from llo syslom board. SoIf-rofrosling DRAMs aro usod in Iiou of slalic
RAM for Iov povor, ballory-bacIod slorago.

To undorsland soIf-rofrosling DRAM, il may loIp lo undorsland vlal llo aI-
lornalivos aro for ballory-bacIod slorago. Oflon, SRAM or a varialion of ROM
caIIod non-voIaliIo RAM (NVRAM) aro usod lo sloro crilicaI dala immodialoIy
during a povor faiIuro. SRAM is voII suilod lo llis lasI duo lo ils infinilosi-
maIIy smaII curronl drain vlon il is nol boing accossod. Tlo conlonls of llo
SRAM can bo mainlainod by a smaII ballory. NVRAM roquiros no povor al aII
lo mainlain ils conlonls sinco il is acluaIIy SRAM and IIIROM pul logollor
(IIIROM is doscribod in llo claplor onlilIod ROM Momory). Noillor llo
SRAM nor llo NVRAM nood lo bo rofroslod, so no Iogic las lo bo running on



llo syslom board lo mainlain llo SRAM or NVRAM conlonls vliIo llo main
povor suppIy is off.

Slandard DRAM roquiros rofrosl Iogic lo bo running, and il is llus nol as voII
suilod for ballory-bacIod appIicalions as SRAM duo lo llis compIoxily and duo
lo llo povor drain causod by llo slandard rofrosl Iogic. SoIf-rofrosling DRAM
oIiminalos llis compIoxily and is llus compolilivo vill SRAM for ballory-
bacIod uso.

SoIf-rofrosling DRAM inilialos ils rofrosl oporalion vlon il soos CAS assorlod
foIIovod by RAS, jusl as vill a CBR-rofrosl DRAM. If CAS and RAS boll
romain assorlod for a Iong limo (IiIo a dogs Iifo, a Iong limo is roIalivo), lypi-
caIIy 100 microsoconds (forovor in compulor limo), llon llo DRAMs inlornaI
limor laIos ovor and bogins soIf-rofrosl. Tlo soIf-rofrosling DRAM conlinuos
lo rofrosl ilsoIf unliI il soos RAS and CAS doassorlod.

As nolod abovo, RAS-onIy rofrosl, CBR-rofrosl and liddon rofrosl roquiro a
RIIRISH TRIGGIR from llo syslom board. In an ISA syslom, limor 1 pro-
vidos llal lriggor. Tlo rofrosl inlorvaI of limor 1 is programmabIo, aIIoving a
programmor lo clango llo rofrosl inlorvaI lo somolling ollor llan fifloon mi-
crosoconds. Tlis praclico is dangorous, lovovor, bocauso aIloralion of llo ro-
frosl inlorvaI raisos llo possibiIily llal somo DRAM momory Iocalions viII
lavo onliroIy disclargod by llo limo llo rofrosl Iogic gols around lo rofrosling
lloir rospoclivo rovs again. In ollor vords, dala in DRAM momory may bo
Iosl.

Il slouId bo nolod llal a rofrosl bus cycIo may aIso bo lriggorod by an ISA bus
maslor. In llo ovonl llal an ISA bus maslor las conlroI of llo busos for a poriod
Iongor llan 15 microsoconds, il can lriggor a rofrosl cycIo by assorling llo RI-
IRISH signaI. Wlon llo rofrosl conlroIIor dolocls llal llo RIIRISH signaI
is assorlod, il viII run a rofrosl cycIo. During llo rofrosl cycIo llo ISA bus mas-
lor viII nol uso llo busos. Soo llo claplor onlilIod ISA Bus Maslors for moro
dolaiIs.

-

-
Wlon a DRAM Iocalion is road, llo DRAM musl lavo somo vay of dolormin-
ing if llo Iocalion conlains a clargo (if il conlains a ono or a zoro). Tlo onIy vay
il can ascorlain llo prosonco of a clargo is lo disclargo llo bil coII. In ollor
vords, DRAM clips uso a doslruclivo road procoss. Il musl disclargo llo ca-
pacilor usod lo sloro a bil in ordor lo dolormino if lloro vas in facl a bil slorod
in llal Iocalion. A slorago dovico llal can onIy bo road ono limo vouId bo uso-
Ioss.

Ivory DRAM clip conlains Iogic llal roclargos a DRAM Iocalion bacI lo a
good IovoI aflor llo doslruclivo road laIos pIaco. Tlo Iocalion is onIy roclargod
if il is dolorminod llal il originaIIy loId a clargo. Il laIos an approciabIo
amounl of limo lo roclargo a DRAM Iocalion bacI lo a good IovoI again. Tlis
poriod of limo is Inovn as llo pro-clargo doIay.

Rofor lo figuro 13-7. Tlis liming diagram iIIuslralos llo pro-clargo doIay im-
modialoIy foIIoving llo accoss limo. If a bus maslor allompls lo road dala from
any momory Iocalion during llo pro-clargo poriod, llo dala rocoivod may vory
voII bo garbago (bocauso llo DRAM Iogic is liod up roclarging llo rov Iasl
road from).

To onsuro llal llo dala road from llo DRAM is good dala, llo lardvaro
slouId nol aIIov a bus maslor lo accoss llo DRAM again unliI llo pro-clargo
doIay las oIapsod. Tlo bus maslor can bo loId off by Iooping ils RIADY Iino
doassorlod unliI boll llo accoss limo and pro-clargo doIay las oIapsod. Wlon
RIADY is llon assorlod, llo bus maslor is aIIovod lo compIolo llo firsl lrans-
for and can immodialoIy and safoIy inilialo a subsoquonl lransfor.

Wlon a DRAM clip manufacluror spocifios llo accoss limo on a DRAM (for
oxampIo, 60ns, 70ns, 80ns or 100ns accoss limo), il doosn'l painl an onliroIy ac-
curalo picluro. AIllougl llo firsl accoss lo a 60ns DRAM clip can bo safoIy ac-
compIislod in 60ns, llo lardvaro musl doIay inilialion of a subsoquonl accoss
unliI llo DRAM's pro-clargo doIay las oIapsod. Sinco llo pro-clargo doIay is
lypicaIIy oquaI lo llo accoss limo for llo DRAM, llo accoss limo slouId bo
doubIod lo ascorlain lov oflon llo DRAM clip may bo safoIy accossod. As an
oxampIo, a DRAM clip vill a ralod accoss limo of 60ns couId onIy bo accossod
safoIy onco ovory 120ns (60ns accoss limo + 60ns pro-clargo doIay). Tlo ovoraII
poriod of limo consisling of llo accoss limo and llo pro-clargo doIay is Inovn
as llo cycIo limo, and llis faclor slouId bo considorod vlon dosigning a mom-
ory syslom using DRAM clips.







Rofor lo figuro 13-8, llo DRAM banI. Tlo lypicaI DRAM clip usod in porsonaI
compulors sloros ono bil of informalion por Iocalion. Sinco llo curronl bus mas-
lor oxpocls lo bo abIo lo road or vrilo al Ioasl ono bylo of informalion al a limo,
llo abiIily lo sloro and rolriovo ono bil por Iocalion appoars roIalivoIy usoIoss.

To croalo a usabIo dosign, llo onginoor combinos a sorios of oigll DRAM clips
so llal, laIon coIIoclivoIy, lloy can sloro ono bylo of informalion por Iocalion.
Tlis is roforrod lo as a banI of DRAM. Tlo dosignor connocls llo momory ad-
dross bus in paraIIoI lo aII oigll DRAM clips. Tlo RAS and CAS Iinos aro
RAS/CAS Delay
Access Time Precharge Delay
Cycle Time
RAS
CAS
Memory
Address
Bus
Row Address Column Address
Row Address
SELECT
R/W
Data
Bus
Read
Data

-

aIso connoclod lo aII oigll DRAM clips, as voII as llo road/vrilo conlroI Iino.
Tlis givo llo bus maslor llo abiIily lo addross llo oxacl samo Iocalion in aII
oigll DRAM clips simuIlanoousIy.

Tlo dosignor connocls oacl individuaI dala bus Iino lo llo dala inpul/oulpul
pin on a soparalo DRAM clip villin llo banI of DRAM.

Wlon llo bus maslor porforms a momory vrilo oporalion and pIacos llo ad-
dross on llo addross bus, llo DRAM addrossing Iogic porforms llo nocossary
broaIdovn of llo addross inlo llo rov and coIumn addrossos and soIocls llo
oxacl samo rov and coIumn villin oacl of llo oigll DRAM clips villin llo
banI. Tlo road/vrilo pin on llo DRAM clips is sol lo llo vrilo slalo and oacl
of llo oigll dala bils llal maIo up llo bylo lo bo vrillon inlo llo momory Ioca-
lion is prosonlod lo ils rospoclivo DRAM clip villin llo banI. Tlo oigll dala
bils aro llon vrillon inlo oxaclIy llo samo Iocalion villin llo oigll individuaI
DRAM clips.

Wlon llo bus maslor porforms a momory road oporalion lo road a bylo of in-
formalion from DRAM, il simuIlanoousIy addrossos procisoIy llo samo rov
and coIumn Iocalion villin oacl of llo oigll DRAM clips. Tlo bil slorod in
llal Iocalion villin oacl of llo oigll DRAM clips is drivon oul onlo llo ro-
spoclivo dala bus Iino by llo individuaI DRAM clip. Irom llo bus maslor's
porspoclivo, il's communicaling vill DRAM momory llal can sloro ono bylo of
informalion por Iocalion.












Tlo originaI IBM IC and IC/XT voro basod on llo InloI 8088 microprocossor,
vlicl lad an 8-bil dala bus. A banI of DRAM in lloso maclinos consislod of
oigll DRAM clips pIus a parily bil (parily is discussod Ialor in llis claplor).

Rofor lo figuro 13-9. Tlo IBM IC/AT (or any IC basod on llo 80286 or 80386SX
microprocossors) las a 16-bil dala bus, so a banI of DRAM consisls of 16
DRAM clips, dividod inlo lvo laIvos. AII ovon-addrossod Iocalions aro Iocalod
in llo Iovor laIf (connoclod lo llo Iovor dala pall, D|7:0]), vliIo aII odd-
addrossod Iocalions aro in llo uppor laIf (connoclod lo llo uppor dala pall,
D|15:8]). Iacl laIf consisls of oigll dala DRAMs and a parily DRAM.

RAS
CAS
D7
D6
D5
D4
D3
D2
D1
D0
DRAM
Memory
Bank
R/W

-




Rofor lo figuro 13-10. Sysloms basod on llo 80386DX or 80486 microprocossor
lavo a 32-bil dala bus, so oacl banI of DRAM consisls of llirly-lvo dala
DRAM clips, pIus four parily DRAMs.

In ollor vords, a banI of DRAM is sizod lo malcl llo vidll of llo dala bus so
llo microprocossor can lransfor llo maximum amounl of informalion por bus
cycIo.
D15
D7
D14
D6
D13
D5
D12
D4
D11
D3
D10
D2
D9
D1
D8
D0
Lower half of DRAM bank
Upper half of DRAM bank
RAS UPPER
CAS UPPER
R/W
RAS LOWER
CAS LOWER
Parity Upper
Parity Lower
-- -





D15
D31
D7
D23
D14
D30
D6
D22
D13
D29
D5
D21
D12
D28
D4
D20
D11
D27
D3
D19
D10
D26
D2
D18
D9
D25
D1
D17
D8
D24
D0
D16
RAS 1
RAS 3
CAS 1
CAS 3
R/W
RAS 0
RAS 2
CAS 0
CAS 2
Parity 1
Parity 3
Parity 0
Parity 2
-- -

-


Tlo liny capacilors usod lo sloro dala in DRAM aro suscoplibIo lo sofl orrors.
Sofl orrors aro dala bils llal voro iniliaIIy slorod corroclIy bul vlicl lavo sub-
soquonlIy Iosl lloir clargo duo lo oIoclricaI and cosmic inlorforonco or duo lo
impropor rofrosl. Ils possibIo for llo bus maslor lo road incorrocl dala or in-
slruclions from DRAM llal las sufforod a sofl orror. If llis lappons, llo bus
maslor may oxoculo llo vrong inslruclion or maIo a bad docision on dala
villoul roaIizing llal an orror las occurrod.

CrosslaII and noiso on llo dala bus can causo dala llal vas slorod and ro-
lriovod corroclIy by llo DRAM clip lo bocomo garbIod bolvoon llo DRAM
clip and llo bus maslor. Tlis isnl nocossariIy llo fauIl of llo DRAM clip. As il
is vill sofl orrors, llo bus maslor may oxoculo llo vrong inslruclion or maIo a
bad docision on dala.

Iarily momory and orror-clocIing-and-corrocling momory aro lvo approaclos
lo soIving lloso probIoms.

Tlo DRAM momory subsyslom usod in mosl ISA producls incorporalos parily
gonoralion and clocIing Iogic. Considor llo DRAM banI piclurod in figuro
13-11. Tlis banI of DRAM consisls of oigll DRAM clips and an addilionaI,
ninll DRAM clip roforrod lo as llo parily DRAM. AII of llo addross Iinos, as
voII as llo RAS and CAS Iinos and llo road/vrilo conlroI Iino aro connoclod
in paraIIoI lo aII nino DRAM clips. Tlo oigll dala Iinos aro connoclod lo llo
oigll dala DRAM clips. Tlo dala bus is nol onIy connoclod lo llo dala DRAM
clips, bul aIso lo llo parily gonoralor/clocIor clip.

Wlon llo bus maslor vrilos a bylo of informalion lo llo DRAM clips, il is pro-
sonlod lo llo DRAM clips and lo llo parily gonoralor/clocIor. During a mom-
ory vrilo oporalion, parily is gonoralod and vrillon inlo llo parily DRAM clip.
Iarily is nol clocIod for corroclnoss during momory vrilo oporalions, onIy
during momory roads (as doscribod furllor on).

Wlon llo dala bylo is prosonlod lo llo parily gonoralor/clocIor clip during a
vrilo oporalion, il clocIs llo numbor of ono bils in llo dala bylo. If llo parily
gonoralor is using ovon parily and llo numbor of ono bils in llo dala bylo is
ovon, llon llo parily gonoralor pIacos a zoro on llo IARITY Iino going lo llo
parily DRAM clip. Tlo parily bil and llo dala bylo aro simuIlanoousIy vrillon



inlo llo samo addross villin llo parily DRAM and llo dala DRAM. Tlal
moans llal a lolaI of nino bils of informalion is vrillon inlo llo addrossod
momory Iocalion during a vrilo oporalion.

If llo parily gonoralor is using ovon parily and il lad nol doloclod an ovon
numbor of ono bils in llo dala bylo boing vrillon lo llo dala DRAM, il vouId
pIaco a ono on llo IARITY Iino lo llo parily DRAM. Tlo lolaI numbor of ono
bils in llo 9-bil pallorn vrillon inlo llo addrossod momory Iocalion is lloroforo
aIvays an ovon numbor of ono bils. In ollor vords, llo parily gonoralor's job is
lo forco llo 9-bil pallorn vrillon inlo momory lo aIvays consisl of an ovon
numbor of ono bils.

Wlon llo dala is Ialor road bacI from momory, llo nino bils of informalion aro
drivon oul onlo llo dala bus and llo parily Iino by llo dala and parily DRAMs.
Tlo dala bylo is sonl bacI lo llo bus maslor ovor llo dala bus and is aIso pro-
sonlod lo llo parily gonoralor/clocIor, nov acling as a parily clocIor, rallor
llan a parily gonoralor. In addilion lo llo 8-bil dala bylo boing prosonlod lo llo
parily clocIor, llo parily bil is aIso boing prosonlod lo il. Tlo parily clocIor
oxaminos llo 9-bil pallorn and clocIs il lo soo if il conlains an ovon numbor of
ono bils (vlicl il aIvays slouId if ovon parily is boing usod).

If llo 9-bil pallorn doosn'l conlain an ovon numbor of ono bils, an orror las oc-
currod and llo parily clocI Iogic gonoralos a parily orror. Tlo parily orror
causos a non-masIabIo inlorrupl (NMI) roquosl lo llo microprocossor, and llo
microprocossor is forcod lo jump lo llo NMI inlorrupl sorvico roulino. In llis
roulino, llo programmor porforms an I/O road from syslom conlroI B al I/O
addross 0061l lo ascorlain llo causo of llo NMI. If bil 7 is sol lo a 1, a parily
clocI vas oncounlorod vliIo roading from syslom board DRAM momory. Tlo
NMI roulino llon roporls a DRAM parily orror on llo scroon and laIls llo sys-
lom. Tlo parily orror is nol rocovorabIo bocauso llo parily gonoralor/clocIor
canl corrocl llo parily orror. Il onIy Inovs llal ono or moro bils in a bylo aro
bad, bul il canl dolormino vlicl bil is bad. NovorlloIoss, il is bollor for llo
syslom lo laIl boforo furllor (possibIy vorso) damago is dono.

Tlo procoding discussion assumos llal llo parily gonoralor/clocIor is using
ovon parily. If, insload, llo parily gonoralor/clocIor is using odd parily, llon il
viII forco llo 9-bil pallorn vrillon inlo momory lo aIvays consisl of an odd
numbor of ono bils. IiIoviso, on a road bus cycIo, llo parily clocIor oxaminos
llo 9-bil pallorn and clocIs il lo soo if il conlains an odd numbor of ono bils.



-




-

Sinco parily momory sysloms lavo 9 bils for ovory 8-bil bylo of dala, lloy ro-
quiro ono-oiglll or aboul 13 moro momory (and cosl) llan non-parily mom-
ory sysloms. Sinco llo amounl of DRAM in modorn ICs is mucl groalor llan
il vas in llo originaI IC (aboul 100 lo 2,000 limos moro), syslom dosignors
musl considor llo cosl of parily vorsus ils orror calcling bonofil. Modorn
DRAMs prolocl llo capacilors in a somiconduclor voII vlicl dofIocls llo ra-
dialion llal causod sofl orrors in oIdor DRAMs. AIso, improvod board manu-
facluring and compononl landIing loclniquos lavo roducod llo
manufacluring-inducod faiIuro ralos on DRAMs. As a rosuIl, many sysloms do
nol uso parily momory. Bul llon, considor llal ICs aro dopondod on moro
loaviIy loday llan lloy voro ovor a docado ago and lloro is a Iol moro mom-
ory boing usod.
RAS
CAS
D7
D6
D5
D4
D3
D2
D1
D0
DRAM
Memory
Bank
R/W
Parity Bit
Parity Error
(to NMl logic)
Parity
Generator
Checker




On vory ligl-ond ICs sucl as fiIo sorvors for rosorvalion sysloms (mission
crilicaI sysloms), orror doloclion and corroclion is vilaI. Usors of lloso sysloms
do nol vanl llo syslom lo crasl vlon a sofl orror occurs. Tloso sysloms may
lavo lundrods of mogabylos of momory in llom, so llo clancos for a sofl orror
aro groalor llan on a lypicaI IC.

Sinco llo parily gonoralor/clocIor can onIy dolocl orrors and cannol corrocl
llom, llo mission crilicaI sysloms uso orror-clocIing-and-corrocling (ICC)
momory. ICC momory may bo vidor llan 9 bils. Wlon llo bus maslor vrilos
dala lo ICC momory, llo ICC momory conlroIIor oncodos llo bylos boforo
sloring llom. Tloro aro moro bils in llo ICC momory llan lloro aro in llo
originaI dala bylo, so somo of llo possibIo bil pallorns llal couId oxisl in ICC
momory do nol corrospond lo dala bylos. Tloso bil pallorns aro invaIid. If llo
ICC momory conlroIIor subsoquonlIy roads ono of lloso invaIid pallorns from
llo ICC momory, il Inovs llal an orror las occurrod bocauso il did nol vrilo
llal pallorn inlo momory. Tlo ICC momory conlroIIor can llon usuaIIy corrocl
llo orror by finding llo vaIid bil pallorn llal il cIososl lo llo invaIid bil pal-
lorn.
- -
Somo ISA sysloms incorporalo pago modo DRAM in ono of ils various forms.
Tlo foIIoving soclions oxpIain llo advanlagos of pago-modo, onlancod pago-
modo, bursl-modo (nibbIo-modo), slalic coIumn pago-modo momory and syn-
clronous DRAM.

Iago modo DRAM is jusl a varialion on slandard DRAM momory. In mosl ro-
spocls, ils oporalion is idonlicaI. As vill slandard DRAM, soquonliaI pago
modo DRAM Iocalions aro Iaid oul or dislribulod soquonliaIIy aIong a rov. In
ollor vords, Iocalion 0 in a pago modo DRAM clip is Iocalod in rov 0, coIumn
0, Iocalion 1 is Iocalod in rov 0, coIumn 1, Iocalion 2 al rov 0, coIumn 2, olc.

If llo curronlIy oxoculing program is porforming soquonliaI momory accossos,
soquonliaI Iocalions villin a rov aro accossod. Sinco llo majorily of program
oxoculion is soquonliaI in naluro (in-Iino codo folclos), program oxoculion vory
oflon procoods aIong a rov of momory. Al llo ond of a rov in a pago modo

-

DRAM clip, llo noxl soquonliaI Iocalion is in coIumn 0 al llo boginning of llo
noxl rov. Subsoquonl Iocalions aro Iocalod aIong llal rov.

As an oxampIo, a 1Mbil (1 mogabil) pago modo DRAM clip consisls of a 1,024-
by-1,024 rov/coIumn malrix. Tlis moans llal oacl rov conlains 1,024 Ioca-
lions. Tlo microprocossor couId porform 1,024 momory accossos villin llo rov
boforo laving lo cross ovor inlo llo noxl rov. Iago modo DRAM is caIIod by
llal namo bocauso llo dosignor considorod ono rov of RAM momory lo bo a
pago of DRAM momory.

In a slandard DRAM clip, a momory Iocalion is addrossod in llo foIIoving
faslion:

1. Tlo rov addross is pIacod on llo momory addross bus.
2. Tlo RAS Iino is assorlod.
3. RAS/CAS doIay lo onsuro propor oporalion.
4. Tlo coIumn addross is pIacod on llo momory addross bus.
5. Tlo CAS Iino is assorlod.

Al llal poinl, llo DRAM clip las llo rov and llo coIumn addross and can
lloroforo idonlify llo addrossod momory Iocalion. Tlo dala lransfor can bo por-
formod.

Rofor lo figuro 13-12. To laIo fuII advanlago of llo oporalionaI claraclorislics of
pago modo DRAM clips, somo oxlornaI supporl Iogic is nocossary. Tlis con-
sisls of a rov Ialcl and a rov comparalor.

Tlo firsl accoss lo a pago modo DRAM is idonlicaI lo llal for a slandard
DRAM. Tlo rov addross is pIacod on llo momory addross bus and RAS is as-
sorlod. Wlon RAS is assorlod in a pago modo DRAM syslom, lvo llings oc-
cur:

Tlo DRAM clips Ialcl llo rov addross.
Tlo rov addross is Ialclod inlo llo rov Ialcl llal is oxlornaI lo llo DRAM
clips.

Tlo oulpul of llo rov Ialcl is appIiod lo ono sido of llo rov comparalor. Aflor
llo RAS/CAS doIay las oIapsod, llo DRAM addrossing Iogic pIacos llo coI-
umn addross on llo momory addross bus and assorls CAS. Tlis causos llo
coIumn addross lo bo Ialclod by llo DRAM. Up lo llis poinl, llo pago modo
DRAM addrossing sclomo is idonlicaI lo llal for slandard DRAM.



Ono ollor ingrodionl llal is nocossary for llo pago modo DRAM arclilocluro lo
vorI officionlIy is llo addross pipoIining capabiIily of llo 80286, 80386 and
Ionlium microprocossors. Tloso microprocossors lavo llo abiIily lo pIaco llo
addross for llo upcoming bus cycIo on llo addross bus during llo curronl bus
cycIo.

Tlo rov comparalor comparos llo rov addross curronlIy loId by llo rov Ialcl
lo llo porlion of llo addross bus llal conlains llo rov addross for llo noxl up-
coming DRAM accoss. If oquaI, il moans llal llo upcoming DRAM accoss is go-
ing lo bo villin llo samo rov (or pago) villin llo pago modo DRAM clips.
Tlis is caIIod a pago lil. Wlon llo rov comparalor dolocls llal lloy aro oquaI,
il informs llo DRAM addrossing Iogic. Tlo DRAM addrossing Iogic rosponds
by Iooping RAS assorlod al llo ond of llo curronl bus cycIo.

Tlo conlinuod assorlion of RAS loIIs llo pago modo DRAM clips lo romombor
llo proviousIy Ialclod rov addross bocauso llo upcoming accoss lo going lo bo
villin llo samo rov. Sinco llo pago modo DRAM clip aIroady las llo rov
addross, llo nov coIumn addross can bo immodialoIy galod llrougl llo
DRAM addrossing MUX onlo llo momory addross bus and CAS can bo as-
sorlod. Tlis commands llo DRAM clips lo Ialcl llo nov coIumn addross.

Wlon soquonliaI accossos faII villin llo samo rov of pago modo DRAM mom-
ory, il isn'l nocossary lo vail for llo RAS/CAS doIay lo oIapso boforo giving llo
DRAM clip llo noxl coIumn addross. Sinco llo RAS/CAS doIay is approxi-
maloIy 50 of llo ovoraII accoss limo for llo DRAM clips, llo accoss limo can
offoclivoIy bo cul in laIf by oIiminaling llis doIay.

-






Rofor lo figuro 13-13. As an oxampIo, pago modo DRAM clips ralod al 100ns
por accoss vouId roquiro 100ns for llo firsl accoss, bul subsoquonl soquonliaI
accossos villin llo samo rov couId bo porformod in approximaloIy 50ns, sub-
slanliaIIy improving llo lransfor ralo. As Iong as subsoquonl, bacI-lo-bacI
momory roads aro villin llo samo rov, llo RAS Iino slays assorlod llrougl-
oul muIlipIo accossos, vliIo nov coIumn addrossos appoar on llo momory ad-
dross bus and CAS is assorlod onco for oacl nov coIumn addross.

Wlon llo rov comparalor dolocls llal llo upcoming bus cycIo viII accoss a
rov ollor llan llo ono inlornaIIy Ialclod villin llo DRAM clips, il musl in-
slrucl llo DRAM addrossing Iogic llal a miss las occurrod and llo pago modo
DRAM clips musl lloroforo forgol llo curronlIy Ialclod rov addross. Tlis is
accompIislod by doassorling RAS. Tlis is caIIod a pago miss.

Tlo noxl accoss is oxaclIy llo samo as a slandard DRAM accoss. Tlo nov rov
addross musl bo sonl lo llo DRAMs and Ialclod, foIIovod by llo RAS/CAS
doIay and llo Ialcling of llo coIumn addross. If, lovovor, subsoquonl accossos
pasl llal poinl aro villin llo samo rov, llon llo momory Iogic can cul llo ac-
coss limo in laIf by doing avay vill llo RAS/CAS doIay again.

Iago modo DRAM laIos advanlago of ono vory imporlanl claraclorislic of any
microprocossor. Wlal is llo microprocossor aIvays doing on an ongoing basis`
Tlo ansvor is folcling inslruclions. Sinco llo majorily of program oxoculion is
soquonliaI in naluro (in-Iino codo folclos), program oxoculion vory oflon pro-
coods aIong a rov of momory. A sorios of momory roads from Iocalions Iocalod
villin llo samo rov can laIo pIaco quicIIy bocauso llo DRAM accoss limo is
cul approximaloIy in laIf by Iooping RAS assorlod llus oIiminaling llo
RAS/CAS doIay.

Anylling llal can bo dono lo incroaso llo ralo al vlicl inslruclions aro sonl lo
llo microprocossor las a subslanliaI impacl on llo ovoraII porformanco of a
IC. In addilion, any program llal londs lo accoss Iargo bIocIs of dala from
pago modo DRAM momory soquonliaIIy viII laIo advanlago of llis arcliloc-
luro as voII.

-




Inlancod pago modo DRAM providos faslor accoss limo llan slandard pago
modo DRAM by boginning llo coIumn addross docodo as soon as a nov coI-
umn addross appoars on llo momory addross bus, ovon boforo CAS is as-
sorlod. Tlo coIumn addross Ialcl is a lransparonl Ialcl, so llal ils inpul (llo
coIumn addross) is immodialoIy avaiIabIo lo ils oulpul (llo coIumn addross do-
codor) vliIo CAS is doassorlod. Sinco llo coIumn addross docodor slarls ils
docodo oarIy, llo DRAMs accoss limo is improvod. As vill slandard pago
modo DRAM, vlon CAS is subsoquonlIy assorlod, llo coIumn addross Ialcl
Ialclos llo coIumn addross.
RAS deasserted when new row detected
RAS
CAS
Memory Address Bus
Row
Address
Column
Address
Column
Address
Column
Address
Column
Address
1st access 2nd access 3rd access 4th access
(same row) (same row) (same row)
Row
Latched
column latched
new column latched
new column latched
new column latched



-
Bursl modo and nibbIo modo DRAMs aro dosignod lo provido oplimum por-
formanco vlon llo caclo is roading or vriling Iinos of informalion from main
RAM. Tlo noxl claplor doscribos caclos and dofinos caclo Iinos in dolaiI, bul
briofIy, a caclo Iino is llo minimum informalion llal llo caclo can sloro. Caclo
Iinos aro lypicaIIy many bylos in Iongll, roquiring llal llo caclo conlroIIor por-
form muIlipIo accossos lo main DRAM in ordor lo road an onliro caclo Iino.
Iacl of lloso caclo accossos aro lo DRAM Iocalions llal aro adjaconl lo ono an-
ollor. In ollor vords, llo DRAM Iocalions aro conliguous.

NormaIIy, an x86 microprocossor bus cycIo consisls of ono addross limo (Ts or
T1) foIIovod by ono or moro dala limos or vail slalos (Tc or T2). Tlo maximum
amounl of informalion llal can bo lransforrod during llo bus cycIo is Iimilod lo
llo vidll of llo microprocossors dala bus. Ior oxampIo, if llo caclo conlroIIor
noodod 16 bylos of informalion (so llo caclo Iino sizo is 16 bylos) and if llo mi-
croprocossors dala bus voro four bylos vido, llon llo microprocossor vouId
lavo lo run four bus cycIos lo fiII a caclo Iino. Iacl of lloso bus cycIos vouId
lavo an addross limo. Bul sinco aII 16 of llo bylos aro conliguous vill ono an-
ollor, somo limo couId bo savod by nol broadcasling llo addrossos of aII of llo
bylos. In a bursl bus cycIo, as usod by llo 80486 microprocossor, llo slarling
addross of llo caclo Iino is broadcasl during llo addross limo (T1) and 16 bylos
como bacI, a doubIovord al a limo, in llo foIIoving dala limos, villoul any
furllor T1 limos. (Tlo momory subsyslom sliII las llo abiIily lo insorl vail
slalos in llo lransaclion.) Tlo momory subsyslom musl lavo ils ovn addross
counlor inlornaIIy so llal il can caIcuIalo llo addross of llo socond and subso-
quonl doubIovords llal llo caclo is roquosling. Tlo Ionlium procossor usos a
bursl bus cycIo as voII, bul ils caclo Iino sizo is Iargor llan llo 80486s.

Bursl and nibbIo modo DRAM laIo advanlago of llo facl llal llo caclo ac-
cossos sovoraI conliguous Iocalions in rapid succossion. Rofor lo figuro 13-14.
As vill slandard DRAM, bursl and nibbIo modo DRAM accopl a rov addross
and a slarling coIumn addross from llo DRAM conlroIIor. Bursl and nibbIo
modo DRAM lavo inlornaI coIumn counlors, so lloy do nol nood lo soo nov
coIumn addrossos during llo bursl. Tlis oIiminalos llo solup and loId limo for
llo socond and subsoquonl coIumn addrossos and llus improvos llo DRAM
accoss limo vlon comparod lo slandard pago modo DRAM. CAS is loggIod lo
causo llo DRAM lo incromonl ils inlornaI coIumn counlor and lo accoss llal
coIumn.

Tlo socond and subsoquonl coIumn addrossos llal llo DRAM gonoralos inlor-
naIIy musl malcl llo coIumn porlion of llo addross llal llo caclo conlroIIor is

-

producing. Tlo bursl modo DRAM musl bo dosignod lo vorI vill llo caclo
conlroIIor or llo bursl modo DRAM musl bo programmod for a coIumn ad-
dross soquonco llal malclos llo soquonco usod by llo caclo conlroIIor. Tlo
Iongll of llo bursl is caclo-dopondonl and llo bursl modo DRAM musl IiIo-
viso bo dosignod or programmod lo gonoralo as many coIumn addrossos as llo
caclo conlroIIor doos.



- --

Nolico llal bursl modo and nibbIo modo DRAM IacI llo abiIily lo do random
accossos aIong llo curronl rov. Slandard pago modo DRAM can provido in-
formalion from any coIumn in llo curronlIy soIoclod rov, bul bursl and nibbIo
RAS deasserted at end of burst
RAS
CAS
Memory Address Bus
Row
Address
Column
Address
1st access 2nd access 3rd access 4th access
(same row) (same row) (same row)
Row
Latched
start column latched
next column accessed
next column accessed
next column accessed



modo DRAM can onIy provido informalion from llo conliguous coIumns llal
voro soIoclod vill llo slarling coIumn numbor.

Tlo accoss limo improvomonl in bursl and nibbIo modo DRAM comos from
saving llo solup and loId limo on llo socond and subsoquonl coIumn ad-
drossos, al llo oxponso of no Iongor boing abIo lo do random pago modo ac-
cossos aIong llo curronlIy soIoclod rov. Tlo noxl soclion doscribos slalic
coIumn pago modo DRAM, vlicl rolains llo abiIily lo do random accossos
aIong llo samo rov and las accoss limos simiIar lo bursl modo DRAM.

Slalic coIumn RAM, or SCRAM, probabIy las ono of llo mosl misIoading
namos in llo induslry. Many poopIo boIiovo llal slalic coIumn RAM is a form
of slalic RAM. Il is nol. Slalic RAM is discussod Ialor in llis claplor. Slalic coI-
umn RAM is anollor form of DRAM momory. Il is oxlromoIy simiIar lo pago
modo DRAM, so mucl so llal lloy aro froquonlIy mixod up in lrado arlicIos.
}usl as vill pago modo DRAM, SCRAM is slruclurod vill soquonliaI momory
Iocalions dislribulod aIong a rov. SCRAM aIso roquiros llo samo oxlornaI sup-
porl Iogic as pago modo RAM. Tlal is, il roquiros a rov Ialcl and a rov com-
paralor and laIos advanlago of addross pipoIining.

Tlo onIy difforonco bolvoon llo lvo loclnoIogios Iios in lov SCRAM rocog-
nizos llal a nov coIumn addross las boon prosonlod lo il. Wloroas pago modo
DRAM roquiros llal CAS bo assorlod oacl limo a nov coIumn addross is pro-
sonlod lo il, SCRAM is sIigllIy moro inloIIigonl.

Rofor lo figuro 13-15. Wlon llo SCRAM clip dolocls RAS and CAS romain-
ing assorlod from ono accoss lo anollor, il rocognizos llal il viII nol bo rocoiv-
ing a nov rov addross, onIy a coIumn addross. Il llon obsorvos llo momory
addross bus. Wlon il soos llo vaIuo on llo addross Iinos bogin lo clango, il in-
lorprols llis as a nov coIumn addross appoaring and vails a prodolorminod
amounl of limo for llo coIumn addross lo slabiIizo. Il llon gonoralos ils ovn
CAS inlornaIIy, Ialcling llo nov coIumn addross. Tlo namo slalic coIumn
RAM sloms from llo facl llal llo coIumn addross slrobo Iino, CAS, slays slalic
assorlod for muIlipIo accossos villin llo samo rov.

Il is possibIo lo dosign a momory subsyslom llal accommodalos oillor SCRAM
or pago modo DRAM clips. Tlis is possibIo bocauso, aIllougl llo SCRAM clip
doosn'l nood lo lavo CAS roassorlod oacl limo a nov coIumn addross is pro-
sonlod lo il, il sliII oporalos proporIy if CAS is roassorlod. In ollor vords, if a

-

momory subsyslom is dosignod for pago modo DRAM, il vouId aIso vorI vill
SCRAM.


--
-
Synclronous DRAM isnl a lypo of DRAM by ilsoIf. Insload, il is a vay llal llo
DRAM clip inlorfacos ils inlornaI slorago array lo ils pins. Tlo procoding soc-
lions doscribod asynclronous DRAM inlorfacos vlicl do nol roquiro a cIocI.
Synclronous inlorfacos aro basod on a cIocI so llal llo momory addross and
conlroI signaIs (RAS and CAS) aro onIy vaIid al approprialo odgos of llo
cIocI.

RAS
CAS
Memory Address Bus
Row
Address
Column
Address
Column
Address
Column
Address
Column
Address
1st access 2nd access 3rd access 4th access
(same row) (same row) (same row)
Row
Latched
column latched
new column latched
new column latched
new column latched
RAS deasserted when new row detected



Synclronous DRAM inlorfacos can simpIify llo dosign of llo inlorfaco bolvoon
llo DRAM clips and llo microprocossor bocauso llo microprocossor is a syn-
clronous (cIocIod) dovico. To acliovo oplimum porformanco vill llo micro-
procossor, llo DRAM musl bo synclronizod lo llo microprocossor, and llus lo
llo microprocossors cIocI. Ior asynclronous DRAM, llo syslom dosignor
musl provido Iogic oxlornaI lo llo DRAM lo synclronizo il lo llo microprocos-
sor. Synclronous DRAM can bo run from llo samo cIocI llal runs llo micro-
procossor, llus roducing llo amounl and compIoxily of llo oxlornaI Iogic.

Synclronous DRAM inlorfacos aro oflon usod on bursl modo DRAM.

InlorIoavod momory arclilocluro laIos advanlago of llo soquonliaI naluro of
program oxoculion. Tlo probIom addrossod by llo inlorIoavod momory arcli-
locluro is llo poriod of limo llo microprocossor is forcod lo vail vlon porform-
ing bacI-lo-bacI accossos lo llo samo DRAM clip. Tlis vail is nocossary
bocauso llo DRAM clip is clarging bacI up again aflor a doslruclivo road. Tlis
is roforrod lo as llo pro-clargo doIay.

Wlon an inlorIoavod momory arclilocluro is usod, vlal vouId ordinariIy bo
ono banI of DRAM momory is spIil up inlo lvo banIs. As an oxampIo, rofor lo
figuro 13-16. In an 80386DX- or 80486-basod syslom, llo microprocossor is ca-
pabIo of folcling a doubIovord (four bylos) por bus cycIo. Tlo momory addross
docodo Iogic is dosignod so llal llo doubIovord consisling of llo firsl four
momory Iocalions, Iocalions 00000000l llrougl 00000003l, is plysicaIIy Io-
calod in DRAM banI A. Tlo socond doubIovord, consisling of Iocalions
00000004l llrougl 00000007l, is plysicaIIy Iocalod in DRAM banI B. Tlo noxl
doubIovord is plysicaIIy Iocalod in DRAM banI A and consisls of Iocalions
00000008l llrougl 0000000Bl, vliIo llo foIIoving doubIovord is plysicaIIy
Iocalod in DRAM banI B and consisls of Iocalions 0000000Cl llrougl
0000000Il, and so on.

Assumo llal llo 80386DX microprocossor las jusl folclod an inslruclion from
llo doubIovord slarling al Iocalion 00000000l in DRAM banI A. Tlal moans
llal llo microprocossor viII moro llan IiIoIy folcl llo noxl inslruclion from llo
doubIovord slarling al momory addross 00000004l in DRAM banI B. WliIo
llo microprocossor is porforming llo socond inslruclion profolcl from llo dou-
bIovord in banI B, llo DRAMs llal maIo up banI A aro going llrougl pro-
clargo doIay and clarging bacI up again.


-

Wlon llo microprocossor compIolos llo folcl from llo doubIovord in banI B,
llo noxl inslruclion folcl is moro llan IiIoIy going lo bo from llo noxl doubIo-
vord in banI A slarling al Iocalion 00000008l. WliIo llo microprocossor is
folcling llo llird doubIovord from banI A, llo DRAMs llal maIo up banI B
viII bo clarging bacI up again.




Tlo microprocossor is abIo lo porform bacI-lo-bacI road oporalions (in llis
caso, inslruclion folclos) villoul vailing for llo pro-clargo doIay. Tlo onIy
limos llal llo microprocossor viII lavo lo vail for llo pro-clargo doIay lo
oIapso viII bo vlon llo noxl momory accoss is villin llo samo banI as llo
Memory
Ready
Logic
Ready to CPU

Bank B
Bank A
A2
Comparator
A2
Latch
A2



provious accoss. Tlis occurs, for inslanco, vlon a jump inslruclion inslrucls llo
microprocossor lo folcl ils noxl inslruclion from a Iocalion rosiding in llo samo
banI llal llo provious inslruclion vas road from.

Il aIso occurs vlon llo curronlIy oxoculing inslruclion inslrucls llo microproc-
ossor lo accoss a momory Iocalion villin llo samo banI as llo provious accoss.

Rofor lo figuro 13-16. Supporl Iogic villin llo inlorIoavod momory subsyslom
Ioops lracI of vlicl banI vas accossod Iasl. Using addross pipoIining, llo sub-
syslom can dolocl llal llo upcoming accoss is from llo samo banI or llo ollor
banI. If from llo ollor banI, llon llo momory Iogic doosn'l lavo lo aIIov for
llo pro-clargo doIay and can Iol llo microprocossor accoss il immodialoIy. Ad-
dross bil A2 indicalos vlicl banI is lo bo accossod in llo upcoming bus cycIo.
Tlo supporl Iogic romombors vlicl DRAM banI is curronlIy boing accossod
via llo A2 Ialcl. Tlo A2 Comparalor comparos llis lo llo slalo of A2 for llo
upcoming accoss (using addross pipoIining). Tlo limooul vaIuo for llo Momory
Roady Iogic is adjuslod accordingIy.

On llo ollor land, if llo upcoming accoss is villin llo samo banI, llo momory
Iogic Ioops llo RIADY Iino doassorlod unliI llo pro-clargo doIay las oIapsod.
Tlo momory Iogic llon assorls RIADY, Iolling llo curronl bus cycIo ond and
Iolling llo microprocossor safoIy bogin llo noxl bus cycIo villin llo samo banI.

If pago modo DRAM is usod in llo inlorIoavod banIs, llon llo pro-clargo do-
Iay may bo avoidod ovon if llo curronl bus maslor accossos llo samo banI con-
soculivoIy. Of courso, accossos lo llo samo banI vouId lavo lo bo lo llo samo
rov in ordor lo avoid llo pro-clargo doIay. By combining pago modo DRAM
and inlorIoaving, llo syslom dosignor can oIiminalo mosl of llo pro-clargo do-
Iays.

UnIiIo DRAM, slalic RAM, or SRAM, momory doosn'l roquiro rofrosling al
roguIar inlorvaIs in ordor lo mainlain llo informalion slorod in momory. Tlis is
bocauso, unIiIo a DRAM bil coII vlicl usos a capacilor and a lransislor lo sloro
informalion, SRAM usos singIo-bil Ialclos Inovn as D fIip-fIops. A lypicaI
SRAM bil coII consisls of four or six lransislors. A four lransislor dosign cosls
Ioss and a six lransislor dosign consumos Ioss povor.

Onco a bil of informalion las boon vrillon inlo ono of lloso Ialclos (or fIip-
fIops), llo SRAM clip conlinuos lo loId llo dala as Iong as povor is appIiod lo
llo SRAM clip. Tlo informalion doosn'l dogrado (disclargo) ovor a poriod of

-

limo as il doos vill DRAM. SRAM is caIIod slalic bocauso, onco llo informa-
lion is vrillon inlo il, il romains slalic, or sloady, villoul boing rofroslod al
roguIar inlorvaIs.

Anollor imporlanl claraclorislic of SRAM is ils roIalivoIy slorl accoss limo.
Tlis is mainIy duo lo llo facl llal, rallor llan providing il llo addross in lvo
slops (as vill DRAMs), llo SRAM rocoivos llo onliro addross al onco. Onco
clip-soIoclod, llo SRAM usos llo addross on ils addross inpuls lo idonlify llo
addrossod momory Iocalion and llo dala lransfor laIos pIaco.

AIllougl SRAM is lypicaIIy mucl faslor llan DRAM momory, il is cosl-
prolibilivo lo popuIalo an onliro syslom vill il. SRAM clips lypicaIIy cosl lon
limos moro llan DRAMs, aro plysicaIIy Iargor, consumo moro povor and gon-
oralo moro loal. AII of lloso faclors, laIon coIIoclivoIy, subslanliaIIy add lo llo
ovoraII cosl of a syslom. In llo faslor 80386, 80486 and Ionlium procossor-basod
sysloms, Iimilod amounls of ligl-spood SRAM aro usod as caclo momory lo
improvo llo microprocossor's ovoraII lransfor ralo vlon addrossing momory.
Tlis subjocl is covorod in llo claplor onlilIod Caclo Momory Concopls.

As vill DRAM, SRAM can bo dosignod lo oporalo oillor asynclronousIy or
synclronousIy. IiIoviso, SRAM can bo dosignod lo uso a bursl modo, vlicl
simpIifios llo inlorfaco of SRAM usod in caclos, sinco caclos usuaIIy oporalo
synclronousIy, in bursl modo.


-


-
IarIior claplors doscribod llo 80386DX microprocossor and DRAM momory.
Tlo 80386DX microprocossor is capabIo of porforming dala lransfors al sub-
slanliaIIy liglor cIocI ralos llan llo 80286 microprocossor. Combino llo in-
croasod porformanco of llo 80386DX microprocossor vill llo roIalivoIy sIov
accoss limo of DRAM momory and a probIom prosonls ilsoIf. Wlonovor llo mi-
croprocossor allompls lo accoss momory, vail slalos viII bo insorlod inlo llo
bus cycIos lo accommodalo llo DRAM's sIov accoss limo. Sinco llo microproc-
ossor accossos momory far moro llan any ollor syslom oIomonl (lo folcl in-
slruclions), procossor porformanco vouId suffor sovoro dogradalion.
-
In llis claplor, caclo momory is discussod. Tlis is llo mosl common mollod
usod lo acliovo suporior momory porformanco vliIo loIding dovn llo cosl of
impIomonlalion. Various momory caclo slralogios found in 80386-, 80486- and
Ionlium procossor-basod sysloms aro discussod, aIong vill advanlagos and
disadvanlagos of oacl.

Tlo noxl claplor discussos llo lypos and configuralions of ROM momory lypi-
caIIy found in ISA sysloms.

Wlon llo IBM IC vas inlroducod, il vas basod on llo InloI 8088 microprocos-
sor running al 4.77MHz. Tlo 8088 laIos four licIs of ils 4.77MHz ICIK lo run
a 0-vail-slalo bus cycIo, so a 0-vail-slalo bus cycIo laIos 838ns (4 x 209.5ns =
838ns). VirluaIIy any DRAM or ROM on llo marIol al llo limo couId rospond
voII villin llis poriod of limo, so vail slalos roaIIy voron'l an issuo.


-

As procossor spoods lavo rapidIy incroasod, llo spood of oconomicaI dynamic
RAM (DRAM) las incroasod al a sIovor paco. Tlus, in ordor lo gain llo maxi-
mum porformanco bonofil of llo faslor and moro povorfuI procossors, faslor
and moro oxponsivo slalic RAM dovicos musl bo usod. Slalic RAM is oasiIy ca-
pabIo of providing zoro-vail-slalo porformanco, lovovor, for sovoraI roasons,
llis soIulion is soIdom considorod:

SRAM is lypicaIIy lon limos moro oxponsivo llan DRAM momory.
SRAM clips aro lypicaIIy Iargor llan DRAMs, roquiring moro roaI oslalo
for llo samo amounl of momory.
During normaI oporalion, SRAMs consumo moro povor llan DRAMs and
may roquiro a moro povorfuI, and lloroforo moro oxponsivo, povor sup-
pIy.
During normaI oporalion, SRAMs gonoralo moro loal llan DRAMs and
may lloroforo roquiro a Iargor cooIing fan.

To bo fair, ils lruo llal SRAM consumos Ioss povor llan DRAM vlon il is nol
boing accossod. Bul vly pul of oxponsivo SRAM in a syslom and llon nol ac-
coss il ropolilivoIy al ligl spood`

Tlo soIulion closon by mosl manufaclurors of fasl 80386-, 80486- and Ionlium
procossor-basod ICs is caclo momory. ImpIomonlalion of a caclo momory sub-
syslom is an allompl lo acliovo accoplabIo syslom cosl and a ligl porconlago of
0-vail-slalo bus cycIos vlon accossing DRAM momory.

A caclo momory subsyslom is impIomonlod by popuIaling main momory vill
roIalivoIy sIov accoss, cloap DRAM, vliIo aIso incorporaling a roIalivoIy smaII
amounl of ligl cosl, fasl accoss SRAM inlo llo syslom. Tlo SRAM momory is
roforrod as caclo momory and a caclo momory conlroIIor allompls lo mainlain
copios of froquonlIy accossod informalion road from DRAM momory in llo
caclo.

Rofor lo figuro 14-1. Tlo caclo momory conlroIIor Ioops lracI of llo informa-
lion il las copiod inlo llo caclo momory. Wlon llo caclo momory conlroIIor
soos llo microprocossor inilialo a momory road bus cycIo, il clocIs lo dolor-
mino if il las a copy of llo roquoslod informalion in caclo momory. If a copy is
prosonl, il immodialoIy roads llo informalion from llo caclo, sonds il bacI lo
llo syslom board microprocossor ovor llo microprocossor's dala bus, and as-
sorls llo microprocossor's RIADY signaI. Tlis is Inovn as a road lil. Tlo ac-

-

coss can bo compIolod in 0 vail slalos bocauso llo informalion is folclod from
llo fasl accoss caclo SRAM.




If, on llo ollor land, llo caclo momory conlroIIor dolorminos llal il doos nol
lavo a copy of llo roquoslod informalion in caclo, llo informalion musl bo
road from DRAM momory. Tlis is Inovn as a road miss and, duo lo llo sIov
accoss limo of llo DRAM momory, rosuIls in vail slalos. Tlo roquoslod infor-
malion is sonl from DRAM bacI lo llo microprocossor lo fuIfiII llo roquosl. In
addilion, llo informalion is aIso copiod inlo llo caclo momory by llo caclo
momory conlroIIor. Tlo caclo conlroIIor updalos an inlornaI diroclory llal
Ioops lracI of informalion slorod in caclo momory.
-- -
--

-

-

On llo surfaco, il may nol bo ovidonl lov llis can spood up llo microprocos-
sor's momory accossos. Hovovor, mosl programs, sucl as Iolus 1-2-3, conlain
program Ioops llal aro oxoculod many limos. A program Ioop is a sorios of in-
slruclions llal musl bo oxoculod a numbor of limos in succossion lo produco
llo dosirod rosuIls.

As an oxampIo, Iolus 1-2-3 usos a program Ioop lo rocaIcuIalo sproadslool
coIIs. Doponding on llo numbor of caIcuIalions lo bo mado during a rocaIc, llis
program Ioop may lavo lo bo oxoculod lundrods or ovon llousands of limos.

Assumo llal llo caclo momory is omply il conlains no copios of informalion
from DRAM momory. Tlo firsl limo llo program Ioop is oxoculod, llo foIIov-
ing sorios of ovonls laIos pIaco:

1. Tlo microprocossor inilialos a momory road bus cycIo lo folcl llo firsl in-
slruclion from momory.
2. Tlo caclo momory conlroIIor usos llo momory addross lo dolormino if a
copy of llo roquoslod informalion is aIroady in llo caclo momory. Sinco
llo caclo is iniliaIIy omply, a copy doosn'l oxisl and a road miss occurs.
3. Tlo caclo momory conlroIIor inilialos a momory road bus cycIo on ils ovn
busos lo folcl llo roquoslod informalion (llo inslruclion) from DRAM
momory. Tlis viII laIo ono or moro vail slalos, doponding on llo accoss
limo of llo DRAM.
4. Tlo informalion from DRAM momory (llo inslruclion) is sonl bacI lo llo
microprocossor and llo caclo momory conlroIIor aIso copios il inlo llo
caclo momory and updalos a diroclory villin llo conlroIIor lo rofIocl llo
prosonco of llo nov informalion. No advanlago vas roaIizod during llis
momory road bocauso llo informalion lad lo bo road from sIov DRAM
momory.
5. Upon compIolion of llo firsl inslruclion in llo program Ioop, llo micro-
procossor inilialos a sorios of momory road bus cycIos lo folcl llo romain-
ing inslruclions in llo program Ioop. If llo caclo is sufficionlIy Iargo, aII of
llo inslruclions in llo program Ioop viII bo rosidonl in caclo momory aflor
llo Iasl inslruclion in llo Ioop las boon road from DRAM momory and
copiod inlo llo caclo. No advanlago vas roaIizod during llo firsl oxoculion
of llis program Ioop.
6. Tlo Iasl inslruclion in llo program Ioop is an inslruclion lo jump lo llo bo-
ginning of llo Ioop and slarl ovor again. In ollor vords, llo microprocos-
sor slarls folcling and oxoculing inslruclions al llo momory addross of llo
firsl inslruclion in llo program Ioop again.
7. Wlon llo microprocossor inilialos llo momory road bus cycIo lo folcl llo
firsl inslruclion again, llo caclo momory conlroIIor clocIs ils caclo diroc-

-

lory and dolocls llo prosonco of llo roquoslod informalion in caclo mom-
ory. Tlo caclo momory conlroIIor immodialoIy roads llo informalion from
llo fasl accoss SRAM llal maIos up llo caclo and sonds il bacI lo llo mi-
croprocossor vill 0 vail slalos incurrod.

Tlo microprocossor is llus abIo lo folcl and bogin oxoculing llo inslruclion
faslor llan il vas abIo lo llo firsl limo llrougl llo Ioop. Tlis provos lruo for
llo romaining inslruclions in llo program Ioop as voII. Tlo socond and subso-
quonl limos llrougl llo program Ioop, llo microprocossor incurs no vail slalos
in folcling llo inslruclions, so llo program runs subslanliaIIy faslor.
-
Tlo lorm usod lo oxpIain llo claraclorislics of programs vlicl run in roIalivoIy
smaII Ioops in consoculivo momory Iocalions is llo IocaIily of roforonco. As
slovn in llo provious oxampIo, caclo subsysloms vorI bocauso mosl pro-
grams llal run on ICs roquiro llo samo informalion from consoculivo momory
Iocalions ovor and ovor again. Tlo IocaIily of roforonco principIo is comprisod
of lvo compononls: lomporaI IocaIily and spaliaI IocaIily.

Sinco programs run in Ioops, llo samo inslruclions musl bo folclod from mom-
ory on a froquonl and conlinuing basis, moaning llal programs lond lo uso llo
mosl roconlIy usod informalion again. Tlo oIdor llo informalion in caclo, llo
Ioss IiIoIy il is lo bo usod again. Tlis is Inovn as llo principIo of lomporaI
IocaIily. Hov voII a caclo subsyslom porforms is liod diroclIy lo lov oflon llo
soflvaro roquosls llo samo informalion from momory. If a program voro inlon-
lionaIIy dosignod lo novor accoss informalion moro llan ono limo, llo caclo
subsyslom vouId provido absoIuloIy no porformanco incroaso.

Irograms and llo dala lloy roquosl lond lo rosido in consoculivo momory Ioca-
lions. Tlis moans llal programs aro IiIoIy lo nood codo or dala llal aro cIoso lo
or adjaconl lo Iocalions aIroady in uso. Tlis claraclorislic is caIIod llo principIo
of spaliaI IocaIily.


-

Iorformanco of caclo subsysloms doponds primariIy on llo froquoncy of caclo
lils. Iorformanco is usuaIIy slalod in lorms of a porconlago of caclo lils or lil
ralo. Hil ralo can bo oxprossod as:

Hil Ralo =
Caclo Hils

X 100


TolaI Momory Roquosls

Sinco caclo lils onIy occur on subsoquonl accossos lo llo samo Iocalion, por-
formanco of caclo sysloms llon can bo IinIod diroclIy lo llo vay in vlicl
soflvaro runs or lov voII il salisfios llo principIo of IocaIily of roforonco. If llo
program runs in a fairIy smaII aroa of momory and ropoals or Ioops, a ligl por-
conlago of accossos lo momory viII bo caclo lils. If on llo ollor land, llo pro-
gram runs Iong slrings of non-Iooping codo, ovory accoss viII bo a caclo miss.
IorlunaloIy, mosl programs run in a Iooping faslion and lloroforo caclo lils
occur a ligl porconlago of llo limo (approximaloIy 85 lo 95).

SovoraI faclors conlribulo lo llo caclo lil ralo in addilion lo llo principIo of Io-
caIily of roforonco. Tloso incIudo llo caclo's arclilocluro, sizo of llo caclo
momory and llo caclo momory organizalion, vlicl aro discussod Ialor in llis
claplor.
-
In addilion lo providing fasl accoss lo llo momory subsyslom, caclo subsys-
loms can aIso provido porformanco advanlagos by improving bus uliIizalion.
Bus uliIizalion is of parlicuIar concorn vlon muIlipIo procossors and bus mas-
lors aro usod. Tlo porconlago of llo limo llal any bus maslor occupios llo sys-
lom bus is caIIod ils bus uliIizalion. If llo lolaI bus uliIizalion of aII bus maslor
dovicos add up lo ovor 100, porformanco vouId drop duo lo oxcooding llo
bandvidll of llo bus. WoII dosignod caclo subsysloms roduco llo amounl of
limo procossors spond on llo syslom bus by maIing accoss lo llo bus as slorl
as possibIo (zoro vail slalos).

An addilionaI bonofil roIalod lo bus uliIizalion, caIIod bus concurroncy, is pos-
sibIo vlon IooI-llrougl caclo arclilocluros aro usod. Bus concurroncy moans
llal a procossor can gain accoss lo momory from ils caclo momory, vliIo an-
ollor bus maslor accossos main momory ovor llo syslom bus al llo samo limo.
IooI-llrougl caclo dosigns pormil concurroncy bocauso lloy docoupIo llo
procossor's IocaI bus from llo main syslom bus. Soo llo soclion on IooI-llrougl
caclo dosigns for addilionaI informalion.

-

--
In ordor for caclo subsysloms lo vorI proporIy, llo conlonls of caclo and main
momory musl bo oxacl dupIicalos. Tloro aro sovoraI possibIo inslancos in vlicl
Iocalions slorod in caclo momory aro updalod in caclo or in main momory
vliIo llo dupIicalo copy romains unclangod. Wlon oillor llo caclo momory
or main momory is updalod, llo dupIicalo copy viII conlain oId informalion
caIIod slaIo dala. Caclo sysloms musl bo dosignod lo oIiminalo polonliaI
caclo consisloncy probIoms. Soo llo soclion on caclo consisloncy for dolaiIs.
- --
Caclo subsysloms aro comprisod of llroo basic parls as slovn in figuro 14-2:

Tlo caclo Momory (Higl spood Slalic RAM)
Tlo caclo managomonl Iogic
Tlo caclo momory diroclory (lag RAM)

Tlo caclo momory is comprisod of SRAM clips llal can provido llo procossor
vill dala al zoro vail slalos. Caclo momory is accossod vlon a copy of an ad-
dross boing accossod in main momory is found in llo caclo momory diroclory
by llo caclo managomonl Iogic.

Somo Iiloraluro rofors lo llo caclo momory as llo dala caclo RAM lo dislin-
guisl il from llo caclo momory diroclory or lag RAM. Bul bovaro llal dala
caclo RAM is oasiIy confusod vill a dala caclo (vlicl vouId bo laIf of a
spIil-caclo syslom, doscribod in llo Caclo Arclilocluros soclion).

Tlo sizo and organizalion of llo momory caclo varios according lo dosign and
is covorod in llo soclion onlilIod Caclo Organizalion and Sizo.

-


-- -

--
-



-


During a road accoss lo main momory, llo caclo managomonl Iogic comparos
llo momory addross oulpul by llo procossor vill llo caclo momory diroclory
vlicl conlains a rocord of vlicl Iocalions aro slorod in caclo momory. If a
malcl occurs, llo caclo managomonl Iogic onabIos caclo momory lo oulpul in-
formalion from llo addrossod Iocalion, and llo bus cycIo is compIolod in zoro
vail slalos. If a malcl doos nol occur, llo roquoslod informalion is suppIiod by
main momory. Tlo informalion is sonl bacI lo llo procossor from main mom-
ory and aIso slorod in caclo momory so llal llo Ialosl informalion is nov avaiI-
abIo in caclo.

Tlo caclo momory diroclory, aIso caIIod lag RAM, conlains a Iisling of aII llo
momory addrossos llal lavo copios slorod in caclo momory. Iacl caclo Ioca-
lion (somolimos roforrod lo as a sol) las a corrosponding onlry in llo caclo di-
roclory as slovn in figuro 14-3. Tlo conlonls of llo diroclory aro comparod lo
llo momory addross from llo procossor lo dolormino if a copy of llo roquoslod
informalion is conlainod in caclo momory. Tlo conlonls of llo diroclory aro
updalod oacl limo nov informalion is slorod in caclo momory.
-


-


-
Tlo noxl sovoraI soclions doscribo various paramolors vlicl spocify caclos.
Tloso paramolors and somo of lloir possibIo vaIuos aro Iislod boIov. A caclo
may bo dosignod by soIocling ono paramolor from oacl of llo Iisls. Ior oxam-
pIo, a caclo couId bo dosignod as an 8KB, IooI-llrougl, IovoI 1, spIil, vrilo-
bacI poIicy, lvo-vay sol-associalivo caclo vill a 32-bylo Iino sizo, llal main-
lains coloroncy by snooping llo syslom bus. An oxampIo of llal lypo of caclo
is llo dala caclo in llo Ionlium procossor. Tloro aro llroo Iisls for Arclilocluro
bocauso llroo indopondonl paramolors dofino llo plysicaI Iayoul (arclilocluro)
of llo caclo.

Arclilocluro
IooI-llrougl
IooI-asido

Arclilocluro
IovoI 1
IovoI 2
IovoI 3, olc.

Arclilocluro
Combinod (unifiod)
SpIil (dodicalod)

Coloroncy IrolocoI (vays of mainlaining coloroncy)
IIusling
Snooping (bus valcling)
Soflvaro-onforcod coloroncy

Wrilo IoIicy
Wrilo-llrougl poIicy
Bufforod vrilo-llrougl poIicy
Wrilo-bacI poIicy

Organizalion or Sol Associalivily
fuIIy-associalivo caclo
dirocl-mappod caclo
lvo-vay sol-associalivo caclo

-

four-vay sol-associalivo caclo, olc.

Iino Sizo
bylos por Iino

Caclo Sizo
KB of dala SRAM

Addrossing
plysicaI
virluaI

AIllougl oacl of lloso paramolors aro indopondonl of ono anollor, il is possi-
bIo lo soIocl vaIuos llal rosuIl in impraclicaI or inofficionl caclo dosigns. Ior
oxampIo, a smaII (1KB), IooI-llrougl caclo slalislicaIIy dogrados (insload of
improving) ovoraII syslom porformanco duo lo llo IooIup ponaIly imposod by
llo ligl miss ralo of llo smaII caclo.

Tlo caclo paramolors aro dofinod and doscribod in dolaiI in llo soclions llal
foIIov.
-
Tvo basic arclilocluros aro usod in loday's sysloms:

IooI-llrougl caclo dosigns
IooI-asido caclo dosigns

Iacl lypo of caclo arclilocluro las ils advanlagos and disadvanlagos. Tlo foI-
Ioving soclions dolaiI boll lypos of arclilocluros and anaIyzos lloir bonofils
and IiabiIilios.

Iorformanco in IooI-llrougl caclo dosigns is lypicaIIy liglor ovoraII llan for
IooI-asido dosigns. Iiguro 14-4 iIIuslralos llo IooI-llrougl caclo dosign. As ils
namo impIios, llo IooI-llrougl caclo IooIs llrougl ils inlornaI caclo lo do-
lormino if a copy of llo roquoslod informalion is in llo caclo. If found,
informalion is sonl bacI lo llo procossor in zoro vail slalos. Nolico llal llo
momory roquosl from llo procossor is nol aulomalicaIIy lransforrod lo llo
syslom bus. Tlis Ioops llo syslom bus froo for uso by ollor bus maslors. OnIy
on caclo missos viII a roquosl bo passod lo llo syslom bus. IooI-llrougl caclo

-

missos viII a roquosl bo passod lo llo syslom bus. IooI-llrougl caclo dosigns
isoIalo llo procossor's IocaI bus from llo syslom bus, lloroby roducing llo uso
of llo syslom bus and pormilling concurronl oporalions lo laIo pIaco.



A cIosor IooI al llo IooI-llrougl dosign rovoaIs buffors on llo addross and
dala busos llal isoIalo llo procossor and syslom busos. Rofor lo figuro 14-5.
Tloso buffors aro conlroIIod by llo caclo managomonl Iogic. If a roquosl from
llo procossor is a caclo lil, informalion is accossod diroclIy from caclo mom-
ory and llo procossor and syslom bus romain isoIalod. If llo roquoslod infor-
malion is nol in caclo (a road miss), llo caclo managomonl Iogic viII onabIo
--

-
-

-
-

-
-


-

llo buffors aIIoving llo roquosl lo bo sonl ovor llo syslom bus lo gol llo ro-
quoslod informalion from main momory. Tlo informalion is passod llrougl a
Ialcl in llo dala pall bacI lo llo procossor, as voII as inlo llo momory caclo.

-

A major advanlago of IooI-llrougl dosigns is llal lloy pormil lvo bus maslors
lo oporalo simuIlanoousIy in llo samo syslom. Tlo procossor can bo running
zoro-vail-slalo oporalions oul of llo caclo momory, vliIo a bus maslor sucl as
-- -
--


-

llo DMA conlroIIor or rofrosl Iogic can uso llo syslom bus lo accoss main
momory. Tloso lvo oporalions can bo run al llo samo limo villoul affocling
oacl ollor and aro lypicaIIy roforrod lo as syslom concurroncy.

To oxpansion dovicos, IooI-llrougl caclo conlroIIors appoar as if lloy aro llo
main microprocossor. In singIo procossor sysloms, vlon a bus maslor noods ac-
coss lo main momory il roquosls uso of llo syslom bus diroclIy from llo caclo
conlroIIor. Tlo caclo conlroIIor viII granl llo uso of llo syslom bus by sonding
an acInovIodgo lo llo bus maslor jusl as llo microprocossor vouId normaIIy
do.

Sinco IooI-llrougl caclo conlroIIors isoIalo llo syslom bus and procossor bus
and sinco lloy can bo dosignod lo run lloir ovn bus cycIos lo main momory,
lloy aIso provido porformanco advanlagos during vrilo oporalions. During
momory vrilos, IooI-llrougl caclo dosigns can provido zoro-vail-slalo opora-
lion for vrilo missos. During vrilo oporalions, many IooI-llrougl dosigns viII
lricI llo microprocossor inlo llinIing llo informalion vas vrillon villin zoro
vail slalos, bul in facl no vrilo nood lavo laIon pIaco al aII. Tlo IooI-llrougl
caclo subsyslom momorizos llo onliro vrilo oporalion so llal il can compIolo
llo momory vrilo lo main momory Ialor. Tlis is caIIod a poslod vrilo or buff-
orod vrilo.

In summary, IooI-llrougl dosigns provido porformanco bonofils by:

roducing syslom bus uliIizalion sinco mosl momory accossos como from
caclo momory, Ioaving llo syslom bus froo for ollor bus maslor's uso.
aIIoving syslom concurroncy, vloro boll llo procossor and anollor bus
maslor can porform bus cycIos al llo samo limo, and
compIoling vrilo oporalions in zoro vail slalos using poslod vrilos.

Tlo primary disadvanlagos of IooI-llrougl dosigns aro:

Tlo IocaI CIU's momory roquosls go firsl lo ils caclo subsyslom lo dolor-
mino if lloro is a copy of llo largol Iocalion is in ils caclo momory. Tlis
IooIup procoss doIays llo roquosl lo main momory in llo ovonl llal llo
momory roquosl is a caclo miss. Tlis doIay is commonIy roforrod lo as llo
IooIup ponaIly.
IooI-llrougl caclos aro moro compIox and difficuIl lo dosign and impIo-
monl.
IooI-llrougl dosigns aro coslIy.

-

-
Rofor lo figuro 14-6. IooI-asido caclos do nol isoIalo llo procossor bus from
llo syslom bus as do IooI-llrougl caclos. Wlon llo procossor bogins a bus cy-
cIo aII dovicos in llo syslom soo llo addross as lloy do in non-caclo sysloms.
Tlo caclo conlroIIor monilors oacl momory roquosl lo soo if caclo momory
conlains a copy of llo roquoslod informalion. Tlo caclo conlroIIor lorminalos
llo bus cycIo in zoro vail slalos if llo oporalion is a lil, and informs llo main
momory subsyslom lo aborl llo roquosl. If llo oporalion is a miss, llo bus cycIo
compIolos in normaI faslion from main momory.

Nolo llal ovon vlon a momory roquosl is a caclo lil, main syslom momory
viII slarl llo accoss llus croaling an unnocossary momory proclargo cycIo in
many casos. Tlis moans llal ollor bus maslors in llo syslom nooding accoss lo
momory musl vail unliI llo proclargo cycIo las compIolod.

Tlo major advanlagos of IooI-asido caclo dosigns aro:

Rosponso limo on caclo miss cycIos. Caclo miss cycIos compIolo faslor in
IooI-asido caclos bocauso llo bus cycIo is aIroady in progross lo main
momory and no IooIup ponaIly is incurrod.
SimpIicily of dosign. IooI-asido dosigns nood onIy monilor ono addross
bus, vloroas, IooI-llrougl dosigns musl inlorfaco vill boll llo procossor
bus and syslom bus.
Iovor cosl of impIomonling duo lo lloir simpIicily.


-


-

Tlo disadvanlagos of IooI-asido caclo dosigns aro:

Syslom bus uliIizalion is nol roducod. Iacl accoss lo main momory goos lo
boll llo caclo subsyslom and main momory.
AII momory roquosls, vlollor a lil or miss, rosuIl in llo slarl of a momory
cycIo in main momory. Tlis causos a proclargo cycIo lo bogin vlicl pro-
vonls ollor dovicos from accossing main momory unliI llo proclargo limo
las oxpirod.
--

-
-

-
-

-
-


-

Concurronl oporalions aro nol possibIo sinco aII maslors rosido on llo samo
bus.
- -
Somo sysloms uso lvo IovoIs of caclo lo improvo ovoraII syslom porformanco.
Iiguro 14-7 slovs llo roIalionslip bolvoon firsl- and socond-IovoI caclos in
lypicaI 80386- and 80486-basod sysloms.

Iirsl-IovoI caclos provido llo procossor vill llo mosl oflon usod codo and
dala. Tloso caclos aro lypicaIIy smaII (4KB lo 64KB). An oxampIo of llis lypo of
caclo is llo inlornaI caclo usod in llo 486.

- -

Socond-IovoI caclos aro somolimos addod bolvoon llo firsl-IovoI caclo and
main momory. Tloso caclos aro usuaIIy mucl Iargor llan firsl-IovoI caclos
(64KB lo 512KB) bocauso lloy loId aII llo informalion conlainod in llo firsl-
IovoI caclo, as voII as informalion llal llo firsl-IovoI caclo is unabIo lo rolain.
Socond-IovoI caclos improvo ovoraII porformanco sinco llo firsl-IovoI caclo can

-
-

-
-

-
-

--

-
-

-
-

-
-

--


-

gol informalion from llo socond-IovoI caclo al zoro vail slalos ovon on mosl
missos.

Mosl modorn microprocossors incIudo a IovoI-ono caclo on llo samo siIicon dio
as llo microprocossor coro. Tlo socond-IovoI caclo is lypicaIIy a soparalo com-
pononl or group of compononls on llo mollorboard.

Caclos aro managod by llo caclo managomonl Iogic using lardvaro aIgo-
rillms llal aro vory simiIar lo llo aIgorillms usod by llo oporaling syslom
vlon il managos virluaI momory (soo Iago TransIalion in llo claplor onli-
lIod Tlo 80386DX and SX Microprocossors). Tlo caclo conlains llo mosl ro-
conlIy accossod Iinos from main momory vliIo main momory conlains llo mosl
roconlIy accossod pagos from mass slorago. Duo lo llis simiIarily, main DRAM
is somolimos roforrod lo as llo IovoI llroo caclo in compulor mainframo do-
signs, sinco main DRAM caclos llo conlonls of mass slorago.
-
Tloro aro lvo onlilios in llo microprocossor vlicl nood officionl accoss lo
momory: llo inslruclion profolclor and llo oxoculion unil. UnIoss llo micro-
procossor is laIlod, llo profolclor is conslanlIy maIing suro llal ils profolcl
quouo is fuII of inslruclion bylos for llo inslruclion docodor lo docodo. WliIo
llo profolclor is folcling bylos, llo oxoculion unil may nood accoss lo momory
lo road or vrilo dala as llo rosuIl of oxoculing a MOV inslruclion. Tlo micro-
procossors bus unil givos priorily lo llo oxoculion unil sinco il is llo oxoculion
unil llal acluaIIy gols vorI dono in llo microprocossor. Tlo profolclor is
moroIy a porformanco onlancomonl looI. Bul if llo oxoculion unil is vory fasl
and if il is porforming many momory accossos, llo oxoculion unil may oxoculo
aII of llo profolclod inslruclions, llus omplying llo profolcl quouo, boforo llo
profolclor las lad a clanco lo accoss momory. Wlon llo profolcl quouo omp-
lios oul, llo oxoculion unil viII slarvo, llus slaIIing llo procossor unliI llo pro-
folclor can onco again accoss momory. Tlo accoss lo momory bocomos a
bollIonocI.

Ivon vill a caclo, lloros sliII a bollIonocI sinco llo profolclor and llo oxocu-
lion unil aro sliII conlonding for accoss lo llo caclo. To oIiminalo llis bollIo-
nocI, llo codo llal llo profolclor noods may bo pul in a dodicalod codo caclo
vliIo llo dala llal llo oxoculion unil noods may bo pul in a dodicalod dala
caclo. As Iong as lloro aro soparalo inlorfacos lo lloso lvo caclos, llo bollIo-
nocI may bo avoidod. Boll llo profolclor and llo oxoculion unil may bo sorvod
simuIlanoousIy from lloir ovn caclos. Caclos llal aro dosignod llis vay aro
roforrod lo as spIil or dodicalod caclos and llo lvo caclos aro caIIod llo in-

-

slruclion caclo and llo dala caclo. Somolimos, llo inslruclion caclo is roforrod
lo as llo codo caclo. Tlo Ionlium procossor las dodicalod inlornaI codo and
dala caclos vliIo llo 486 microprocossor las a combinod inlornaI caclo. Aflor
a miss on llo inlornaI caclo, llo microprocossors oxlornaI bus bocomos llo bol-
lIonocI for accoss lo oxlornaI momory, so il is raro lo soo dodicalod oxlornaI
caclos oxcopl on microprocossors llal lavo lvo sols of addross busos and lvo
sols of dala busos, sucl as ligl-spood digilaI signaI procossors.

Tlo abiIily lo accoss codo and dala simuIlanoousIy is a significanl advanlago of
spIil caclos vs. combinod caclos, bul llal doosnl moan llal spIil caclos aro
aIvays bollor. Unifiod or combinod caclos lavo llo abiIily lo dynamicaIIy
roaIIocalo spaco lo sloro moro codo and Ioss dala, or lo sloro moro dala and Ioss
codo, doponding on vlal informalion llo microprocossor is acluaIIy accossing
during a spocific poriod of limo. Tlo combinod caclo docidos vlal lo Ioop in
llo caclo by using a Ioasl-roconlIy-usod aIgorillm (doscribod Ialor in llis clap-
lor) basod on llo principIos of IocaIily (doscribod oarIior in llis claplor). Tlo
combinod caclo doosnl Inov or caro vlollor llo informalion llal il sloros
roprosonls codo or dala, so il doos nol lavo lo baso ils docision on vlollor llo
roquosls aro coming from llo profolclor or llo oxoculion unil.

SpIil caclos IacI llo abiIily lo dynamicaIIy roaIIocalo spaco lo sloro moro codo
or moro dala, and lloy run llo risI of llo loII-booll probIom. If you Iivo in a
cily vill loII roads, you may lavo nolicod llal Iinos form vlon lloro aro dodi-
calod Ianos, say for lrucIs onIy, or for oxacl clango onIy, vliIo ollor Ianos,
sucl as for rocoipls givon, viII bo omply. Tlal moans llal somo Ianos lavo
loo mucl capacily (lloy aro omply) and ollors IacI capacily (lloy aro bacIod
up). Tlo samo can lappon vill dodicalod caclos. If aII llo loII Ianos providod
aII llo samo sorvicos, llon llo Iinos vouId ovon oul and ovoraII llrouglpul
vouId incroaso. So vly do lloy lavo dodicalod Ianos` To provido priorily lo
corlain cIassos of lraffic. Tlals oxaclIy vlal llo dodicalod caclos do lloy
provido priorily sorvico lo lloir spocific onlilios in llo microprocossor. Bul
combinod caclos lypicaIIy provido llo abiIily lo sloro moro codo and dala
ovoraII sinco ovory Iocalion in llo caclo may bo usod for oillor codo or dala.
--
Ioss of caclo consisloncy occurs vlon llo copy of a Iocalion in caclo no Iongor
malclos llo conlonls of llo informalion slorod in main momory. Caclo consis-
loncy (aIso Inovn as caclo coloroncy) probIoms can rosuIl from oillor llo
caclo momory boing updalod vliIo llo main momory Iocalion is nol, or main
momory boing updalod vliIo llo caclo momory is nol. In oacl of lloso in-
slancos, somo aclion musl bo laIon lo onsuro llal llo confIicl is rosoIvod.

-


Il is imporalivo llal any microprocossor or bus maslor llal is accossing main
momory bo guaranlood accoss lo llo Ialosl copy of informalion llal is, or
slouId bo, slorod in main RAM.
-- -- -
Ioss of caclo consisloncy occurs vlon llo informalion slorod in caclo and llo
corrosponding Iocalion in main momory do nol malcl. Consisloncy probIoms
occur undor lvo condilions:

Caclo momory is updalod vliIo main momory is nol.
Main momory is updalod vliIo caclo momory is nol.

In llo silualions abovo, oillor caclo momory or main momory conlains slaIo
dala. In llo firsl caso, slaIo dala is causod by a caclo vrilo lil villin llo caclo
momory. In llo socond caso, a bus maslor vrolo lo main momory. SlaIo dala in
llo caclo musl bo updalod boforo llo microprocossor accossos llo caclo. SlaIo
dala in main RAM musl bo updalod boforo anollor bus maslor accossos llal Io-
calion in main RAM. Nolo llal llis doos nol nocossariIy moan llal llo caclo
and main RAM musl aIvays bo oxacl copios of ono anollor. Il doos moan llal
nono of llo microprocossors or bus maslors slouId ovor bo aIIovod lo accoss
slaIo dala. To dolocl a coloroncy probIom, llo caclo conlroIIor musl monilor
(snoop) llo syslom bus lo dolocl momory road and vrilo oporalions lo Iocalions
conlainod in caclo momory.

Consisloncy probIoms aro landIod difforonlIy doponding on llo caclo's vrilo
poIicy.

Wlon a caclo vrilo lil occurs, llo caclo momory is updalod. Caclo momory
llon conlains llo Ialosl informalion and main momory conlains ouldalod in-
formalion. Tlo Iocalion in main momory is said lo lavo slaIo informalion and
llo caclo Iocalion is said lo bo dirly, or modifiod, sinco il no Iongor is an ox-
acl dupIicalo of ils corrosponding Iocalion in main momory. To corrocl llis
caclo consisloncy probIom, llo corrosponding main momory Iocalion musl bo
updalod lo rofIocl llo clango mado in caclo. If main momory is nol updalod,
anollor bus maslor couId rocoivo slaIo dala vlon il roads from a momory Ioca-
lion llal las nol boon updalod. Tlroo vrilo poIicios commonIy usod lo provonl
llis lypo of consisloncy probIom aro:

-


vrilo-llrougl
bufforod vrilo-llrougl
vrilo-bacI

Tloso llroo vrilo poIicios aro covorod in llo foIIoving soclions.
--
Many IooI-llrougl caclo conlroIIors pass oacl vrilo oporalion on lo main
momory. Tlis onsuros llal main momory aIvays conlains vaIid dala. Tlis is
caIIod a vrilo-llrougl poIicy. Tlis impIomonlalion is vory simpIo and offoclivo,
bul rosuIls in poor porformanco sinco oacl vrilo oporalion musl accoss sIov
main momory.
--
A varialion of llo vrilo-llrougl poIicy is llo bufforod or poslod vrilo-llrougl
oporalion. Tlo bufforod vrilo-llrougl caclo las llo advanlago of providing
zoro-vail-slalo vrilo oporalions for boll lils and missos. Wlon a vrilo occurs,
a bufforod IooI-llrougl caclo lricIs ils associalod procossor inlo llinIing llo
informalion vas vrillon in zoro vail slalos, bul llo vrilo lo momory las nol
laIon pIaco yol. Tlo IooI-llrougl caclo conlroIIor sloros llo onliro vrilo opora-
lion in a buffor so llal il can compIolo llo momory vrilo lo main momory Ialor.

If lloro aro lvo bacI-lo-bacI momory vrilo bus cycIos, llo caclo conlroIIor in-
sorls vail slalos inlo llo socond bus cycIo unliI llo firsl momory vrilo las aclu-
aIIy boon compIolod. Tlo socond bus cycIo is llon poslod and llo CIU's
RIADY Iino is assorlod. Sinco momory vrilos lypicaIIy occur as singIo occur-
roncos, a Iargo porconlago of momory vrilos aro compIolod al zoro vail slalos.

In a bufforod vrilo-llrougl caclo, anollor bus maslor is nol pormillod uso of
llo busos unliI llo vrilo-llrougl is compIolod, lloroby onsuring llal llo bus
maslor rocoivos llo Ialosl informalion from main momory.

Tlo vrilo-llrougl oporalions doscribod abovo roquiro uso of llo syslom bus.
As a rosuIl, vlon llo vrilo-llrougl lo momory is laIing pIaco, bus maslors aro
provonlod from accossing main momory. Nolo, lovovor, llal llo caclo consis-
loncy probIom onIy occurs vlon a bus maslor roads from a Iocalion in main
momory llal las nol yol boon updalod by llo caclo conlroIIor. Tlo froquoncy
of llis lypo of occurronco is vory smaII. In facl, llo momory Iocalion viII IiIoIy
bo updalod numorous limos by llo CIU boforo anollor bus maslor roads llal

-

parlicuIar Iocalion. As a rosuIl, vrilo-llrougl dosigns, as voII as bufforod-
vrilo-llrougl dosigns, updalo main momory oacl limo a momory vrilo is por-
formod, llougl llo nood for sucl aclion may nol bo roquirod immodialoIy.

In summary, caclo coloroncy probIoms can occur vlon llo caclo momory is
updalod on a vrilo lil, bul llo corrosponding Iocalion in main momory is nol
updalod. IrobIoms vouId occur if anollor bus maslor road from a Iocalion in
main momory llal conlains slaIo dala. Tlo vrilo-llrougl poIicy provonls llis
polonliaI consisloncy probIom by aulomalicaIIy passing oacl vrilo oporalion
on lo main momory, lloroby onsuring llal main momory aIvays las llo Ialosl
dala.
--
Wrilo-bacI dosigns improvo ovoraII syslom porformanco by updaling momory
onIy vlon il is nocossary, lloroby Iooping llo syslom bus froo for uso by ollor
procossors and bus maslors. Main momory is updalod (vrillon lo) onIy vlon
anollor bus maslor accossos a main momory Iocalion llal conlains slaIo dala or
vlon a caclo Iocalion llal conlains modifiod informalion is aboul lo bo ovor-
vrillon lo maIo room for a nov caclo Iino.

Caclo momory Iocalions aro marIod as modifiod in llo caclo diroclory vlon
lloy aro updalod and llo updalo is nol propagalod llrougl lo momory. Wlon
anollor maslor is roading from main momory, llo caclo subsyslom musl moni-
lor, or snoop, llo syslom bus lo clocI for roads or vrilos lo main momory Ioca-
lions llal lavo modifiod dala in caclo momory.

Wrilo-bacI caclo dosigns aro moro compIicalod lo impIomonl bocauso lloy
musl maIo docisions on vlon lo updalo main momory.

-

- -
Wlon anollor dovico in llo syslom roquiros llo uso of llo busos, il musl bo-
como bus maslor. In a syslom llal doosn'l incorporalo a caclo conlroIIor, llo
dovico roquosling bus maslorslip assorls HOID lo soizo llo busos from llo mi-
croprocossor. In a syslom incorporaling a IooI-llrougl caclo, lovovor, llo ro-
quosling dovico musl forco llo caclo conlroIIor, rallor llan llo microprocossor,
lo roIinquisl conlroI of llo syslom busos. To do llis, llo roquoslor assorls llo
caclo conlroIIor's HOID inpul lo roquosl conlroI of llo busos. In rosponso, llo
conlroIIor disconnocls from llo syslom bus and assorls HIDA (HoId AcInovI-
odgo) lo granl llo syslom bus lo llo roquoslor. Tlo nov bus maslor can llon
uso llo syslom bus lo porform ono or moro bus cycIos lo lransfor dala.

Sinco a bus maslor can road from and vrilo lo main momory, caclo consisloncy
probIoms can occur undor lvo circumslancos:

- Wlon bus maslors vrilo lo main momory lloy
updalo Iocalions llal may aIso bo caclod by llo caclo conlroIIor. In lloso
inslancos, main momory is updalod and llo dala in caclo momory bocomos
slaIo. Tlo caclo conlroIIor musl monilor vrilos lo main momory lo dolocl
polonliaI coloroncy probIoms.
- Wlon bus maslors
road from main momory in vrilo-bacI caclo impIomonlalions, lloy may
road from a Iocalion llal conlains slaIo dala. Tlal is, llo Iocalion is in caclo
and las boon updalod in caclo bul nol in main momory. If llo bus maslor
is aIIovod lo road llo dala from main momory, slaIo dala vouId bo ro-
coivod. To dolocl llis polonliaI coloroncy probIom, vrilo-bacI caclos musl
aIso monilor roads from main momory.

Tlo foIIoving soclion discussos llo procoss of moniloring llo busos lo dolocl
polonliaI caclo consisloncy probIoms.
-
Bus snooping is llo mollod usod by caclo subsysloms lo monilor main mom-
ory accossos mado by anollor bus maslor. Tlo caclo conlroIIor monilors
(snoops) llo syslom bus vlon anollor bus maslor is porforming a bus cycIo lo
main momory. If llo Iocalion boing accossod in main momory is aIso conlainod
in llo caclo momory, il is lormod a caclo snoop lil. In sucl casos, caclo mom-
ory or main momory may conlain slaIo dala. Tvo condilions ariso llal croalo
llo nood lo snoop llo busos:

-


1. A bus maslor vrilos lo a Iocalion in main momory. Assumo llal llo caclo
conlroIIor las roIinquislod conlroI lo llo DMA conlroIIor so llal il may
lransfor a bIocI of dala from a disI conlroIIor inlo main momory. Il is quilo
possibIo llal llo DMA conlroIIor viII aIlor llo conlonls of main momory
Iocalions llal lavo aIroady boon copiod inlo llo caclo. Tlis moans llal llo
caclo and main momory vouId no Iongor bo coloronl. In ollor vords, llo
informalion in llo caclo viII nol accuraloIy rofIocl llo acluaI informalion in
main momory. Tlis is a polonliaIIy dangorous silualion bocauso llo micro-
procossor may nov folcl slaIo informalion from llo caclo and maIo bad
docisions basod on il.

Caclo subsysloms landIo llis silualion difforonlIy doponding on lov lloy
aro dosignod and doponding on lloir vrilo poIicios.

a) Wrilo-llrougl poIicy caclos may invaIidalo llo Iino in caclo. Tlo
noxl limo llal parlicuIar Iocalion is accossod by llo caclo's IocaI m-
icroprocossor, il rosuIls in a caclo miss, forcing llo caclo subsys-
lom lo gol llo informalion from main momory vloro llo vaIid
dala rosidos.
b) Wrilo-bacI poIicy caclos cannol simpIy invaIidalo llo Iino sinco
modificalions llal may lavo boon mado by llo microprocossor
vouId bo Iosl. TypicaIIy, llo caclo Iino is vidor llan llo dala bus,
so llo bus maslor is nol updaling llo onliro caclo Iino. Sinco llo
caclo cannol romombor vlicl bylos in llo Iino aro modifiod, il
musl pusl bacI llo onliro Iino lo momory. Wrilo-bacI poIicy
caclos musl forco llo bus maslor lo aborl llo bus cycIo lo provonl
accoss lo llo slaIo dala in main RAM. Tlo caclo llon puslos bacI
llo modifiod Iino lo momory and invaIidalos ils copy of llo Iino.
Tlo bus maslor llon rolrios llo bus cycIo again and vrilos ils
clangos inlo main RAM. Wlon llo microprocossor lrios lo accoss
llal Iocalion in llo fuluro, llo caclo las a miss and roads llo Ialosl
informalion from main momory.
c) Iillor vrilo-llrougl or vrilo-bacI poIicy caclos may snarf llo
dala llal llo bus maslor is vriling lo momory. Wlon llo caclo
subsyslom snoops llo bus during anollor bus maslor's vrilo op-
oralion and dolocls a snoop lil, il capluros llo dala from llo sys-
lom bus vliIo ils boing vrillon lo main momory by llo bus maslor.
In llis vay, boll main momory and caclo momory gol updalod al
llo samo limo, llus oIiminaling llo polonliaI consisloncy probIom.


-

2. A bus maslor roads from a Iocalion in main momory. OnIy caclo subsys-
loms llal uso a vrilo-bacI poIicy monilor llo syslom busos for momory
roads. In llis caso, llo caclo conlroIIor snoops momory roads by anollor
bus maslor lo dolormino if llo Iocalion boing road from is a Iocalion llal
las boon updalod in caclo, bul nol in main momory (i.o. llo caclod Ioca-
lion is modifiod). If so, llis is a snoop lil on a modifiod Iino and llo caclo
subsyslom musl forco llo bus maslor accossing llo Iocalion lo suspond ils
bus cycIo (bacIoff) unliI llo caclo subsyslom las updalod main momory.
Onco llo main momory Iocalion las boon updalod by llo caclo subsyslom,
llo bus maslor is aIIovod lo compIolo ils accoss lo main momory.

AIlornalivoIy, vlon a snoop road lil is doloclod, llo caclo conlroIIor couId
causo llo accoss lo main momory lo bo aborlod and suppIy llo vaIid dala
diroclIy lo llo bus maslor porforming llo road.

Coloroncy may bo mainlainod in a varioly of vays. Tlo primary mollod is
basod on bus valcling, or snooping, as doscribod abovo, bul lloro aro al Ioasl
lvo ollor, Ioss commonIy usod (bul porfoclIy viabIo), aIlornalivos.
-
AII of llo informalion in a vrilo-llrougl poIicy caclo is an oxacl copy of llo in-
formalion curronlIy in main RAM. Informalion vouId nol bo pormanonlIy
damagod or Iosl if llo vrilo-llrougl caclos conlonls voro fIuslod (invaIi-
dalod), bocauso llo informalion is aIso rosidonl in main RAM. Tloroforo, ono
vay lo onsuro llal a vrilo-llrougl poIicy caclo aIvays gols llo Ialosl and
groalosl informalion llal a bus maslor vrolo lo main RAM is lo fIusl llo caclo
vlonovor a bus maslor issuos HOID roquosl lo llo caclo. Wlon llo micro-
procossor subsoquonlIy lrios lo accoss any nov informalion, llo caclo las a
miss and gols llo informalion from main RAM. AdmillodIy, llis is a rallor
draconian mollod of mainlaining coloroncy, bul il vorIs, and ils simpIo.

In facl, fIusling is an oconomicaI mollod of mainlaining coloroncy in sysloms
vloro llo caclo raroIy las lo givo up llo bussos lo anollor bus maslor. A good
oxampIo is a Iaplop syslom. Ils vory raro for a bus maslor (ollor llan llo ro-
frosl Iogic) lo soizo llo bussos avay from llo caclo in a Iaplop. Tlo caclo
doosnl nood lo mainlain coloroncy vill llo RAM rofrosl Iogic, so llo caclo
doos nol nood lo bo fIuslod vlon llo rofrosl Iogic assorls HOID. In gonoraI,
llo onIy ollor bus maslor in llo Iaplop is llo DMA conlroIIor, and il is raroIy
usod. So, llo oxponso of bus snooping Iogic can bo savod by moroIy fIusling llo
vrilo-llrougl poIicy caclo on lloso raro limos llal llo DMA conlroIIor bo-
comos llo bus maslor.

-


Il vouId bo a major mislaIo lo invaIidalo llo conlonls of a vrilo-bacI poIicy
caclo in llis mannor sinco llo vrilo-bacI poIicy caclo may conlain informalion
llal doos nol appoar in main RAM. Tlo informalion vouId bo Iosl.

Mosl of llo doscriplions of lov lo mainlain caclo coloroncy aro basod on forc-
ing llo caclo conlroIIor lardvaro lo aulomalicaIIy onforco coloroncy. Hard-
varo-onforcod coloroncy isnl aIvays nocossary. If llo oporaling syslom
soflvaro can guaranloo llal no lvo microprocossors or bus maslors viII ovor
accoss llo samo momory Iocalions, llon lloros no nood for llo caclo conlroIIor
lo vorry aboul anollor bus maslors momory accossos.

UIlimaloIy, llo oporaling syslom soflvaro las conlroI ovor llo microprocossor
and ovor ovory bus maslor in llo syslom. Tlo oporaling sysloms dovico drivors
givo commands lo llo bus maslors, loIIing llom vlicl momory Iocalions lo ac-
coss. Tlo oporaling syslom can lloroforo issuo commands llal provonl bus
maslors from accossing (slaring) momory Iocalions vloso conlonls aro cur-
ronlIy conlainod in llo microprocossors caclo.

Soflvaro-onforcod coloroncy can provido bollor llrouglpul llan lardvaro-
onforcod coloroncy vlon lransforring Iargo bIocIs of dala bolvoon main mom-
ory and poriploraIs by avoiding llo limo-consuming bacIoffs and puslbacIs
llal aro oflon usod for lardvaro-onforcod coloroncy. Tlo puslbacIs aro
avoidod bocauso llo caclo doos nol conlain any of llo Iocalions llal llo bus
maslor is accossing.

Of courso, if soflvaro-onforcod coloroncy is usod, llo oporaling syslom las lo
bo smarl onougl lo manago llo caclo ilsoIf. Tlo caclos usod in llo 486 and
Ionlium procossors aro dosignod lo provido lardvaro-onforcod coloroncy,
soflvaro-onforcod coloroncy, or boll.

-


Caclo momory can bo organizod in various vays lo improvo llo IiIoIilood of
caclo lils. In ollor vords, caclo momory of llo samo sizo can provido difforonl
lil ralos doponding on llo vay il is organizod. Tlo foIIoving soclions discuss
llo common mollods of organizing caclo momory.
--
Tlo fuIIy-associalivo mollod of organizalion providos llo oplimum slrucluro
for onsuring caclo lils, and for a givon caclo sizo il providos llo liglosl por-
formanco of aII ollor organizalions. IuIIy-associalivo caclos viov momory as a
singIo pago or bIocI rogardIoss of ils sizo. Soo figuro 14-8. Any Iocalion in main
momory can bo copiod lo any Iocalion villin llo caclo. Tlis providos maxi-
mum fIoxibiIily in sloring informalion from anyvloro in momory.

In ordor lo Ioop lracI of any Iocalion in momory, llo caclo diroclory musl
sloro llo onliro addross. Any givon momory Iocalion roquoslod migll bo found
in any ono of llo caclo Iocalions. Tlus, oacl accoss lo momory roquiros llal llo
addross of llo roquoslod informalion bo comparod lo oacl onlry in llo onliro
caclo diroclory lo dolormino if llo roquoslod informalion is in caclo momory.
Tlo limo noodod lo clocI llo addross againsl llo diroclory onlrios (caIIod llo
IooI-up ponaIly) can bo unaccoplabIy Iong in fuIIy-associalivo caclos. Sinco llo
IooI-up ponaIly can bo subslanliaI, fuIIy-associalivo caclos aro usuaIIy quilo
smaII (4KB or Ioss) roducing llo numbor of caclo onlrios llal lavo lo bo
clocIod vill oacl momory roquosl.

Tloso lypos of smaIIor caclos do nol provido accoplabIo lil ralos vill mosl ap-
pIicalions lypicaIIy run on ISA maclinos. Tlo claIIongo is lo dosign a Iargor
caclo llal providos liglor lil ralos villoul llo associalod IooI-up ponaIly. Tlo
concopl of llo dirocl-mappod caclo providos llis soIulion.


-


--




















--
--
--
--
--
--



-

--
Dirocl-mappod caclos roquiro llal onIy ono diroclory onlry bo clocIod lo do-
lormino vlollor llo roquoslod momory Iocalion is in caclo. Tlis moans llal
caclo lils and missos can bo dolorminod vory quicIIy. SingIo IooI-ups aro pos-
sibIo duo lo llo vay dirocl-mappod caclo conlroIIors organizo caclo and viov
momory.

Iiguro 14-9 is a simpIifiod diagram of llo momory slrucluro in a dirocl-mappod
caclo syslom. Nolico llal llo caclo is subdividod inlo unils caIIod sols and oacl
sol las ils ovn diroclory onlry.

Tlo caclo conlroIIor viovs momory as IogicaIIy dividod inlo numorous pagos
oacl boing llo samo sizo and laving llo samo organizalion as llo caclo mom-
ory. Ivory Iocalion in momory occupios a givon sol posilion villin a pago.
Wlon a momory Iocalion is road, il is pIacod in caclo al llo samo sol Iocalion
llal il occupios in main momory. In ollor vords, informalion from a givon sol
in main momory is mappod inlo llo samo sol villin llo caclo. Ior a dirocl-
mappod caclo, oacl sol las a singIo diroclory onlry, lloroforo, llo informalion
slorod in a sol musl como from ono pago in momory.

Dirocl-mappod caclo slrucluros aIIov llo caclo conlroIIor lo idonlify llo Ioca-
lion of informalion in caclo basod on lvo criloria:

1. llo sol posilion llal a Iocalion occupios in llo caclo (llo sol vloro llo
momory Iocalion comos from villin a pago)
2. llo pago numbor conlainod in llo caclo diroclory (llo pago numbor llo Io-
calion comos from in main momory)

-


--

Iiguro 14-10 is a simpIifiod oxampIo of a dirocl-mappod caclo organizalion and
oporalion. Tlis oxampIo iIIuslralos lov llo caclo vouId landIo six road ro-
quosls from Iocalions nol curronlIy slorod in caclo. Iacl limo llo procossor ro-
quosls informalion from momory, llo caclo syslom comparos llo addross lo a
diroclory onlry. Iacl diroclory onlry Ioops lracI of vlicl pago in main mom-
ory informalion from oacl sol comos from. UnIiIo llo fuIIy-associalivo caclo,
llo procossor nood onIy comparo llo roquoslod momory addross vill a singIo
diroclory onlry. Tlo Iovor porlion of llo addross idonlifios vlicl sol llo Ioca-
lion occupios in main momory, and llus idonlifios llo diroclory onlry llal musl
bo clocIod. Tlo uppor porlion of llo addross is comparod lo llo diroclory on-
lry lo dolormino if llo momory pago roquoslod malclos llo onlry. If lloy
malcl, llo roquosl is a caclo lil and if nol il is a caclo miss.
















-














































































-


-
-
- - -


-

IoIIoving is llo soquonco of ovonls llal occurs vlon oacl inslruclion is folclod
from momory. Nolo llal oacl of llo foIIoving roquosls rosuIls in a caclo miss
and llo informalion musl bo oblainod from main momory.

1. Tlo firsl roquosl (road 1) is for informalion vlicl rosidos in sol 1 of pago 0.
Sinco llo informalion road from momory is from sol 1 of a givon pago, llo
informalion is slorod in llo sol 1 posilion in caclo momory. Tlo corro-
sponding diroclory onlry for sol 1 is updalod lo indicalo llal llo informa-
lion in sol 1 of llo caclo is from pago 0.
2. SimiIarIy, road 2 is from a momory Iocalion llal rosidos in sol 2 of pago 0 in
main momory. Tlis informalion is pIacod inlo llo caclo in llo sol 2 posi-
lion and llo corrosponding diroclory onlry is updalod lo indicalo llal llo
sourco pago vas 0.
3. Noxl, road 3 is accossod from sol 3 of pago 0 and is pIacod in llo caclo in
llo sol 3 posilion and llo corrosponding diroclory onlry is updalod lo pago
0.
4. Road 4 jumps lo a liglor momory Iocalion llal occupios sol n (llo Iasl sol
villin pago 1. Tlis informalion is slorod in llo sol n posilion in caclo and
llo diroclory for sol n is updalod lo indicalo pago 1.
5. Road 5 comos from llo firsl sol (sol 0) in pago 2 and is pIacod in llo sol 0
posilion of caclo. Tlo corrosponding diroclory onlry is updalod lo pago 2.
6. Tlo Iasl roquosl from momory (road 6) is from sol 1 in pago 2. Hovovor, sol
1 in llo caclo is aIroady occupiod by informalion from sol 1 of pago 0. Sinco
no ollor sol 1 posilion oxisls in llo caclo, llo informalion curronlIy in sol 1
musl bo ropIacod. Tlo nov informalion from road 6 is pIacod in sol posilion
1 and llo diroclory onlry is updalod lo pago 2.

Will a dirocl-mappod caclo, lvo momory sols cannol bo Iopl in caclo al llo
samo limo if llo sols como from difforonl pagos in momory. As you can soo, a
dirocl-mappod caclo providos onIy ono vay lo sloro informalion road from a
givon sol.

Ollor caclo organizalions lavo moro llan ono pIaco lo sloro informalion from
a givon sol in caclo. Ior oxampIo, llo lvo-vay sol-associalivo caclo providos
lvo pIacos, or vays, lo sloro informalion llal occupios llo samo sol posilion in
difforonl momory pagos.
--
In a lvo-vay sol-associalivo organizalion, vlon llo caclo conlroIIor gols in-
formalion from main momory, il las a cloico of lvo caclo momory banIs lo
sloro llo dala in. Caclo banIs aro froquonlIy roforrod lo as vays. In ollor

-

vords, llo conlroIIor musl clooso ono of lvo vays lo sloro llo dala in. Honco,
llo lorm lvo-vay sol-associalivo.

Iiguro 14-11 slovs llo samo oxampIo usod in llo dirocl-mappod discussion lo
slov llo offocl llal lvo-vay caclo organizalions can lavo on porformanco.
Assumo llal llo six momory roads accoss llo samo oxacl Iocalions in main
momory as boforo and llal llo lolaI caclo momory sizo is llo samo as llo di-
rocl-mappod oxampIo in figuro 14-10.
Nolico llal oacl caclo vay (A and B) las ils ovn diroclory. Sinco lloro aro lvo
vays for informalion from a givon sol lo bo caclod in, oacl momory roquosl
musl bo comparod lo lvo diroclory onlrios lo dolormino vlollor or nol llo in-
formalion is curronlIy slorod in caclo.
Wlon comparod lo llo dirocl-mappod caclo, llo oxampIo lvo-vay sol-
associalivo caclo conlroIIor viovs momory as boing organizod in pagos oquaI lo
ono-laIf llo sizo of llo dirocl-mappod pagos. Tlo foIIoving slops iIIuslralo llo
soquonco of llo six momory accossos. Nolo llal llo firsl llroo roads aro idonli-
caI lo llo dirocl-mappod oxampIo.

1. Tlo firsl roquosl (road 1) is for informalion vlicl rosidos in sol 1 of pago 0.
Sinco llo informalion road from momory is from sol 1 of a pago, llo infor-
malion is slorod in llo sol 1 posilion in caclo vay A. A subsoquonl soclion
onlilIod Ioasl-RoconlIy Usod (IRU) AIgorillm doscribos lovvay A vas
soIoclod lo sloro llo sol. Tlo corrosponding diroclory onlry for sol 1 is up-
dalod lo indicalo informalion in sol 1 of llo caclo is from pago 0.
2. SimiIarIy, road 2 is from a momory Iocalion llal rosidos in sol 2 of pago 0 in
main momory. Tlis informalion is pIacod inlo vay A in llo sol 2 posilion
and llo corrosponding diroclory onlry is updalod lo indicalo pago 0.
3. Noxl, road 3 is accossod from sol 3 of pago 0 and pIacod in vay A in llo sol
3 posilion and llo corrosponding diroclory onlry is updalod lo pago 0.
4. Road 4 is from sol n of pago 3 and is pIacod in llo sol n posilion in vay A.
5. Tlo Iocalion for Road 5 occupios sol 0 of pago 4. Tlis informalion is slorod
in caclo vay A in llo sol 0 posilion.
6. Road 6 comos from sol posilion 1 villin pago 4 and cannol bo slorod in
vay A bocauso il is aIroady occupiod vill dala from road 1. Dala from
road 6 insload is pIacod in sol posilion 1 of vay B.


-


--





-

As you can soo a lvo-vay momory slrucluro is moro fIoxibIo llan dirocl-
mappod. Tlo lvo-vay sol-associalivo caclo vas abIo lo caclo aII six of llo
momory roquosls villoul ovorvriling an onlry, vliIo llo dirocl-mappod caclo
couId nol. GonoraIIy spoaIing llo lvo-vay sol-associalivo caclo rosuIls in a
liglor porconlago of caclo lils.
--
Tlo four-vay sol-associalivo caclo momory organizalion is simpIy an oxlonsion
of llo lvo-vay slrucluro. Caclo momory is dividod inlo four banIs (vays) of
oquaI sizo and main momory is viovod as dividod inlo pagos oacl oquaI in sizo
lo llal of a vay. Tlo four-vay slrucluro providos ovon moro fIoxibiIily llan llo
lvo-vay organizalion.

Tlo four-vay sol-associalivo caclo roquiros four onlrios lo bo clocIod lo maIo
suro llo informalion is nol in caclo. Iacl limo llo numbor of caclo vays in-
croasos, llo numbor of IooI-ups incroaso proporlionaIIy. A caclo vill muIlipIo
vays usuaIIy impIomonls a comparalor llal comparos llo largol pago addross
lo aII of llo soIoclod lags simuIlanoousIy (o.g., a four-vay sol associalivo caclo
comparos llo largol pago numbor lo llo four soIoclod diroclory onlrios). Nolo
llal conlinuing lo incroaso llo numbor of vays vouId ovonluaIIy Ioad lo a
fuIIy-associalivo slrucluro.

Tlo inlornaI caclo of llo 486 microprocossor is four-vay sol-associalivo. Soo llo
MindSlaro Arclilocluro Sorios pubIicalion onlilIod -
from Addison-WosIoy for dolaiIs on llo 486s inlornaI caclo.
- -
In lvo- or four-vay caclos, vlon aII caclo vays lavo vaIid informalion slorod
in a givon sol and nov informalion noods lo bo slorod in llal sol posilion, a do-
cision musl bo mado as lo vlicl informalion lo ropIaco. Mosl caclo conlroIIors
uso a Ioasl-roconlIy usod (IRU) aIgorillm lo dolormino vlicl caclo onlry lo
ovorvrilo. Tlo IRU Iogic Ioops lracI of llo caclo Iocalions villin a sol llal
lavo boon Ioasl roconlIy usod. Tlis is consislonl vill llo principIo of lomporaI
IocaIily, moaning llal informalion llal las nol roconlIy boon usod viII nol bo
IiIoIy lo bo usod again soon.

AIllougl llo procossor dosignor may impIomonl an IRU aIgorillm llal slriclIy
Ioops lracI of llo Ioasl-roconlIy usod diroclory onlry villin llo soIoclod group,
llis can roquiro a fairIy subslanliaI amounl of Iogic. Rallor, many dosignors

-

clooso lo impIomonl a psoudo-IRU aIgorillm llal maIos a bosl allompl al
Iooping lracI of llo Ioasl-roconlIy usod diroclory oIomonl. As an oxampIo, llo
486 procossor usos a psoudo-IRU aIgorillm.

Wlon a caclo miss occurs, llo caclo subsyslom musl go lo main momory lo gol
llo roquoslod informalion. Tlo caclo subsyslom can bo dosignod lo folcl moro
informalion llan vas acluaIIy roquoslod. Tlo amounl of informalion folclod
from momory by llo caclo conlroIIor is dofinod as a Iino by InloI. Ollor manu-
faclurors uso llo lorms bIocI or soclor lo dofino llo amounl of informalion llo
caclo folclos in llo ovonl of a caclo miss. Iino sizo varios according lo dosign,
bul lypicaIIy rangos from 4 bylos lo 32 bylos. Tlo Iino is llo smaIIosl unil of in-
formalion llal a caclo can map. Tlis moans llal oacl limo a caclo miss occurs
an onliro Iino of informalion musl bo road from main momory. Tlis is caIIod a
caclo Iino fiII.

Ior a givon caclo dala RAM sizo, as llo Iino sizo incroasos, llo caclo diroclory
(lag RAM) sizo docroasos. Sinco llo caclo diroclory is ovorload and doosnl
sloro dala or codo llal llo microprocossor can uso, il maIos sonso lo lry lo ro-
duco llo amounl of lag RAM llal llo caclo usos. Tlo caclo diroclory conlains
llo numbors of llo pagos in main momory llal Iinos como from. Ior oxampIo, a
4KB dirocl-mappod caclo noods lo bo abIo lo addross 1,048,576 4KB-Iong pagos
in main momory (assumo llo caclo is dosignod lo landIo addrossos anyvloro
in a 4GB rango, 4GB / 4KB = 1M.) Iacl of llo caclo diroclory onlrios is llus 20
bils vido lo soIocl 1 of 1M pagos. Iacl of llo 4KB-Iong pagos consisls of Iinos.
Assumo llal llo Iino sizo is 4 bylos. In llis caso, lloro aro 1,024 sols in llo caclo
(4KB caclo dala RAM / 4 bylos = 1,024 sols). Tloroforo, lloro musl bo 1,024 on-
lrios in llo caclo diroclory. Sinco oacl onlry is 20 bils vido, llo caclo noods
1,024 x 20 bils or 2,560 bylos of SRAM for llo diroclory. 2.5KB is a Iol of ovor-
load for a 4KB caclo.

If llo Iino sizo is incroasod lo 16 bylos, llo numbor of sols roquirod drops lo 256
(4KB / 16 bylos = 256). Tlo vidll of llo caclo diroclory onlrios slays llo samo
(20 bils) sinco llo caclo is sliII addrossing 1M of 4KB-Iong pagos in main mom-
ory. So, llo caclo noods 256 x 20 bils or 640 bylos of SRAM for llo diroclory.
Tlals 75 Ioss.

AIong vill saving spaco and monoy, Iargor Iino sizos can incroaso caclo por-
formanco, bocauso a Iargor amounl of informalion is slorod as a rosuIl of oacl
miss. Sinco inslruclions aro normaIIy roquoslod from soquonliaI momory Ioca-
lions (principIo of spaliaI IocaIily), a Iargor Iino sizo can rosuIl in a liglor lil

-

ralo. Tlo caclo Iino fiII oporalion londs lo profolcl inslruclions llal llo micro-
procossor viII roquiro in llo noar fuluro, pIacing llom in llo ligl-spood caclo
boforo llo microprocossor noods llom.

Iargor Iino sizo doosnl aIvays moan bollor porformanco. Tloro aro Iimils lo
lov Iargo llo Iino sizo can bo boforo porformanco bogins lo suffor. A porform-
anco lradooff of Iargor Iino sizos is llal Iino sizos Iargor llan llo dala pall lo
main momory roquiro sovoraI momory accossos lo compIolo oacl caclo Iino fiII.
Tlis laIos limo and incroasos llo syslom bus uliIizalion. To counlor llis prob-
Iom somo caclo subsysloms aro dosignod lo do bursl lransfors vlon porform-
ing caclo Iino fiIIs. Ono oxampIo of sucl a caclo is llo inlornaI caclo in llo 486.

Anollor porformanco lradooff of Iargor Iino sizos is sIacI (vaslod) spaco in llo
caclo. If llo Iino sizo is loo Iargo, llon llo caclo may bo sloring many bylos llal
llo microprocossor doos nol inlond lo accoss. Sinco llo caclo can onIy lracI
compIolo Iinos, il musl gol aII llo bylos in a Iino, ovon if llo microprocossor
onIy vanls ono of llo bylos in llal Iino. Tlo rosl of llo SRAM in llo Iino is usod
up sloring unvanlod bylos. SlalislicaIIy, llo oplimaI Iino sizo for oacl caclo do-
sign is basod on llo lypicaI oporaling syslom/appIicalion mix and dala slruc-
luro roquiromonls llal llo syslom is largolod for.

As discussod abovo, llo Iargor llo Iino sizo, llo smaIIor llo caclo diroclory (bul
big Iino sizos can lurl porformanco). An approacl llal aIIovs for smaII diroclo-
rios and good porformanco is llo soclorod caclo. InloI dofinos a soclor as a
group of consoculivoIy-addrossod Iinos llal slaro llo samo caclo diroclory on-
lry. Ollor manufaclurors dofino soclor and Iino difforonlIy, bul llo soclorod
caclo concopl is llo samo.

In a soclorod caclo, oacl soclor consisls of lvo or moro Iinos. Tlo Iinos musl
como from Iocalions llal aro adjaconl lo ono anollor in main momory bocauso
aII of llo Iinos in llo soclor lavo llo samo lag or pago numbor in llo caclo di-
roclory. AIllougl llo caclo diroclory onIy las ono pago numbor for llo Iinos in
a soclor, il doos lavo an individuaI sol of slalo bils for oacl Iino. Tlal moans
llal llo Iino is sliII llo smaIIosl unil of dala llal llo caclo can lracI.

-


Tlo caclo momory is roIalivoIy smaII comparod lo llo main syslom momory.
Tlo sizo of llo caclo varios by dosign, bul lypicaIIy rangos from 4KB lo 512KB
and doponds on vlollor llo caclo is a firsl- or socond-IovoI caclo. Tlo foIIov-
ing aro somo gonoraI dosign considoralions for firsl- and socond-IovoI caclo
subsysloms.
-
To acliovo llo liglosl caclo porformanco, informalion roquoslod by llo proc-
ossor musl rosido in llo firsl-IovoI caclo a ligl porconlago of llo limo. Tlo
clancos llal informalion is in caclo is roIalod lo caclo sizo and organizalion. In
gonoraI, a Iargor caclo viII givo a liglor lil ralo and llus liglor porformanco.

Tlo ruIo of Iargor caclos giving liglor porformanco musl bo lomporod in Iigll
of lvo faclors: cosl and IocaIily of roforonco. Sinco SRAM, usod in caclo do-
signs, is oxlromoIy oxponsivo, lradooffs musl bo mado bolvoon cosl of addi-
lionaI caclo momory and incroasod porformanco. Tlis lradooff bocomos
parlicuIarIy gormano vlon considoring llo non-Iinoar incroaso in porformanco
as caclo sizo incroasos. Rofor lo labIo 14-1. Tlo informalion in llis labIo is lypi-
caI of rosuIls during dosign procoss simuIalions. Nolico llal addilionaI caclo
momory providos onIy minimaI incroasos in porformanco onco caclo sizo in-
croasos boyond 16KB. Hovovor, llo oplimum sizo of caclo is liglIy dopondonl
on lov voII llo appIicalion fils llo IocaIily of roforonco modoI.

-

1KB 41
8KB 73
16KB 81
32KB 86
64KB 88
128KB 89

Tlo principIo advanlago of llo socond-IovoI caclo is llal il can suppIy a Iino of
informalion lo llo IovoI ono caclo vlon il incurs a caclo miss. Tlo porform-
anco gains of socond-IovoI caclos llon roIalo lo slorloning llo limo noodod for
llo firsl-IovoI caclo lo porform a caclo Iino fiII. Ior oxampIo, if llo firsl-IovoI

-

caclo las a lil ralo of 85, llon 15 of aII accossos lo momory rosuIl in caclo
missos. A corlain porconlago of llo missos from llo firsl-IovoI caclo viII rosuIl
in caclo lils al llo socond-IovoI caclo. Assuming llo socondary caclo aIso las
a lil ralo of 85, llon 85 of llo 15 missod by llo firsl-IovoI caclo rosuIl in
caclo lils. OvoraII llon, 97.75 of aII roquosls lo momory aro suppIiod by
caclo.

As is lruo for firsl-IovoI caclos, socond-IovoI caclos onlanco porformanco duo
lo llo IocaIily of roforonco principIos. Socond-IovoI caclos musl loId copios of
informalion llal llo firsl-IovoI caclo missos. In ollor vords, socond-IovoI
caclos loId informalion curronlIy in llo firsl-IovoI caclo aIong vill informa-
lion llal vas proviousIy in llo firsl-IovoI caclo (bul vas subsoquonlIy oIimi-
nalod lo maIo room for nov informalion). By dosign llon, socond-IovoI caclos
musl bo sovoraI limos Iargor llan llo firsl-IovoI caclo so llal informalion pro-
viousIy loId in llo firsl-IovoI caclo can bo oblainod from llo socond-IovoI caclo
vlon il is noodod again.

Il slouId bo apparonl llal llo oplimum sizo of any caclo doponds on llo na-
luro of llo programs llal accoss momory for codo and dala. Somo manufaclur-
ors spond considorabIo limo, monoy and offorl lo undorsland llo naluro of
momory accoss in various oporaling onvironmonls so llal llo bosl caclo can bo
dosignod and impIomonlod.
--
Caclos in x86-basod sysloms aro plysicaIIy addrossod. Tlal moans llal llo
momory managomonl unil (llo sogmonlalion unil and llo paging unil) lrans-
Ialos llo IogicaI addross inlo llo plysicaI addross boforo llo plysicaI addross is
submillod lo llo caclo for a IooI-up.

Somo ollor compulor arclilocluros submil llo addross lo llo caclo boforo pago
lransIalion is dono. Tlis spoods llo accoss lo llo caclo bocauso il savos a slop.
Sucl caclos aro virluaIIy-addrossod insload of plysicaIIy-addrossod.

Caclo conlroIIors do nol caclo informalion road from I/O addrossos. Il doosn'l
maIo sonso lo do so. Considor llo sconario vloroin a caclo conlroIIor Ioops a
copy of llo prinlor slalus llal is rolurnod in rosponso lo an I/O road from llo
prinlor slalus I/O porl. If llo microprocossor roquosls llo prinlor slalus al
somo limo in llo fuluro, llo roquosl vouId bo lonorod from llo caclo, and llo

-

program vouId bo givon llo slalus of llo prinlor fivo minulos ago. In facl, llo
prinlor may lavo run oul of papor lvo minulos ago.

Wlon llo caclo conlroIIor inlorcopls a procossor-inilialod I/O bus cycIo, il im-
modialoIy inilialos llo bus cycIo on llo syslom bus. Wlon llo I/O dala is road
from llo I/O dovico, il is rolurnod lo llo microprocossor and a copy is nol Iopl
in llo caclo.

Corlain aroas of momory spaco musl bo dosignalod as non-cacloabIo addross
spaco. If llo caclo conlroIIor voro lo allompl lo Ioop copios of informalion
from lloso aroas of momory spaco, il may ond up vill slaIo informalion llal
doosn'l accuraloIy rofIocl llo acluaI conlonls of main momory.

A nolvorI conlroIIor card vill duaI-porlod RAM is a good oxampIo. Tlo nol-
vorI conlroIIor card can rocoivo informalion ovor llo nolvorI and vrilo il inlo
llis momory villoul using llo bus. Tlo syslom board microprocossor can aIso
accoss llo momory. If llo caclo conlroIIor on llo syslom board voro lo caclo
informalion from llis aroa of momory, il vouId bo unabIo lo dolocl momory aI-
loralions porformod by llo nolvorI conlroIIor using ils on-card busos. Tlo in-
formalion in llo caclo vouId no Iongor bo coloronl vill main momory.

Tlo syslom board musl incorporalo a momory addross docodor llal dolocls
non-cacloabIo momory addrossos and loIIs llo caclo conlroIIor nol lo Ioop a
copy of informalion road from lloso momory Iocalions. Tlo roquoslod informa-
lion slouId bo road from main momory and givon lo llo microprocossor vill-
oul maIing a copy in llo caclo. Tlo 82385 caclo conlroIIor las an inpul caIIod
NCA (non-cacloabIo accoss) llal is usod lo loII il vlon llo microprocossor is
accossing a non-cacloabIo momory Iocalion. Tlo syslom board dosignor can ac-
compIisl llis in ono of lvo vays:

Tlo dosignor may sol asido ono or moro pro-dofinod momory addross
rangos as non-cacloabIo spaco. Any oxpansion cards vill addrossabIo
duaI-porlod momory slouId llon bo configurod so as lo map lloir on-
board RAM inlo llis spaco. Tlo syslom board vouId incIudo a momory
addross docodor dosignod lo dolocl accossos villin lloso fixod momory
addross rangos and assorl NCA lo llo caclo conlroIIor.
Tlo dosignor may incIudo a programmabIo momory addross docodor on
llo syslom board. Iacl limo llo maclino is povorod up, llo programma-
bIo addross docodor is aulomalicaIIy configurod lo rocognizo llo momory

-

addross rangos usod by oxpansion cards vill non-cacloabIo momory on-
board.
-
Wlon running main momory diagnoslics, llo caclo conlroIIor can causo prob-
Ioms by inlorcopling momory roads and novor Iolling llom propagalo oul lo
main momory. Tlo diagnoslic vouId assumo llal dala is boing road from main
momory vlon, in facl, il is boing rolurnod from llo caclo.

In ordor lo onsuro llal llis probIom doosn'l occur, caclo conlroIIors lypicaIIy
incIudo an inpul caIIod IIUSH. Wlon assorlod, il causos llo caclo conlroIIor
lo cIoar llo vaIid bil in ovory diroclory onlry lo 0, lloroby invaIidaling aII caclo
onlrios. AII of llo vaIid bils romain cIoarod as Iong as llo IIUSH inpul is Iopl
assorlod. TypicaIIy, llo IIUSH Iino is assorlod or doassorlod by vriling llo
approprialo vaIuo lo an I/O Iocalion llal las boon sol asido for llis purposo.
Tlo I/O Iocalion usod and llo dala nocossary lo assorl or doassorl IIUSH is
syslom dosign-spocific.

Wlon IIUSH is assorlod, ovory momory road inilialod by llo microprocossor
rosuIls in a momory road bus cycIo, causing main momory lo bo accossod for
ovory momory road.





-
Irior claplors covorod llo subjocl of RAM momory and momory caclo subsys-
loms.
-
Tlis claplor covors llo various lypos of ROM momory oncounlorod in ISA sys-
loms. Tlis incIudos IROM, MROM, IIROM, IIIROM and fIasl IIIROM. In
addilion, llo subjocls of ROM diagnoslics, sladov RAM, doubIo-mapping, and
dovico ROMs aro covorod.

Tlis claplor concIudos Iarls 1 and 2, vlicl doscribo llo bacIground loclnoI-
ogy nocossary lo a compIolo undorslanding of any ISA maclino. Iarl 3 foIIovs
llis claplor and covors llo ISA arclilocluro. Tlis incIudos ISA lislory, llo ISA
bus slrucluro, ISA bus cycIos, llo inlorrupl subsyslom, dirocl momory accoss
(DMA), bus masloring, llo roaI-limo cIocI and configuralion RAM, llo Ioy-
board/mouso inlorfaco, numoric coprocossors, and llo ISA limors.


ROM slands for road-onIy momory. ROM momory can onIy bo road onco il is
inslaIIod in a syslom and il is non-voIaliIo il rolains ils slorod informalion
indofiniloIy aflor povor is romovod from llo syslom.

As iIIuslralod in figuro 15-1, llo ROM momory clips usod in ISA maclinos con-
lain ono bylo of informalion por inlornaI slorago Iocalion. Iacl slorago Iocalion
consisls of oigll bil coIIs, oacl of vlicl can sloro a 1 or a 0.

-




Tlo informalion slorod in a ROM lypicaIIy consisls of boll programs and dala
lo bo usod by llo programs. Tlo programs and dala aro dovoIopod by a pro-
grammor and aro llon assombIod or compiIod inlo maclino Ianguago. Maclino
Ianguago is llo sorios of lox numbors llal llo microprocossor lroals as inslruc-
lions and dala.

Tlo maclino Ianguago roprosonlalion of llo programs and dala is llon Ioadod
inlo a dovico caIIod a ROM programmor. Tlis is lypicaIIy accompIislod by
lransmilling llo informalion lo llo ROM programmor using a soriaI or paraIIoI
communicalions IinI.

Tlo ROM is insorlod inlo a socIol on llo ROM programmor and llo informa-
lion is vrillon inlo il. Onco pIacod in llo largol unil, sucl as an ISA syslom, llo
ROM may onIy bo road from.

Tlo foIIoving soclions discuss llo lypos of ROM lypicaIIy usod in ISA ma-
clinos:

IusibIo-IinI IROM
MasIod ROM, or MROM
IIROM
IIIROM
IIasl IIIROM






-





-
Iiguro 15-2 roprosonls ono slorago Iocalion in fusibIo-IinI IROM (programma-
bIo road-onIy momory). Ivory bil coII conlains a fuso, or fusibIo-IinI. In ordor lo
sloro llo programs and dala inlo llo IROM's slorago Iocalions, il musl bo in-
sorlod inlo llo socIol on llo ROM programmor. Wlon llo programming proc-
oss bogins, a bylo is vrillon inlo oacl Iocalion by bIoving, or vaporizing, llo
fusos in somo bil coIIs, vliIo Ioaving ollors inlacl.

Wlon llo IROM is inslaIIod in an ISA syslom, llo microprocossor may onIy
road from il. Wlon a IROM slorago Iocalion is road from, llo pallorn of onos
and zoros roprosonlod by llo oigll fusos is simuIlanoousIy oulpul onlo llo dala
bus and sonl bacI lo llo microprocossor.

Bocauso somo of llo fusibIo IinIs aro plysicaIIy vaporizod during llo pro-
gramming procoss, a IROM may nol bo ro-programmod vill nov informalion
aflor ils iniliaI programming. Ior llis roason, if a sysloms manufacluror inlonds
lo updalo llo informalion slorod in llo ROMs poriodicaIIy, IROMs slouId nol
bo usod.

-
-
Tlo masIod ROM is a varialion of llo fusibIo-IinI IROM. If llo sysloms manu-
facluror is absoIuloIy corlain llal llo informalion in llo ROMs viII novor
clango, il may clooso lo lavo llo ROM clip manufacluror pro-program llo in-
formalion inlo llo ROMs for llom. Tlo sysloms manufacluror sonds llo mom-
ory clip manufacluror a copy of llo informalion lo bo slorod in llo ROM. Tlo
momory clip manufacluror llon producos a plolograplic masI llal roprosonls
llo opons and slorls llal vouId bo producod by bIoving somo fusos and Ioav-
ing ollors inlacl. Tlis masI is llon usod lo olcl llousands of pro-programmod
ROMs llal aro llon slippod lo llo sysloms manufacluror.


-

-

If llo sysloms manufacluror vanls lo rosorvo llo oplion of ro-programming llo


ROMs al somo limo in llo fuluro, IIROMs slouId bo usod insload of IROMs
or MasIod ROMs.

IIROM slands for orasabIo programmabIo road-onIy momory. Wlon rocoivod
from llo momory clip manufacluror, llo IIROM is bIanI (conlains no infor-
malion). As vill llo IROM, informalion is vrillon inlo il using a ROM pro-
grammor.

Iiguro 15-3 iIIuslralos llo loarl of llo IIROM bil coII. Al llo bil coII IovoI, llo
IIROM basicaIIy consisls of a lransislor. A lransislor is nolling moro llan a
svilcl. Will a corlain voIlago, or clargo, on ils galo, llo lransislor providos a
pall for curronl fIov llrougl ils sourco and drain. In ollor vords, llo svilcl is
cIosod, aIIoving curronl lo fIov. Will a difforonl clargo on ils galo, lovovor,
llo lransislor coasos lo conducl.

Tlo galo of llo lransislor is fIoaling, surroundod by a llin Iayor of siIicon diox-
ido. Sinco siIicon dioxido is an insuIalor (il doosn'l conducl oIoclricily), a clargo
pIacod on llo fIoaling galo doosn'l lavo anyvloro lo go and londs lo slay lloro.

Wlon llo IIROM is pIacod in llo ROM programmor and llo programming
procoss is inilialod, a bil is vrillon inlo a bil coII by oillor clarging llo fIoaling
galo or disclarging il. Tlo clargo on llo fIoaling galo may bo clangod by ap-
pIying a Iargo posilivo or nogalivo voIlago lo oillor llo conlroI galo, sourco or
drain. Al llo compIolion of llo programming procoss, somo of llo bil coIIs lavo
lad clargos pIacod on lloir fIoaling galos and somo lavo nol.

Tlo IIROM is romovod from llo ROM programmor and pIacod in llo syslom.
Wlon llo microprocossor allompls lo road from ono of llo IIROM's slorago
Iocalions, somo of llo oigll lransislors llal maIo up llo slorago Iocalion con-
ducl, vliIo ollors do nol as a rosuIl of llo clargo (or IacI of a clargo) pIacod
on lloir fIoaling galos. Il acls jusl IiIo a sorios of oigll svilclos, producing a
group of oigll bils of informalion. Tlo oigll bils of informalion aro llon drivon
oul onlo llo dala bus and sonl bacI lo llo microprocossor.

Wlon llo informalion in llo IIROM musl bo aIlorod, llo IIROM is romovod
from llo syslom and pIacod undor a spociaI uIlravioIol Iigll. An IIROM can bo
oasiIy idonlifiod by llo smaII, roclanguIar cryslaI vindov on ils uppor surfaco.



Tlo IIROM is Iofl undor llo Iigll for approximaloIy lvonly-ono minulos. Dur-
ing llis poriod of limo, ovory fIoaling galo is bombardod vill ligl onorgy uI-
lravioIol Iigll and a clargo bogins lo buiId on ovory galo. IvonluaIIy, by llo
ond of llo lvonly-ono minulo poriod, ovory fIoaling galo las buiIl up a clargo
sufficionl lo jump llo llin Iayor of siIicon dioxido and disclargo. In llis vay,
aII of llo dala in llo IIROM is cIoarod. Tlo IIROM is llon romovod from llo
Iigll sourco and may bo ro-programmod vill nov informalion.




-

In oporalion, IIIROM momory is vory simiIar lo IIROM. Iacl bil coII con-
lains a lransislor vill a fIoaling galo. Tloro is no cryslaI vindov, lovovor, so
llo IIIROM cannol bo orasod by uIlravioIol Iigll. Rallor, llo IIIROM is
orasod by pIacing a spociaI programming voIlago on ils IROGRAM pin and
addrossing a spocific Iocalion. Tlo Iocalion is llon orasod and a nov bylo of in-
formalion may bo vrillon inlo il. Iacl Iocalion lo bo aIlorod musl addrossod,
orasod and ro-vrillon. A proporIy dosignod IC aIIovs llo IIIROM's conlonls
lo bo aIlorod vliIo il is sliII inslaIIod in llo maclino.






-

Tlo dravbacI arisos in orasing oacl Iocalion, as il laIos a considorabIo amounl
of limo. TypicaIIy, llo oraso/rovrilo limo is in llo miIIisocond rango. Tlo
IIIROM is bosl usod in appIicalions vloro onIy a fov bylos viII bo aIlorod al
a limo (sucl as for slorago of configuralion informalion).
-
Tlo fIasl IIIROM is a varialion on llo IIIROM. Rallor llan orasing and ro-
vriling a Iocalion al a limo, llo fIasl IIIROM is fIasl orasod llo onliro con-
lonls of llo fIasl IIIROM (or a Iargo bIocI of il) is orasod simuIlanoousIy.
Nov dala may llon bo vrillon inlo llo fIasl IIIROM. Tlo orasuro/rovrilo
limo is considorabIy Iongor llan llo IIIROM duo lo llo Iargo buII of informa-
lion lo bo updalod. Duo lo llis oporalionaI claraclorislic, llo fIasl IIIROM is
bollor suilod lo appIicalions vloroin Iargo amounls of informalion aro aIlorod
al a limo, vliIo llo IIIROM is bollor suilod lo appIicalions vloro onIy a fov
bylos aro aIlorod al a limo. A lypicaI appIicalion of fIasl IIIROM vouId bo as
a subslilulo for a fIoppy drivo for sloring program and dala fiIos.

IIasl IIIROMs cosl approximaloIy 75 Ioss llan an IIIROM of comparabIo
bil donsily. As a rosuIl, IIIROM is considorod lo bo loo oxponsivo for IC ap-
pIicalions. As llo bil donsily of fIasl IIIROMs las incroasod, lloy lavo bo-
como quilo allraclivo lo IC syslom dosignors. On llo ollor land, lypicaI fIasl
IIIROMs roquiro boll a 5Vdc and a 12Vdc povor suppIy, vliIo llo lypicaI
IIIROM onIy roquiros a 5Vdc povor suppIy. Tlis moans llal fIasl IIIROM
roquiros a moro compIox povor suppIy, adding cosl lo llo syslom. TI and sov-
oraI ollor clip vondors aro dovoIoping fIasl IIIROMs llal onIy roquiro a sin-
gIo 5Vdc povor suppIy, llus romoving llis disadvanlago.
- -
Iiguro 15-4 iIIuslralos llo ROM inlorfaco lo llo syslom. Il consisls of llo signaIs
doscribod in labIo 15-1.




- -
- -
CI . Tlis signaI is assorlod by llo ROM
addross docodor vlon il dolocls a momory addross villin llo
rango of addrossos assignod lo llo ROM. Wlon CI is assorlod,
llo ROM usos ils addross inpuls lo soIocl llo largol Iocalion lo bo
road.
Addross Iinos Onco CI is doloclod, llo ROM usos llo addross prosonl on ils
addross inpuls lo soIocl llo largol Iocalion lo bo road.
OI . Wlon OI is assorlod, llo ROM oulpuls llo bylo
of informalion from llo largol Iocalion onlo llo dala bus Iinos lo
bo sonl bacI lo llo microprocossor.
Dala Iinos Tlo dala Iinos aro usod by llo ROM lo sond llo bylo road from llo
largol Iocalion bacI lo llo microprocossor.

As an oxampIo, assumo llal llo ROM in figuro 15-4 is a 64KB ROM and llo
ROM's addross docodor is dosignod lo dolocl llo momory addross rango from
I0000l lo IIIIIl. Tlo ROM addross docodor obsorvos llo uppor addross Iinos,
A|19:16], lo dolocl an Il as llo uppormosl digil in llo momory addross. Wlon
an Il is doloclod, llo ROM addross docodor clip-soIocls llo ROM by assorling
ils CI inpul. Tlo ROM rosponds by using ils addross inpuls, A|15:0], lo soIocl
llo oxacl Iocalion villin llo 64K Iocalions of slorago villin llo ROM. If llo
ROM's oulpul onabIo (OI) inpul is aIso assorlod, llo ROM roads llo bylo from
llo largol Iocalion and drivos il onlo llo dala bus Iinos lo bo sonl bacI lo llo
microprocossor.

- -

-- - -


-

-
Many ISA syslom boards conlain 128KB of ROM momory. Tlis ROM conlains
llo foIIoving:

llo povor-on soIf-losl, or IOST.
Tlo BIOS roulinos for llo slandard I/O dovicos inlogralod onlo llo syslom
board.
Tlo inlorrupl sorvico roulinos for llo slandard I/O dovicos inlogralod onlo
llo syslom board.
Tlo BASIC Ianguago inlorprolor llal is oxoculod if llo bool program faiIs
lo find a vaIid oporaling syslom on oillor llo fIoppy or lard drivo (llo BA-
SIC Ianguago inlorprolor is onIy incIudod in somo ISA maclinos).
Tlo bool program usod lo road llo oporaling syslom soflvaro, sucl as
MS-DOS or OS/2, from llo fIoppy or lard drivo.
-
ClocIsumming is lypicaIIy usod lo clocI ROMs for propor oporalion. Wlon
llo programmor originaIIy dovoIops llo programs and dala lo bo vrillon lo llo
ROM, a simpIo uliIily program is usod lo add llo conlonls of ovory ROM Ioca-
lion logollor. As llo uliIily program is running, il Ioops llo rosuIl of llo addi-
lions (llo running lolaI) in an 8-bil rogislor. An 8-bil rogislor canl loId vaIuos
Iargor llan IIl or 255d, so an ovorfIov occurs vlon llo running lolaI vouId
oxcood IIl. Tlo uliIily program ignoros llo ovorfIov. Tlo foIIoving oxampIo
iIIuslralos llo procoss:





Tlo programmor aIvays sloros a vaIuo in llo Iasl Iocalion in llo ROM llal viII
forco llo rosuIl lo zoro. As an oxampIo, assumo llal adding ovory ROM Ioca-
lion bul llo Iasl rosuIlod in DAl (1101 1010b). Tlo programmor vouId sloro
llo foIIoving vaIuo in llo Iasl ROM Iocalion lo causo llo ovoraII rosuIl lo bo
zoro:


-
- -



During llo IOST, llo program roads llo conlonls of ovory syslom board ROM
Iocalion and adds llom logollor. If llo finaI rosuIl isn'l zoro, oillor llo dala in
llo ROM las clangod, vlicl il novor slouId, or llo syslom cannol proporIy
road from llo ROM. In oillor caso, llo ROM cannol bo roIiabIy road from and a
ROM clocIsum orror is gonoralod.

In somo ISA sysloms, a sIigllIy difforonl mollod is usod. Tlo IOST adds llo
conlonls of ovory ROM Iocalion logollor, accumuIaling a 16-bil running lolaI.
Tlo corrocl vaIuo is slorod in llo Iasl lvo Iocalions of llo ROM lo forco llo
running lolaI lo 0000l vlon llo Iasl lvo bylos aro addod. If llo finaI rosuIl isn'l
zoro, a ROM clocIsum orror is gonoralod.

ClocIsumming onIy losls llo conlonls of llo ROM onco, during llo IOST. Tlis
is usuaIIy sufficionl bocauso ROM is quilo roIiabIo and il is unIiIoIy llal a coII
viII ovor faiI in llo usofuI Iifolimo of llo maclino. A primary roason llal llo
IOST ovon bollors lo losl llo ROM is bocauso lloro may bo addross confIicls in
llo syslom llal maIo il impossibIo lo roIiabIy accoss llo ROM. Tlo confIicls oc-
cur bocauso muIlipIo cards may bo docoding llo samo ROM addrossos. Tloros
no cIoaringlouso llal says vlicl addrossos a manufacluror slouId uso for llo
dovico ROMs on ISA oxpansion cards. Tloso confIicls slov up as dala bus con-
lonlion during llo clocIsum caIcuIalion, rosuIling in a garbIod running lolaI.
Tloros onIy ono clanco in 256 (0.4) llal llo clocIsum viII faiI lo calcl llo
confIicl.

Hovovor, in sysloms vloro roIiabiIily is paramounl, parily bils can bo slorod
aIong vill llo dala bylos in llo ROM vlon llo ROM is iniliaIIy programmod.
Aflor llal, ovory limo any bylos aro road from llo ROM, a parily clocIor can
clocI for faiIuros in llo ROM. If a faiIuro occurs, il may nol bo llo fauIl of llo
ROM. Insload, il may bo noiso or crosslaII on llo sysloms dala bus vlicl gar-
bIos llo dala bolvoon llo limo il Ioavos llo ROM and llo limo il roaclos llo
bus maslor. Tlis can occur in vory ligl spood appIicalions. Ior oxampIo, par-
ily-proloclod ROM is oflon usod lo sloro llo microcodo (insido llo microproc-
ossor clip) llal runs llo microprocossors oxoculion unil.

Nolo llal llo DRAM parily gonoralor/clocIor is parl of llo DRAM conlroIIor
and il normaIIy onIy clocIs for parily vlon roading from RAM. Tloroforo, do-
vico ROMs on ISA oxpansion cards do nol nood parily bils.

-


Many ISA sysloms basod on llo 80386DX or SX microprocossors copy llo sys-
lom board ROM conlonls inlo sladov RAM during llo IOST. Tlis is dono lo
componsalo for llo noloriousIy sIov accoss limo of ROMs.

If an appIicalions program doponds loaviIy on llo BIOS roulinos in ROM, llo
inslruclions llal maIo up llo BIOS roulinos musl bo folclod from syslom ROM
froquonlIy. Sinco ROM momory las a noloriousIy sIov accoss limo roIalivo lo
llal of RAM momory, llo inslruclions couId bo road moro quicIIy and llo
BIOS roulino lloroforo oxoculod moro quicIIy if llo BIOS roulinos voro Iocalod
in RAM rallor llan ROM. In addilion, llo sladov RAM is a 32-bil dovico,
vliIo llo ROM is lypicaIIy impIomonlod as a 16-bil dovico. Informalion slorod
in sladov RAM can lloroforo bo accossod al doubIo llo ralo of llo ROM.

AIllougl lloro may bo pIonly of oxlra RAM in llo syslom lo loId a copy of llo
ROMs conlonls, llo appIicalions programs and syslom soflvaro llal maIo uso
of llo ROMs conlonls musl Inov vloro llo ROM is. Tloso programs assumo
llo ROM is al I0000l lo IIIIIl. Tlal moans il vouId bo a vaslod offorl lo
copy llo ROM lo RAM llal lad a difforonl addross aflor llo copy vas com-
pIolo. Tloro aro sovoraI soIulions lo llis probIom and difforonl sysloms uso dif-
foronl soIulions.
-- -
Ono soIulion is lo uso llo 80386s virluaI pago lransIalion foaluro lo lransIalo
llo ROMs addross rango inlo RAM addrossos. A syslom soflvaro program
vouId firsl copy llo ROM inlo RAM and llon sol up llo pago diroclory and
pago labIo vill onlrios llal poinl lo llo RAM llal conlains a copy of llo ROMs
conlonls. SubsoquonlIy, vlon a program submils a ROM addross lo llo mom-
ory managomonl unil (MMU), llo paging unil insido llo MMU lransIalos llo
ROM addross lo llo addross of llo RAM llal conlains llo ROMs conlonls.
Irograms aro unavaro llal pago lransIalion is occurring. Tlo addross llal llo
program submils lo llo MMU is caIIod llo Iinoar addross. Tlo MMU lransIalos
llo Iinoar addross lo llo plysicaI addross. Iago lransIalion is doscribod in llo
claplor onlilIod Tlo 80386DX and SX Microprocossors.

Comparod lo llo ollor soIulions doscribod boIov, pago lransIalion las llo
bonofil llal il doos nol roquiro spociaI addross docodors or DRAM conlroIIors.
Tlo Iimilalions of llis approacl aro llal llo microprocossor musl bo an 80386
or liglor (llo 80286 doos nol lavo a paging unil), il musl bo running in pro-



loclod modo (pago lransIalion is nol avaiIabIo in roaI modo) and il musl bo in
virluaI-8086 modo (lo run codo in ROM llal vas vrillon for roaI modo). Tlo
foIIoving soIulions do nol lavo lloso Iimilalions.
--
Tvo dovicos occupying llo samo addross spaco is a uniquo silualion. Any
momory road villin llo ROM's assignod addross rango accossos llo syslom
ROM, vliIo any momory vrilo villin llo samo rango accossos llo lop 128KB
of llo RAM, Inovn as llo sladov RAM.

Aflor IOST las vorifiod llal RAM is vorIing corroclIy, llo compIolo conlonls
of llo 128KB syslom ROM is copiod lo RAM momory. Tlis is accompIislod by
porforming a road from oacl Iocalion in llo 000I0000l lo 000IIIIIl addross
rango foIIovod immodialoIy by a vrilo lo llo samo Iocalion. In llis mannor, llo
dala is road from llo ROM Iocalion and vrillon lo llo RAM Iocalion vill llo
samo addross. Roading and vriling ovory addross in llo rango pIacos a com-
pIolo copy of llo syslom ROM in llo sladov RAM.

Aflor llo copy las boon compIolod, llo programmor usos an I/O conlroI rogis-
lor lo disabIo llo ROM addross docodor and maIo llo sladov RAM road-onIy
(as if il voro ROM). Any subsoquonl caIIs lo llo BIOS or inlorrupl sorvico rou-
linos nov accoss llo sladov RAM rallor llan llo ROMs. Tlo subslanliaIIy
faslor RAM accoss limo causos llo BIOS roulinos lo bo oxoculod moro quicIIy
from llis poinl forvard and can rosuIl in subslanliaI spood incroasos vlon
running appIicalions programs llal caII llo BIOS roulinos froquonlIy.
--
Tlis mollod of impIomonling sladov RAM dosignalos an aroa al llo vory lop
of llo microprocossors addross map (jusl boIov 16MB or 4GB) for llo sladov
RAM. Aflor llo ROM is copiod inlo llis RAM aroa, aII addrossos llal aro in-
londod for ROM aro rodiroclod lo llo Iocalion in RAM vloro llo ROM conlonls
lavo boon copiod.

Aflor llo IOST las vorifiod llal RAM is vorIing corroclIy, llo compIolo con-
lonls of llo 128KB syslom ROM is copiod lo sladov RAM. Tlis is accom-
pIislod on an 80286- or 80386SX-basod syslom by porforming a road from oacl
Iocalion in llo 000I0000l lo 000IIIIIl addross rango foIIovod immodialoIy
by a vrilo lo llo nov Iocalion in llo 00II0000l lo 00IIIIIIl rango. SimiIarIy,
a syslom basod on llo 80386DX or liglor procossor vouId do llo vrilos lo llo
nov Iocalion in llo IIII0000l lo IIIIIIIIl rango. In llis mannor, llo dala is

-

road from llo ROM Iocalion and vrillon lo llo sladov RAM Iocalion. Roading
and vriling ovory addross in llo rangos pIacos a compIolo copy of llo syslom
ROM in llo sladov RAM.

Aflor llo copy las boon compIolod, llo programmor usos an I/O conlroI rogis-
lor lo modify llo oporalion of llo ROM addross docodor so llal llo ROMs aro
novor clip-soIoclod again and aII accossos villin llo ROM addross rango nov
accossos llo sladov RAM insload. Tlo sladov RAM is aIso vrilo-proloclod so
llal il is road-onIy (as if il voro ROM). Any subsoquonl caIIs lo llo BIOS rou-
linos nov accoss llo 32-bil sladov RAM rallor llan llo ROMs. Tlo subslan-
liaIIy faslor RAM accoss limo causos llo BIOS roulinos lo bo oxoculod moro
quicIIy from llis poinl forvard and rosuIls in subslanliaI spood incroasos vlon
running appIicalions programs llal caII llo BIOS roulinos froquonlIy.
- --
AIllougl IBM rosorvod rangos of addrossos in llo firsl mogabylo of momory
for uso by ROMs (bool ROM, oplion ROM and dovico ROMs), lloso rangos of
addrossos aro nol aIvays fuIIy occupiod. Ior oxampIo, 128KB of spaco is ro-
sorvod for dovico ROMs, bul many sysloms lavo onIy a coupIo of smaII (2KB or
so) dovico ROMs in llom. Tlal Ioavos a Iol of unusod addross spaco. Oflon il is
possibIo lo map RAM inlo llo addrossos llal voro rosorvod for ROM so llal
MS-DOS and ollor roaI-modo appIicalions can accoss moro llan llo 640KB of
RAM llal IBM spocifiod.

To dolormino if an addross is acluaIIy assignod lo a ROM, a syslom soflvaro
program viII do a lol momory soarcl, vriling and roading vaIuos lo and from
momory. If a Iocalion can bo aIlorod, il is assumod lo bo RAM. If llo Iocalion
cannol bo aIlorod, il is assumod lo bo oillor vacanl or ROM. If llo Iocalion and
ils noiglboring Iocalions conlain IIl (aII onos), il is assumod lo bo an addross
llal is vacanl bocauso llo ISA dala bus fIoals ligl (lo onos) vlon no dovico is
driving il. Tlo vacanl addrossos can bo roassignod lo RAM. Tlo assumplions
llal llo momory soarcl maIos aro nol fooIproof and llo momory soarcl can
causo llo syslom lo crasl if a momory-mappod I/O Iocalion is accossod. If llo
syslom survivos llo momory soarcl villoul crasling, RAM viII bo mappod lo
llo vacanl ROM addrossos.

RoaI modo programs llal voro vrillon lo run on an 8086 or 8088 microprocos-
sor onIy inlond lo produco addrossos from 00000l lo IIIIIl. In ordor for lloso
programs lo accoss moro llan 640KB of RAM, llo RAM musl lavo addrossos
boIov 100000l (1MB), from llo programs porspoclivo.




Using pago lransIalion and virluaI-8086 modo, llo syslom soflvaro can provido
an oxcIusivo 1MB Iinoar addross rango for llo roaI-modo program lo uso. Tlo
program boIiovos il is accossing llo firsl plysicaI mogabylo of RAM, bul in facl
llo paging unil lransIalos llo Iinoar addross lo a plysicaI addross llal may bo
anyvloro in llo microprocossors plysicaI addross rango.

If llo syslom usos ono of llo ollor ROM sladoving loclniquos llal is compali-
bIo vill llo 80286 microprocossor and roaI modo, llo unusod ROM addross
spaco can sliII bo rocovorod. Tlo DRAM addross docodor is programmod lo
map a bIocI (usuaIIy 16KB al a limo) of RAM inlo llo unusod ROM addrossos.
Tlo mappod RAM is llon loslod al lloso nov addrossos lo onsuro llal llo
momory soarcl vas nol fooIod vlon il found llo vacanl Iocalions.

Tloso bIocIs of ROM addrossos llal aro frood up so llal roaI-modo appIica-
lions can accoss moro RAM aro caIIod uppor momory bIocIs (UMB).

AIong vill accossing uppor momory bIocIs, roaI modo appIicalions llal voro
vrillon for llo 80286 microprocossor can accoss aImosl 64KB of oxlondod mom-
ory in llo ligl momory aroa (HMA). HMA addrossos slarl al 1MB. Soo llo soc-
lion onlilIod Accossing Ixlondod Momory in RoaI Modo in llo claplor
onlilIod Tlo 80286 Microprocossor for informalion on accossing llo HMA.
-
In figuro 15-5, llo ROMs aro dividod inlo lvo pairs, ono of vlicl rosponds lo
llo addross rango from I0000l lo IIIIIl and llo ollor lo llo addross rango
from I0000l lo IIIIIl. Iacl of lloso pairs consisls of lvo 32KB ROMs dosig-
nalod as llo uppor or odd ROM and llo Iovor or ovon ROM.

Tlo uppor or odd ROM is caIIod llo uppor ROM bocauso il is connoclod lo llo
uppor dala pall, D|15:8]. Il is aIso caIIod llo odd ROM bocauso aII of llo odd-
addrossod ROM Iocalions aro villin llis ROM. Tlis is ovidonl bocauso il is
connoclod lo llo uppor dala pall and llo microprocossor aIvays communi-
calos vill odd-addrossod Iocalions ovor llo uppor dala pall.
Tlo Iovor or ovon ROM is caIIod llo Iovor ROM bocauso il is connoclod lo llo
Iovor dala pall, D|7:0]. Il is aIso caIIod llo ovon ROM bocauso aII of llo ovon-
addrossod ROM Iocalions aro villin llis ROM. Tlis is ovidonl bocauso il is
connoclod lo llo Iovor dala pall and llo microprocossor aIvays communicalos
vill ovon-addrossod Iocalions ovor llo Iovor dala pall.

Wlon llo programmor Ioads dala inlo llo ROMs using llo ROM programmor,
a uliIily program is firsl oxoculod llal dividos llo informalion in laIf. AII of llo

-

informalion lo bo slorod in ovon addrossos is programmod inlo llo Iovor or
ovon ROM, vliIo aII informalion lo bo slorod in odd-addrossod Iocalions is
programmod inlo llo uppor or odd ROM.

Wlonovor an addross in llo rango from I0000l lo IIIIIl is doloclod by llo
syslom board ROM addross docodor, llo IXXXXCS Iino (clip-soIocl for
I0000l lo IIIIIl rango) is assorlod by llo docodor. Tlis soIocls llo IXXXX
ROM pair. Tlo lvo ROMs llon uso llo Iovor parl of llo addross from llo mi-
croprocossor, A|15:1], lo soIocl ono of 32K Iocalions in oacl of llo lvo ROMs.
Tlo sysloms bus conlroI Iogic assorls llo momory Road command Iino
(MRDC) vlicl is connoclod lo llo Oulpul InabIo pin (OI) on boll ROMs.
Iacl of llo ROMs oulpuls llo bylo from llo addrossod Iocalion onlo llo dala
bus vlon OI and CI aro boll assorlod. Tlo Iovor or ovon ROM oulpuls llo
bylo from llo ovon addross onlo llo Iovor dala pall, D|7:0], vliIo llo ollor
ROM oulpuls llo bylo from llo noxl soquonliaI odd addross onlo llo uppor
dala pall, D|15:8]. Ivon llougl llo IXXXX ROMs aIso soo lloir OI pins as-
sorlod, lloy viII nol inlorforo vill llo lransaclion bocauso lloir CI pins aro
doassorlod. Tlo IXXXX ROM pair rosponds lo llo addross rango from I0000l
lo IIIIIl.




- -
-
In figuro 15-6, lloro aro lvo 64KB ROMs llal rospond lo llo addross rango
from I0000l lo IIIIIl. Tloy aro dosignalod as llo uppor or odd ROM and llo
Iovor or ovon ROM. Tlis dosignalion is oxpIainod in llo provious soclion.

Wlonovor an addross in llo rango from I0000l lo IIIIIl is doloclod by llo
syslom board ROM addross docodor, llo ROMCS Iino (ROM clip-soIocl) is as-
sorlod by llo docodor. Tlis soIocls llo ROM pair. Tlo lvo ROMs llon uso llo
Iovor parl of llo addross from llo microprocossor, A|16:1], lo soIocl ono of 64K
Iocalions in oacl of llo lvo ROMs. Tlo sysloms bus conlroI Iogic assorls llo
momory road command Iino (MRDC) vlicl is connoclod lo llo oulpul onabIo


-

pin (OI) on boll ROMs. Iacl of llo ROMs oulpuls llo bylo from llo ad-
drossod Iocalion onlo llo dala bus vlon OI and CI aro boll assorlod. Tlo
Iovor or ovon ROM oulpuls llo bylo from llo ovon addross onlo llo Iovor dala
pall, D|7:0], vliIo llo ollor ROM oulpuls llo bylo from llo noxl soquonliaI
odd addross onlo llo uppor dala pall, D|15:8].

- -
- - -
As aIroady poinlod oul, llo syslom board ROM conlains:

llo IOST for llo slandard dovicos.
llo BIOS roulinos for llo slandard dovicos.
llo inlorrupl sorvico roulinos for llo slandard I/O dovicos.

A card dosignod lo bo inslaIIod in an ISA sIol aIso noods lo bo loslod during
IOST and may roquiro a BIOS roulino and an inlorrupl sorvico roulino. Tlo
card dosignor can incIudo a ROM on llo ISA card and pIaco ils soIf-losl pro-
gram, BIOS roulino and inlorrupl sorvico roulino in il. Tlis is caIIod a dovico
ROM.

ISA sysloms provido a vay lo aulomalicaIIy oxoculo llo ISA card's soIf-losl
during IOST and lo aulomalicaIIy updalo llo inlorrupl labIo in RAM lo poinl
lo llo card's BIOS roulino and inlorrupl sorvico roulino.




During llo IOST, a procoss caIIod ROM scan is porformod. Slarling al momory
addross C0000l and going llrougl DIIIIl, llo IOST program scans for do-
vico ROMs. Tlo procoss is simpIo:

1. Tlo IOST roads lvo bylos slarling al momory Iocalion C0000l. If llo bylo
from C0000l is 55l and llo bylo from C0001l is AAl, llon llo IOST las
found llo signaluro of a dovico ROM on an ISA card.
2. IOST roads llo noxl bylo from Iocalion C0002l. Tlis Iocalion conlains llo
Iongll of llo dovico ROM in incromonls of 512 bylos. As an oxampIo, a 2KB
dovico ROM vouId lavo a 04l in ils llird Iocalion (4 x 512 = 2048, or 2KB).
3. Knoving llo slarl addross and llo Iongll of llo dovico ROM, llo IOST
llon clocIsums il lo onsuro il can bo road from proporIy. ClocIsumming is
doscribod in llo soclion onlilIod Tosling. Tlo rosuIl slouId bo zoro. If il
isn'l, a clocIsum orror is dispIayod on llo scroon aIong vill llo sogmonl
slarl addross. As an oxampIo:

CHICKSUM IRROR C000:0000 is inlorprolod as a dovico ROM clocIsum
orror for an ISA card vloso dovico ROM slarls al momory addross
C000:0000 (sogmonl:offsol formal).
4. If llo ROM clocIsum is OK, llo IOST program doos a caII lo llo fourll
Iocalion in llo dovico ROM, in llis caso, Iocalion C0003l. Tlis is llo slarl
addross of llo iniliaIizalion codo, or program, in llo ROM. A caII is simi-
Iar lo a jump, oxcopl llal by using a caII, llo syslom romombors vloro lo
rolurn lo vlon llo dovico ROM program is finislod.
5. Tlo iniliaIizalion codo:

Runs a soIf-losl on llo card.
Wrilos llo slarl addross of ils BIOS roulino inlo llo propor sIol in
llo inlorrupl labIo.
Wrilos llo slarl addross of ils inlorrupl sorvico roulino inlo llo
propor sIol in llo inlorrupl labIo.
IniliaIizos any programmabIo I/O rogislors on llo card lo sol il up
for normaI oporalion.
Rolurns lo llo IOST program.

In llis vay, llo dovico ROM is aulomalicaIIy doloclod and loslod, and ils BIOS
and inlorrupl sorvico roulino poinlors aro inslaIIod in llo inlorrupl labIo.

Tlo IOST llon adds 2K (0800l) lo llo slarl addross, C0000l, and clocIs for
anollor ROM slarling al C0800l. If anollor dovico ROM is doloclod, llo proc-
oss is ropoalod. Tlis procoss is ropoalod al 2K addross inlorvaIs up lo Iocalion
DIIIIl, llo ond of llo ROM Scan addross rango.

-


Wlon llo ROM scan is compIolod, llo IOST las aulomalicaIIy doloclod, loslod
and oxoculod llo iniliaIizalion programs for ovory inslaIIod ISA card llal las a
dovico ROM on il.






-


Iarl 1, Tlo Syslom KornoI, covorod llo moclanism uliIizod by microprocos-
sors in llo InloI X86 famiIy vlon communicaling vill momory and I/O do-
vicos. Tlis incIudod llo 80286 and 80386 microprocossors, as voII as llo IornoI
supporl Iogic nocossary lo inlorfaco lloso procossors lo 8-, 16-, and 32-bil do-
vicos. Iarl 2, Momory Subsysloms, providod dolaiIod doscriplions of RAM,
ROM and caclo momory. Togollor, llo firsl lvo parls provido llo bacIground
nocossary lo an undorslanding of llo ISA arclilocluro.

Iarl 3, Tlo Induslry Slandard Arclilocluro, oxaminos aII ISA-spocific aspocls
of syslom dosign. Il incIudos llo foIIoving claplors:

Claplor 16: ISA Bus Slrucluro
Claplor 17: Typos of ISA Bus CycIos
Claplor 18: Inlorrupl Subsyslom
Claplor 19: Dirocl Momory Accoss DMA)
Claplor 20: ISA Bus Maslors
Claplor 21: RTC and Configuralion RAM
Claplor 22: Koyboard/Mouso Inlorfaco
Claplor 23: Numoric Coprocossors
Claplor 24: ISA Timors


-


-
Tlo provious claplor covorod llo various lypos of ROM momory oncounlorod
in ISA sysloms. Tlis incIudod IROM, MROM, IIROM, IIIROM and fIasl
IIIROM. In addilion, llo subjocls of ROM diagnoslics, sladov RAM, doubIo-
mapping, and dovico ROMs voro covorod.
-
Tlis claplor providos a dolaiIod doscriplion of llo ISA bus. AII signaIs on llo
oxpansion bus aro fuIIy dofinod, as voII as llo roIalod syslom board Iogic.

Tlo noxl claplor, Typos of ISA Bus CycIos, providos a dolaiIod doscriplion of
bus cycIos as lloy appoar on llo ISA oxpansion bus.

Tlo oxpansion bus in ISA maclinos is froquonlIy roforrod lo as llo I/O bus.
Tlis is incorrocl. Boll momory and I/O cards aro inlorfacod lo llo syslom
llrougl llo oxpansion bus. Iiguros 16-1, 16-2 and 16-3 iIIuslralo llo 8- and 16-
bil ISA oxpansion bus connoclors. Tlo foIIoving soclions doscribo llo capabiIi-
lios providod by llo ISA inlorfaco. Tlo claraclorislics of llo 8-bil ISA sIols voro
dofinod in llo originaI IBM IC. Tlo IBM IC/AT addod addilionaI funclionaI-
ily. Tlo signaIs lavo boon groupod by funclion and aro doscribod in llo foIIov-
ing soclions.


-


-


-
0Vdc
RESET
+5Vdc
lRQ2/lRQ9
-5Vdc
DRQ2
-12Vdc
NOWS
+12Vdc
0Vdc
SMRDC
SMWTC
lOWC
lORC
DAK3
DRQ3
DAK1
DRQ1
REFRESH
BCLK
lRQ7
lRQ6
lRQ5
lRQ4
lRQ3
DAK2
TC
BALE
+5Vdc
OSC
0Vdc
B01
B02
B03
B04
B05
B06
B07
B08
B09
B10
B11
B12
B13
B14
B15
B16
B17
B18
B19
B20
B21
B22
B23
B24
B25
B26
B27
B28
B29
B30
B31
A01
A02
A03
A04
A05
A06
A07
A09
A10
A11
A12
A13
A14
A15
A16
A17
A18
A19
A20
A21
A22
A23
A24
A25
A26
A27
A28
A29
A08
A30
A31
CHCHK
SD7
SD6
SD5
SD4
SD3
SD2
SD1
SD0
CHRDY
AEN
SA19
SA18
SA17
SA16
SA15
SA14
SA13
SA12
SA11
SA10
SA9
SA8
SA7
SA6
SA5
SA4
SA3
SA2
SA1
SA0

D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
D14
D15
D16
D17
D18
C01
C02
C03
C04
C05
C06
C07
C09
C10
C11
C12
C13
C14
C15
C16
C17
C18
C08
M16
lO16
lRQ10
lRQ11
lRQ12
lRQ15
lRQ14
DAK0
DRQ0
DAK5
DRQ5
DAK6
DRQ6
DAK7
DRQ7
+5Vdc
MASTER16
0Vdc
SBHE
LA23
LA22
LA21
LA20
LA19
LA18
LA17
MRDC
MWTC
SD8
SD9
SD10
SD11
SD12
SD13
SD14
SD15

-



REFRESH
M16
lO16
SBHE
MRDC
MWTC
LA23:LA17
MASTER16
SD15:SD8
DRQ0, DRQ5:DRQ7
DAK0, DAK5:DAK7
lRQ10:lRQ12, lRQ14:lRQ15
SD7:SD0
AEN
lRQ3:lRQ7, lRQ9
TC
DRQ1:DRQ3
DAK1:DAK3
SMRDC
SMWTC
lORC
lOWC
SA19:SA0
BALE
RESDRV
BCLK
OSC
CHRDY
NOWS
CHCHK
16-bit section of lSA Connector 8-bit section of lSA Connector

-

-- -
Wlon llo CIU inilialos a bus cycIo, il pIacos llo addross on llo addross bus
during addross limo (Ts).Tlo addross is visibIo lo aII inslaIIod ISA cards and lo
llo Iogic on llo syslom board. In ollor vords, llo curronl bus maslor can com-
municalo vill any momory or I/O sIavo in llo syslom. TabIo 16-1 providos a
doscriplion of llo signaIs invoIvod in addrossing dovicos on llo ISA oxpansion
bus.

-- -

SA|19:0] - -- -. Tlis is llo microprocossor's Ialclod addross bus.
Tlo SA bus onIy Ialclos llo Iovor 20 bils of llo addross (A|19:0]) bo-
ing omillod by llo microprocossor. Tlo addross for a bus cycIo bogins
lo appoar on llo SA bus al llo rising (Ioading) odgo of BAII and is
Ialclod al llo lraiIing odgo of BAII (bufforod addross Ialcl onabIo).
IA|23:17] -- -. Tloso signaIs aro a bufforod vorsion of llo
uppor bils on llo microprocossor's addross bus. During addross pipo-
Iining, llo addross for llo noxl bus cycIo is prosonl on llis bus prior lo
llo boginning of llo acluaI bus cycIo. Wlon an ISA oxpansion board
roquiros an oarIy addross docodo, llo IA bus slouId bo docodod
rallor llan llo SA bus. Tlo addross for a bus cycIo doos nol bogin lo
appoar on llo SA bus unliI llo midpoinl of llo ISAs addross limo.
Docoding llo IA bus aIIovs llo oxpansion board addross docodor lo
slarl llo addross docodo procoss oarIy, onsuring llal llo addrossod
dovico viII bo roady lo compIolo llo bus cycIo oarIior llan if ils clip-
soIocl lad boon docodod from llo SA bus. Dosignors uso llis mollod
lo aIIov boards ompIoying roIalivoIy sIov momory dovicos lo rospond
lo llo microprocossor vill fovor vail slalos.
SBHI - - . AIso soo llo soclion on llo dala bus slooring
Iogic. Tlo 80286 or 80386SX microprocossor assorls BHI during an 8-
bil lransfor vill an odd addross and during a 16-bil lransfor slarling
al an ovon addross. Wlon assorlod, il signaIs llal llo uppor laIf of llo
dala bus, D|15:8], viII bo usod lo lransfor a bylo bolvoon llo micro-
procossor and an odd addross.

-

-
During a bus cycIo's dala limo (Tc), dala is lransforrod ovor llo dala bus. Tlo
ISA dala bus consisls of lvo 8-bil dala palls: SD|7:0] and SD|15:8]. TabIo 16-2
doscribos lloso palls.

- -

SD|7:0] - - . During lransfors vill 16-bil dovicos, llo
Iovor dala pall is usod lo lransfor dala bolvoon llo curronl bus mas-
lor and ovon-addrossod Iocalions. During lransfors vill 8-bil dovicos,
llo Iovor dala pall is usod lo lransfor dala bolvoon llo curronl bus
maslor and boll ovon and odd-addrossod Iocalions. Tlis dala pall is
avaiIabIo on aII 8- and 16-bil ISA oxpansion sIols.
SD|15:8] - - . During lransfors vill 16-bil dovicos,
llo uppor dala pall is usod lo lransfor dala bolvoon llo curronl bus
maslor and odd-addrossod Iocalions. During lransfors vill 8-bil do-
vicos, llo uppor dala pall is nol usod. Tlis dala pall is avaiIabIo onIy
on 16-bil ISA oxpansion sIols.
-
Wlon llo syslom board procossor inilialos a bus cycIo, il pIacos llo bus cycIo
dofinilion on ils bus cycIo dofinilion Iinos during addross limo (Ts). Tlo slalo of
lloso Iinos musl bo docodod by llo syslom board's bus conlroI Iogic lo dolor-
mino llo lypo of bus cycIo in progross. Tlo bus conlroI Iogic llon assorls llo
approprialo command Iino lo indicalo llo bus cycIo lypo lo aII ISA oxpansion
cards. TabIo 16-3 dofinos llo solling of llo microprocossor's bus cycIo dofinilion
Iinos for llo various lypos of bus cycIos.

-
--- -
-


- - --
0 0 0 Inlorrupl AcInovIodgo nono
0 0 1 I/O Wrilo IOWC
0 1 0 I/O Road IORC
1 0 0 HaIl or Sluldovn nono
1 0 1 Momory Wrilo MWTC and SMWTC
1 1 0 Momory Road MRDC and SMRDC
Tlo ISA command Iinos aro doscribod in labIo 16-4.

-


-

SMRDC - . Tlis signaI is assorlod by llo syslom
board Iogic during a momory road bus cycIo llal addrossos a Iocalion
in llo Iovor 1MB momory addross spaco (000000l lo 0IIIIIl). Tlis
signaI is connoclod lo llo 8-bil porlion of aII 8- and 16-bil ISA oxpan-
sion connoclors. 8-bil momory cards slouId uso llis command Iino as
an onabIo lo docodo llo momory addross on llo addross bus. Tlis pro-
vonls 8-bil momory cards from boing soIoclod vlon a momory addross
groalor llan 1MB is on llo addross bus. AIso soo MRDC.
SMWTC - . Tlis signaI is assorlod by llo syslom
board Iogic during a momory vrilo bus cycIo llal addrossos a Iocalion
in llo Iovor 1MB momory addross spaco (000000l lo 0IIIIIl). Tlis
signaI is connoclod lo llo 8-bil porlion of aII 8- and 16-bil ISA oxpan-
sion connoclors. 8-bil momory cards slouId uso llis command Iino as
an onabIo vlon docoding llo momory addross on llo addross bus.
Tlis provonls 8-bil momory cards from boing soIoclod vlon a momory
addross groalor llan 1MB is on llo addross bus. AIso soo MWTC.
IOWC . Tlis signaI is assorlod by llo syslom board Iogic
during an I/O vrilo bus cycIo.
IORC . Tlis signaI is assorlod by llo syslom board Iogic
during an I/O road bus cycIo.
MRDC Tlo Iino is assorlod by llo syslom board Iogic
during a momory road bus cycIo. 16-bil momory cards slouId uso llis
signaI as an onabIo vlon docoding llo momory addross on llo ad-
dross bus. Tlis provonls 8-bil momory cards from boing soIoclod vlon
a momory addross groalor llan 1MB is on llo addross bus. AIso soo
SMRDC.
MWTC Tlo Iino is assorlod by llo syslom board
Iogic during a momory vrilo bus cycIo. 16-bil momory cards slouId
uso llis signaI as an onabIo vlon docoding llo momory addross on llo
addross bus. Tlis provonls 8-bil momory cards from boing soIoclod
vlon a momory addross groalor llan 1MB is on llo addross bus. AIso
soo SMWTC.

-

-
Tlo liming for an ISA bus cycIo is dorivod from BCIK. TabIo 16-5 doscribos llo
ISA bus signaIs roIalod lo bus cycIo liming.

- -

BCIK - . Tlo BCIK signaI is dorivod from llo inpul cIocI lo llo sys-
lom board microprocossor. ISA bus is basod on llo vorsion of llo IBM
IC/AT llal vas basod on an 80286 microprocossor running al a spood
of 8MHz (inlornaI ICIK spood). Tlo microprocossor's doubIo-
froquoncy cIocI inpul, CIK2, is dividod by lvo lo yioId an 8MHz sig-
naI. In ordor lo synclronizo il lo oacl bus cycIo gonoralod by llo mi-
croprocossor, llo BCIK gonoralor on llo syslom board monilors llo
S0 and S1 oulpuls of llo microprocossor. Tlo faIIing odgo of oillor
of lloso signaIs marIs llo slarl of a bus cycIo and is usod lo synclro-
nizo llo 8MHz BCIK suppIiod lo llo ISA oxpansion cards. Sinco
BCIK is ro-synclronizod al llo Ioading odgo of ovory bus cycIo, il viII
appoar lo jillor vlon viovod vill an osciIIoscopo. Ono cycIo of BCIK
dofinos llo duralion of addross limo or dala limo on llo ISA bus.
In Ialor ISA maclinos, llo BCIK spood is usuaIIy 8.33MHz. Tlis dalos
from llo inlroduclion of llo firsl 25MHz 80386 maclinos. Tlo dosign-
ors of lloso maclinos simpIy dividod llo 50MHz CIK2 by six lo yioId
a BCIK spood of 8.33MHz. Somo probIoms voro anlicipalod duo lo
llo sIigllIy faslor BCIK and llo rosuIling slorlor duralion of addross
limo and dala limo on llo ISA bus, bul fov acluaI probIoms voro on-
counlorod.

-


BAII -- . On llo Ioading, or rising, odgo of
BAII, llo microprocossors addross bus (A|19:0]) is galod llrougl llo
syslom board's Addross Ialcl and llrougl llo bus conlroI Iogic onlo
llo SA bus (SA|19:0]). On llo lraiIing odgo of BAII, llo addross Ialcl
and llo bus conlroI Iogic loId llo curronl addross on llo SA bus for
llo duralion of llo curronl bus cycIo.
Tlo faIIing odgo of BAII slouId bo usod lo by 16-bil ISA momory
boards lo Ialcl llo rosuIl of llo docodod IA bus addross (IA|23:17])
and loId il for llo duralion of llo curronl bus cycIo.
BAII is doassorlod and roassorlod (puIsod) for ovory bus cycIo llal
llo bus conlroI Iogic runs. If addross pipoIining is onabIod, A|19:0] is
nol galod llrougl llo addross Ialcl lo SA|19:0] on llo socond and sub-
soquonl ISA cycIos vlon llo bus conlroI Iogic is running muIlipIo ISA
bus cycIos lo salisfy ono microprocossor bus cycIo.
BAII is assorlod (ligl) conslanlIy vlonovor llo sysloms microproc-
ossor is nol llo curronl bus maslor.
CHRDY . Wlon an ISA oxpansion board roquiros moro vail
slalos llan vouId normaIIy bo suppIiod by llo dofauIl roady limor on
llo syslom board, il slouId doassorl CHRDY vlon ils addross docodor
rocognizos an addross and llo approprialo command Iino (SMRDC,
SMWTC, MRDC, olc.). Tlis provonls llo dofauIl roady limor on llo
syslom board from liming oul and issuing RIADY lo llo microproc-
ossor unliI CHRDY is assorlod again by llo curronlIy-addrossod ISA
dovico. As Iong as llo curronlIy-addrossod ISA card loIds CHRDY
doassorlod, llo microprocossor's RIADY inpul is Iopl doassorlod,
causing vail slalos lo bo insorlod in llo bus cycIo. Wlon llo curronlIy-
addrossod dovico is roady lo ond llo bus cycIo, il aIIovs CHRDY lo
bocomo assorlod again (CHRDY las a puII-up rosislor on llo syslom
board), onabIing llo dofauIl roady limor lo assorl llo microprocossor's
RIADY inpul. Wlon llo microprocossor sampIos ils RIADY inpul
assorlod al llo ond of llo curronl dala limo, il onds llo bus cycIo.
- -

-

NOWS -. Wlon an 8- or 16-bil ISA momory oxpansion board ro-
quiros zoro vail slalos rallor llan llo numbor llal vouId normaIIy bo
suppIiod by llo dofauIl roady limor on llo syslom board, il slouId
assorl NOWS vlon ils addross docodor rocognizos an addross and
llo approprialo command Iino (SMRDC, SMWTC, MRDC, olc.).
Tlis causos llo dofauIl roady limor lo assorl RIADY immodialoIy.
Tlis signaIs lo llo microprocossor llal llo dovico is roady lo ond llo
bus cycIo. NOWS can bo usod lo slorlon an accoss lo an 8-bil card
from llo dofauIl of four vail slalos dovn lo ono vail slalo, or an ac-
coss lo a 16-bil momory card from ono lo zoro vail slalos. Accossos lo
16-bil I/O cards may nol bo slorlonod from llo dofauIl of ono vail
slalo, bul may bo Iongllonod using llo CHRDY signaI.

Wlon a 16-bil sIavo's addross docodor dolocls an addross villin ils assignod
rango, il nol onIy slouId assorl llo dovico's clip-soIocl Iino, bul slouId aIso as-
sorl llo approprialo 16-bil sizo Iino. Rofor lo labIo 16-6. An assorlod IovoI on oi-
llor of llo 16-bil sizo Iinos informs llo curronl bus maslor llal il is
communicaling vill a dovico llal is connoclod lo boll dala palls, SD|7:0] and
SD|15:8].

If noillor of lloso signaIs is assorlod during a bus cycIo, llo bus maslor is com-
municaling vill an 8-bil dovico and aII communicalions musl laIo pIaco ovor
llo Iovor dala pall, SD|7:0]. Wlon nocossary, llo syslom board's dala bus
slooring Iogic is aulomalicaIIy onabIod by llo bus conlroI Iogic lo roulo llo dala
ovor llo corrocl dala pall.

Tlo dovico sizo Iinos (M16 and IO16) conlroI lloso aspocls of llo bus conlroI
Iogic:

1. ISA bus cycIo liming, incIuding:
vlollor llo command Iinos aro assorlod oarIy or aro doIayod, and
llo numbor of dofauIl vail slalos

2. Bus sizing, incIuding:
dala bus slooring, and
llo numbor of ISA bus cycIos llal musl bo run

- -

-

ISA bus cycIo liming is doscribod in dolaiI in llo noxl claplor. Bus sizing is do-
scribod in dolaiI in llo claplors onlilIod Tlo 80286 Syslom KornoI: Tlo In-
gino and Tlo 80386 Syslom KornoI.

-

M16 - . Tlis signaI is gonoralod by a 16-bil momory oxpan-
sion card vlon il rocognizos il is boing addrossod. M16 loIIs llo dala
bus slooring Iogic llal llo addrossod momory dovico is capabIo of
communicaling ovor boll dala palls. Wlon accossing an 8-bil mom-
ory dovico, llo M16 signaI Iino romains doassorlod, indicaling lo llo
dala bus slooring Iogic llal llo curronlIy addrossod dovico is an 8-bil
momory dovico capabIo of communicaling ovor llo Iovor dala pall
onIy. Wlon assorlod, M16 aIso pro-condilions llo dofauIl roady limor
on llo syslom board lo insorl ono vail slalo inlo llo bus cycIo unIoss
NOWS is assorlod. If NOWS is assorlod, zoro vail slalos aro insorlod
in llo bus cycIo.
IO16 I - . Tlis signaI is gonoralod by a 16-bil ISA I/O oxpansion
board vlon il rocognizos llal il is boing addrossod. IO16 providos
llo samo funclion for 16-bil I/O oxpansion dovicos as llo M16 signaI
providos for 16-bil momory dovicos. IO16 aIso pro-condilions llo do-
fauIl roady limor on llo syslom board lo insorl ono vail slalo inlo llo
bus cycIo.
-
Wlon llo unil is firsl povorod up, llo RISDRV (rosol drivo) signaI on llo ISA
bus romains assorlod unliI llo povor suppIy voIlagos lavo slabiIizod. RISDRV
is aIso assorlod vlon povor las droppod boIov an accoplabIo IovoI. Wlon as-
sorlod, RISDRV las lvo offocls on llo inslaIIod ISA cards:

Tlo cards aro provonlod from doing anylling unliI llo povor las slabi-
Iizod and RISDRV las bocomo doassorlod.
Iorcos aII of llo inslaIIod ISA cards lo a Inovn, iniliaIizod slalo lo onsuro
llal lloy aIvays bogin oporaling oxaclIy llo samo vay ovory limo llo unil
is povorod up.

-

Iiguro 16-4 iIIuslralos llo syslom board Iogic and ISA bus signaIs roIalod lo
DMA. ISA sysloms ompIoy lvo 8237 DMA conlroIIors cascadod logollor lo
provido sovon DMA clannoIs for uso by I/O cards. Tlo signaIs associalod vill
DMA oporalions aro Iislod and dofinod in labIo 16-7. Ior a dolaiIod doscriplion
of DMA, soo llo claplors onlilIod Dirocl Momory Accoss (DMA) and ISA
Bus Maslors.

- -- -

DRQ|3:0]
DRQ|7:5]
- for clannoIs 0 llrougl 3 and 5 llrougl 7. DRQ4 isn'l prosonl on llo
ISA oxpansion Bus bocauso il's usod by llo SIavo 8237 DMA conlroIIor lo roquosl
llo uso of llo busos from llo maslor 8237. Tlo ollor DMA roquosl Iinos aro usod
by I/O dovicos lo roquosl llal a bIocI dala lransfor bolvoon llo I/O dovico and
momory bo porformod by llo DMAC. DRQ|3:1] aro connoclod lo aII 8- and 16-bil
ISA oxpansion sIols, vliIo DRQ|7:5] and DRQ0 aro onIy connoclod lo llo 16-bil
ISA oxpansion sIols.
DAK|3:0]
DAK|7:5]
for clannoIs 0 llrougl 3 and 5 llrougl 7. DAK4 isn'l prosonl
on llo ISA oxpansion bus bocauso il's usod by llo maslor 8237 DMAC lo inform
llo sIavo 8237 DMAC llal il las boon granlod llo uso of llo busos. Wlon a DMA
clannoI las possossion of llo busos, il rosponds lo a DMA roquosl (DRQx) by
assorling llo corrosponding DMA acInovIodgo Iino (DAKx), aIong vill oillor
llo I/O Road or I/O Wrilo command Iino (IORC or IOWC). Tlis combinalion of
DAKx and IORC or IOWC soIocls llo I/O dovico llal inilialod llo roquosl,
aIIoving il lo lransfor a bylo (for llo sIavo DMAC) or a vord (for llo maslor
DMAC) bolvoon ilsoIf and momory.
TC - . Assorlod by llo maslor or sIavo DMAC vlon llo vord or bylo
lransfor counl for a DMA clannoI las boon oxlauslod.
AIN -- . Assorlod vlon ono of llo syslom board's DMACs (maslor or
sIavo) las boon granlod llo busos. Wlon assorlod, AIN provonls llo I/O dovicos
from rosponding lo llo I/O command Iinos. Tlo DMAC las pIacod a momory
addross on llo addross bus (nol an I/O addross) bul il las assorlod ono of llo I/O
command Iinos.
MASTIR16 Assorlod by a - - oxpansion board vlon il las boon granlod
llo busos. On llo syslom board, an assorlod IovoI on MASTIR16 causos llo diroc-
lion of llo bus buffors lo bo rovorsod so llo ISA bus maslor oxpansion card can
drivo addrossos and bus cycIo informalion onlo llo ISA bus and inlo llo syslom
board. Tlo assorlod IovoI on MASTIR16 aIso causos llo syslom board lo doassorl
AIN, lloroby aIIoving llo I/O dovicos lo rospond lo llo ISA command Iinos. Tlis
onabIos llo bus maslor card lo addross any dovico on llo syslom board and any
dovico Iocalod on llo ISA bus.


-


- -- -
TC
TC
MRDC
MWTC
lORC
lOWC
HOLD
DAK7
DAK5
DRQ7
DRQ5
DAK0
DAK3
DAK2
DRQ0
DRQ3
DRQ2
DRQ6
DRQ1
DAK1
DAK6
HLDA
Slave
DMA
Controller
Master
DMA
Controller
DAK4
DRQ4
TC
AEN
AEN

-

-
Iiguro 16-5 iIIuslralos llo inlorrupl supporl Iogic on llo syslom board and llo
inlorrupl-roIalod signaIs on llo ISA bus. Tvo InloI 8259 programmabIo inlor-
rupl conlroIIors (IICs) aro Iocalod on llo syslom board. Wlon a dovico on llo
ISA bus roquiros sorvicing by llo syslom board microprocossor, il slouId assorl
ils rospoclivo inlorrupl roquosl (IRQ) Iino lo inform llo syslom board micro-
procossor. A dolaiIod doscriplion of inlorrupls is Iocalod in llo claplor onlilIod
Inlorrupl Subsyslom. TabIo 16-8 Iisls llo ISA inlorrupl roquosl Iinos and llo
I/O dovicos llal normaIIy uso llom. Tlo assignmonls of syslom inlorrupl ro-
quosl Iinos llal aro on llo ISA connoclor aro slovn in labIo 16-9.

- - --
- --
IRQ3 SoriaI porl 2
IRQ4 SoriaI porl 1
IRQ5 IaraIIoI porl 2
IRQ6 IIoppy disI inlorfaco
IRQ7 IaraIIoI porl 1
IRQ9 nono (namod IRQ2 on IC and IC/XT)
IRQ10 nono
IRQ11 nono
IRQ12 Mouso inlorfaco
IRQ14 Hard disI inlorfaco
IRQ15 nono

- -- - -
--
IRQ0 Syslom limor
IRQ1 Koyboard inlorfaco
IRQ2 Cascado inlorrupl from sIavo IIC
IRQ8 RoaI limo cIocI
IRQ13 Numoric coprocossor


-


- -- -
S0
S1
M/lO

-


Tlo ISA oxpansion bus signaI Iino associalod vill orror roporling is doscribod
in labIo 16-10. Iiguro 16-6 iIIuslralos llo roIalionslip bolvoon llo ISA bus
CHCHK signaI and llo syslom board Iogic.



CHCHK . Tlis signaI is assorlod by an ISA oxpansion
board lo signaI an orror condilion lo llo microprocossor. An NMI
inlorrupl is issuod lo llo microprocossor if NMI inlorrupls lavo boon
onabIod (bil 7 of porl 70l is a 0) and if rocognilion of clannoI clocI
las boon onabIod (bil 3 of porl 61l is a 0).




Micro
NMl
NMl
Enable/Disable Gate
Port 70h
Bit 7
Port 61h
Bit 2
Port 61h
Bit 3
Channel Check
Enable/Disable
Gate
DRAM Parity Error
Enable/Disable
Gate
CHCHK
Parity Check
Watchdog Timer Timeout

-

-- -
Tlo romaining signaIs on llo ISA bus aro Iislod and doscribod in labIo 16-11.

-- -

RIIRISH Tlis signaI is assorlod vlonovor llo syslom board - Iogic is
oxoculing a DRAM rofrosl bus cycIo. Soo discussion of DRAM rofrosl
in llo claplor onlilIod RAM Momory: Tloory of Oporalion.
OSC -. Tlis is a froo-running 14.31818MHz cIocI llal may bo
usod by ISA oxpansion boards. OSC runs al a muIlipIo of llo coIor
bursl froquoncy and vas usod by vidoo dispIay adaplor cards. Addi-
lionaI informalion aboul OSC is in llo claplor onlilIod ISA Timors.


- - -


-
Tlo provious claplor, Tlo ISA Bus Slrucluro, providod a dolaiIod doscriplion
of aII of llo signaIs on llo ISA oxpansion bus and lloir associalod syslom board
supporl Iogic.
-
Tlis claplor providos a dolaiIod doscriplion of llo lypos of lransfors porformod
ovor llo ISA oxpansion bus.

Tlo noxl claplor, Inlorrupl Subsyslom, providos a dolaiIod doscriplion of llo
inlorrupl subsyslom found in aII ISA maclinos.

Tlo faslosl bus cycIo llal can bo run by an 80286 or liglor microprocossor is a
0-vail-slalo bus cycIo, vill a duralion of lvo ICIK cycIos. Ior llo cIocI-
muIlipIiod 486 and Ionlium procossors, a 0-vail-slalo bus cycIo laIos lvo licIs
of llo CIK inpul lo llo microprocossor. ICIK may bo llo samo as or may bo
faslor llan CIK. Tlo cIocI llal is usod lo synclronizo ISA bus lransfors is
caIIod BCIK, or bus cIocI. Tlo ISA bus is basod on llo 8MHz vorsion of llo
80286-basod IBM IC/AT. In llal maclino, BCIK vas a copy of ICIK, so
BCIK ran al 8MHz.

In Ialor ISA maclinos, llo BCIK spood is up lo 8.33MHz. Tlis dalos from llo
inlroduclion of llo firsl 25MHz 80386 maclinos. Tlo dosignors of lloso ma-
clinos simpIy dividod llo 50MHz CIK2 by six lo yioId a BCIK spood of
8.33MHz. BCIK can run al any froquoncy up lo 8.33MHz, vill lypicaI fro-
quoncios of 8MHz, 8.25MHz and 8.33MHz. A singIo licI, or cycIo, of BCIK is
lloroforo 120ns lo 125ns in duralion. A 0-vail-slalo bus cycIo on llo ISA bus
consisls of lvo BCIK licIs, Iasling 240ns lo 250ns.

-

Nolo llal for simpIicily in llo rosl of llis claplor, BCIK is assumod lo run al
8MHz.

During a bus cycIo, a maximum of lvo bylos may bo lransforrod by using boll
dala palls. Al llis ralo, llo maclino can porform four miIIion (1 socond di-
vidod by 250ns por bus cycIo) lvo-bylo lransfors por socond. Tlis yioIds a
maximum lransfor ralo of 8MB/socond.

Tlo ISA bus aIIovs boll 8-bil lransfors, for compalibiIily vill llo 8-bil oxpan-
sion boards usod in llo originaI IBM IC, as voII as 16-bil lransfors. Tlo foIIov-
ing soclions doscribo llo basic lypos of ISA bus cycIos.
-- -
Tlo ISA bus cycIo lypos usod lo communicalo vill 8-bil dovicos incIudo:

Slandard 8-bil dovico ISA bus cycIo 4 vail slalos
Slorlonod 8-bil dovico bus cycIo 1, 2, or 3 vail slalos
Slrolclod 8-bil dovico bus cycIo moro llan 4 vail slalos

Tlo slops boIov doscribo llo soquonco of ovonls llal laIo pIaco during an 8-bil
bus cycIo using llo dofauIl RIADY liming and oxpIains lov llo dofauIl lim-
ing can bo oillor slorlonod or slrolclod. Iiguro 17-1 iIIuslralos an oxampIo bus
cycIo. Tlo slop numbors in llo loxl llal foIIovs corrosponds lo llo numborod
roforonco poinls in figuro 17-1.

1. Tlo addross boing prosonlod by llo microprocossor bogins lo appoar on llo
IA bus al llo slarl of addross limo. Tlis corrosponds lo llo Ioading odgo of
Ts. If llo syslom board is basod on an 80286, 80386 or Ionlium microproc-
ossor and addross pipoIining is onabIod, llo addross may acluaIIy bo pro-
sonl on llo IA bus prior lo llo boginning of llo bus cycIo (as is llo caso in
llis oxampIo). 16-bil ISA momory oxpansion cards can uso llo porlion of
llo addross on llo IA bus lo porform an oarIy addross docodo. 8-bil ISA
oxpansion cards do nol lavo accoss lo llo IA bus and lloroforo cannol por-
form an oarIy addross docodo. I/O cards onIy uso llo Iovor 16 addross bils
and lloroforo cannol laIo advanlago of addross pipoIining oillor.





- - -



--

2. BAII is assorlod laIfvay llrougl addross limo, galing llo addross
llrougl llo syslom board addross Ialcl and llrougl llo bus conlroI Iogic
onlo llo SA bus.
3. If llis is a vrilo bus cycIo, llo microprocossor's oulpul dala is galod onlo
llo SD bus laIfvay llrougl addross limo. Il romains on llo SD bus unliI
laIf a BCIK cycIo inlo llo noxl bus cycIo (laIfvay llrougl addross limo of
llo noxl lransfor).
4. Tlo lraiIing odgo of BAII (al llo boginning of dala limo) causos llo syslom
board addross Ialcl and llo bus conlroI Iogic lo Ialcl llo addross boing
125ns 125ns 125ns 125ns 125ns 125ns 125ns 125ns
Tc Tc Tc Tc Tc Tc Ts Ts
Write Data
SD15:SD0
Read Data
SD15:SD0
CHRDY
NOWS
SMRDC, SMWTC,
lORC, lOWC
M16,
lO16
BALE
SBHE,
SA19:SA0
LA23:LA17
BCLK
1
2
4
5
6
7
8
M16
lO16
3

-

oulpul by llo CIU so il viII romain slalic on llo SA bus for llo romaindor
of llo bus cycIo. AIso al llis limo, llo addrossod dovico can safoIy compIolo
llo docoding procoss.
5. If llis is a momory lransaclion (M/IO from microprocossor is ligl), llon
al llo ond of addross limo, llo M16 signaI is sampIod by llo syslom board
bus conlroI Iogic. Sinco llis is a lransaclion lo an 8-bil dovico, M16 is sam-
pIod doassorlod, and llo bus conlroI Iogic doos nol assorl llo command Iino
unliI laIfvay llrougl llo firsl dala limo. During a lransfor vill an 8-bil
dovico, llo assorlion of llo command Iino is doIayod unliI llo midpoinl of
dala limo lo aIIov moro limo for addross docodo boforo command Iino as-
sorlion. (Soo llo soclion onlilIod, Transfors vill 16-bil Dovicos lo soo
vlon llo command Iinos aro assorlod oarIy.)
6. Tlo approprialo command Iino (SMRDC, SMWTC, IORC or IOWC) is
assorlod laIfvay llrougl dala limo. Tlo command Iino romains assorlod
unliI llo ond of llo bus cycIo (ond of Iasl Tc). If llis is a momory lransac-
lion, M16 is aIso sampIod by llo bus conlroI Iogic laIfvay llrougl llo
firsl dala limo. Sinco llis is a lransaclion lo an 8-bil dovico, M16 is sam-
pIod doassorlod. Tlo socond sampIo poinl on M16 givos addilionaI limo
for 16-bil momory dovicos llal faiIod lo assorl M16 oarIy onougl for llo
firsl sampIo poinl. Tloso dovicos oillor did nol soo IA|23:17] oarIy onougl
lo assorl M16 by llo firsl sampIo poinl, or lloy aro vailing for BAII lo bo
assorlod boforo docoding IA|23:17].
1. If llis is an I/O lransaclion (M/IO from microprocossor is Iov), llon al
llo midpoinl of llo socond dala limo (llo firsl vail slalo), llo IO16 signaI
is sampIod by llo syslom board bus conlroI Iogic. Sinco llis is a lransaclion
lo an 8-bil dovico, IO16 is sampIod doassorlod, indicaling llal llo ad-
drossod oxpansion board is an 8-bil dovico.

HaIfvay llrougl llo socond dala limo and laIfvay llrougl oacl subso-
quonl dala limo, llo dofauIl roady limor on llo syslom board sampIos llo
NOWS and CHRDY Iinos. If boll NOWS and CHRDY aro sampIod as-
sorlod, llo CIU RIADY Iino is assorlod and llo bus cycIo onds on llo noxl
rising odgo of BCIK (llo ond of llo curronl dala limo). In llis vay, an ISA
board can lorminalo a bus cycIo oarIior llan llo dofauIl numbor of BCIK
cycIos (vail slalos) by assorling NOWS. On llo ollor land, if CHRDY is
doassorlod, llo dofauIl roady limor ignoros NOWS and insorls vail slalos.
(Nolo llal llo IISA spocificalion varns llal dovicos slouId nol assorl
NOWS vliIo doassorling CHRDY, impIying llal somo bus conlroIIors
may nol ignoro NOWS vlon CHRDY is doassorlod.)

A bus cycIo addrossing an 8-bil ISA dovico dofauIls lo six BCIK cycIos
(four vail slalos) if llo foIIoving lvo condilions aro mol:

- - -

llo bus cycIo isn'l lorminalod oarIior by llo assorlion of NOWS
and
CHRDY is assorlod vlon sampIod during llo firsl laIf of llo Iasl
dala limo of llo dofauIl cycIo (firsl laIf of llo 5ll dala limo).
Tlis moans llal llo duralion of an ISA bus cycIo accossing an 8-bil dovico
dofauIls lo four vail slalos unIoss slorlonod by NOWS (lo 3, 4, or 5 BCIK
cycIos) or Iongllonod by CHRDY. Tlo dofauIl bus cycIo onds al llo lraiIing
odgo of llo fifll dala limo.
8. During a road bus cycIo, llo microprocossor roads llo dala on llo dala bus
al llo ond of llo Iasl BCIK (Tc) of llo bus cycIo and llo bus cycIo is llon
lorminalod by doassorling llo command Iino (SMRDC, MRDC, IORC).
Wlon a vrilo bus cycIo lorminalos, llo SMWTC or IOWC command Iino
is doassorlod bul vrilo dala romains on llo SD bus unliI laIfvay llrougl
addross limo of llo noxl bus cycIo. Tlis accommodalos llo loId limo of llo
dovico boing vrillon lo and doosn'l dislurb llo dovico boing addrossod in
llo noxl bus cycIo bocauso llo command Iino for llal bus cycIo lasn'l boon
assorlod yol.
-- -
Tlo ISA bus cycIo lypos usod lo communicalo vill 16-bil dovicos incIudo:

Slandard 16-bil dovico ISA bus cycIo (Momory & I/O) 1 vail slalo
Slorlonod 16-bil dovico ISA bus cycIo (Momory onIy) 0 vail slalo
Slrolclod 16-bil dovico ISA bus cycIo moro llan 1 vail slalo
-
Iiguro 17-2 iIIuslralos llo liming of a bus cycIo on llo ISA bus vlon llo micro-
procossor is communicaling vill a ono-vail-slalo 16-bil momory dovico. Tlo
liming diagram and llo foIIoving numborod slops iIIuslralo llo soquonco of
ovonls llal occur during a dofauIl ISA 16-bil momory accoss. Iacl of llo num-
borod slops corrosponds lo llo numborod roforonco poinls in figuro 17-2.

1. If llo syslom board is basod on an 80286, 80386 or Ionlium microprocossor
and addross pipoIining is onabIod, llo addross is prosonl on llo IA bus
prior lo llo boginning of llo bus cycIo. Tlis aIIovs llo addrossod momory
dovico lo slarl docoding llo addross oarIy vlicl may spood up accoss.
2. BAII is assorlod laIfvay llrougl addross limo. Somo 16-bil momory do-
vicos vail unliI llo rising odgo of BAII boforo docoding llo IA Iinos lo do-
lormino if llo addross is for llom. AIso vlon BAII bocomos assorlod, llo

-

Iovor porlion of llo addross from llo procossor is lransforrod llrougl llo
syslom board's addross Ialcl and llrougl llo bus conlroI Iogic onlo llo SA
bus.
3. Tlo addrossod momory board assorls M16 as a rosuIl of docoding llo IA
Iinos, indicaling lo llo syslom board's bus conlroI Iogic llal il is capabIo of
landIing a 16-bil lransfor villoul dala bus slooring boing porformod by
llo slooring Iogic on llo syslom board.
4. If llis is a vrilo bus cycIo, llo microprocossor's oulpul dala is galod onlo
llo SD bus laIfvay llrougl addross limo and romains on llo SD bus unliI
laIf a BCIK cycIo inlo llo noxl bus cycIo (laIf-vay llrougl addross limo of
llo noxl bus cycIo).
5. Al llo ond of addross limo, llo lraiIing odgo of BAII causos lvo ovonls lo
laIo pIaco:
a) 16-bil ISA momory dovicos Ialcl llo IA Iinos (or llo clip soIocl) so
llo addrossod dovico viII nol bo dosoIoclod vlon llo IA Iinos aro
pipoIinod boforo llo ond of llo curronl bus cycIo.
b) Tlo addross Ialcl on llo syslom board and llo bus conlroI Iogic
Ialcl llo Iovor lvonly bils of llo addross, SA|19:0], so lloy romain
slalic on llo SA bus for llo romaindor of llo bus cycIo. Tlo ad-
drossod dovico can safoIy compIolo docoding llo SA addross on llo
bus on llo faIIing odgo of BAII.


- - -


--
125ns 125ns
125ns
125ns
125ns
Tc Ts Tc Tc
LA23: LA17
SBHE,
SA19:SA0
BCLK
BALE
M RDC, MW TC
M16
NOW S
CHRDY
Read Data
SD15:SD0
W rite Data
SD15:SD0
8 1
2
5
6
3
7
9
4
10

-


6. Tlo syslom board's bus conlroI Iogic sampIos M16 al llo ond of addross
limo lo dolormino if llo addrossod dovico can laIo advanlago of llo
MRDC or MWTC command Iinos boing assorlod immodialoIy. 16-bil
momory dovicos soo llo pipoIinod addross Iong boforo 8-bil and I/O do-
vicos soo llo addross on SA|19:0]. 16-bil momory dovicos can lloroforo as-
sorl M16 vory oarIy in llo bus cycIo. Tlo approprialo command Iino
(MRDC or MWTC) is assorlod al llo Ioading odgo of dala limo if M16
vas sampIod assorlod. Tlis command Iino romains assorlod unliI llo ond of
llo bus cycIo (ond of Iasl Tc).If M16 is sampIod doassorlod, llo command
Iino (MRDC or MWTC) is assorlod laIfvay llrougl dala limo.
7. Tlo syslom board's bus conlroI Iogic sampIos M16 a socond limo al llo
midpoinl of llo firsl dala limo lo dolormino if dala bus slooring is nocos-
sary. Sinco llis is an accoss lo a 16-bil dovico, no slooring is nocossary. Tlo
socond sampIo poinl on M16 givos addilionaI limo for 16-bil momory do-
vicos llal faiIod lo assorl M16 oarIy onougl for llo firsl sampIo poinl.
Tloso dovicos oillor did nol soo IA|23:17] oarIy onougl lo assorl M16 by
llo firsl sampIo poinl, or lloy aro vailing for BAII lo bo assorlod boforo
docoding IA|23:17]. AIso al llo midpoinl of llo firsl dala limo, llo dofauIl
roady limor on llo syslom board sampIos llo NOWS and CHRDY Iinos. If
NOWS and CHRDY aro sampIod assorlod, llo microprocossor's RIADY
Iino is assorlod and llo bus cycIo lorminalos al llo ond of llo firsl dala limo.
In llis vay, a 16-bil ISA momory board can compIolo a bus cycIo in lvo
BCIK cycIos. On llo ollor land, if CHRDY is doassorlod, llo dofauIl roady
limor ignoros NOWS and insorls vail slalos. (Nolo llal llo IISA spocifica-
lion varns llal dovicos slouId nol assorl NOWS vliIo doassorling
CHRDY, impIying llal somo bus conlroIIors may nol ignoro NOWS vlon
CHRDY is doassorlod.)
8. During addross pipoIining, llo microprocossor is froo lo oulpul llo addross
for llo noxl bus cycIo during llo curronl bus cycIo. OnIy llo uppor porlion
of llo pipoIinod addross appoars al llis limo on llo IA bus bocauso lloso
bils aro bufforod bul nol Ialclod from llo microprocossor's addross bus.
Tlo romaindor of llo addross viII nol appoar on llo SA bus unliI llo mid-
poinl of addross limo in llo noxl bus cycIo.
9. CHRDY is sampIod by llo dofauIl roady limor during llo socond dala limo
lo dolormino if llo dovico viII bo roady lo compIolo llo bus cycIo al llo ond
of llis BCIK cycIo. If llo dovico cannol compIolo llo bus cycIo by llo ond
of llis BCIK cycIo, il slouId doassorl llo CHRDY Iino. If CHRDY voro
sampIod doassorlod by llo dofauIl roady limor, il vouId rospond by ox-
londing llo bus cycIo by adding anollor dala limo. CHRDY is llon clocIod
al llo boginning of oacl addilionaI dala limo unliI llo dovico roIoasos
CHRDY lo indicalo llal llo bus cycIo can bo compIolod.

- - -

10. An ISA 16-bil momory bus cycIo dofauIls lo llroo BCIK cycIos (ono vail
slalo) if llo bus cycIo isn'l lorminalod oarIior by llo assorlion of NOWS
and if CHRDY slays assorlod llrougloul llo bus cycIo. Tlis moans llal llo
Iongll of an ISA bus cycIo vlon accossing a 16-bil momory card dofauIls lo
ono vail slalo unIoss slorlonod by NOWS or Iongllonod by CHRDY.
RIADY is llon assorlod lo llo microprocossor, loIIing il lo road llo dala
from llo dala bus. Tlo bus conlroI Iogic llon doassorls llo command Iino
(MRDC, MWTC, SMRDC, SMWTC). Wlon a momory vrilo bus cycIo
lorminalos, llo MWTC command Iino is doassorlod, bul llo dala romains
on llo SD bus for llo firsl laIf of addross limo in llo noxl bus cycIo. Tlis
providos loId limo for llo dovico boing vrillon lo and doosn'l affocl llo
dovico boing addrossod in llo noxl bus cycIo bocauso llo command Iino
lasn'l boon assorlod yol.
-
Iiguro 17-3 iIIuslralos llo liming of a bus cycIo on llo ISA bus vlon llo micro-
procossor is communicaling vill a 16-bil I/O dovico. Tlo liming diagram and
llo foIIoving numborod slops iIIuslralo llo soquonco of ovonls llal occur dur-
ing a dofauIl ISA 16-bil I/O accoss. Iacl of llo numborod slops corrosponds lo
llo numborod roforonco poinls in figuro 17-3.

1. If llo syslom board is basod on an 80286, 80386 or Ionlium microprocossor
and addross pipoIining is onabIod, llo addross is prosonl on llo IA bus
prior lo llo boginning of llo bus cycIo. Tlo IA bus las no impacl on I/O
bus cycIos sinco llo IA bus viII aIvays bo zoros during I/O oporalions.
2. BAII is assorlod laIfvay llrougl addross limo, galing llo addross
llrougl llo syslom board's addross Ialcl and llrougl llo bus conlroI Iogic
onlo llo SA bus.
3. If llis is a vrilo bus cycIo, llo microprocossor's oulpul dala is galod onlo
llo SD bus laIfvay llrougl addross limo and romains on llo SD bus unliI
laIf a BCIK cycIo inlo llo noxl bus cycIo (laIf-vay llrougl addross limo of
llo noxl bus cycIo).
4. Al llo slarl of dala limo, llo lraiIing odgo of BAII causos llo addross Ialcl
on llo syslom board and llo bus conlroI Iogic lo Ialcl llo Iovor lvonly bils
of llo addross, SA|19:0], so il romains slalic on llo SA bus for llo romain-
dor of llo bus cycIo. Tlo addrossod dovico can safoIy compIolo docoding
llo SA addross on llo faIIing odgo of BAII.

-


--
7
125ns 125ns 125ns 125ns
Tc Ts
Tc Tc
LA23:LA17
SBHE,
SA19:SA0
BCLK
BALE
lORC,
lOWC
lO16
NOWS
CHRDY
Read Data
SD15:SD0
Write Data
SD15:SD0
8
1
2
4
6
3
10
5
9

- - -

5. Tlo approprialo command Iino (IORC or IOWC) is aIso assorlod al llo
midpoinl of dala limo. Tlis command Iino romains assorlod unliI llo ond of
llo bus cycIo (ond of Iasl Tc).
6. Al llo midpoinl of llo firsl dala limo, llo dofauIl roady limor on llo syslom
board ignoros llo NOWS and CHRDY Iinos sinco an I/O dovico is boing
accossod. Tlo onIy dovicos llal can lavo zoro-vail-slalo ISA bus cycIos aro
16-bil momory dovicos.
7. During addross pipoIining, llo microprocossor is froo lo oulpul llo addross
for llo noxl bus cycIo during llo curronl bus cycIo. OnIy llo uppor porlion
of llo pipoIinod addross appoars al llis limo on llo IA bus bocauso lloso
bils aro bufforod bul nol Ialclod from llo microprocossor's addross bus.
Tlo romaindor of llo addross viII nol appoar on llo SA bus unliI llo mid-
poinl of addross limo in llo noxl bus cycIo.
8. IO16 is sampIod al llo midpoinl of llo socond dala limo lo dolormino if
llo I/O dovico is an 8- or 16-bil dovico. If sampIod assorlod, no dala bus
slooring viII bo porformod and llo bus cycIo is lorminalod on llo noxl ris-
ing odgo of BCIK, vlicl is llo ond of llo socond dala limo. Tlo bus cycIo
viII nol bo lorminalod if llo CHRDY Iino is sampIod doassorlod.
9. CHRDY is sampIod by llo dofauIl roady limor during llo socond dala limo
lo dolormino if llo dovico is roady lo compIolo llo bus cycIo. If llo dovico
cannol compIolo llo bus cycIo by llo ond of llo socond BCIK cycIo, il
slouId lavo doassorlod llo CHRDY Iino. If CHRDY voro sampIod doas-
sorlod by llo dofauIl roady limor, il vouId rospond by oxlonding llo bus
cycIo by ono dala limo. CHRDY is llon clocIod during oacl addilionaI
dala limo unliI llo dovico roIoasos CHRDY lo indicalo llal llo bus cycIo
can bo compIolod.
10. An ISA 16-bil I/O bus cycIo dofauIls lo llroo BCIK cycIos (ono vail slalo)
if CHRDY slays assorlod llrougloul llo bus cycIo. Tlo bus cycIo cannol bo
lorminalod oarIior by llo assorlion of NOWS. Tlis moans llal llo Iongll
of an ISA bus cycIo vlon accossing a 16-bil I/O card dofauIls lo ono vail
slalo unIoss Iongllonod by CHRDY. RIADY is llon assorlod lo llo micro-
procossor, loIIing il lo road llo dala from llo dala bus and llo bus conlroI
Iogic doassorls llo command Iino. Wlon an I/O vrilo bus cycIo lorminalos,
llo IOWC command Iino is doassorlod, bul llo dala romains on llo SD
bus for llo firsl laIf of addross limo in llo noxl bus cycIo. Tlis accommo-
dalos llo loId limo of llo dovico boing vrillon lo and doosn'l dislurb llo
dovico boing addrossod in llo noxl bus cycIo bocauso llo command Iino for
llal bus cycIo lasn'l boon assorlod yol.

-

--
Iiguro 17-4 iIIuslralos llo liming of a bus cycIo on llo ISA bus vlon llo CIU is
communicaling vill a zoro-vail-slalo 16-bil momory dovico. Nolo llal onIy 16-
bil momory dovicos can compIolo bus cycIos al zoro vail slalos. Tlo liming
diagram and llo foIIoving numborod slops iIIuslralo llo soquonco of ovonls
during llis bus cycIo. Iacl of llo numborod slops corrosponds lo llo numborod
roforonco poinls in figuro 17-4.

1. In llis oxampIo, addross pipoIining is onabIod and llo IA addross is pro-
sonl on llo ISA bus prior lo llo boginning of llo bus cycIo. Tlis aIIovs llo
addrossod dovico lo slarl docoding llo addross oarIy. In somo casos, llis aI-
Iovs a dovico lo oporalo al 0 vail slalos.
2. BAII is assorlod laIfvay llrougl addross limo. Wlon BAII bocomos as-
sorlod, llo Iovor porlion of llo addross from llo procossor is lransforrod
llrougl llo syslom board's addross Ialcl and llrougl llo bus conlroI Iogic
onlo llo SA bus.
3. Tlo addrossod momory board assorls M16 as a rosuIl of docoding llo IA
Iinos, indicaling lo llo syslom board's bus conlroI Iogic llal il is capabIo of
landIing a 16-bil lransfor villoul dala bus slooring boing porformod by
llo slooring Iogic on llo syslom board.
4. If llis is a vrilo bus cycIo, llo microprocossor's oulpul dala is galod onlo
llo SD bus laIfvay llrougl addross limo and romains on llo SD bus unliI
laIf a BCIK cycIo inlo llo noxl bus cycIo (laIf-vay llrougl addross limo of
llo noxl bus cycIo).
5. Al llo ond of addross limo, llo lraiIing odgo of BAII causos lvo ovonls lo
laIo pIaco:
a) 16-bil ISA momory dovicos Ialcl llo IA Iinos (or Ialcl llo clip soIocl)
so llo addrossod dovico viII nol bo dosoIoclod vlon llo IA Iinos aro
pipoIinod boforo llo ond of llo curronl bus cycIo.
b) llo addross Ialcl on llo syslom board and llo bus conlroI Iogic Ialcl
llo Iovor lvonly bils of llo addross, SA|19:0], so lloy romain slalic on
llo SA bus for llo romaindor of llo bus cycIo. Tlo addrossod dovico
can safoIy compIolo docoding llo SA addross on llo bus on llo faIIing
odgo of BAII.



- - -


--
125ns 125ns 125ns 125ns
Tc Ts Tc Ts
LA23:LA17
SBHE,
SA19:SA0
BCLK
BALE
MRDC
MWTC
M16
NOWS
CHRDY
Read Data
SD15:0
Write Data
SD15:0
9
7
6
1
3
8
2
4
5

-

6. Tlo syslom board's bus conlroI Iogic sampIos M16 al llo ond of addross
limo lo dolormino if llo addrossod dovico can laIo advanlago of llo
MRDC or MWTC command Iinos boing assorlod immodialoIy. M16 is
sampIod assorlod and llo approprialo command Iino (MRDC or MWTC)
is assorlod al llo Ioading odgo of dala limo. Tlis command Iino romains as-
sorlod unliI llo ond of llo bus cycIo (ond of Tc).
7. Tlo syslom board's bus conlroI Iogic sampIos M16 a socond limo al llo
midpoinl of llo firsl dala limo lo dolormino if dala bus slooring is nocos-
sary. Sinco llis is an accoss lo a 16-bil dovico, no slooring is nocossary. Tlo
socond sampIo poinl on M16 givos addilionaI limo for 16-bil momory do-
vicos llal faiIod lo assorl M16 oarIy onougl for llo firsl sampIo poinl.
Tloso dovicos oillor did nol soo IA|23:17] oarIy onougl lo assorl M16 by
llo firsl sampIo poinl, or lloy aro vailing for BAII lo bo assorlod boforo
docoding IA|23:17]. Sinco llo M16 Iino is assorlod, llo dofauIl roady limor
sampIos llo NOWS and CHRDY Iinos lo soo if llo bus cycIo can ond in
zoro ISA vail slalos. In llis oxampIo, M16, NOWS and CHRDY aro sam-
pIod assorlod, forcing llo dofauIl roady limor lo assorl llo microprocossor's
RIADY Iino boforo llo ond of llo curronl dala limo. In llis vay, faslor
ISA momory boards can compIolo a bus cycIo in lvo rallor llan llroo
BCIK cycIos. (Nolo llal llo IISA Spocificalion varns llal dovicos slouId
nol assorl NOWS vliIo doassorling CHRDY, impIying llal somo bus con-
lroIIors may nol ignoro NOWS vlon CHRDY is doassorlod.)
8. Sinco llo IA Iinos lavo aIroady dono lloir job, (llo addrossod dovico las
aIroady docodod llo IA Iinos and Ialclod llo clip soIocl), llo microprocos-
sor is froo lo oulpul llo addross for llo noxl bus cycIo.
9. During a road, llo microprocossor Ialclos llo conlonls of llo dala bus, and
llo bus conlroI Iogic doassorls llo command Iino (SMRDC, SMWTC,
MRDC, MWTC) lloroby onding llo bus cycIo. During a vrilo, llo com-
mand Iino is doassorlod, bul llo dala romains on llo SD bus for llo firsl
laIf of addross limo in llo noxl bus cycIo. Tlis accommodalos llo loId limo
of llo dovico boing vrillon lo and doosn'l dislurb llo dovico boing ad-
drossod in llo noxl bus cycIo bocauso llo command Iino for llal bus cycIo
lasn'l boon assorlod yol.


--


-
Tlo lvo claplors prior lo llis ono doscribod llo ISA oxpansion bus and llo bus
cycIo lypos llal aro usod lo lransfor dala ovor il.
-
Tlis claplor providos a dolaiIod discussion of llo inlorrupl subsyslom found in
ovory ISA maclino. Tlis incIudos in-dopll lardvaro and soflvaro doscriplions
of ils oporalion and programming.

Tlo noxl claplor, Dirocl Momory Accoss (DMA) providos a dolaiIod doscrip-
lion of llo DMA subsyslom found in aII ISA maclinos.
-
Al various limos, an I/O dovico villin a IC syslom may roquiro loIp, or sor-
vico, from llo microprocossor. Tlo I/O dovico usos a signaI Iino Inovn as an
inlorrupl roquosl Iino lo roquosl llo microprocossor's loIp.

Tlo oxacl lypo of sorvicing a dovico roquiros is dofinod by llo lypo of dovico
and ils curronl condilion. Ior oxampIo, a paraIIoI porl connoclod lo a prinlor
may gonoralo an inlorrupl roquosl lo asI llo microprocossor for llo noxl clar-
aclor lo bo sonl lo llo prinlor. In llis caso, llo microprocossor vouId rospond
by porforming an I/O vrilo bus cycIo lo sond llo noxl claraclor lo llo paraIIoI
porl.

A socond oxampIo vouId bo llo inlorrupl roquosl gonoralod by a lard disI
conlroIIor lo loII llo microprocossor llal a dala lransfor lo or from momory las
boon compIolod. If llis voro a disI road oporalion, for oxampIo, llo microproc-
ossor vouId rospond lo llo inlorrupl roquosl by using llo dala llal las boon
lransforrod from llo disI conlroIIor inlo momory.

-

As a llird and finaI oxampIo, llo Ioyboard inlorfaco gonoralos an inlorrupl ro-
quosl lo inform llo microprocossor llal a Ioy las boon prossod. Tlo micro-
procossor slouId rospond by porforming an I/O road from llo Ioyboard
inlorfaco lo gol llo Ioyboard claraclor.

In oacl of lloso casos, llo microprocossor rosponds lo an inlorrupl roquosl by
oxoculing a spociaI program Inovn as an inlorrupl sorvico roulino, or ISR. Tlo
inlorrupl sorvico roulino's lasI is lo sorvico llo roquosl. Difforonl lypos of inlor-
rupl roquosls roquiro difforonl lypos of sorvicing on llo parl of llo microproc-
ossor. Tlis moans llal lloro musl bo a soparalo inlorrupl sorvico roulino for
oacl lypo of inlorrupl roquosl llal can bo gonoralod by llo various lardvaro
dovicos found in an ISA syslom.

An inlorrupl causos llo microprocossor lo lomporariIy suspond oxoculion of
llo curronl program and forcos il lo jump lo anollor program, llo ISR. Al llo
concIusion of llo ISR, llo microprocossor musl llon rolurn lo llo originaI pro-
gram fIov al llo poinl il vas inlorruplod.
-- -- -
Tlis soclion providos a dolaiIod oxpIanalion of lov an InloI x86 microprocossor
sorvicos an inlorrupl roquosl. Iiguro 18-1 fIovclarls llo sorios of aclions llal
musl laIo pIaco.

Tlo InloI x86 microprocossors lavo ono inlorrupl roquosl inpul llal is usod lo
dolocl sorvico roquosls from I/O dovicos. Tlo inlorrupl roquosl Iinos from llo
various I/O dovicos aro nol connoclod diroclIy lo llo microprocossor's singIo
inlorrupl roquosl inpul, bul rallor lo a dovico Inovn as an inlorrupl conlroIIor.
Tlo acluaI dovico usod in IC-compalibIo maclinos is llo InloI 8259 program-
mabIo inlorrupl conlroIIor, or IIC. Up lo oigll inlorrupl roquosl Iinos can bo
liod lo ono 8259 inlorrupl conlroIIor.

--



lnterrupt
Detected
Move new CS
and lP values
into their registers
and Jump to the
lnterrupt Service
Routine
Generate two
lnterrupt Acknowledge
Bus cycles to request
lnterrupt Table entry
number
Read entry number
from lower data
path
Execute lnterrupt
Service Routine
Writ e EOl command
to lnterrupt
Controller to t urn
off request
Execute lRET
instruction to
pop original
CS:lP and Flag
contents off Stack
Continue interrupted
program
Push Flag, CS
and lP registers
onto Stack and
disable interrupt
recognition
lndex into lnt errupt
Table, read table
entry to be used as
new CS:lP value

-

Iiguro 18-2 iIIuslralos llo 8259 IIC. Al any givon momonl in limo, ono or moro
of llo IIC's inlorrupl roquosl inpuls may bo assorlod. Tlo IIC usos a priorily
sclomo lo dolormino vlicl of llo ponding inlorrupl roquosls is llo mosl im-
porlanl. Il llon passos llal inlorrupl roquosl aIong lo llo microprocossor by as-
sorling llo microprocossor's inlorrupl roquosl, or INTR, inpul.



Tlo INTR inpul lo llo microprocossor is roforrod lo as llo masIabIo inlorrupl
roquosl Iino. WliIo oxoculing a sorios of inslruclions, llo programmor las llo
abiIily lo lurn off rocognilion of oxlornaI inlorrupl roquosls by oxoculing a CII,
or cIoar inlorrupl onabIo, inslruclion. Tlo programmor is llon onsurod llal
subsoquonl inslruclions viII nol bo inlorruplod. As soon as llo crilicaI sorios of
inslruclions las boon oxoculod, llo programmor ro-onabIos rocognilion of ox-
lornaI inlorrupl roquosls by oxoculing an STI, or sol inlorrupl onabIo, inslruc-
lion. Any inlorrupl roquosl ponding on llo INTR Iino viII nov bo rocognizod
by llo microprocossor. Tlo programmor slouId laIo caro, lovovor, lo onsuro
llal inlorrupl rocognilion isn'l disabIod for an approciabIo amounl of limo. To
do so couId possibIy causo probIoms.

As an oxampIo, llo soriaI porl may bo gonoraling an inlorrupl roquosl bocauso
il las a claraclor lo bo pIacod in momory. If llo microprocossor doosn'l road
lR0
lR1
lR2
lR3
lR4
lR5
lR6
lR7
lNTR
lntel 8259
Programmabl e
lnterrupt
Control ler
request li nes
from l/O
devices

--

llo claraclor from il on a limoIy basis, il may bo vrillon ovor by llo noxl clar-
aclor rocoivod ovor llo communicalions Iino. Tlis is roforrod lo as a dala ovor-
run condilion.
- -
Tlo microprocossor's immodialo rosponso lo an inlorrupl roquosl is lo find oul
vlal dovico inilialod llo roquosl. Tlo microprocossor porforms llis inquiry by
oxoculing lvo, bacI-lo-bacI inlorrupl acInovIodgo bus cycIos. Iogic oxlornaI
lo llo microprocossor convorls llo bus cycIos inlo lvo puIsos on llo IIC's inlor-
rupl acInovIodgo (INTA) inpul. Wlon llo IIC sonsos lloso lvo inlorrupl ac-
InovIodgos, il rocognizos llal llo microprocossor is roquosling llo ID of llo
liglosl-priorily inlorrupling dovico.

Tlo microprocossor musl dolormino llo liglosl-priorily roquosling dovico so il
can jump lo llo propor inlorrupl sorvico roulino. As vill any ollor program,
oacl of llo inlorrupl sorvico roulinos, or ISRs, rosido in momory. In ordor lo
oxoculo an ISR, llo microprocossor musl Inov llo slarl momory addross of
oacl ono of llo ISRs. InloI sols asido llo firsl 1,024 momory Iocalions, from
00000l llrougl 003IIl, as llo dofauIl Iocalions for llo inlorrupl labIo. On llo
80286 and liglor microprocossors, llo IIDT (Ioad inlorrupl doscriplor labIo)
inslruclion can bo usod lo clango llo slarl addross and llo sizo of llo inlorrupl
labIo. IIDT may bo oxoculod in oillor roaI or proloclod modo, bul if llo inlor-
rupl labIo is roIocalod in roaI modo, llon programs llal iniliaIizo llo inlorrupl
labIo (sucl as lloso in oxpansion ROMs) may iniliaIizo llo vrong Iocalions in
momory. Tlo inlorrupl labIo may bo Iocalod anyvloro in momory in oillor roaI
or proloclod modo. Tlis discussion focusos on roaI modo oporalion and as-
sumos llal llo inlorrupl labIo slarls al addross 00000l. Rofor lo figuro 18-3. Soo
llo soclion onlilIod, Iroloclod Modo Inlorrupls for difforoncos bolvoon roaI
modo and proloclod modo inlorrupls.

-


Entry 255 (FFh)

Entry 0
Entry 1
Entry 2

--


Tlo inlorrupl labIo is subdividod inlo 256 individuaI onlrios, oacl conlaining 4
bylos of informalion (256 dividod inlo 1024 oquaIs 4 Iocalions por onlry). Tlo
syslom ROMs llal aro slippod vill ISA sysloms conlain (among ollor llings):

Tlo Iovor-On SoIf-Tosl, or IOST.
Tlo inlorrupl sorvico roulinos (ISRs) for llo slandard I/O dovicos llal aro
slippod vill llo syslom.
Tlo BIOS roulinos for llo slandard I/O dovicos llal aro slippod vill llo
syslom (discussod Ialor).

In ollor vords, llo programmors vlo vrilo llo syslom ROM codo (inslruc-
lions) dolormino llo slarl momory addross of oacl of llo inlorrupl sorvico rou-
linos for llo slandard I/O dovicos llal aro slippod vill llo syslom. During llo
oxoculion of llo IOST, llo programmor copios llo slarl momory addross of
oacl of lloso inlorrupl sorvico roulinos inlo llo propor onlry in llo inlorrupl
labIo. Al llo compIolion of llo IOST, llo inlorrupl labIo onlrios associalod vill
oacl of llo slandard I/O dovicos lavo boon fiIIod vill llo slarl momory ad-
dross of lloir rospoclivo inlorrupl sorvico roulinos Iocalod in ROM momory.

Wlon llo microprocossor gonoralos llo lvo inlorrupl acInovIodgo bus cycIos
lo roquosl llo ID of llo inlorrupling dovico from llo IIC, llo IIC rosponds as
foIIovs:

If llo inlorrupl roquosl Iino is ligl during llo firsl acInovIodgo bus cycIo
(vlicl il normaIIy is), llon llo IIC rosols llo liglosl-priorily bil llal is
curronlIy sol in llo inlorrupl roquosl rogislor, or IRR, and sols llo rospoc-
livo bil in llo in-sorvico rogislor. If llo inlorrupl roquosl Iino is Iov, a plan-
lom inlorrupl las occurrod. Tloso aro doscribod Ialor.
Tlo socond acInovIodgo causos llo IIC lo pIaco an 8-bil numbor on llo
Iovor dala pall, D|7:0]. Tlis numbor is commonIy roforrod lo by llo foI-
Ioving namos: inlorrupl lypo codo, inlorrupl ID, inlorrupl voclor, inlorrupl
labIo onlry numbor. Il is formod by adding llo llroo-bil binary vaIuo of llo
liglosl-priorily bil sol in llo in-sorvico rogislor lo llo baso addross slorod
in rogislor ICW2 (covorod Ialor in llis claplor).

Nolo: AIllougl inlorrupl voclor is llo mosl commonIy usod lorm, inlorrupl la-
bIo onlry numbor is usod in llis claplor bocauso il is llo mosl corrocl of llo
four. AIso nolo llal many documonls uso llo samo abbrovialion ISR lo sland
for lvo difforonl iloms: inlorrupl sorvico roulino and in-sorvico rogislor. Ior
cIarily in llis claplor, llo abbrovialion ISR aIvays rofors lo inlorrupl sorvico
roulino.

-


Al llo ond of llo socond inlorrupl acInovIodgo bus cycIo, llo microprocossor
roads llo inlorrupl labIo onlry numbor from llo Iovor dala pall. Tlo onlry
numbor musl llon bo convorlod inlo llo acluaI slarl momory addross of llo ro-
spoclivo onlry in llo inlorrupl labIo. Sinco oacl onlry in llo inlorrupl labIo con-
sisls of four Iocalions, llo microprocossor indoxos inlo llo inlorrupl labIo by
muIlipIying llo onlry numbor from llo IIC by llo numbor four. Tlis viII pro-
duco llo acluaI slarl momory addross of llo dosirod labIo onlry. Tlis onlry con-
lains llo slarl momory addross of llo largol inlorrupl sorvico roulino in llo
form of a nov CS and II vaIuo.

Tlo microprocossor llon aulomalicaIIy porforms ono or lvo momory road bus
cycIos (llo 80386DX, 80486 and Ionlium procossors porform ono bus cycIo,
vliIo llo 80286 and llo 80386SX musl porform lvo) lo road llo four bylos of
informalion from llo inlorrupl labIo onlry. Tloso four bylos of informalion aro
lomporariIy slorod insido llo procossor.

As an oxampIo, llo Ioyboard inlorfaco usos llo IRQ1 inpul lo llo maslor inlor-
rupl conlroIIor lo gonoralo an inlorrupl roquosl vlon a Ioy is prossod. llo
inlorrupl labIo onlry numbor assignod lo llis inpul is 09l. Tlis moans llal on-
lry nino in llo inlorrupl labIo conlains llo four bylo slarl addross of llo Ioy-
board inlorrupl sorvico roulino in momory.

Tlo microprocossor caIcuIalos llo acluaI slarl momory addross of onlry nino in
llo inlorrupl labIo by muIlipIying llo inlorrupl labIo onlry numbor, 09l in llis
caso, by a faclor of four. Nino limos four oquaIs 36 in docimaI, or 24l, so llo
slarl momory addross of onlry nino in llo inlorrupl labIo is 00024l.

Tlo slarl addross of llo Ioyboard inlorrupl sorvico roulino is conlainod in
momory addrossos 00024l llrougl 00027l. Tlo microprocossor llon:

1. Roads llo conlonls of Iocalions 00024l and 00025l.
2. Roads llo conlonls of Iocalions 00026l and 00027l.

Tlo microprocossor viII uso lloso slorod vaIuos Ialor lo folcl llo firsl inslruc-
lion of llo inlorrupl sorvico roulino for llo Ioyboard. Iirsl, llo microprocossor
musl savo ils curronl pIaco in llo program llal vas inlorruplod.

--


Tlo microprocossor is ongagod in folcling, or roading, inslruclions from mom-
ory unliI llo inlorrupl roquosl is rocognizod. Tlo onIy purposo of llo micro-
procossor's codo sogmonl (CS) and inslruclion poinlor (II) rogislors is lo poinl
lo llo Iocalion in momory vloro llo noxl inslruclion slouId bo folclod from.
Tlo microprocossor lad jusl compIolod llo oxoculion of an inslruclion and vas
aboul lo folcl llo noxl inslruclion from momory vlon llo inlorrupl roquosl
vas sonsod. Tlo CS and II rogislors nov poinl lo vloro llo microprocossor
vouId lavo folclod ils noxl inslruclion from lad il nol boon inlorruplod. If llo
microprocossor is lo rosumo oxoculion succossfuIIy vloro il Iofl off aflor sorvic-
ing llo roquosl, il musl savo llo conlonls of lloso lvo rogislors. In ollor vords,
llo microprocossor musl savo a booImarI.


Bottom of Stack
Top of Stack
SS

SP


-

Tlo microprocossor's immodialo rosponso lo an inlorrupl roquosl is lo run lvo
inlorrupl acInovIodgo bus cycIos lo oblain llo inlorrupl labIo onlry numbor.
Tlo microprocossor llon roads llo nov CS and II vaIuos from llo onlry and
savos llom. Boforo lloso nov CS and II vaIuos aro acluaIIy pIacod in lloir ro-
spoclivo rogislors, llo conlonls of llo curronl CS and II rogislors musl bo savod
in slacI momory. Rofor lo figuro 18-4.

Assumo llal llo slacI is curronlIy omply (conlains no dala). In llo figuro, llo
slacI sogmonl rogislor, SS, conlains 5000l, indicaling llal llo slacI sogmonl
slarls al momory Iocalion 50000l. Tlo slacI poinlor rogislor, SI, conlains
IIIIl. In rosponso lo an inlorrupl roquosl, llo microprocossor aulomalicaIIy
porforms llroo pusl oporalions. Nolo llal llo programmor doos nol nood lo
vrilo codo lo causo lloso aulomalic pusl oporalions lo occur.

Boforo jumping lo llo inlorrupl sorvico roulino, llo microprocossor musl firsl
savo ils pIaco in llo curronl program fIov by porforming llo foIIoving opora-
lions:

1. Tlo microprocossor firsl puslos llo conlonls of llo fIag rogislor onlo llo
slacI. To do llis, llo microprocossor docromonls SI by 2 (IIIIl - 2 =
IIICl), and llon porforms a 16-bil momory vrilo lo llo addross spocifiod
by SS:SI (5000:IIICl). Iiguro 18-5 iIIuslralos llo slacI's conlonls aflor llo
conlonls of llo fIag rogislor las boon puslod inlo slacI Iocalions 5IIICl
and 5IIIDl.


--


- -

2. Tlo microprocossor llon puslos llo conlonls of llo CS rogislor onlo llo
slacI. To do llis, llo microprocossor docromonls SI by 2, and llon por-
forms a 16-bil momory vrilo lo llo addross spocifiod by SS:SI
(5000:IIIAl). Iiguro 18-6 iIIuslralos llo slacI's conlonls aflor llo conlonls
of llo CS rogislor las boon puslod inlo slacI Iocalions 5IIIAl and
5IIIBl.

unused
unused
MSB of
Flag Register
LSB of
Flag Register
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
SP

Bottom of Stack


-


- -

3. Tlo microprocossor llon puslos llo conlonls of llo II rogislor onlo llo
slacI. To do llis, llo microprocossor docromonls SI by 2, and llon por-
forms a 16-bil momory vrilo lo llo addross spocifiod by SS:SI
(5000:III8l). Iiguro 18-7 iIIuslralos llo slacI's conlonls aflor llo conlonls
of llo II rogislor las boon puslod inlo slacI Iocalions 5III8l and 5III9l.

unused
unused
MSB of
Flag Register
MSB of
CS Register
LSB of
CS Register
LSB of
Flag Register
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
SP

Bottom of Stack


--


- -

Tlo microprocossor savos llo conlonls of llo IIag rogislor bocauso il is quilo
possibIo llal llo inslruclion llal viII bo oxoculod vlon normaI program oxocu-
lion rosumos viII clocI llo IIag bils lo dolormino llo rosuIl of llo inslruclion
oxoculod jusl prior lo llo inlorruplion.

Summarizing, llo microprocossor's immodialo rosponso lo an inlorrupl roquosl
is lo gol llo slarling addross of llo inlorrupl sorvico roulino (ISR) from llo in-
lorrupl labIo. Tlo slarling addross in llo form of nov CS and II vaIuos aro
slorod insido llo microprocossor. Noxl llo microprocossor puslos llo conlonls
of llo IIag, CS and II rogislors inlo slacI momory. Tlis is dono so llo micro-
procossor can rosumo ils originaI program fIov aflor llo inlorrupl roquosl sor-
vicing las boon compIolod.

unused
unused
MSB of
Flag Register
MSB of
CS Register
MSB of
lP Register
LSB of
CS Register
LSB of
lP Register
LSB of
Flag Register
empty
empty
empty
empty
empty
empty
empty
empty
empty
SP

Bottom of Stack


-

Onco llo IIag, CS and II rogislors lavo boon savod lo llo slacI, llo microproc-
ossor cIoars llo inlorrupl onabIo fIag lo provonl anollor inlorrupl roquosl from
inlorrupling llo inlorrupl sorvico roulino (ISR) curronlIy running. If llo pro-
grammor of an ISR cloosos lo pormil anollor inlorrupl roquosl lo inlorrupl lis
inlorrupl sorvico roulino (caIIod nosling of inlorrupls), llo programmor musl
onabIo inlorrupls by vriling an STI inslruclion. Al llo concIusion of an inlor-
rupl sorvico roulino, llo conlonls of llo IIag rogislor aro poppod off llo slacI,
rosloring llo originaI vaIuo of llo inlorrupl onabIo fIag.

Tlo CS and II vaIuos llal voro road from llo inlorrupl labIo and slorod in llo
un-namod rogislors aro movod inlo llo CS and II rogislors. Tlo microprocossor
llon usos llo conlonls of llo CS and II rogislors lo dolormino llo momory Ioca-
lion lo road llo noxl inslruclion from. Sinco lloso lvo rogislors lavo jusl boon
Ioadod from llo inlorrupl labIo onlry, lloy nov poinl lo llo firsl inslruclion of
llo approprialo inlorrupl sorvico roulino. In llis vay, llo microprocossor bo-
gins lo folcl and oxoculo llo inslruclions llal maIo up llo inlorrupl sorvico
roulino. Tlo inlorrupl labIo onlry numbor assignmonls aro dolaiIod Ialor in llis
claplor.

Doos llo microprocossor jump lo llo ISR or doos il caII llo ISR` Al llis
poinl in llo soquonco of ovonls, llo microprocossor is simpIy roIoading CS and
II, vlicl is oxaclIy llo samo as a jump, or moro spocificaIIy, a far jump. By
proviousIy saving llo oId CS and II on llo slacI boforo jumping lo llo ISR, llo
microprocossor is doing somo of llo samo llings llal il vouId do vlon oxocul-
ing a CAII inslruclion, bul lloro aro lvo significanl difforoncos. Wlon oxocul-
ing a CAII inslruclion, llo microprocossor doos nol savo llo IIag rogislor and
llo nov CS and II como from llo CAII inslruclion insload of from llo inlor-
rupl labIo. As a rosuIl, il may bo misIoading lo say llal llo microprocossor
caIIs an inlorrupl sorvico roulino.

In llo inlorrupl sorvico roulino, llo programmor musl firsl savo llo conlonls of
any rogislors llal viII bo aIlorod villin llo sorvico roulino. Tlis is accom-
pIislod by porforming a sorios of ono or moro IUSH inslruclions lo savo llo
rogislor conlonls on llo slacI. Tlo programmor llon porforms llo aclions noc-
ossary lo sorvico llo roquosl llal vas issuod by llo I/O dovico. As an oxampIo,
if llis voro llo Ioyboard inlorrupl sorvico roulino, llo programmor causos llo
microprocossor lo porform an I/O road from llo Ioyboard dala porl al I/O ad-
dross 0060l lo gol llo Ioyboard scan codo (llo claraclor prossod on llo Ioy-
board).


--

Aflor sorvicing llo roquosl, bul boforo llo ond of llo inlorrupl sorvico roulino,
llo programmor musl vrilo a non-spocific IOI (Ind-of-Inlorrupl) command lo
llo inlorrupl conlroIIor. Tlis forcos llo inlorrupl conlroIIor lo rosol llo liglosl-
priorily bil llal is curronlIy sol in ils in-sorvico rogislor. Tlo inlorrupl conlroIIor
usos llo in-sorvico rogislor lo mainlain a fixod priorily sclomo so llal liglor-
priorily inlorrupl sorvico roulinos aro novor inlorruplod by Iovor-priorily I/O
dovicos. Tlo inlorrupl conlroIIor viII assorl a nov inlorrupl roquosl oulpul
(INTR) onIy vlon llo inlorrupl roquosl (IR pin) las a liglor priorily llan llo
liglosl-priorily bil llal is sol in llo in-sorvico rogislor. By issuing llo IOI
command, llo programmor is Iolling llo inlorrupl conlroIIor Inov llal llo cur-
ronlIy-liglosl-priorily inlorrupl sorvico roulino las finislod sorvicing llo I/O
dovico and llal a Iovor-priorily inlorrupl may nov bo passod on lo llo micro-
procossor.

Al llo ond of llo inlorrupl sorvico roulino, llo programmor musl porform a so-
rios of ono or moro IOI inslruclions lo rosloro llo originaI conlonls of any rog-
islors IUSHod onlo llo slacI al llo slarl of llo sorvico roulino.
-
Iacl inlorrupl sorvico roulino musl ond vill an IRIT (inlorrupl Rolurn) in-
slruclion. Wlon llo microprocossor oxoculos llo IRIT inslruclion, il aulomali-
caIIy porforms llroo pop oporalions lo road llo originaI II, CS and IIag rogislor
conlonls from llo slacI.

1. Rofor lo figuro 18-8. Tlo microprocossor firsl pops llo oId conlonls of llo II
rogislor off llo slacI. To do llis, llo microprocossor porforms a 16-bil road
from llo momory Iocalions spocifiod by SS:SI (5000:III8l), and llon in-
cromonls SI by 2. Tlo lvo bylos llal voro road aro pIacod in llo II rogis-
lor.


-


-

2. Rofor lo figuro 18-9. Noxl, llo microprocossor pops llo oId conlonls of llo
CS rogislor off llo slacI. To do llis, llo microprocossor porforms a 16-bil
road from llo momory Iocalions spocifiod by SS:SI (5000:IIIAl), and llon
incromonls SI by 2. Tlo lvo bylos llal voro road aro pIacod in llo CS rog-
islor.
unused
unused
MSB of
Flag Register
MSB of
CS Register
MSB of
lP Register
LSB of
CS Register
LSB of
lP Register
LSB of
Flag Register
empty
empty
empty
empty
empty
empty
empty
empty
empty
SP

Bottom of Stack


--


-

3. Rofor lo figuro 18-10. Noxl, llo microprocossor pops llo oId conlonls of llo
IIag rogislor off llo slacI. To do llis, llo microprocossor porforms a 16-bil
road from llo momory Iocalions spocifiod by SS:SI (5000:IIICl), and llon
incromonls SI by 2. Tlo lvo bylos llal voro road aro pIacod in llo IIag
rogislor. Tlo slacI is nov omply again.
unused
unused
MSB of
Flag Register
MSB of
CS Register
LSB of
CS Register
LSB of
Flag Register
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
SP

Bottom of Stack


-


-

Al llis poinl, llo CS, II and IIag rogislors lavo boon roIoadod vill llo vaIuos
llal voro prosonl vlon llo inlorrupl occurrod. SpocificaIIy, llo IIag rogislor
las boon roslorod lo rofIocl llo slalus of llo Iasl inslruclion llal vas oxoculod
prior lo llo inlorrupl. Nolo llal rosloring llo fIag vaIuo aIso causos inlorrupls
lo bo onabIod onco again. IinaIIy, llo microprocossor usos llo roslorod conlonls
of llo CS and II rogislors lo folcl llo noxl inslruclion from momory. In llis
vay, llo microprocossor las aulomalicaIIy rolurnod lo ils originaI program
fIov aflor compIoling llo inlorrupl sorvico roulino.
unused
unused
MSB of
Flag Register
LSB of
Flag Register
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
SP

Bottom of Stack


--

-
Tlo IC and IC/XT onIy lad ono 8259 IrogrammabIo inlorrupl conlroIIor. Tlis
imposod a Iimil of oigll inlorrupl roquosl Iinos avaiIabIo for usago by I/O do-
vicos. In ordor lo provido an oxpandod numbor of usabIo I/O inlorrupl roquosl
Iinos, llo dosignors of llo IC/AT addod a socond 8259 inlorrupl conlroIIor.

Rofor lo figuro 18-11. As slovn in llo iIIuslralion, llo lvo inlorrupl conlroIIor
clips aro in a maslor/sIavo configuralion. Tlo 8259 IIC connoclod diroclIy lo
llo microprocossor is llo maslor inlorrupl conlroIIor, vliIo llo addilionaI IIC
is dosignalod as a sIavo inlorrupl conlroIIor. Tlo inlorrupl roquosl oulpul of llo
sIavo inlorrupl conlroIIor is connoclod lo ono of llo inlorrupl roquosl inpuls of
llo maslor inlorrupl conlroIIor (IR2). Tlis is roforrod lo as cascading ono inlor-
rupl conlroIIor llrougl anollor.

In llo originaI IC and IC/XT, llo maslor inlorrupl conlroIIors IR2 inpul pin is
liod lo llo sysloms IRQ2 Iino on llo ICs 8-bil connoclor. Bul in ISA maclinos,
llo sIavo inlorrupl conlroIIors IR1 inpul pin is liod lo llo 8-bil connoclor pin
llal usod lo bo IRQ2 in llo IC. In ISA sysloms (al Ioasl in mosl of llo various
and compoling ISA spocificalions), llo pin is namod IRQ9. Bovaro llal IRQ2
and IRQ9 aro llo samo pin. Moro informalion is in llo soclion onlilIod, IRQ2
Rodirocl.

Iacl of lloso liglIy programmabIo IIC clips conlains a sorios of rogislors. By
programming (vriling vaIuos lo) lloso rogislors during llo IOST, llo pro-
grammor can spocify llo oporalionaI claraclorislics of oacl of llo clips.

During llo IOST, a spociaI 8-bil rogislor in llo maslor inlorrupl conlroIIor is
programmod vill a vaIuo indicaling llal llo inlorrupl roquosl IovoI Tvo (IR2)
inpul of llo maslor inlorrupl conlroIIor is connoclod lo llo sIavo inlorrupl con-
lroIIor rallor llan an I/O dovico. AII of llo ollor inlorrupl roquosl inpuls of llo
maslor inlorrupl conlroIIor aro dosignalod as I/O inlorrupl roquosl inpuls lo bo
landIod in llo faslion doscribod oarIior.

Tlo sIavo inlorrupl conlroIIor conlains a rogislor Inovn as llo sIavo ID rogislor.
During llo IOST, llis rogislor is programmod vill llo vaIuo 02l. Tlis is ils
sIavo ID numbor and corrosponds lo llo inpul on llo maslor il is connoclod lo.

In addilion, during llo IOST, boll of llo inlorrupl conlroIIors aro programmod
lo uso a fixod priorily sclomo. Tlis moans llal, on oacl of llo inlorrupl conlroI-
Iors, llo inlorrupl roquosl IovoI 0 (IR0) inpul las llo liglosl-priorily, vliIo llo
inlorrupl roquosl IovoI 7 (IR7) inpul las llo Iovosl priorily. If aII of llo inlor-

-

rupl roquosl Iinos voro lo bo assorlod al llo samo limo, llo inlorrupl roquosl
IovoI 0 inpul vouId bo sorvicod firsl, foIIovod by llo ollors in docroasing or-
dor of priorily.

Up unliI nov, llo lorms inlorrupl roquosl IovoIs 0 llrougl 7 lavo boon usod lo
idonlify llo individuaI inlorrupl roquosl inpuls lo llo inlorrupl conlroIIor clip.
Tlo acluaI signaI Iinos connoclod lo llo lloso inpuls aro dosignalod as slovn in
figuro 18-11. Tlo signaI namos givon lo lloso Iinos aro IRQ0 (inlorrupl roquosl
IovoI 0) llrougl IRQ15. IR0 llrougl IR7 aro clip pin namos. IRQ0 llrougl
IRQ15 aro ISA syslom signaI namos.

--


- -
S0
S1
M/lO

-

IRQ0 llrougl IRQ7 aro connoclod lo llo maslor inlorrupl conlroIIor, vliIo
IRQ8 llrougl IRQ15 aro connoclod lo llo sIavo inlorrupl conlroIIor. Nolo llal
IRQ2 and IRQ9 aro on llo samo ISA bus pin so lloro is nol a uniquo IRQ2 inlor-
rupl pin in an ISA maclino. Moro informalion is in llo soclion onlilIod, IRQ2
Rodirocl. Will llo oxcoplion of IRQ2, oacl of llo inlorrupl roquosl Iinos is
avaiIabIo lo bo connoclod lo llo inlorrupl roquosl oulpul of an I/O dovico.

Tlo facl llal boll conlroIIors aro programmod for fixod priorily yioIds llo foI-
Ioving ovoraII priorily. IRQ0 is llo liglosl-priorily, foIIovod immodialoIy by
IRQ1. Sinco IR2 on llo maslor inlorrupl conlroIIor is llo inlorrupl roquosl oul-
pul of llo sIavo inlorrupl conlroIIor, llo sIavo's oigll inpuls, IRQ8 llrougl
IRQ15, como noxl in llo priorily soquonco. IinaIIy, IRQ3 llrougl IRQ7 aro llo
Iovosl fivo in llo priorily soquonco.

Rofor lo figuro 18-11. Somo of llo inlorrupl roquosl Iinos aro dodicalod lo spo-
ciaI I/O dovicos llal rosido on llo syslom board.

IRQ0 is connoclod lo llo oulpul of Timor 0, froquonlIy caIIod llo Syslom
Timor. Tlis limor and ollor limors aro discussod in dolaiI in llo claplor on-
lilIod ISA Timors.
IRQ1 is connoclod lo llo Ioyboard inlorrupl roquosl Iino coming from llo
Koyboard Inlorfaco. Tlo Ioyboard inlorfaco is doscribod in llo claplor onli-
lIod Koyboard/Mouso Inlorfaco.
IRQ8 is connoclod lo llo AIarm oulpul of llo RoaI Timo CIocI and Con-
figuralion RAM clip. Tlis subjocl is covorod in moro dolaiI in llo claplor
onlilIod RTC and Configuralion RAM.
IRQ13 is connoclod lo llo IRROR oulpul of llo Numoric Coprocossor.
Tlis is doscribod in llo claplor onlilIod Numoric Coprocossors.

Tlo romaindor of llo inlorrupl roquosl Iinos aro allaclod lo llo ISA connoclors
and aro avaiIabIo for uso by ISA cards. AIllougl avaiIabIo for gonoraI uso, llo
foIIoving ISA inlorrupl roquosl Iinos aro lypicaIIy usod by llo indicalod do-
vicos.

IRQ3 is usod as llo inlorrupl roquosl Iino for soriaI porl 2. Il is connoclod lo
aII 8- and 16-bil ISA oxpansion sIols.
IRQ4 is usod by llo inlorrupl roquosl oulpul of soriaI porl 1. Il is connoclod
lo aII 8- and 16-bil ISA oxpansion sIols.
IRQ5 is usod by paraIIoI porl 2. Il is connoclod lo aII 8- and 16-bil ISA ox-
pansion sIols.
IRQ6 is usod by llo IIoppy DisI ConlroIIor on llo syslom board. Il is con-
noclod lo aII 8- and 16-bil ISA oxpansion sIols.

--

IRQ7, is lypicaIIy usod by paraIIoI porl 1. Il is connoclod lo aII 8- and 16-bil
ISA oxpansion sIols.
IRQ9 is avaiIabIo for uso by ISA cards. Il is connoclod lo aII 8- and 16-bil
ISA oxpansion sIols. In somo sysloms, llo pin is namod IRQ2. Soo llo dis-
cussion undor llo loading, IRQ2 Rodirocl.
IRQ10 is avaiIabIo for uso by ISA cards. Il is connoclod lo aII 16-bil ISA ox-
pansion sIols.
IRQ11 is avaiIabIo for uso by ISA cards. Il is connoclod lo aII 16-bil ISA ox-
pansion sIols.
IRQ12 is avaiIabIo for uso by ISA cards, bul is lypicaIIy usod by llo mouso
inlorfaco. Il is connoclod lo aII 16-bil ISA oxpansion sIols.
IRQ14 is avaiIabIo for uso by ISA cards. Il is lypicaIIy usod by Hard DisI
ConlroIIors. Il is connoclod lo aII 16-bil ISA oxpansion sIols.
IRQ15 is avaiIabIo for uso by ISA cards. Il is connoclod lo aII 16-bil ISA ox-
pansion sIols.
--
Wlon llo sIavo inlorrupl conlroIIor dolocls an inlorrupl roquosl on ono or moro
of ils inpuls, il gonoralos an inlorrupl roquosl lo llo maslor inlorrupl conlroIIor.
If no liglor priorily inlorrupls aro curronlIy boing sorvicod, llo maslor inlor-
rupl conlroIIor sonsos ils IR2 inpul assorlod and gonoralos an inlorrupl roquosl
lo llo microprocossor on llo INTR Iino. If liglor-priorily inlorrupls aro boing
sorvicod (syslom limor or Ioyboard inlorrupls), llon llo maslor inlorrupl con-
lroIIor vails for llo liglor-priorily inlorrupls lo finisl boforo inlorrupling llo
microprocossor. Tlis onforcos llo fixod priorily sclomo.

Tlo microprocossor roquosls llo inlorrupl lypo by gonoraling lvo bacI-lo-bacI
inlorrupl acInovIodgo bus cycIos. Wlon llo maslor inlorrupl conlroIIor dolocls
llo doubIo inlorrupl acInovIodgo, il inlorprols llis as llo microprocossor's ro-
quosl for llo inlorrupl lypo. If IR2, llo oulpul of llo sIavo inlorrupl conlroIIor,
is llo liglosl-priorily roquosl ponding on llo maslor's inpuls, llo maslor com-
mands llo sIavo lo suppIy llo inlorrupl lypo lo llo microprocossor.

To do llis, llo maslor inlorrupl conlroIIor drivos llo sIavo ID, a 2 (010b), onlo
llo llroo-bil cascado bus. Tlo sIavo inlorrupl conlroIIor comparos llo sIavo ID
prosonl on llo cascado bus lo ils sIavo ID (vrillon inlo ils sIavo ID rogislor dur-
ing llo IOST) and rosponds by pIacing llo propor inlorrupl labIo onlry numbor
onlo llo Iovor dala pall, D|7:0].


-

Al llo ond of llo socond inlorrupl acInovIodgo bus cycIo, llo microprocossor
roads llo inlorrupl labIo onlry numbor from llo Iovor dala pall. Il muIlipIios
llo onlry numbor by four lo produco llo slarl momory addross of llo onlry in
llo inlorrupl labIo, and roads llo four bylos of informalion from llo onlry. Af-
lor saving llo curronl CS, II and IIag rogislor on llo slacI, llo microprocossor
pIacos llo four bylos from llo inlorrupl labIo in llo CS and II rogislors.

Tlo microprocossor llon usos llo conlonls of llo CS and II rogislors lo idonlify
llo momory Iocalion lo road llo noxl inslruclion from. Tlis is llo addross of llo
firsl inslruclion in llo largol inlorrupl sorvico roulino. Al llo ond of llo inlor-
rupl sorvico roulino, llo programmor musl issuo lvo non-spocific IOI (Ind-of-
Inlorrupl) commands:

Ono lo llo maslor inlorrupl conlroIIor lo rosol bil 2 in ils in-sorvico rogislor.
Nolo llal bil 2 vas llo liglosl-priorily bil llal vas sol boforo llo IOI
command vas issuod, duo lo llo fixod priorily sclomo. Tloroforo, llo non-
spocific IOI command vorIs corroclIy.
Ono lo llo sIavo lo rosol llo liglosl-priorily bil llal is curronlIy sol in ils
in-sorvico rogislor.
---
During llo IOST, llo lvo inlorrupl conlroIIors aro oacl programmod vill llo
inlorrupl labIo onlry numbors for oacl of lloir inlorrupl roquosl inpuls. TabIo
18-1 dofinos llo onlry numbor assignmonls.


--

---


--

0 08l
1 09l
3 0Bl
4 0Cl
5 0Dl
6 0Il
7 0Il
8 70l
9 (or 2) 71l
10 72l
11 73l
12 74l
13 75l
14 76l
15 77l

Tlo originaI IBM IC, IC/XT and compalibIos lavo IRQ2 avaiIabIo on llo 8-bil
oxpansion sIols and llal pin is connoclod lo IR2 of llo maslor inlorrupl conlroI-
Ior. An oxpansion dovico inslaIIod in llo IC or IC/XT may uso IRQ2 lo roquosl
sorvico. Tlo soflvaro dovico drivor llal conlroIs llo oxpansion dovico viII ini-
liaIizo onlry 0Al in llo inlorrupl labIo during IOST or vlon llo dovico drivor
is Ioadod from disI and oxoculod so llal onlry 0Al poinls lo llo slarl addross
of llo ISR in llo dovico drivor. Aflorvards, vlon llo oxpansion dovico issuos
an IRQ2 inlorrupl in llo IC or IC/XT, llo maslor inlorrupl conlroIIor givos in-
lorrupl onlry numbor 0Al (IR2 pIus baso of 8 = 10d = Al) lo llo microprocos-
sor. Tlo microprocossor roads llo CS and II from onlry 0Al in llo inlorrupl
labIo and runs llo ISR for llo oxpansion dovico.

In an ISA maclino, IRQ2 is IRQ9 and il is connoclod lo IR1 of llo sIavo inlor-
rupl conlroIIor. Wlon llo oId oxpansion dovico gonoralos vlal il llinIs is
IRQ2, llo sIavo inlorrupl conlroIIor roporls onlry numbor 71l (IR1 pIus baso of
70l = 71l) lo llo microprocossor. Tlo microprocossor roads llo CS and II from
onlry numbor 71l in llo inlorrupl labIo, bul il doos nol run llo oxpansion do-
vicos ISR bocauso onlry numbor 71l vas nol iniliaIizod by llo oxpansion do-
vicos drivor. Tlis is a probIom.

-


Tlo soIulion is lo rodirocl IRQ9 inlorrupls (onlry 71l) lo vlal usod lo bo IRQ2
(onlry 0Al). During IOST or during iniliaIizalion of llo oporaling syslom,
onlry 71l in llo inlorrupl labIo is iniliaIizod lo poinl lo llo IRQ2 rodirocl rou-
lino in llo bool ROM or in llo oporaling syslom. Tlo IRQ2 rodirocl roulino usos
llo soflvaro inlorrupl inslruclion, INT 0A, lo causo llo microprocossor lo run
llo ISR poinlod lo by onlry 0Al in llo inlorrupl labIo, llus causing llo micro-
procossor lo run llo oxpansion dovicos ISR. Tlo INT inslruclion is doscribod in
llo soclion onlilIod, Tlo Soflvaro Inlorrupl Inslruclion.

RocaII llal oacl inlorrupl sorvico roulino (ISR) musl porform an Ind Of Inlor-
rupl (IOI) command lo cIoar ils bil in llo in-sorvico rogislor. ISRs using IRQ
Iinos llal connocl lo llo maslor inlorrupl conlroIIor musl porform a singIo IOI
command, vloroas, ISRs using IRQ Iinos llal connocl lo llo sIavo inlorrupl
conlroIIor musl porform lvo IOI commands (ono for llo maslor and ono for
llo sIavo). ISRs dosignod for IRQ2 oxpocl il lo bo connoclod lo llo maslor inlor-
rupl conlroIIor (as il vas in llo IC and IC/XT) and lloroforo porform a singIo
IOI command, lovovor, sinco llo IRQ2 Iino connocls lo llo sIavo inlorrupl
conlroIIor (IRQ9), lvo IOIs aro noodod. Tlo foIIoving codo sampIo slovs lov
a lypicaI IRQ2 Rodirocl roulino lransfors conlroI from IRQ9 lo IRQ2 and lan-
dIos llo socond IOI command:

- - -
-
-

-
- -




Nolo llal llo rodirocl codo musl porform llo IOI for llo sIavo inlorrupl con-
lroIIor sinco llo ISR for IRQ2 porforms onIy llo maslor conlroIIor IOI.

--

- -
Wlon oxpansion dovicos (add-in cards) llal uso inlorrupls aro inslaIIod in an
ISA syslom, lloy lypicaIIy uso ono of llo avaiIabIo inlorrupl roquosl Iinos llal is
nol usod by llo slandard I/O dovicos (sucl as llo prinlor porl or llo fIoppy
conlroIIor). In somo onvironmonls lovovor, llo domand for IRQ Iinos oxcoods
llo numbor of avaiIabIo Iinos. In sucl casos, llo lomplalion is groal lo slaro a
singIo inlorrupl Iino bolvoon lvo dovicos.

Tlo condilions roquirod lo slaro inlorrupls in an ISA onvironmonl incIudo llo
foIIoving:

Tlo dovicos slouId gonoralo inlorrupls by driving llo IRQ Iino Iov and
llon nol driving il, aIIoving llo puII-up rosislor lo gonoralo llo rising odgo
(as opposod lo driving llo IRQ Iino ligl).
IniliaIizalion of oxpansion dovicos musl bo dono proporIy lo onsuro llo
slarling addrossos for llo inlorrupl sorvico roulinos of slarod dovicos aro
IinIod.
Ixpansion dovicos musl impIomonl an inlorrupl ponding slalus bil.
Inlorrupl sorvico roulinos musl clocI llo inlorrupl ponding bil for lloir
dovicos and pass conlroI lo llo noxl ISR in llo clain.
If a slandard dovico is slaring llo inlorrupl, llon oillor llo slandard do-
vico musl aIso mool aII lloso roquiromonls, or llo inlorrupls musl bo guar-
anlood lo novor occur simuIlanoousIy.

Tloso roquiromonls aro doscribod in llo noxl soclions.
-
On ISA sysloms, llo 8259 inlorrupl conlroIIors aro programmod lo rocognizo a
posilivo-going odgo as a vaIid inlorrupl roquosl on an inpul. Tloro aro a coupIo
of vays lo gonoralo lloso Iov-lo-ligl lransilions. Tlo ISA IRQ Iinos aro puIIod
ligl by rosislors on llo syslom board. Wlon an ISA oxpansion dovico musl
gonoralo an inlorrupl roquosl, llo card may drivo llo Iino Iov and llon slop
driving llo Iino (sol ils drivor lo a ligl-impodanco slalo so il is noillor driving
ligl nor Iov), llus aIIoving llo Iino lo fIoal ligl again duo lo llo puII-up ro-
sislor. AIlornalivoIy, llo oxpansion card can bo dosignod lo aclivoIy drivo llo
IRQ Iino Iov and llon aclivoIy drivo il ligl. In oillor caso, llo Iov-lo-ligl
lransilion is rogislorod as an inlorrupl roquosl by llo 8259 inlorrupl conlroIIor
on llo syslom board.

-

Tlo 8259 spocificalion roquiros llal llo 8259s IR inpul musl romain ligl unliI
aflor llo Ioading odgo of llo firsl inlorrupl acInovIodgo bus cycIo in ordor for
llo inlorrupl roquosl lo bo vaIid. To mool llis roquiromonl, llo oxpansion do-
vico musl oillor slop driving llo IRQ Iino and aIIov llo puII-up rosislor lo Ioop
llo Iino ligl or llo oxpansion dovico musl aclivoIy drivo llo IRQ Iino ligl al
Ioasl unliI llo inlorrupl sorvico roulino las bogun sorvicing llo dovico.

If lloro is onIy ono oxpansion dovico using a parlicuIar IRQ Iino, llo inlorrupl is
nol boing slarod. Wlon moro llan ono oxpansion dovico is connoclod lo llo
samo IRQ Iino, llal Iino is boing slarod.

Ior non-slarod IRQ Iinos, onIy ono oxpansion dovico is driving llo IRQ Iino, so
il doosnl mallor vlollor llo oxpansion dovico drivos llo IRQ Iino Iov, drivos
il ligl or doosnl drivo il al aII aflor llo firsl inlorrupl acInovIodgo bus cycIo.
Conlonlion viII nol occur on a non-slarod IRQ Iino. In ordor lo slaro llo IRQ
Iino, lovovor, llo oxpansion dovico slouId uso llo firsl mollod llal vas do-
scribod abovo for gonoraling llo inlorrupl. Tlal is, il slouId drivo llo Iino Iov,
llon slop driving il, aIIoving llo puII-up rosislor lo causo llo Iov-lo-ligl lran-
silion. Tlis can bo accompIislod vill an opon-coIIoclor or opon-drain drivor.
Will opon-coIIoclor or opon-drain drivors, llo Iino is novor aclivoIy drivon
ligl, so il is safo for ono drivor lo drivo llo Iino Iov vliIo llo ollor drivors aro
nol driving, and il is safo for sovoraI drivors lo drivo llo samo Iino Iov al llo
samo limo.

Iacl of llo oxpansion dovicos llal aro slaring llo IRQ Iino vouId lavo lo gon-
oralo inlorrupls llis vay. InloroslingIy onougl, lloro is no roquiromonl for
manufaclurors lo uso llis loclniquo, so inlorrupls aro oflon nol slaroabIo.
-
Slandard I/O dovicos llal uso inlorrupls normaIIy lavo inlorrupl sorvico rou-
linos llal rosido in llo manufaclurors syslom ROM. Wlon an oxpansion card
using an inlorrupl is inslaIIod in an ISA syslom, llo inlorrupl sorvico roulino
(ISR) musl bo providod by llo manufacluror. Tlo ISR may bo conlainod oillor
in a ROM Iocalod on llo card or on a disIollo slippod vill llo card. In oacl
caso, llo slarling addross of llo ISR musl bo pIacod in llo inlorrupl labIo onlry
assignod lo llo IRQ Iino usod.

Assuming llo IRQ Iino lo bo slarod is aIroady in uso by a slandard dovico, llo
slarling addross of llo slandard dovico viII aIroady occupy llo onlry. Tlo ox-
pansion dovico llon viII ovorvrilo llo slarling addross of llo slandard dovico
vlon il iniliaIizos. Hovovor, during iniliaIizalion of llo oxpansion card, llo

--

conlonls of llo inlorrupl onlry lo bo usod (vlicl curronlIy conlains llo slarling
addross of llo slandard dovico's ISR) musl bo savod boforo ovorvriling llo on-
lry vill ils ovn ISR addross. In llis vay, a IinI is croalod bolvoon llo ISR ad-
dross of llo oxpansion dovico (vlicl occupios llo onlry aflor iniliaIizalion) and
llo ISR addross of llo slandard dovico (vlicl las boon savod).

Dosignors of oxpansion cards vlo uso ROM lo sloro lloir ISR lypicaIIy impIo-
monl I/O Iocalions on lloir cards lo sloro llo conlonls of llo inlorrupl labIo on-
lry lloy aro aboul lo ovorvrilo. Dosignors vlo impIomonl lloir ISR via
inslaIIabIo dovico drivors lypicaIIy Ioavo spaco in llo loador of lloir ISR for
saving llo curronl vaIuo of llo inlorrupl labIo onlry.

Wlon lvo dovicos slaro an singIo inlorrupl roquosl Iino, llo dovico inslaIIod
Iasl viII lavo ils slarling addross in llo inlorrupl labIo onlry corrosponding lo
llo IRQ in uso. RogardIoss of vlicl dovico issuod llo inlorrupl roquosl, llo ISR
of llo dovico Iasl inslaIIod viII bo oxoculod firsl. In llo provious oxampIo, llis
moans llal ovon llougl llo slandard dovico roquosls sorvicing, llo oxpansion
dovico's ISR occupios llo inlorrupl labIo onlry and ils ISR viII bo oxoculod.

Tlo oxpansion dovico's ISR musl firsl clocI llo inlorrupl ponding bil lo dolor-
mino if ils dovico noods lo bo sorvicod. If so, llo oxpansion dovico is sorvicod in
normaI faslion. If llo inlorrupl ponding bil indicalos llal no inlorrupl is pond-
ing for ils dovico, llo ISR viII pass conlroI lo llo ISR boIonging lo llo slandard
dovico by using llo vaIuo il proviousIy savod. Tlo slandard dovico llon vouId
bo sorvicod as usuaI.

If boll of llo dovicos gonoralo inlorrupls simuIlanoousIy (or al Ioasl boforo llo
microprocossor runs llo inlorrupl acInovIodgo bus cycIo), llon onIy ono inlor-
rupl roquosl viII bo rogislorod in llo 8259. Sinco llo oxpansion dovico gonor-
alod an inlorrupl, llo inlorrupl ponding bil llal is on llo oxpansion dovico
vouId bo sol. Tlo oxpansion dovicos ISR is run firsl sinco ils CS and II aro in
llo inlorrupl labIo. Tlo oxpansion dovicos ISR dolocls llal llo oxpansion do-
vicos inlorrupl ponding bil is sol, so il sorvicos llo oxpansion dovico and ro-
lurns lo llo inlorruplod program. Nolo llal llo slandard dovicos inlorrupl
novor gols sorvicod.

Tloro aro lvo soIulions lo llis probIom. If llo slandard dovico las an inlorrupl
ponding bil, llon llo oxpansion dovicos ISR can do a soflvaro inlorrupl (INT)
lo run llo slandard dovicos ISR. Sinco llo slandard dovicos inlorrupl ponding
bil is sol, llo slandard dovicos ISR viII sorvico llo slandard dovico corroclIy.

-

Tlo oxpansion dovicos ISR musl bo vrillon lo aIvays do llo soflvaro inlor-
rupl, rogardIoss of vlollor llo oxpansion dovico gonoralod an inlorrupl. In
facl, in ordor lo slaro an inlorrupl roquosl Iino among lvo or moro oxpansion
dovicos, llo oxpansion dovicos ISR musl aIvays do llo soflvaro inlorrupl lo
IinI bacI lo llo ollor ISRs in llo Iisl.

If llo slandard dovico IacIs an inlorrupl ponding bil or if llo slandard dovicos
ISR faiIs lo losl llal bil, llon il couId bo a mislaIo for llo slandard dovicos ISR
lo sorvico llo dovico if no inlorrupl lad occurrod.

Tlo ollor soIulion is lo guaranloo llal llo lvo dovicos novor gonoralo inlor-
rupls simuIlanoousIy. (Iasior said llan dono. Tloro aro many polloIos in llo
road lo slaring inlorrupls in ISA.)
-
On ISA sysloms, llo 8259 inlorrupl conlroIIors aro programmod lo rocognizo a
posilivo-going odgo as a vaIid inlorrupl roquosl on an inpul. A lransilory noiso
spiIo on an inlorrupl roquosl Iino couId bo rogislorod as a vaIid inlorrupl ro-
quosl in llo 8259s inlorrupl roquosl rogislor (IRR). Wlal lappons noxl doponds
on lov llo oxpansion card is dosignod lo drivo llo IRQ Iino. Tlo mollods for
driving llo IRQ Iino aro doscribod in llo soclion abovo onlilIod, SlaroabIo In-
lorrupls in ISA Maclinos.

Aflor an inlorrupl is sorvicod (indood, any limo aflor llo firsl inlorrupl ac-
InovIodgo), il doosnl mallor vlollor llo oxpansion dovico drivos llo IRQ Iino
Iov, drivos il ligl or doosnl drivo il al aII, so Iong as no Iov-lo-ligl lransilions
occur (unIoss, of courso, llo oxpansion dovico vas roquosling moro sorvico).
Tlis is lruo bocauso llo 8259 is programmod lo Ialcl Iov-lo-ligl lransilions
onIy.

If llo oxpansion dovico usos llo slaroabIo mollod of gonoraling inlorrupls and
a lransilory noiso spiIo occurs on llo IRQ Iino, llon llo IRQ Iino viII bo ligl
vlon llo firsl inlorrupl acInovIodgo bus cycIo occurs. In rosponso lo llo inlor-
rupl acInovIodgo bus cycIo, llo 8259 viII cIoar llo bil in ils IRR and viII sol llo
corrosponding bil in ils in-sorvico rogislor. Tlo 8259 viII llon givo llo onlry
numbor of llo oxpansion dovico lo llo microprocossor during llo socond inlor-
rupl acInovIodgo bus cycIo. Tlo microprocossor viII llon run llo inlorrupl
sorvico roulino for llo oxpansion dovico. Tlis is a probIom bocauso llo oxpan-
sion dovico did nol roquosl sorvico. Somo oxpansion dovicos viII coaso lo func-
lion corroclIy if lloy aro sorvicod promaluroIy. Tlo soIulion lo llis probIom is
for llo oxpansion dovico lo inlornaIIy lavo an inlorrupl roquosl ponding bil

--

vlicl il sols aIong vill gonoraling any inlorrupl. Tlo ISR slouId firsl clocI
llis bil boforo acluaIIy sorvicing llo oxpansion dovico. If llo inlorrupl voro
causod by a noiso spiIo, llo inlorrupl ponding bil on llo oxpansion card vouId
nol bo sol and llo ISR vouId oxil villoul sorvicing llo oxpansion dovico.

If llo oxpansion dovico usos a non-slaroabIo mollod lo gonoralo llo inlorrupl,
llon llo oxpansion dovico oillor conlinuos lo drivo llo IRQ Iino ligl or il
drivos llo Iino Iov aflor llo inlorrupl is sorvicod insload of coasing lo drivo llo
Iino. If llo oxpansion dovico drivos llo IRQ Iino ligl aflor an inlorrupl las boon
sorvicod, llon a noiso spiIo on llo IRQ Iino viII lavo lo bo landIod llo samo
vay llal il vas for llo slaroabIo loclniquo (llal is, llo ISR slouId clocI llo in-
lorrupl ponding bil).

Tlings aro moro inlorosling vlon llo oxpansion dovico drivos llo IRQ Iino Iov
aflor an inlorrupl las boon sorvicod. In llis caso, if a noiso spiIo is rogislorod by
llo 8259, llo IRQ Iino is Iov vlon llo firsl inlorrupl acInovIodgo bus cycIo oc-
curs. Tlo 8259 roquiros llal ils IR inpul bo ligl al Ioasl unliI llo firsl inlorrupl
acInovIodgo in ordor for llo inlorrupl lo bo vaIid. In llis caso, llo IR inpul is
Iov, so llo 8259 Inovs llal a glosl or planlom inlorrupl las occurrod.

Wlon llo socond inlorrupl acInovIodgo bus cycIo occurs, llo 8259 musl roporl
an onlry numbor lo llo microprocossor, bul no vaIid inlorrupls lavo occurrod.
InloI dosignod llo 8259 lo aulomalicaIIy rolurn llo onlry numbor for ils numbor
sovon inpul in llis caso. On llo maslor 8259, llis viII bo 0Il, llo onlry numbor
for IRQ7. On llo sIavo, il viII bo 77l, llo onlry numbor for IRQ15. Tlo micro-
procossor viII lloroforo run oillor llo IRQ7 or llo IRQ15 inlorrupl sorvico rou-
lino.

As slalod oarIior, somo oxpansion dovicos viII coaso lo oporalo corroclIy if lloy
aro sorvicod vlon lloy did nol roquosl sorvico. In lloso lvo ISRs, lloroforo, llo
programmor musl porform a clocI lo soo if llo IRQ7 or llo IRQ15 vas roaI.
Tlis is accompIislod by roading llo conlonls of llo rospoclivo 8259's in-sorvico
rogislor and clocIing lo soo if bil sovon is roaIIy sol. If il is, llon llo roquosl is
roaI and llo programmor slouId oxoculo llo romaindor of llo inlorrupl sorvico
roulino lo sorvico llo roquosl. If, on llo ollor land, llo bil is cIoar, il vas a
planlom or glosl inlorrupl and llo programmor slouId jusl rolurn lo llo inlor-
ruplod program fIov villoul sorvicing llo oxpansion dovico.



-

Tlis soclion is inlondod as an inlroduclion lo programming llo 8259 inlorrupl
conlroIIor. Ior a moro dolaiIod doscriplion, rofor lo llo approprialo InloI man-
uaI.
--
AII of llo 8259 rogislors aro accossod llrougl lvo I/O Iocalions. Tlo maslor
8259's rogislors aro accossod llrougl I/O porls 20l and 21l, vliIo llo sIavo's
aro accossod llrougl A0l and A1l. Tlo 8259 accopls lvo lypos of commands:
iniliaIizalion command vords, or ICWs, and oporalion command vords, or
OCWs.

Boforo llo 8259 can bo usod lo priorilizo inlorrupl roquosls, il musl bo iniliaI-
izod lo a Inovn slalo. Tlis is accompIislod by vriling a sorios of bylos lo llo
ICWs and OCWs. Tlo conlonls of lloso iniliaIizalion bylos dofino llo basic op-
oralionaI claraclorislics of llo 8259. TabIos 18-2 and 18-3 iIIuslralo llo soquonco
of ICWs and OCWs vrillon lo llo 8259s during llo ISA IOST iniliaIizalion.
Tlo ICW rogislors musl bo accossod in a prodofinod soquonco. Tlo programmor
bogins llo soquonco by vriling lo ICW1. Tlis is accompIislod by vriling llo
dosirod dala lo porl 20l or A0l (maslor or sIavo 8259) vill dala bil 4 sol lo a 1.
Tlo 8259 llon oxpocls llroo subsoquonl vrilos lo porl 21l or A1l vill llo vaI-
uos for ICW2 llrougl ICW4. Aflor aII of llo ICW rogislors lavo boon Ioadod,
any subsoquonl dala vrillon lo porl 21l or A1l is Ioadod inlo OCW1, llo inlor-
rupl masI rogislor.


--

-

-

-
1) 15l vrillon
lo I/O porl
20l
An I/O vrilo lo porl 20l vill bil 4 = 1 accossos ICW1. Bil 0 sol lo 1
inslrucls llo 8259 lo oxpocl ICW4. Bil 1 sol lo 0 indicalos llal ono or
moro sIavos aro cascadod llrougl llo maslor's IRQ inpuls. Bil 2 las
no offocl vlon llo 8259s aro programmod for 8086/8088 oporalion.
Bil 3 sol lo 0 pIacos llo 8259 in odgo-lriggorod modo. Tlo romaindor
of llo bils lavo no moaning vlon llo 8259s aro programmod for
8086/8088 oporalion.
2) 08l vrillon
lo I/O porl
21l
Iirsl accoss lo porl 21l aflor ICW1 is vrillon accossos ICW2. Uppor
fivo bils of llo dala vrillon lo porl 21l aro llo uppor fivo bils of llo
maslor's inlorrupl ID. Tlo Iovor llroo bils of llo inlorrupl ID ropro-
sonls llo IovoI of inlorrupl curronlIy boing sorvicod. Tlis moans llal
llo maslor 8259's oigll inpuls lavo inlorrupl ID's ranging from 08l
llrougl 0Il.
3) 04l vrillon
lo I/O porl
21l
Aflor vriling ICW2, llo noxl vrilo lo porl 21l accossos ICW3. Tlo
dala vrillon lo llis rogislor indicalos vlicl of llo maslor's IRQ in-
puls aro connoclod lo sIavo 8259s. Sinco bil 2 is sol lo 1 and llo ro-
maining bils aro 0, IRQ2 is connoclod lo a sIavo vliIo llo romaining
inpuls aro connoclod lo I/O dovicos.
4) 01l vrillon
lo I/O porl
21l
Aflor vriling ICW3, llo noxl vrilo lo porl 21l accossos ICW4. Tlo
dala vrillon lo llis rogislor indicalos llo foIIoving:

bil 0 = 1: Tlo syslom is basod on an 8086/8088, nol an 8080/8085.
Tlis moans llal llo 8259 musl sond an inlorrupl ID lo llo
procossor in rosponso lo inlorrupl acInovIodgo, nol a caII
inslruclion.
bil 1 = 0: Tlo programmor musl vrilo a non-spocific Ind-of-
Inlorrupl, or IOI, command lo llo 8259 lo rosol llo ligl-
osl-priorily bil llal vas sol in llo in-sorvico rogislor al llo
ond of oacl inlorrupl sorvico roulino.
bils 3:2 = 00b non-bufforod modo. Has no offocl.
bil 4 = 0 spociaI fuIIy-noslod modo off.
bils 7:5 = 000b nol usod.
5) IBl vrillon
lo I/O porl
21l
Aflor llo four ICW rogislors lavo boon Ioadod, any subsoquonl
vrilo lo porl 21l accossos OCW1, llo inlorrupl masI rogislor(IMR).
Wriling a IBl lo llis rogislor disabIos aII inlorrupl roquosl inpuls
ollor llan IRQ2 (roquosls from llo sIavo 8259).


-





-
1) 15l vrillon
lo I/O porl
A0l
Soo doscriplion of vrilo lo maslor's porl 20l.
2) 70l vrillon
lo I/O porl
A1l
Iirsl accoss lo porl A1l aflor ICW1 is vrillon accossos ICW2. Uppor
fivo bils of llo dala vrillon lo porl A1l aro llo uppor fivo bils of llo
inlorrupl ID. Tlo Iovor llroo bils of llo inlorrupl ID roprosonls llo
IovoI of inlorrupl curronlIy boing sorvicod. Tlis moans llal llo sIavo
8259's oigll inpuls lavo inlorrupl ID's ranging from 70l llrougl
77l.
3) 02l vrillon
lo I/O porl
A1l
Aflor vriling ICW2, llo noxl vrilo lo porl A1l accossos ICW3. Tlo
dala vrillon lo llis rogislor Ioads llo sIavo's ID inlo ICW3. Sinco llo
sIavo is connoclod lo IRQ2 on llo maslor, il's sIavo ID is lvo.
4) 01l vrillon
lo I/O porl
A1l
Aflor vriling ICW3, llo noxl vrilo lo porl A1l accossos ICW4. Tlo
dala vrillon lo llis rogislor indicalos llo foIIoving:

bil 0 = 1: Tlo syslom is basod on an 8086/8088, nol an 8080/8085.
Tlis moans llal llo 8259 musl sond an inlorrupl ID lo llo
procossor in rosponso lo inlorrupl acInovIodgo, nol a caII
inslruclion.
bil 1 = 0: Tlo programmor musl vrilo a non-spocific Ind-of-
Inlorrupl, or IOI, command lo llo 8259 lo rosol llo ligl-
osl-priorily bil llal vas sol in llo in-sorvico rogislor al llo
ond of oacl inlorrupl sorvico roulino.
bils 3:2 = 00b non-bufforod modo. Has no offocl.
bil 4 = 0 spociaI fuIIy-noslod modo off.
bils 7:5 = 000b nol usod.
5) IIl vrillon
lo I/O porl
A1l
Aflor llo four ICW rogislors lavo boon Ioadod, any subsoquonl
vrilos lo porl A1l accoss OCW1, llo inlorrupl masI rogislor. Wril-
ing a IIl lo llis rogislor disabIos aII of llo sIavo's inlorrupl roquosl
inpuls.

Aflor llo inlorrupl conlroIIors lavo boon iniliaIizod, any subsoquonl road from
or vrilo lo I/O porl 21l or A1l accossos llo inlorrupl masI rogislor, OCW1, in
oillor llo maslor or sIavo inlorrupl conlroIIor, rospoclivoIy.

In an inlorrupl sorvico roulino, llo programmor musl issuo a non-spocific Ind-
of-Inlorrupl, or IOI, command lo llo inlorrupl conlroIIor lo cIoar llo liglosl-
priorily bil llal vas sol in llo in-sorvico rogislor. Tlis is accompIislod by vril-

--

ing 20l lo porl 20l or A0l, OCW2. In an inlorrupl sorvico roulino for a roquosl
originaling on llo sIavo, a non-spocific IOI command musl bo issuod lo boll
llo sIavo and llo maslor lo cIoar llo rospoclivo bils in boll of lloir in-sorvico
rogislors.

Tlo programmor vrilos lo OCW3 undor lvo circumslancos:

To sol or rosol llo spociaI masI modo. Ior furllor informalion, rofor lo llo
InloI lardvaro roforonco manuaI.
To idonlify a rogislor lo bo road on a subsoquonl road.

To road from llo in-sorvico rogislor or llo inlorrupl roquosl rogislor (IRR), llo
programmor firsl vrilos oillor 03l (in-sorvico rogislor) or 02l (IRR) lo OCW3 al
porl 20l or A0l. Tlo noxl limo porl 20l is road from, llo conlonls of llo idonli-
fiod rogislor is pIacod on llo dala bus. Tloro is no nood lo vrilo lo OCW3 ovory
limo a road is lo bo porformod from llo IRR or in-sorvico rogislor (as Iong as llo
samo rogislor is lo bo road from again). Aflor iniliaIizalion, llo 8259 viII rolurn
llo slalus of llo IRR vlon porl 20l or A0l is road from.
- --
In addilion lo llo masIabIo inlorrupl roquosl inpul, INTR, InloI x86 microproc-
ossors lavo an addilionaI inlorrupl roquosl inpul Inovn as llo NMI inpul.
UnIiIo llo masIabIo inlorrupl roquosl inpul, llo non-masIabIo inlorrupl ro-
quosl inpul, or NMI, can nol bo masIod oul by llo programmor. In ollor
vords, if llo NMI inpul is assorlod, llo microprocossor musl immodialoIy sor-
vico llal inlorrupl roquosl. Tlo NMI Iino is lypicaIIy usod lo roporl sorious or
falaI lardvaro faiIuros lo llo microprocossor.

A cIassic oxampIo vouId bo a momory parily orror. Wlon llo microprocossor
sonsos an assorlod signaI on llo NMI inpul, il rosponds by firsl pusling llo
IIag, CS and II rogislors onlo llo slacI.

Rallor llan roquosl llo inlorrupl labIo onlry numbor from llo inlorrupl con-
lroIIor, lovovor, llo microprocossor aulomalicaIIy accossos onlry lvo in llo in-
lorrupl labIo. Tlis onlry is dodicalod lo llo NMI inlorrupl. During llo IOST,
llo programmor vrilos llo slarl addross of llo NMI inlorrupl sorvico roulino
Iocalod in ROM momory inlo onlry lvo of llo inlorrupl labIo.

Aflor saving llo llroo rogislors on llo slacI, llo microprocossor llon jumps lo
llo NMI inlorrupl sorvico roulino by Ioading CS and II from onlry lvo. In llo

-

NMI inlorrupl sorvico roulino, llo programmor roads llo conlonls of llo foI-
Ioving I/O porls lo dolormino llo causo of llo NMI:

syslom conlroI porl B al I/O addross 0061l.
syslom conlroI porl A al I/O addross 0092l.

Tlo orror is llon roporlod on llo scroon.

TabIos 18-4 and 18-5 dofino llo bil assignmonl of lloso lvo porls and idonlify
llo bils roIalod lo NMI vill an aslorisI. Tlo bil assignmonls slovn aro fairIy
slandard, bul lloy aro difforonl on somo sysloms. Tlo NMI inlorrupl sorvico
roulino llal oxaminos lloso bils is normaIIy in llo sysloms bool ROM. Sinco
llo bool ROM is vrillon spocificaIIy for a parlicuIar slyIo of syslom board, llo
ROM viII Inov vlal llo bil assignmonls aro. Tlo moaning of llo bils in sys-
lom conlroI porl B al I/O addross 0061l aro difforonl for a road vorsus a vrilo.
Ior moro informalion, soo llo ISA I/O Addrossos soclion in llo Appondix.

- --

7 Syslom Board RAM Iarily ClocI
6 ClannoI ClocI
5 Timor 2 (SpoaIor Timor) Oulpul
4 Rofrosl Roquosl
3 ClannoI ClocI InabIod
2 Iarily ClocI InabIod
1 SpoaIor Dala InabIo
0 Timor 2 Galo lo spoaIor

- --

7 Iixod DisI Aclivily IID
6 Iixod DisI Aclivily IID
5 Rosorvod
4 Walcldog Timor Slalus
3 Socurily IocI Ialcl
2 Rosorvod
1 AIlornalo Galo A20
0 AIlornalo Hol Rosol


--

As iIIuslralod in llo procoding labIos and in figuro 18-12, lloro aro llroo possi-
bIo causos for an NMI:

Syslom board RAM parily clocI. Tlo claplor onlilIod RAM Momory:
Tloory of Oporalion, conlains a dolaiIod doscriplion of llo syslom board
RAM parily clocI Iogic.
ClannoI clocI. Tlo claplor onlilIod ISA Bus Slrucluro, providos a do-
laiIod doscriplion of llo clannoI clocI Iogic.
Walcldog limor slalus. Tlo claplor onlilIod ISA Timors, providos a do-
laiIod doscriplion of llo valcldog limor.

Tlo programmor can soIoclivoIy onabIo or disabIo llo abiIily of oxlornaI Iogic lo
gonoralo an NMI. Tlis is accompIislod by vriling llo dosirod vaIuo lo I/O porl
0070l. A 1 vrillon lo bil 7 disabIos llo NMI Iogic's abiIily lo gonoralo an NMI,
vliIo a 0 onabIos il. Ior addilionaI informalion, soo llo claplor onlilIod ISA
Bus Slrucluro, undor llo loading Irror Roporling SignaI.

--
Micro
NMl
NMl
Enable/Disable Gate
Port 70h
Bit 7
Port 61h
Bit 2
Port 61h
Bit 3
Channel Check
Enable/Disable
Gate
DRAM Parity Error
Enable/Disable
Gate
CHCHK
Parity Check
Watchdog Timer Timeout

-

-
Tloro aro lvo lypos of soflvaro condilions llal can causo an inlorrupl lo an In-
loI x86 microprocossor:

Ixcoplion inlorrupls.
Soflvaro inlorrupls gonoralod by llo INT (inlorrupl) inslruclion.

Boll lypos of soflvaro condilions aro discussod in llo foIIoving paragrapls.
-
GonoraIIy spoaIing, an oxcoplion inlorrupl rosuIls vlon llo microprocossor al-
lompls lo oxoculo an inslruclion and incurs an orror vliIo during so. A cIassic
oxampIo vouId bo an allompl lo divido a numbor by zoro. Wlon an InloI x86
microprocossor allompls oxoculo of an inslruclion llal vouId causo a divido-
by-zoro condilion, llo microprocossor immodialoIy gonoralos a divido-by-zoro
oxcoplion inlorrupl. Inlry 0 in llo inlorrupl labIo is dodicalod lo llis condilion
and poinls lo llo slarl addross of llo divido-by-zoro inlorrupl sorvico roulino
suppIiod by llo programmor.

Various ollor lypos of iIIogaI soflvaro condilions can causo oxcoplion inlor-
rupls as voII. Wlon InloI inlroducod llo 8086, InloI rosorvod llirly lvo onlrios
in llo Iovor-mosl parl of llo inlorrupl labIo lo poinl lo llo inlorrupl sorvico
roulinos for various soflvaro orror condilions. TabIo 18-6 dofinos llo condilions
and lloir rospoclivo onlrios in llo inlorrupl labIo for an 80386 microprocossor.
Duo lo llo lardvaro orionlalion of llis booI, a dolaiIod doscriplion of oacl of
lloso condilions is nol incIudod. Tlis informalion may bo found in llo InloI
programmor's roforonco manuaIs.

Nolico llal in labIo 18-6 oxcoplion inlorrupls uso onlry numbors 8 llrougl 10l
vlicl coincido vill onlry numbors usod by lardvaro dovicos. To oIiminalo
possibIo confIicls, llo oxcoplion landIors (ISRs) slaro llo labIo onlrios vill llo
lardvaro dovicos jusl as lvo lardvaro dovicos slaro llo samo onlry.


--

--
--
0 Divido-By-Zoro Ixcoplion
1 SingIo Slop, or Trap, Inlorrupl
2 NMI
3 BroaIpoinl
4 Inlorrupl on OvorfIov
5 BOUND Rango Ixcoodod Ixcoplion
6 InvaIid Opcodo Ixcoplion
7 Irocossor Ixlonsion Nol AvaiIabIo Ixcoplion
8 DoubIo Ixcoplion Doloclod
9 Irocossor Ixlonsion Sogmonl Ovorrun Ixcoplion
Al InvaIid TasI Slalo Sogmonl
Bl Sogmonl Nol Irosonl
Cl SlacI Sogmonl Ovorrun or Nol Irosonl Ixcoplion
Dl GonoraI Iroloclion Ixcoplion
Il Iago IauIl
Il Rosorvod by InloI
10l Coprocossor Irror
11l lo 1Il Rosorvod by InloI
-
Tlo inlorrupl inslruclion aIIovs llo program lo simuIalo a lardvaro inlorrupl
roquosl. Tlis inslruclion laIo llo foIIoving formal:



Wlon llo microprocossor oxoculos llo oxampIo inslruclion slovn abovo, il ro-
acls vory mucl as il vouId lo a lardvaro inlorrupl roquosl rocoivod on llo
masIabIo inlorrupl roquosl Iino, INTR.

Il firsl savos llo conlonls of llo IIag, CS and II rogislors on llo slacI. Al llis
limo, CS and II poinl lo llo inslruclion immodialoIy aflor llo INT inslruclion.
Sinco llo inlorrupl vas nol acluaIIy causod by a lardvaro inlorrupl roquosl on
llo INTR Iino, llo microprocossor doosn'l porform lvo inlorrupl acInovIodgo
bus cycIos lo roquosl llo inlorrupl labIo onlry numbor from llo 8259 inlorrupl
conlroIIor. Insload, llo inlorrupl labIo onlry numbor is suppIiod by llo loxa-
docimaI numbor lo llo rigll of llo INT inslruclion.

-

In llo oxampIo abovo, llo programmor las dosignalod onlry numbor 13l (a
docimaI 19). Tlo microprocossor muIlipIios llis numbor by four (13l x 4 = 4Cl)
lo yioId llo slarl momory addross of onlry 13l in llo inlorrupl labIo.

}usl as il vouId for a lardvaro roquosl, llo microprocossor llon roads llo four
bylos of informalion slarling al llis momory addross and pIacos llom inlo llo
CS and II rogislors. Tlo CS and II rogislors nov poinl lo llo slarl addross of
llo INT 13l inlorrupl sorvico roulino in momory. Tlo microprocossor bogins lo
folcl and oxoculo llo inslruclions llal maIo up llis roulino. As dofinod by
IBM, onlry 13l in llo inlorrupl labIo aIvays poinls lo llo disI BIOS roulino. Al
llo concIusion of llo roulino, oxoculion of llo IRIT (inlorrupl Rolurn) inslruc-
lion pops llo originaI CS and II off llo slacI, causing llo microprocossor lo ro-
sumo oxoculing llo originaI program al llo inslruclion immodialoIy aflor llo
INT inslruclion.

Tlo lruo vaIuo of llo INT inslruclion Iios in llo facl llal a programmor can caII
(jump lo) a roulino (o.g., a BIOS roulino) villoul Inoving vloro il acluaIIy ro-
sidos in momory. AII llo programmor noods lo Inov is llo onlry numbor llal
conlains ils slarl addross.

Wlon Microsofl firsl camo oul vill llo disI oporaling syslom (DOS) for llo
IBM IC, il vas idonlifiod as vorsion 1.0. An oporaling syslom sucl as MS-DOS
is roaIIy nolling moro llan a coIIoclion of usofuI roulinos llal llo programmor
can caII (jump lo) lo porform various commonIy usod funclions. Tlo MS-DOS
roulinos aIIov llo programmor lo conlroI llo various dovicos in llo syslom
villoul laving an inlimalo InovIodgo of llo oporalions roquirod lo conlroI
llom.

Ono diroclion llal Microsofl couId lavo laIon vouId lavo boon lo pubIisl a
Iisl of llo slarl momory addrossos of llo various roulinos llal maIo up
MS-DOS. A programmor couId llon jump lo llo slarl momory addross of llo
approprialo roulino lo accompIisl a parlicuIar lasI. Tlis mollod vouId lavo
causod lromondous compalibiIily probIoms.

Considor llis. Nol loo Iong aflor vorsion 1.0 of MS-DOS vas roIoasod, IBM ro-
Ioasod vorsion 1.1. Tlis vas foIIovod rallor cIosoIy by various ollor vorsions
Ioading up lo llo vorsion curronlIy on llo marIol. Nov considor llo facl llal as
llo various vorsions of MS-DOS voro issuod, llo sizo, funclionaIily, and
pIacomonl of llo various roulinos llal maIo up MS-DOS voro aIlorod. Tlis
moans llal llo Iisl of slarl momory addrossos for llo various roulinos spocifiod
in vorsion 1.0 is no Iongor vaIid for any of llo ollor vorsions. In facl, il vouId

--

roquiro a soparalo Iisl of slarl momory addrossos for llo roulinos in oacl and
ovory vorsion of MS-DOS on llo marIol.

If llo dosignors of an appIicalions program lad accossod llo MS-DOS roulinos
by jumping lo llo slarl momory addrossos of llo various roulinos omboddod in
vorsion of 1.0 of MS-DOS, llal vorsion of llo appIicalions program vouId onIy
run corroclIy vill vorsion 1.0 of MS-DOS. Tloy vouId lavo lad lo issuo a
soparalo vorsion of llo appIicalions program for ovory vorsion of MS-DOS.

Il vouId aIso moan llal llo ond-usor vouId lavo lo Inov llo vorsion of
MS-DOS llal lloy aro running in ordor lo buy llo corrocl vorsion of llo appIi-
calion program lloy vanl lo run. Tlo ond-usor couId novor upgrado MS-DOS
villoul roIogaling virluaIIy aII of lis or lor appIicalion's programs lo llo scrap
loap. Tlis obviousIy vouId lavo boon an unlonabIo soIulion lo llo probIom.

As MS-DOS is Ioadod inlo momory vlon llo maclino is povorod up, llo
MS-DOS Ioad procoduro incIudos llo aulomalic pIacomonl of llo slarl momory
addrossos for llo various MS-DOS roulinos inlo pro-dofinod onlrios in llo in-
lorrupl labIo. IBM guaranlood appIicalions program dovoIopors llal llo poinl-
ors lo llo various MS-DOS roulinos vouId aIvays rosido in llo samo onlrios in
llo inlorrupl labIo, irrospoclivo of llo MS-DOS vorsion. Tlis moans llal an ap-
pIicalion program dovoIopor doosn'l nood lo Inov llo acluaI slarl momory ad-
dross of a MS-DOS roulino llal lo or slo vanls lo uso. To caII llo roulino, aII
llo programmor las lo do is spocify llo corrocl onlry numbor in an inlorrupl
inslruclion. Tlo Microsofl and IBM loclnicaI roforonco guidos conlain informa-
lion dolaiIing llo roulinos caIIod by oacl inlorrupl onlry.

MS-DOS roulinos aron'l llo onIy onos llal can bo caIIod using llo inlorrupl in-
slruclion. Tlo BIOS (basic inpul/oulpul syslom) roulinos aro a coIIoclion of
usofuI roulinos vrillon by llo IC manufacluror and omboddod in llo syslom
ROMs. Tloro is ono roulino for oacl slandard I/O dovico slippod vill llo sys-
lom. Somo oxampIos vouId bo llo Ioyboard, fIoppy disI, and lard disI BIOS
roulinos.

Rallor llan oxpocl oacl appIicalion's programmor lo undorsland llo propor
soquonco of I/O vrilos and roads roquirod in ordor lo conlroI and sonso llo
slalus of various I/O dovicos, llo IC manufacluror suppIios llo BIOS roulinos.
AII llo appIicalions programmor las lo Inov is lov lo caII llo approprialo
roulino lo accoss llo largol I/O dovico. During llo IOST, llo slarl momory ad-
dross of oacl of llo BIOS roulinos is slorod in prodofinod onlrios in llo inlor-
rupl labIo. Tlo IC manufacluror suppIios a Iisl of llo inlorrupl onlrios assignod

-

lo oacl BIOS roulino. Tlis Iisl is lypicaIIy avaiIabIo in llo loclnicaI roforonco
guido for llo IC syslom.
-
Tlo discussions llus far in llis claplor lavo assumod llal llo microprocossor
is in roaI modo. Duo lo llo lardvaro orionlalion of llis booI, a dolaiIod discus-
sion of proloclod modo is nol incIudod, bul somo of llo basic simiIarilios and
difforoncos bolvoon roaI modo and proloclod modo inlorrupls aro doscribod
loro.

In proloclod modo, llo inlorrupl labIo is moro proporIy namod llo inlorrupl
doscriplor labIo, or IDT, bocauso il conlains 8-bylo inlorrupl doscriplors. Tlo
IDT can bo Iocalod anyvloro in momory. Tlo Iocalion (baso addross) and sizo
(Iimil) of llo IDT is spocifiod by llo inlorrupl doscriplor labIo rogislor, IDTR,
vlicl is llo samo rogislor llal spocifios llo Iocalion of llo inlorrupl labIo in
roaI modo.

Tlo 8259 inlorrupl conlroIIors landIo inlorrupl roquosls llo samo vay in pro-
loclod modo as lloy did in roaI modo. Tloy roporl inlorrupl labIo onlry num-
bors lo llo microprocossor on llo socond inlorrupl acInovIodgo bus cycIo.

Wlon llo microprocossor rocoivos an onlry numbor from llo 8259, llo micro-
procossor muIlipIios llo onlry numbor by 8 if il is in proloclod modo (Il muIli-
pIios by 4 if il is in roaI modo.). Il llon adds llo rosuIl lo llo IDT baso addross
from llo IDTR. Tlo finaI rosuIl is llo addross of llo inlorrupl doscriplor in
momory. Tlo microprocossor muIlipIios llo onlry numbor by 8 bocauso llo in-
lorrupl doscriplors aro oacl 8 bylos Iong.

Tlo microprocossor llon runs momory road bus cycIos lo llo caIcuIalod ad-
dross lo road in aII oigll bylos of llo inlorrupl doscriplor. Tlo inlorrupl do-
scriplor incIudos a nov CS rogislor vaIuo, a nov II rogislor vaIuo and ollor
bylos vlicl conlroI lov proloclod modo viII landIo llo inlorrupl. Ior an
80386 or liglor microprocossor, llo inlorrupl doscriplor may conlain a nov III
insload of jusl II.

SimiIarIy lo roaI modo, llo microprocossor puslos llo oId IIags, CS and II rog-
islors onlo llo slacI boforo pulling llo nov CS and II vaIuos llal il road in
from llo inlorrupl doscriplor inlo ils CS and II rogislors. Doponding on llo sol-
ling of llo conlroI bylos in llo inlorrupl doscriplor, llo microprocossor may
aIso pusl llo oId SS and SI rogislors boforo pusling llo CS and II rogislors.


--

Wlonovor a sogmonl rogislor is roIoadod in proloclod modo, llo microprocos-
sor aulomalicaIIy roads a doscriplor from oillor llo gIobaI doscriplor labIo
(GDT) or llo IocaI doscriplor labIo (IDT). Tloro aro sovoraI lypos of inlorrupl
doscriplors, so lo jusl gol llo basic idoa across, Iols uso a sogmonl doscriplor.
Sogmonl doscriplors aro doscribod in llo claplor onlilIod Tlo 80286 Micro-
procossor in llo soclion onlilIod Sogmonl Rogislor Usago in Iroloclod Modo.

Sinco llo inlorrupl causod llo microprocossor lo roIoad ils CS sogmonl rogislor
vill llo vaIuo from llo inlorrupl doscriplor, llo microprocossor nov roads llo
sogmonl doscriplor llal llo CS rogislor poinls lo, from llo GDT or llo IDT.
Tlo sogmonl doscriplor dofinos llo baso addross and llo Iimil of llo nov codo
sogmonl. Tlo microprocossor adds llo nov codo sogmonl baso addross lo llo
nov II (llal il aIroady road from llo inlorrupl doscriplor) and forms llo ad-
dross of llo firsl inslruclion of llo inlorrupl sorvico roulino (ISR). Tlo micro-
procossor is llon folclos llo firsl inslruclion of llo ISR.

Sinco llo microprocossor is in proloclod modo, llo ISR musl oillor bo vrillon
for proloclod modo, or llo microprocossor musl bo pIacod in virluaI-8086 modo
or bacI in roaI modo boforo running a roaI modo ISR.



--


-
Dofinilions of llo ISA bus signaI Iinos and funclions voro inlroducod aIong
vill dolaiIs aboul ISA bus cycIos. DolaiIs of llo impIomonlalion and oporalion
of inlorrupls villin llo ISA onvironmonl voro providod.
-
Transfors bolvoon momory and I/O dovicos can bo landIod oillor by llo mi-
croprocossor or by llo dirocl momory accoss (DMA) conlroIIor. DMA aIIovs
llo procossor lo conlinuo lo oxoculo inslruclions from ils profolcl quouo or
caclo vliIo lransfors aro boing mado bolvoon I/O and momory. Tlis claplor
oxpIains llo procoss, Iogic and liming of llo ISA DMA subsyslom.

ISA bus masloring is oxpIainod, incIuding ils roIalionslip lo DMA and ils ca-
pabiIilios and Iimilalions in llo ISA slrucluro.

Wlon using dirocl momory accoss (DMA) lo lransfor a bIocI of informalion bo-
lvoon an I/O dovico and momory, llo microprocossor musl sliII inilialo llo
bIocI dala lransfor bolvoon llo I/O dovico and momory, bul llo acluaI dala
lransfor and ils lorminalion aro landIod soIoIy by llo DMA conlroIIor (DMAC).
Tlis froos up llo microprocossor lo conlinuo vill ollor produclivo aclivilios
vliIo llo dala lransfor is laIing pIaco. Onco a DMA bIocI dala lransfor las
boon inilialod, llo DMA conlroIIor and llo I/O dovico do nol dislurb llo mi-
croprocossor again unliI llo onliro bIocI of dala las boon lransforrod. Tlo
DMAC usod in ISA maclinos porforms a fIy-by lransfor, llal is, il is abIo lo
lransfor dala bolvoon momory and an I/O dovico (road and vrilo) in a singIo
DMA cycIo villoul Ialcling llo dala inlornaIIy, a job llal vouId normaIIy ro-
quiro lvo soparalo bus cycIos (a road foIIovod by a vrilo) by llo microprocos-
sor.

-

Upon compIolion of llo ovoraII dala lransfor, llo I/O dovico inlorrupls llo mi-
croprocossor lo indicalo compIolion. In rosponso, llo microprocossor lomporar-
iIy susponds ils curronl lasI and porforms an I/O road from llo I/O dovico lo
clocI llo compIolion slalus of llo lransfor. If llo I/O dovico indicalos no orrors
voro oncounlorod, llo microprocossor may conlinuo procossing.

Tlo DMAC usod in ISA maclinos is llo InloI 8237, providing four soparalo
DMA clannoIs. Tvo 8237s aro usod in a maslor/sIavo configuralion, providing
a lolaI of sovon DMA clannoIs. Iacl DMA clannoI is usod by a soparalo I/O
dovico lo landIo bIocI dala lransfors vill momory.

Iour dislincl slops musl occur lo inilialo and compIolo a DMA lransfor.

Sol up llo DMA clannoI for llo lransfor.
Command llo I/O dovico lo inilialo llo bIocI dala lransfor.
Granl llo syslom busos lo llo DMA conlroIIor so il can run llo bus cycIo.
Nolify llo microprocossor llal llo lransfor is compIolo.

Iacl DMA clannoI villin llo DMA conlroIIor las ils ovn sol of I/O rogislors
llal llo programmor usos lo sol up llo dala lransfor. Tlo sol of I/O rogislors
associalod vill oacl DMA clannoI aIIovs llo programmor lo spocify:

Tlo Transfor Counl (numbor of DMA bus cycIos lo run).
Tlo slarl momory addross (slarl addross in momory vloro dala viII bo
road from or vrillon lo).
Tlo diroclion of lransfor vill roforonco lo momory (lypo of lransfor).

Aflor llo DMA clannoI las boon sol up by llo programmor, llo I/O dovico
musl bo programmod lo inilialo llo ovoraII bIocI dala lransfor. As an oxampIo,
llo programmor vouId issuo llo propor sorios of I/O vrilo commands lo a
fIoppy disI conlroIIor lo inilialo a disI road oporalion.

Having sol up llo rospoclivo DMA clannoI and issuod llo propor commands
lo llo I/O dovico (in llis caso, llo fIoppy disI conlroIIor and DMA clannoI
lvo), llo microprocossor can llon go on lo anollor lasI. Tlo onliro dala lrans-
for and ils lorminalion viII bo landIod by llo I/O dovico and ils rospoclivo
DMA clannoI. Tlo foIIoving paragrapls doscribo an oxampIo dala lransfor bo-
lvoon syslom momory and a fIoppy disI conlroIIor.


--

Wlon porforming a fIoppy disI lransfor, llo programmor may onIy porform
dala lransfors in muIlipIos of llo soclor sizo. Wlon running MS-DOS, a soclor
on a fIoppy disI conlains 512 bylos of informalion. Tlis vouId bo llo smaIIosl
dala lransfor possibIo vlon lransforring informalion bolvoon a disI drivo and
momory.

Rofor lo figuro 19-1 for a bIocI diagram of llo compononls invoIvod.


- -
DREQn
DAKn
lORC
lOWC
TC
HOLD
HLDA
DRAM
Memory
Floppy
Drive
Controller
DMA
Controller
Micro-
processor
lnterrupt
Controller
Disk
Drive
lRQ6
lNTR

-

1. Tlo programmor issuos a sorios of I/O vrilos lo DMA clannoI lvo's rogis-
lors lo sol up llo slarl momory addross, lransfor counl and llo diroclion of
llo lransfor vill roforonco lo momory. In llo disI road oxampIo, assumo
llal llo slarl momory addross is 1000l, llo lransfor counl is 512 bylos (ono
soclor) and llal llis is a vrilo lransfor (vill roforonco lo momory).
2. Tlo fIoppy conlroIIor musl bo programmod vill llo disI road command,
llo cyIindor numbor, llo load (or surfaco) numbor, llo slarl soclor numbor
and llo numbor of soclors lo bo road. In llis oxampIo, vo viII assumo a ono
soclor (512 bylos) road from cyIindor llroo, load ono, soclor fivo.
3. Upon rocoiving llo paramolors and llo disI road command, llo disI con-
lroIIor inilialos a sooI oporalion lo posilion llo road/vrilo load mocla-
nism ovor cyIindor llroo. Il musl llon vail for llo disI lo spin unliI llo
slarl of soclor fivo is doloclod undor llo road load on surfaco ono. As llo
disI is a moclanicaI dovico, llis viII laIo somo limo.
4. In llo oxampIo of a road oporalion from a fIoppy disI conlroIIor, somo limo
viII oIapso boforo llo disI conlroIIor las road llo firsl bylo from disI.
5. Wlon llo firsl bylo las boon lransforrod from llo disI lo llo disI conlroI-
Ior, llo fIoppy disI conlroIIor musl llon roquosl llal ils associalod DMA
clannoI lransfor llo dala. Tlo fIoppy disI conlroIIor assorls DMA roquosl
Iino lvo (DRQ2) llal goos lo llo DMAC.
6. Tlo DMAC rosponds by assorling ils HRQ loId roquosl oulpul lo soizo llo
busos (addross, dala, and conlroI busos) from llo microprocossor. Sinco llo
rofrosl Iogic musl aIso bo abIo lo soizo llo busos, llo rofrosl Iogic aIso las a
loId roquosl oulpul. Tloso lvo loId roquosl Iinos go lo a liny firsl-como-
firsl-sorvod arbilor vlicl in lurn drivos llo microprocossor's HOID ro-
quosl inpul.
7. Doponding on llo X86 microprocossor llal is boing usod, llo microprocos-
sor viII oillor compIolo llo curronl bus cycIo, compIolo llo curronl inslruc-
lion, or porform aII llo vrilos in ils poslod vrilo buffor. Tlon llo
microprocossor viII lri-slalo aII of ils bus oulpul drivors, lloroby fIoaling
llo busos. Tlo microprocossor aIso assorls HIDA lo loII llo roquosling do-
vico (llo DMAC in llis caso) llal il is nov llo bus maslor. Iogic on llo sys-
lom board assorls llo ISA bus AIN signaI vlon il soos HIDA assorlod.
Nolo llal llo ISA bus AIN signaI is nol llo samo as llo DMAC AIN pin.
8. Tlo DMAC llon rosponds lo DRQ2 from llo disI conlroIIor by assorling
DMA AcInovIodgo (DAK2) and llo I/O road command Iino (IORC).
Tloso lvo Iinos go lo llo disI conlroIIor via llo ISA bus.
9. Tlo disI conlroIIor doassorls DRQ2 and bogins llo accoss lo llo dala rog-
islor lo pIaco dala onlo llo dala bus.
10. Tlo DMAC assorls llo momory vrilo command Iino (MWTC) and pIacos
llo addross from clannoI lvo's slarl addross rogislor onlo llo addross bus.
NormaIIy, llo command Iinos indicalo vlollor llo addross bus carrios a

--

momory or I/O addross. Al llis poinl, lovovor, lvo command Iinos
(IORC and MRDC) aro assorlod. Tlo assorlod ISA bus AIN signaI pro-
vonls aII I/O dovicos, oxcopl for llo ono llal is connoclod lo DAK2, from
rosponding during llis bus cycIo.
11. Tlo dala on llo dala bus is vrillon inlo momory al llo addross curronlIy
on llo addross bus.
12. Tlo DMAC llon incromonls clannoI lvo's momory addross rogislor by ono
lo poinl lo llo addross in llo RAM vloro il viII sloro llo noxl bylo il ro-
coivos from llo disI conlroIIor.
13. Tlo DMAC aIso docromonls llo bylo lransfor counl. If llo lransfor counl is
nol oxlauslod, llo dala lransfor is nol compIolo and llo DMAC vails for
anollor DMA Roquosl (DRQ2) from llo fIoppy drivo conlroIIor, indicaling
llal il las anollor bylo lo lransfor (slop oigll).
14. Wlon llo lransfor counl is oxlauslod, llo dala lransfor is compIolo. Tlo
DMAC viII llon doassorl llo loId roquosl Iino (HRQ) lo loII llo micro-
procossor llal il no Iongor noods llo busos. Tlo microprocossor viII ro-
allacl ilsoIf lo llo busos (oxil llo lri-slalo condilion) and doassorl llo HoId
AcInovIodgo Iino (HIDA) lo loII llo DMAC il las rosumod conlroI of llo
busos. Tlo microprocossor is nov bus maslor again. Iogic on llo syslom
board doassorls llo ISA bus AIN signaI so llal I/O dovicos can rosumo
docoding lloir addrossos.
15. Tlo DMAC aIso gonoralos IOI (ond-of-procoss). Tlis suppIios llo signaI
TC (lorminaI counl roaclod) lo llo disI conlroIIor. Tlo disI conlroIIor viII
llon gonoralo a dovico-spocific inlorrupl roquosl lo llo 8259 inlorrupl con-
lroIIor vlicl in lurn gonoralos INTR (inlorrupl roquosl) lo llo microproc-
ossor lo inform il llal llo lransfor oporalion is compIolo.

Tlis vas an oxampIo of a DMA clannoI oporaling in bIocI lransfor modo.
BIocI lransfor modo is bosl suilod for I/O dovicos llal can sloro or rolriovo aII
of llo roquoslod dala in momory llal is on llo I/O dovico boforo roquosling a
DMA lransfor. SingIo lransfor modo is proforabIo for dovicos sucl as llo fIoppy
disI conlroIIor vlicl can loId onIy ono or lvo bylos of dala in lloir buffors.
Domand lransfor modo is proforabIo for I/O dovicos, sucl as Ialor vorsions of
llo fIoppy disI conlroIIor, vlicl lavo IIIO (firsl-in-firsl-oul) buffors. AII llroo
modos aro oxpIainod Ialor in llis claplor.

In llo rosl of llis claplor, for llo saIo of simpIicily, llo liny firsl-como-firsl-
sorvo arbilor llal roulos llo loId roquosls from llo DMAC and llo rofrosl
Iogic lo llo microprocossor is nol slovn in llo figuros. AIso, llo doscriplions
assumo llal llo DMACs HRQ oulpul is liod diroclIy lo llo microprocossors
HOID inpul.

-


Iacl 8237 DMA conlroIIor las four DMA clannoIs. In llo originaI IBM IC, a
singIo 8237 conlroIIor vas usod, Iimiling llo numbor of clannoIs lo four. Tlo
IBM IC/AT addod anollor DMAC, incroasing llo lolaI numbor of clannoIs
avaiIabIo lo sovon (ono clannoI is usod lo cascado llo conlroIIors logollor). Ro-
for lo figuro 19-2.
- -
Iacl of llo sovon DMA clannoIs may bo programmod lo porform ono of llroo
lypos of lransfors. Tlis soIoclion dofinos llo mollod usod lo lransfor a bylo or
vord during ono DMA bus cycIo. Tlo llroo lypos aro:

-. Wlon llo road lransfor lypo is soIoclod for a DMA clannoI,
llo DMAC viII road dala from momory and vrilo il lo llo I/O dovico as-
socialod vill llo DMA clannoI.
-. Wlon llo vrilo lransfor lypo is soIoclod for a DMA clannoI,
llo DMAC viII road dala from llo I/O dovico associalod vill llo DMA
clannoI and vrilo lo llo momory.
-. Tlo vorify lransfor lypo causos llo DMAC clannoI lo oxo-
culo DMA lransfor bus cycIos, incIuding gonoralion of momory addrossos,
bul noillor llo road nor llo vrilo command Iinoss is assorlod. Il vas usod
by DMA clannoI zoro lo impIomonl DRAM rofrosl in llo originaI IBM IC
and IC/XT.
- -
In llo procoding oxampIo, llo DMAC conlroIIod llo busos vliIo llo onliro
bIocI of dala vas lransforrod from llo disI conlroIIor lo momory. Tlis is caIIod
bIocI lransfor modo. An 8237 DMAC clannoI lovovor, may bo programmod lo
oporalo in ono of four modos. Tlo modo soIoclod dofinos llo DMAC lroalmonl
of llo ovoraII informalion lransfor. Tlo four modos aro:


--

SingIo Transfor Modo
BIocI Transfor Modo
Domand Transfor Modo
Cascado Modo
-
SingIo lransfor modo is llo ono mosl commonIy usod bocauso il aIIovs llo
DMAC lo limoslaro llo busos vill llo microprocossor. Tlo DMAC givos up
llo busos aflor oacl bylo (or vord) is lransforrod so llo microprocossor can
lavo accoss lo llo busos on a roguIar basis. Tlis is imporalivo, ospociaIIy in
silualions vloro roIalivoIy Iargo amounls of dala viII bo lransforrod, bocauso,
ollorviso, llo microprocossor and llo rofrosl Iogic gol IocIod oul for loo Iong.

Wlon a DMA clannoI is programmod lo oporalo in singIo lransfor modo, il op-
oralos as foIIovs:

1. Tlo DRQ(n) is rocoivod from llo roquosling I/O dovico (o.g., llo fIoppy
disI conlroIIor) vlon il is roady lo lransfor dala.
2. Tlo DMAC assorls HOID lo roquosl llo uso of llo busos from llo micro-
procossor.
3. Tlo microprocossor assorls HIDA, granling llo busos lo llo DMAC. Iogic
on llo syslom board assorls llo ISA bus AIN signaI, disabIing llo I/O ad-
dross docodors.
4. Tlo DMAC issuos DAK(n) lo llo roquosling I/O dovico in conjunclion
vill oillor IORC or IOWC. Tlo I/O dovico doassorls ils DRQ(n) bocauso
llo DMAC is sorvicing ils dala lransfor roquosl.
5. Tlo DMAC oxoculos a DMA bus cycIo lo movo llo bylo (or vord) bolvoon
llo I/O dovico and momory by driving llo momory addross and appropri-
alo momory command Iino as doscribod oarIior.
6. Tlo vord/bylo lransfor counl is docromonlod and llo momory addross is
incromonlod.
7. Aflor llo bylo las boon lransforrod, DAK(n) is doassorlod.
8. Tlo HOID Iino is doassorlod lo surrondor llo busos bacI lo llo microproc-
ossor. ISA bus AIN signaI is doassorlod aIso. HOID is roassorlod lo ro-
quosl llo uso of llo busos again vlon llo I/O dovico las anollor bylo or
vord lo lransfor. Upon rocoipl of HIDA from llo CIU, llo noxl bus cycIo
viII occur. Tlis procoss conlinuos unliI llo lransfor is compIolod.
9. Wlon llo lransfor counl is oxlauslod, TC is gonoralod lo signaI llo ond of
llo lransfor and llo I/O dovico inlorrupls llo CIU.
-

-

BIocI lransfor modo can bo usod vlon llo DMAC noods lo lransfor a bIocI of
dala, bul llo dosignor and programmor musl Ioop in mind llal if llo DMAC
rolains ovnorslip of llo busos for loo Iong, llo DRAM rofrosl inlorvaI may bo
oxcoodod and lloro may aIso bo larmfuI offocls from IocIing llo microprocos-
sor oul for loo Iong. An oxampIo of oporalion undor bIocI lransfor modo vas
aIroady covorod undor llo loading, A DMA IxampIo.
-
Wlon domand modo is usod, llo DMAC runs DMA bus cycIos bacI-lo-bacI as
Iong as llo I/O dovico Ioops il DRQ(n) Iino assorlod, moaning il can conlinuo
lo suppIy dala. If llo I/O dovico faIIs bolind llo DMAC's abiIily lo lransfor
dala, llo DMA lransfor is lomporariIy suspondod. Tlis is dono vlon llo I/O
dovico doassorls ils DRQ(n) Iino. Wlon llo I/O dovico is roady lo rosumo do-
mand lransfors, il again assorls ils DRQ(n) Iino.

As an oxampIo, if a slroaming lapo drivo usos DMA lo lransfor informalion, il
couId lransfor informalion on a conlinuing basis unliI il roaclod llo ond of a
lracI. WliIo llo lapo drivo moclanism rovorsos llo diroclion of llo lapo, dala
fIov vouId bo inlorruplod and llo lransfor vouId lomporariIy bo suspondod.

Wlon a DMA clannoI is programmod lo oporalo in domand lransfor modo, il
oporalos as foIIovs:

1. Tlo DRQ(n) is rocoivod from llo roquosling I/O dovico (o.g., llo slroaming
lapo conlroIIor).
2. Tlo DMAC assorls HOID lo roquosl llo uso of llo busos from llo micro-
procossor.
3. Tlo microprocossor assorls HIDA, granling llo busos lo llo DMAC. ISA
bus AIN signaI is assorlod.
4. Tlo DMAC assorls DAK(n) and oillor llo IORC or IOWC lo llo ro-
quosling I/O dovico. Nolo llal llo I/O dovico Ioops DRQ(n) assorlod.
5. As doscribod oarIior, llo DMAC oxoculos a DMA bus cycIo lo movo a bylo
(or vord) bolvoon llo I/O dovico and momory.
6. Aflor llo lransfor, llo vord/bylo lransfor counl is docromonlod and llo
momory addross is incromonlod.
7. Tlo DMAC conlinuos lo oxoculo lransfor cycIos unliI llo I/O dovico doas-
sorls DRQ(n) indicaling ils inabiIily lo conlinuo doIivoring dala. Tlo
DMAC doassorls HOID lo givo llo busos bacI lo llo microprocossor and
llo DMAC doassorls DAK(n). Iogic on llo syslom board doassorls ISA
bus AIN signaI. Tlo I/O dovico can ro-inilialo llo domand lransfor by ro-

--

assorling DRQ(n). Iacl limo llo I/O dovico doassorls DRQ(n) llo busos
viII bo roIoasod lo llo microprocossor.
8. Transfor conlinuos in llis faslion unliI llo lransfor counl las boon ox-
lauslod.
-
Wlon a DMA clannoI is programmod lo oporalo in cascado modo, llis moans
llal il is connoclod lo anollor DMAC or lo an ISA bus maslor, rallor llan an
I/O dovico. Soo llo discussion of ISA bus masloring in llis claplor.

Rofor lo figuro 19-2. To gol moro llan four DMA clannoIs, lvo DMACs aro
cascadod logollor. Tlis is accompIislod by dosignaling ono of llo 8237s as llo
maslor and llo ollor as llo sIavo. Tlo HRQ (loId roquosl) oulpul of llo sIavo is
liod lo llo DRQ0 inpul of llo maslor (clannoI 4) and llo maslor's DAK0 oul-
pul is liod lo llo sIavo's HIDA (loId acInovIodgo) inpul. In llis vay, llo sIavo
usos llo maslor lo oblain conlroI of llo busos.

During IOST, clannoI zoro of llo maslor DMAC musl bo programmod for cas-
cado modo. Wlon llo sIavo roquiros llo uso of llo busos, il assorls ils HoId Ro-
quosl oulpul. Tlo maslor DMAC dolocls llo roquosl for llo busos and assorls
ils HRQ oulpul lo soizo llo busos from llo microprocossor. Wlon llo micro-
procossor surrondors llo busos and assorls HIDA, llo maslor DMAC assorls ils
DAK0 oulpul lo granl llo busos lo llo sIavo DMAC. Tlo maslor's DAK0
oulpul is connoclod lo llo sIavo's HIDA inpul. Il slouId bo nolod llal llo sig-
naIs inlorconnocling llo maslor and sIavo aro commonIy roforrod lo as DRQ4
and DAK4, ovon llougl lloy aro connoclod lo clannoI zoro on llo maslor
DMAC.

Tlo 8237 DMAC offors lvo lypos of soflvaro-soIoclabIo priorily sclomos:

. Tlo clannoIs aro fixod in priorily ordor basod upon llo do-
sconding vaIuo of lloir numbor. ClannoI 0 las llo liglosl priorily and
clannoI 3 las llo Iovosl priorily. Aflor llo rocognilion of any clannoI for
sorvico, llo ollor clannoIs aro provonlod from inlorforing vill llal sorvico
unliI il is compIolod.
. Tlo Iasl clannoI lo gol sorvico bocomos llo Iovosl prior-
ily clannoI vill llo priorily of llo ollors rolaling accordingIy. Tlis pro-
vonls any ono clannoI from monopoIizing llo syslom.

-


Boll DMACs in an ISA syslom aro dofauIl-programmod by llo IOST for fixod
priorily. As a rosuIl, llo liglosl priorily clannoI on boll llo sIavo and llo mas-
lor is clannoI zoro, foIIovod by clannoIs ono llrougl llroo. Tlis rosuIls in
maslor clannoI zoro laving llo liglosl priorily. Sinco maslor clannoI zoro is
roaIIy connoclod lo llo sIavo DMAC, llis moans llal llo sIavo's four DMA
clannoIs lavo llo liglosl priorily, vill clannoI zoro as liglosl and clannoI
llroo as llo Iovosl. ImmodialoIy foIIoving sIavo clannoI llroo, maslor clannoI
ono, aIso Inovn as clannoI fivo, is llo noxl liglosl, foIIovod by clannoIs six
and sovon (maslor clannoIs lvo and llroo).

--


- -
TC
TC
MRDC
MWTC
lORC
lOW C
HOLD
DAK7
DAK5
DRQ7
DRQ5
DAK0
DAK3
DAK2
DRQ0
DRQ3
DRQ2
DRQ6
DRQ1
DAK1
DAK6
HLDA
Slave
DMA
Controller
Master
DMA
Controller
DAK4
DRQ4
TC
AEN
AEN

-

-
Tlo 8237 is buiIl around a slalo maclino vill sovon possibIo slalos, oacl ono
DMA cIocI poriod vido. Wlon a DMAC is bus maslor, il usos ils ovn cIocI
vlon oxoculing bus cycIos. Tlis cIocI is roforrod lo as llo DMA cIocI and is
1/2 llo BCIK froquoncy. Doponding on llo unil and llo soIoclod procossor
spood, llis viII yioId a DMA cIocI of oillor 3MHz (6MHz IC/AT), or 4MHz
(8MHz ISA-compalibIo maclino) lo 4.165MHz (8.33MHz ISA-compalibIo ma-
clino).

TabIo 19-1 Iisls llo cIocI poriod for llroo possibIo BCIK spood sollings:



6MHz 3MHz 333.3ns
8MHz 4MHz 250ns
8.33MHz 4.166MHz 240ns

Irior lo rocoiving a DMA Roquosl, llo DMAC is in llo idIo slalo, Si. Wlon a
DRQ is sonsod, llo DMAC onlors a slalo vloro il assorls HOID (loId roquosl)
lo llo microprocossor and avails llo HIDA (loId acInovIodgo). Tlis slalo is
caIIod S0 (S zoro). Tlo DMAC romains in llo S0 slalo unliI HIDA is sonsod as-
sorlod.

Tlo DMAC can llon procood vill llo DMA lransfor. S1, S2, S3 and S4 aro llo
slalos usod lo oxoculo a lransfor (of a bylo or vord) bolvoon llo roquosling I/O
dovico and syslom momory. In addilion, vlon accossing a dovico llal is sIov lo
rospond, a DMA lransfor cycIo can bo slrolclod by doassorling llo DMAC's
RIADY inpul unliI llo dovico is roady lo compIolo llo lransfor. Tlis viII causo
llo DMAC lo insorl vail slalos, Sv, in llo bus cycIo unliI RIADY is assorlod
again.

TabIo 19-2 doscribos llo aclions llal laIo pIaco during slalos S1 llrougl S4. Soo
figuro 19-3 for llo acluaI liming of a singIo lransfor.


--

-
-
S1 During singIo lransfor modo, S1 is usod lo oulpul llo middIo bylo of llo
momory addross, A|15:8] during oacl lransfor. Tlo middIo bylo of llo
momory addross is oulpul onlo dala bus pins D|7:0]. Tlo DMAC aIso
puIsos ils addross slrobo (ADSTB) oulpul during S1 and on llo faIIing odgo
of ADSTB llo nov middIo bylo of llo addross lo bo Ialclod inlo llo oxlornaI
DMA addross Ialcl. Addross Iinos A|15:8] rocoivo llo middIo porlion of llo
addross during S2.

During bIocI and domand lransfors, llo middIo bylo of llo momory ad-
dross onIy clangos onco ovory 256ll lransfor. Ior llis roason, vlon in lloso
modos llo DMAC onIy onlors llo S1 slalo ovory 256ll lransfor lo updalo
llo middIo bylo of llo addross.
S2 During S2, llo Iovor bylo (A|7:0]) of llo momory addross is oulpul diroclIy
onlo llo addross bus, A|7:0]. Tlo DMAC's AIN oulpul is assorlod causing
llo oxlornaI DMA addross Ialcl lo oulpul llo middIo porlion of llo addross
and lo acl as an onabIo for llo DMA pago rogislor addrossing. Nolo llal
DMACs AIN pin is llo ISA bus AIN signaI. In addilion, DAKn is
assorlod lo loII llo I/O dovico llal llo lransfor is in progross.
S3 S3 viII onIy occur in a bus cycIo if comprossod liming lasn'l boon soIoclod
for llis DMA clannoI. Soo loxl boIov for a discussion of comprossod lim-
ing. During S3, llo MRDC or llo IORC Iino is assorlod. If llo DMA clan-
noI is programmod for oxlondod vrilos, llo MWTC or IOWC Iino is aIso
assorlod during S3.
S4 If llo DMA clannoI vas nol programmod for oxlondod vrilo, llo MWTC
or IOWC is assorlod al llo slarl of S4. If oxlondod vrilo lad boon soIoclod,
llo vrilo command Iino vas aIroady assorlod al llo slarl of S3. Tlo acluaI
road/vrilo laIos pIaco al llo lraiIing odgo of S4 vlon boll llo road and
vrilo command Iinos aro doassorlod by llo DMAC. Tlis compIolos llo
lransfor of a bylo or vord bolvoon momory and llo roquosling I/O dovico.

Wlon comprossod liming is soIoclod, S3 is oIiminalod from llo DMA lransfor
cycIo. Tlo onIy roaI purposo of S3 is lo aIIov llo road command Iino lo bo as-
sorlod for lvico llo duralion il is vlon comprossod liming is usod. Nol aII
momory and I/O dovicos viII loIoralo llis abbrovialod road command Iino, so
il musl bo usod cauliousIy.

Wlon oxlondod vrilo is soIoclod, il causos llo vrilo command Iino lo bo
assorlod during S3 rallor llan S4, offoclivoIy doubIing llo duralion of llo vrilo
command Iino's assorlod poriod.

-


Il slouId bo obvious llal oxlondod vrilo and comprossod liming aro muluaIIy
oxcIusivo bocauso S3 is ossonliaI for oxlondod vrilo and is oIiminalod vlon
comprossod liming is soIoclod.

-

--

--
ISA sysloms can porform bylo lransfors via sIavo clannoIs zoro llrougl llroo
and vord lransfors via maslor clannoIs fivo llrougl sovon. Tlo DMACs voro
dosignod lo landIo bylo lransfors, bul llo maslor DMAC is connoclod lo llo
addross bus in a vay llal aIIovs 16-bil lransfors.

Tlo addross oulpuls of llo maslor DMAC and ils associalod addross Ialcl and
pago rogislors aro connoclod lo SA|23:1]. SA0 is nol connoclod lo il. Tlis moans
llal llo programmor musl program llo maslor DMA momory addross rogislors
vill llo corrocl slarl addross for a vord lransfor. Ior oxampIo, lo accoss Ioca-
lion 1000l in momory, llo maslor DMACs momory addross rogislor vouId
nood lo bo programmod lo 0800l. Wlonovor llo maslor DMAC bocomos bus
maslor, Iogic oxlornaI lo llo DMAC assorls SBHI and forcos SA0 lo a 0 (ovon
addross) lo indicalo a vord lransfor. Nolo llal DMA clannoIs fivo llrougl
sovon can onIy porform 16-bil lransfors bocauso SA0 is aIvays sol lo zoro and
SBHI is aIvays assorlod vlon llo maslor DMAC oulpuls a momory addross.
Tlo sIavo DMAC and ils associalod momory addross and pago rogislors, on llo
ollor land, aro connoclod lo SA|23:0] and can lloroforo gonoralo boll ovon and
odd addrossos ono al a limo. Tlis givos DMA clannoIs zoro llrougl llroo llo
abiIily lo porform bylo-orionlod lransfors.
--
Iacl DMA clannoI can addross any momory Iocalion villin llo 16MB rango
from 000000l lo IIIIIIl. Tlis is accompIislod by using llo DMAC's 16-bil
Momory addross rogislors associalod vill oacl DMA clannoI in conjunclion
vill an 8-bil oxlornaI DMA pago rogislor. Tlis pair of rogislors associalod vill
oacl clannoI providos llo 24-bil momory addross capabiIily.

Tlo slarling addross in momory vloro dala is lo bo vrillon lo or road from
musl bo programmod inlo llo DMAC and llo clannoI's rospoclivo pago rogis-
lor prior lo boginning llo DMA lransfor. Tlo Iovor sixloon bils of llo addross
aro vrillon inlo llo clannoI's 16-bil momory addross rogislor insido llo DMAC
using lvo succossivo vrilo oporalions ovor ils 8-bil dala pall. TabIo 19-3 idonli-
fios llo I/O Iocalion associalod vill oacl clannoIs momory addross rogislor.
Tlo mosl significanl bylo of llo addross musl bo vrillon lo llo DMA clannoI's
rospoclivo pago rogislor. TabIo 19-3 aIso givos llo pago rogislor Iocalions.

-- -- -
-

-


Momory Addross
Rogislor I/O
Addross
00l 02l 04l 06l C0l C4l C8l CCl
Iago Rogislor I/O
Addross
87l 83l 81l 82l nono 8Bl 89l 8Al

Sinco llo DMAC las onIy oigll addross pins, il musl oulpul llo Iovor sixloon
bils of llo addross using boll A|7:0] and D|7:0]. Tlo Iovor bylo of llo momory
addross is oulpul onlo A|7:0], vliIo llo middIo bylo of llo momory addross is
oulpul onlo D|7:0].

Rofor lo figuro 19-4. Tlo sIavo DMAC firsl pIacos llo middIo bylo of llo ad-
dross (bils 15:8) on dala bus Iinos D|7:0]. Onco llo dala las slabiIizod, il is
Ialclod inlo llo oxlornaI addross Ialcl by llo addross slrobo signaI, ADSTB.
Tlo sIavo DMAC oulpuls llo Iovor bylo of llo momory addross onlo A|7:0]
and assorls AIN, onabIing boll llo addross Ialcl and llo clannoI's DMA pago
rogislor lo lransfor lloir conlonls lo addross Iinos A|15:8] and A|23:16] rospoc-
livoIy. (Nolo llal llo DMACs AIN pin is nol llo samo as llo ISA bus AIN
signaI.) Tlo approprialo DMA pago rogislor is soIoclod by llo DAKn Iino asso-
cialod vill llo clannoI in uso.

Rofor lo figuro 19-5. Tlo maslor DMAC firsl pIacos llo middIo bylo of llo ad-
dross (bils 16:9) on dala bus Iinos D|7:0]. Onco llo dala las slabiIizod, il is
Ialclod inlo llo oxlornaI addross Ialcl by llo addross slrobo signaI, ADSTB.
Tlo maslor DMAC oulpuls llo Iovor bylo of llo momory addross (bils 8:1)
onlo A|7:0] and assorls AIN, onabIing boll llo addross Ialcl and llo clannoI's
DMA pago rogislor lo lransfor lloir conlonls lo addross Iinos A|16:9] and
A|23:17] rospoclivoIy. Nolo llal llo DMACs AIN pin is nol llo samo as llo
ISA bus AIN signaI. Tlo approprialo DMA pago rogislor is soIoclod by llo
DAKn Iino associalod vill llo clannoI in uso.


--


--

-


- --

--

--
Rofor lo figuro 19-6. Tlo DMA conlroIIor (DMAC) rosidos on llo X-bus, and
musl bo capabIo of addrossing momory llal rosidos on llo ISA bus. To do llis
llo addross musl bo passod from llo X-bus lo llo SA bus. NormaIIy, vlon llo
main CIU is running bus cycIos llo buffor passos llo addross from llo SA bus
on lo llo X-bus lo addross llo I/O dovicos llal rosido on llo X-bus, lovovor,
vlon llo DMAC is llo bus maslor, addrossos producod by llo DMAC musl go
in llo opposilo diroclion. During DMA lransfors, llo DMAC's AIN oulpul
goos lo llo X-bus addross buffor lo clango llo diroclion of llo addross.

- --


-

-- -
ISA sysloms basod on 80386 or liglor microprocossors lypicaIIy lavo main sys-
lom momory on llo procossors IocaI bus. Tlis dosign aIIovs llo procossor lo
accoss momory al llo fuII spood and dala pall vidll of llo microprocossor.
Hovovor, llis dosign aIso croalos llo nood lo porform addross lransIalion and
dala bus slooring in ordor for llo DMAC lo accoss 32-bil momory. Rofor lo fig-
uro 19-7.
-- -
Data Bus Steering Logic

1st
Data Bus
Xcvr
2nd
Data Bus
Xcvr
3rd
Data Bus
Xcvr
4th
Data Bus
Xcvr
Address
Latch
LA Bus
Buffer
Bus
Control
Logic
W/R
D/C
M/lO
ADS
M16
lO16
M32
CPU READY
80386
DX
32-bit
System Memory

- MRDC
MWTC
lORC
lOWC
SA0
SA1
To 32-bit Memory
SBHE

--

Rofor lo figuro 19-8. Nolico aIso llal llo addross buffors in addilion lo llo X-
bus buffor musl bo rovorsod so llal llo addross can bo passod from llo X-bus
bus bacI lovard main momory. Tlis rovorsaI of llo buffor occurs vlonovor llo
main CIU givos up conlroI of llo busos (assorls llo HIDA signaI). Tlo HIDA
signaI causos llo buffors lo clango diroclion.
--


-

Tlo syslom addross usod by llo DMACs consisls onIy of SA|16:0]. Nolo llal
SA|16:2] pass llrougl llo buffor bacI lo syslom momory, vliIo SA0, SA1 and
SBHI musl bo convorlod lo BI|3:0] by llo bus conlroIIor. Tlo IA Iinos pass
llrougl a bi-diroclionaI buffor vloso diroclion is conlroIIod by HIDA. Wlon
llo CIU las conlroI of llo busos, llo buffor passos llo addross from llo CIU lo
llo ISA bus. Wlon llo CIU givos up ovnorslip of llo busos, llo diroclion is
rovorsod lo pass llo addross from llo ISA bus bacI lovard llo CIU and sys-
lom momory.
-- -
Sinco llo DMA subsyslom rosidos on llo X-bus (a subsol of llo ISA bus) il las
accoss onIy lo llo ISA bus and cannol suppIy llo 32-bil addross noodod by llo
32-bil momory. Tloroforo, llo bus conlroIIor musl bo dosignod lo lransIalo llo
8- or 16-bil addross from llo DMA subsyslom (SA|16:0], IA|23:17] and SBHI)
lo llo 32-bil addross (A|31:2] and BI|3:0]) roquirod by momory.

Addross Iinos SA0, SA1 and SBHI, normaIIy oulpuls from llo bus conlroIIor
vlon llo CIU is running bus cycIos, aro inpuls vlon DMA or bus maslors
ollor llan llo CIU aro running bus cycIos. Wlon llo HIDA signaI from llo
CIU bocomos assorlod, llo bus conlroIIor bogins lransIaling llo ISA lypo ad-
drossos lo 32-bil momory addrossos.
-
Tlo bus conlroIIor in ISA maclinos vill 32-bil momory subsysloms musl aIso
porform dala bus slooring lo onsuro propor oporalion vill DMA. Tlo MRDC
and MWTC Iinos aro usod by llo DMA subsyslom lo indicalo llo lypo of bus
cycIo boing run. Tloso command Iinos, aIong vill SA0, SA1 and SBHI, and
llo M32 sizo Iino aro usod by llo bus conlroIIor lo onsuro informalion lrans-
forrod bolvoon llo DMA subsyslom and llo 32-bil momory subsyslom is lrans-
forrod ovor llo corrocl pall(s). In ossonco, llo dala bus slooring roquirod by
DMA is llo oxacl invorso of llo dala bus slooring roquirod vlon an 80386 or
liglor microprocossor communicalos vill an 8- or 16-bil dovico. In llis in-
slanco, llo DMA conlroIIor is oillor an 8- or 16-bil dovico communicaling vill
32-bil momory, nocossilaling llo slooring.

--

-
TabIo 19-4 iIIuslralos llo lransfor spoods possibIo al llo llroo cIocI spoods un-
dor llo foIIoving condilions:

Comprossod liming lurnod off
Comprossod liming lurnod on

Tlo labIo assumos llal llo lransfor is no moro llan 256 DMA bus cycIos in
Iongll. Tlis vas dono for simpIicily's saIo. Onco for ovory 256 bus cycIos, llo
DMAC musl insorl an S1 slalo in llo bus cycIo lo updalo llo middIo bylo of llo
momory addross (A|16:9] for maslor DMAC or A|15:8] for sIavo DMAC),
vlicl musl bo Ialclod inlo llo oxlornaI DMA addross Ialcl. Tlis adds ono
DMA cIocI poriod lo llo Iongll of ovory 256ll bus cycIo. In slorl, labIo 19-4
givos ralos basod on DMA bus cycIos consisling of slalos S2, S3 and S4 (3 DMA
cIocI cycIos vill comprossod liming off) and slalos S2 and S4 (2 DMA cIocI cy-
cIos vill comprossod liming on). Using llo maslor DMAC, llo maximum
DMA lransfor ralo in an ISA syslom is 4.166MB/soc (16 bils limos 2.083M bus
cycIos por socond).

- -
-- --
DMA CIocI
Iroquoncy
3MHz 4MHz 4.166MHz 3MHz 4MHz 4.166MHz
Transfors por
Socond
1M/s 1.33M/s 1.39M/s 1.5M/s 2M/s 2.083M/s

During IOST, boll llo sIavo and maslor DMA conlroIIors aro iniliaIizod for
ISA oporalion. RocaII llal llo DMA conlroIIors aro programmod during IOST
lo oporalo in singIo modo, using fixod priorily, normaI liming, and aro cas-
cadod logollor via maslor clannoI zoro. Tvo rogislors aro programmod lo pro-
vido lloso ISA oporalionaI claraclorislics:

DMAC conlroI rogislor
DMAC modo rogislor

Tlo programming soquonco lypicaIIy usod is slovn in labIo 19-5. Ior a com-
pIolo dofinilion of oacl bil soo llo I/O addross map in llo appondix.

-


-
-

-



-



-
ConlroI 08l NormaI liming, fixod
priorily, DMAC on-
abIod, no momory-lo-
momory lransfors
D0l NormaI liming, fixod
priorily, DMAC on-
abIod, no momory-lo-
momory lransfors
Modo 0Bl ClannoI 0 - singIo
lransfor modo
D6l ClannoI 4 - cascado
modo
Modo 0Bl ClannoI 1 - singIo
lransfor modo
D6l ClannoI 5 - singIo
lransfor modo
Modo 0Bl ClannoI 2 - singIo
lransfor modo
D6l ClannoI 6 - singIo
lransfor modo
Modo 0Bl ClannoI 3 - singIo
lransfor modo
D6l ClannoI 7 - singIo
lransfor modo


- --


-
Tlo provious claplor oxpIains llo procoss, Iogic and liming of llo ISA DMA
subsyslom.
-
Tlis claplor covors ISA bus masloring. Tlo provious claplor on DMA providos
a foundalion for undorslanding ISA bus maslors, sinco bus maslors musl uso
llo DMA subsyslom lo gain conlroI of llo syslom busos.

Tlo noxl claplor oxpIains llo ISA impIomonlalion of llo roaI limo cIocI and
configuralion momory.
- -
Tlo microprocossor on llo syslom board is llo bus maslor mosl of llo limo in
ISA sysloms. Il is aIso possibIo for a card insorlod inlo an ISA oxpansion sIol lo
bocomo bus maslor, bul lloro is a major dravbacI. Wlon a card bocomos bus
maslor in a ISA syslom, il can romain bus maslor as Iong as il Ioops llo micro-
procossor's HOID Iino assorlod. Tloro aro no safoly moclanisms buiIl inlo a
IC/AT or compalibIo lo provonl a bus maslor card from monopoIizing llo uso
of llo busos lo llo oxcIusion of llo microprocossor on llo syslom board, llo
RAM rofrosl Iogic and polonliaI bus maslor cards insorlod inlo ollor oxpansion
sIols.

Rofor lo figuro 20-1. In ordor lo gain ovnorslip of llo busos, llo roquosling do-
vico musl bo inlorfacod lo llo syslom board via DMA clannoI 5, 6 or 7. Tloso
aro llo clannoIs connoclod lo llo maslor 8237 DMAC on llo syslom board.
Irior lo roquosling llo uso of llo busos, llo rospoclivo clannoI of llo maslor
DMAC musl bo programmod for cascadod oporalion (lo indicalo llal a sIavo
DMAC is allaclod lo llal clannoI). In llis caso llo ISA bus maslor viII bo al-

-

laclod lo llo cascado clannoI rallor llan a sIavo DMAC. Wlon llo DMA ac-
InovIodgo is sonl lo llo bus maslor il las boon granlod conlroI of llo busos
and viII mainlain ovnorslip unliI llo DMA roquosl is roIoasod.

- -
TC
TC
MRDC
MWTC
lORC
lOW C
HOLD
DAK7
DAK5
DRQ7
DRQ5
DAK0
DAK3
DAK2
DRQ0
DRQ3
DRQ2
DRQ6
DRQ1
DAK1
DAK6
HLDA
Slave
DMA
Controller
Master
DMA
Controller
DAK4
DRQ4
TC
AEN
AEN

- --

Wlon llo ISA oxpansion board vislos lo roquosl llo uso of llo busos, llo foI-
Ioving soquonco of aclions laIos pIaco:

1. Tlo roquosling dovico assorls ils rospoclivo DRQ Iino.
2. Tlo Maslor 8237 DMAC assorls HOID (loId roquosl) lo llo microprocos-
sor lo roquosl llo uso of llo busos.
3. Wlon llo microprocossor's bus unil compIolos llo curronl bus cycIo, llo
microprocossor fIoals llo busos and assorls HIDA (loId acInovIodgo) lo
inform llo maslor DMAC llal il is nov llo bus maslor.
4. Upon sonsing llo HIDA, llo maslor DMAC assorls llo DAK Iino (DMA
acInovIodgo) associalod vill llo DRQ Iino from llo roquosling bus maslor
card.
5. Tlo roquosling ISA oxpansion board is nov llo bus maslor and can run bus
cycIos lo communicalo vill ollor syslom dovicos.
6. Tlo ISA bus maslor card musl assorl llo MASTIR16 signaI if il vislos lo
accoss I/O dovicos. Wlon llo CIU assorls llo HIDA signaI, llo AIN sig-
naI is assorlod, disabIing aII I/O addross docodors. Tlis provonls I/O do-
vicos from mislaIing llo momory addross as lloirs during DMA lransfors
(soo llo claplor onlilIod Dirocl Momory Accoss (DMA) for dolaiIs). As-
sorling MASTIR16 causos llo AIN signaI lo bocomo doassorlod, lloroby
onabIing aII I/O addross docodors.
7. Wlon llo oxpansion dovico las compIolod ils uso of llo busos, il musl
doassorl ils DRQ Iino.
8. Upon sonsing llal DRQ is doassorlod, llo maslor DMAC on llo syslom
board viII doassorl DAK and HOID.
9. Tlo microprocossor viII doassorl HIDA and ro-allacl ilsoIf lo llo busos.
- -- --
ISA sysloms basod on 80386DX and liglor microprocossors lypicaIIy lavo
main syslom momory on llo procossors IocaI bus. Tlis dosign aIIovs llo proc-
ossor lo accoss momory al llo fuII spood and dala pall vidll of llo microproc-
ossor. Hovovor, llis dosign aIso croalos llo nood lo porform addross
lransIalion and dala bus slooring in ordor for llo ISA bus maslor lo accoss 32-
bil momory. Rofor lo figuro 20-2.


-


- - -- -

Rofor lo figuro 20-3. Nolico aIso llal llo addross buffors musl bo rovorsod so
llal llo addross can bo passod from llo ISA bus bacI lovard main momory.
Tlis rovorsaI of llo buffor occurs vlonovor llo main CIU givos up conlroI of
llo busos (assorls llo HIDA signaI). Tlo HIDA signaI causos llo buffors lo
clango diroclion. ISA bus maslors gonoralo addrossos using llo foIIoving ISA
addross Iinos:

Data Bus Steering Logic

1st
Data Bus
Xcvr
2nd
Data Bus
Xcvr
3rd
Data Bus
Xcvr
4th
Data Bus
Xcvr
Address
Latch
LA Bus
Buffer
Bus
Control
Logic
W/R
D/C
M/lO
ADS
M16
lO16
M32
CPU READY
80386
DX
32-bit
System Memory

-
MRDC
MWTC
lORC
lOWC
MASTER16
SA0
SA1
To 32-bit Memory
SBHE

- --

SA|16:0]
SBHI
IA|23:17]


-- - --

-


Tlo syslom addross usod by ISA bus maslors consisls onIy of SA|16:0]. RocaII
llal SA0, SA1 and SBHI aro convorlod lo BI|3:0] by llo bus conlroIIor. OnIy
SA|16:2] pass llrougl llo buffor bacI lo syslom momory.

Tlo IA Iinos pass llrougl a bi-diroclionaI buffor vloso diroclion is conlroIIod
by HIDA. Wlon llo CIU las conlroI of llo busos, llo buffor passos llo ad-
dross from llo CIU lo llo ISA bus. Wlon llo CIU givos up ovnorslip of llo
busos, llo diroclion is rovorsod lo pass llo addross from llo ISA bus bacI lo-
vard llo CIU and syslom momory.
-- -
Sinco ISA bus maslor rosido on llo ISA bus lloy lavo accoss onIy lo llo ISA bus
and cannol suppIy llo 32-bil addross noodod by llo 32-bil momory. Tlo bus
conlroIIor musl bo dosignod lo lransIalo llo 16-bil addross from llo bus maslor
(SA|16:0], IA|23:17] and SBHI) lo llo 32-bil addross (A|31:2] and BI|3:0])
roquirod by momory.
Addross Iinos SA0, SA1 and SBHI, normaIIy oulpuls from llo bus conlroIIor
vlon llo CIU is running bus cycIos, aro inpuls vlon a bus maslor ollor llan
llo CIU is running bus cycIos. Wlon llo HIDA signaI from llo CIU bocomos
assorlod, llo bus conlroIIor bogins lransIaling llo ISA lypo addrossos lo 32-bil
momory addrossos.
-
Tlo bus conlroIIor in ISA maclinos vill 32-bil momory subsysloms musl aIso
porform dala bus slooring lo onsuro propor oporalion vill ISA bus maslors.
Tlo MRDC and MWTC Iinos aro usod by ISA bus maslors lo indicalo llo
lypo of bus cycIo boing porformod. Tloso command Iinos, llo slalus of addross
Iinos SA0, SA1 and SBHI, and llo M32 sizo Iino aro usod by llo bus conlroI-
Ior lo onsuro llal informalion lransforrod bolvoon llo bus maslor and 32-bil
momory subsyslom is lransforrod ovor llo corrocl pall(s). In ossonco, llo dala
bus slooring roquirod by ISA bus maslors is llo oxacl invorso of llo dala bus
slooring roquirod vlon a 80386DX or liglor microprocossor communicalos
vill a 16-bil dovico. In llis inslanco, llo bus maslor is a 16-bil dovico commu-
nicaling vill 32-bil momory.

- --

- -- -
Sinco DRAM rofrosl is usuaIIy landIod by llo rofrosl Iogic on llo syslom
board, DRAM viII slarl lo Ioso informalion if il is nol rofroslod villin llo ro-
frosl inlorvaI spocifiod by llo DRAM clip manufacluror. Tlo syslom board ro-
frosl Iogic rofroslos ono rov ovory fifloon microsoconds. Tlo rofrosl Iogic
roquiros llo uso of llo busos lo accompIisl llis lasI. Il slouId bo nolod llal an
ISA bus maslor llal conlroIs llo busos for any poriod of limo slouId bo pro-
parod lo landIo DRAM rofrosl. Tlo bus maslor slouId oillor givo up ovnor-
slip of llo busos a Ioasl ovory 15 microsoconds or slouId roquosl llal a rofrosl
cycIo bo run ovory 15 microsoconds.

ISA bus maslors can lriggor llo rofrosl Iogic lo run a rofrosl bus cycIo by as-
sorling llo RIIRISH signaI. Tlo rofrosl Iogic normaIIy assorls llo RIIRISH
signaI vlon running a bus cycIo lo inform DRAM addross docodors llal a ro-
frosl cycIo is in progross, lovovor, llo RIIRISH signaI aIso acls as an inpul
lo llo rofrosl Iogic lo provido ISA bus maslors vill a moans lo lriggor a rofrosl
bus cycIo. Nolo llal ISA bus maslors do nol givo up ovnorslip of llo busos
during llo rofrosl cycIo, bul musl vail unliI llo rofrosl cycIo compIolos boforo
conlinuing uso of llo busos. Tlo slops invoIvod in lriggoring a rofrosl cycIo via
bus masloring is as foIIovs:

1. RIIRISH is assorlod by llo bus maslor. Tlo bus maslor viII nol uso llo
busos again unliI llo rofrosl cycIo las boon compIolod.
2. Tlo rofrosl Iogic soos llo RIIRISH signaI bocomo assorlod and slarls a
rofrosl bus cycIo.
3. Tlo rofrosl Iogic oulpuls llo Iovor porlion of llo addross lo idonlify a rov
of momory lo bo rofroslod, aIong vill llo MRDC Iino.
4. Tlo ISA bus maslor valclos for llo MRDC Iino lo bocomo doassorlod in-
dicaling llal llo rofrosl cycIo las ondod.
5. Tlo bus maslor conlinuos lo run bus cycIos.





-
Tlo provious claplor providod a dolaiIod doscriplion of syslom supporl ro-
quirod for ISA bus maslors lo funclion in various ISA maclinos.
-
Tlis claplor doscribos llo oporalion and usago of llo roaI-limo cIocI and con-
figuralion RAM found in aII ISA maclinos.

Tlo noxl claplor, Koyboard/Mouso Inlorfaco, doscribos llo inlorfaco bo-
lvoon llo Ioyboard and mouso and llo syslom.

Mosl ISA maclinos conlain oillor a MoloroIa MC146818 roaI-limo cIocI and
configuralion RAM clip or a DaIIas Somiconduclor oquivaIonl. Tloso clips
consisl of lvo funclionaI aroas:

1. 64 Iocalions of CMOS Iov povor RAM momory llal rolains slorod infor-
malion aflor povor-dovn via a ballory bacIup. In llo caso of llo MoloroIa
vorsion, llo ballory is oxlornaI, vloroas llo DaIIas Somiconduclor clip las
llo ballory buiIl in. Tlis moans llal llo DaIIas Somiconduclor clip musl bo
ropIacod approximaloIy ovory lon yoars.
2. Tlo roaI-limo cIocI funclion aulomalicaIIy Ioops lracI of llo dalo and limo.

An oxlornaI, 32.768KHz cryslaI osciIIalor suppIios llo RTC clip's limobaso. Tlo
firsl lon RAM Iocalions aro usod by llo roaI-limo cIocI funclion lo Ioop lracI of
llo dalo (day and monll) and limo. Tlo noxl four Iocalions aro usod lo conlroI
llo roaI-limo cIocI funclion. Tlo romaining fifly Iocalions aro usod lo sloro sys-
lom configuralion informalion and llo conlury porlion of llo dalo.

-

-- -
Via a lvo-slop procoss, RAM Iocalions insido llo clip aro accossod using I/O
oporalions.

1. Tlo programmor firsl idonlifios vlicl of llo 64 RAM Iocalions is lo bo ac-
cossod by vriling llo RAM addross lo I/O porl 70l, llo clip's addross
porl. Tlo addross musl bo in llo rango from 00l lo 3Il. Caulion slouId bo
oxorcisod vlon vriling llo addross lo porl 70l bocauso porl 70l las a soc-
ond funclion bil 7 conlroIs llo onabIing or disabIing of NMI inlorrupls
lo llo microprocossor (0 = onabIo NMI).
2. Noxl, llo programmor oillor roads llo conlonls of llo proviousIy idonlifiod
CMOS RAM Iocalion from llo clip's dala porl, I/O porl 71l, or vrilos llo
dosirod dala bylo lo llo dala porl.

As an oxampIo, llo propor soquonco lo road llo conlonls of CMOS RAM Ioca-
lion fivo vouId bo:

1. Wrilo llo RAM addross, 05, lo llo addross porl al I/O porl 70l.
2. Road RAM Iocalion 5's conlonls by porforming an I/O road from llo dala
porl, I/O porl 71l.

Caulion musl bo oxorcisod lo aIvays foIIov a vrilo lo llo addross porl vill oi-
llor a road from or a vrilo lo llo dala porl. IaiIuro lo do so may rosuIl in unro-
IiabIo oporalion of llo roaI-limo cIocI.
-- -
Iiguro 21-1 providos a basic viov of llo RTC clip's inlorfaco lo llo syslom. Tlo
RTC's addross docodor is dosignod lo gonoralo ono of llroo possibIo clip-
soIocls lo llo RTC clip:

. Addross vrilo is gonoralod vlonovor llo addross docodor do-
locls an I/O vrilo lo porl 70l, llo RTC's addross porl. Wlon ADSWR goos
ligl, llo RTC clip accopls llo dala from llo Iovor dala pall, D|7:0], and
Ialclos il inlo ils addross porl. Tlis idonlifios llo CMOS RAM Iocalion lo
bo communicalod vill during a subsoquonl road from or vrilo lo llo dala
porl (I/O porl 71l).
Dala road is gonoralod vlonovor llo addross docodor dolocls
an I/O road from porl 71l, llo RTC's dala porl. Wlon DATARD goos
Iov, llo RTC clip roads llo dala from llo CMOS RAM Iocalion idonlifiod



by llo addross curronlIy in ils addross porl. Tlo dala is pIacod onlo llo
Iovor dala pall, D|7:0], lo bo road by llo microprocossor.
Dala vrilo is gonoralod vlonovor llo addross docodor dolocls
an I/O vrilo lo porl 71l, llo RTC's dala porl. Wlon DATAWR goos Iov,
llo RTC clip accopls llo dala from llo Iovor dala pall, D|7:0], and sloros
il inlo llo CMOS RAM Iocalion idonlifiod by ils addross porl.



Tlo firsl lon RAM Iocalions aro usod by llo roaI-limo cIocI funclion and aro do-
finod in labIo 21-1.

-
--
0 Soconds
1 Soconds AIarm
2 Minulos
3 Minulos AIarm
4 Hours
5 Hours AIarm
6 Day of WooI
7 Dalo of Monll
8 Monll
9 Yoar

ADSWR
DATAWR
DATARD
32.768KHz
Real-
Time
Clock
lRQ8
Alarm

-


Iocalions 1, 3 and 5 can bo usod lo spocify an aIarm ovonl lo occur onco por
day (IRQ8 viII bo gonoralod).

Iocalions Al llrougl Dl aro roforrod lo as slalus rogislors A llrougl D and
aro usod lo conlroI llo oporalionaI claraclorislics of llo roaI-limo cIocI func-
lion. TabIos 21-2 llrougl 21-5 dofino llo funclion of llo bils in llo four roaI-
limo cIocI slalus rogislors.

- -
- -
7 --. Wlon sol lo 1, indicalos llal llo clip is updaling llo
limo and dalo.
6:4 . Indicalo limobaso in uso. AIvays sol lo 010b lo indicalo a
32.768KHz limobaso.
3:0 - -. AIIov soIoclion of an oulpul froquoncy. Sol lo 0110b,
soIocls a 1.024KHz squaro-vavo oulpul froquoncy and a 976.562 microsoc-
ond Ioriodic Inlorrupl ralo.


- -
- -
7 . Wlon 0, llis bil aIIovs llo dalo/limo lo bo updalod normaIIy al llo
ralo of onco por socond. Wlon sol lo a 1, updalos aro disaIIovod and llo
programmor may clango llo dalo and limo villoul inlorforonco from up-
dalos.
6 . Wlon sol lo 1, aIIovs IRQ8 lo occur al llo
1.024KHz ralo spocifiod in slalus rogislor A. Tlis bil is normaIIy 0.
5 Wlon sol lo 1, llis bil aIIovs an IRQ8 lo bo gonor-
alod al llo soIoclod aIarm dalo/limo. Tlis bil is normaIIy 0.
4 Wlon sol lo 1, llo clip viII gonoralo an
IRQ8 oacl limo a dalo/limo updalo is compIolod in llo dovico's RAM. Tlis
bil is normaIIy 0.
3 Wlon sol lo 1, llis bil onabIos llo gonoralion of llo
oulpul froquoncy soIoclod in slalus rogislor A. Tlis bil is normaIIy 0.
2 . Tlis bil dofinos vlollor llo dalo and limo viII bo roprosonlod
in Binary or BCD formals. A 1 soIocls binary modo. Tlis bil is normaIIy 0.
1 Tlis bil dofinos vlollor llo lours bylo is prosonlod in 24 or
12 lour formal. A 1 soIocls 24-lour modo. Tlis bil is normaIIy 1.
0 -- A 1 onabIos dayIigll-savings limo modo. Tlis
bil is normaIIy 0.



- -
- -
7 - . Tlis bil is sol lo a 1 vlon llo clip las gonoralod an
inlorrupl on IRQ8. Bils 4, 5 and 6 of llis rogislor may llon bo clocIod lo
ascorlain llo causo of llo inlorrupl.
6 Sol lo 1 vlon an poriodic inlorrupl is gonoralod.
5 Sol lo 1 vlon an aIarm inlorrupl is gonoralod.
4 Sol lo 1 vlon an updalo-ondod inlorrupl is
gonoralod.
3:0 Nol Usod.


- -
- -
7 . Wlon sol lo 0, indicalos llal llo ballory is doad or discon-
noclod and RAM dala las lloroforo boon Iosl.
6:0 Nol Usod.

-
Tlo rocommondod mollod for conlroIIing llo roaI-limo cIocI clip is llrougl
BIOS funclion caIIs. INT 1Al can bo usod lo caII llo limo-of-day BIOS roulino.
A compIolo doscriplion of llis BIOS roulino's usago can bo found in oillor of
llo foIIoving pubIicalions:

- pub-
Iislod by IBM.
- - - - by Iloonix
ToclnoIogios Ild., pubIislod by Addison-WosIoy.

-

-
TabIo 21-6 dofinos llo ISA-slandard usago of llo fifly configuralion RAM Ioca-
lions in llo MC146818 clip.

-
- -

Diagnoslic Slalus Bylo

Rosol Codo Bylo

DisIollo Drivo Typo Bylo

Rosorvod

Iixod DisI Drivo Typo Bylo

Rosorvod

Iquipmonl InslaIIod Bylo



Iov and Higl Baso Momory Bylos

Iov and Higl Ixlondod Momory Bylos

Rosorvod

AddilionaI IIags

ClocIsum VaIuo

Momory abovo 1MB

Conlury parl of limo and dalo funclion

Syslom informalion

Rosorvod

TabIo 21-7 idonlifios llo vaIid vaIuos llal may bo slorod in llo rosol codo bylo
al CMOS RAM Iocalion 0Il. Wlonovor llo microprocossor is rosol, il bogins
oxoculing llo IOST again. Al llo boginning of llo IOST, llo program roads llo
rosol codo bylo from CMOS RAM lo dolormino llo courso of aclion lo bo laIon.




-

NormaI Iovor-Up rosol or ConlroI-AIlornalo-DoIolo rosol, doponding on


llo vaIuo of llo rosol fIag vord in momory al Iocalion 0040:0072. Wlon llo
rosol fIag conlains llo vaIuo 1234l, llo IOST momory losl is sIippod.

IOST is sIippod. Causos DOS lo bo Ioadod from disI.

IOST is sIippod and momory prosorvod. Tlo 80286 microprocossor cannol


bo svilclod from proloclod modo inlo roaI modo villoul rosolling llo
procossor. Tlis prosonls probIoms vlon llo programmor vislos lo lompo-
rariIy svilcl lo proloclod modo lo accoss oxlondod momory and llon
svilcl bacI inlo roaI modo lo conlinuo oxoculion. Wlon a program musl
lomporariIy Ioavo roaI modo and onlor proloclod modo, llo programmor
firsl sloros a four bylo momory addross (poinlor) inlo momory Iocalion
0040:0067. Tlis poinlor spocifios llo addross al vlicl roaI modo oxoculion
viII rosumo. Having dono llis, llo program may svilcl llo procossor inlo
proloclod modo and accoss oxlondod momory. Upon compIoling llo pro-
loclod modo funclion, llo programmor musl pIaco llo vaIuo 05l or 0Al
inlo llo rosol codo bylo in CMOS RAM and llon rosol llo 80286 microproc-
ossor. Wlon rosol goos avay, llo procossor is in roaI modo and bogins oxo-
culing llo IOST. Tlo IOST codo clocIs for a 05l or a 0Al in llo rosol codo
bylo, and, if prosonl, jumps lo llo momory addross spocifiod in momory
slarling al Iocalion 0040:0067 lo rosumo oxoculion al llo poinl vloro il Iofl
off in roaI modo. In addilion, if llo rosol codo bylo vaIuo is 05l, an IOI
command is issuod lo llo inlorrupl conlroIIor.

BIocI-movo rolurn. Tlis vaIuo is pIacod in llo rosol codo bylo by a BIOS
caII lo INT 15l lo movo a bIocI of informalion bolvoon convonlionaI and
oxlondod momory. In ordor lo accompIisl llis movo, llo procossor musl
svilcl inlo proloclod modo. On an 80286-basod syslom, llo INT 15l rou-
lino sols llo rosol codo bylo lo 09l prior lo rosolling llo procossor lo rolurn
lo roaI modo aflor llo bIocI movo. Wlon rosol, llo procossor slarls oxocul-
ing llo IOST, clocIs llo rosol codo bylo vaIuo, and llon porforms an inlor-
rupl rolurn, or IRIT, inslruclion lo rolurn lo llo originaI program aflor
compIolion of llo caII lo llo INT 15l BIOS roulino.

}ump lo rosol voclor 0040:0067 villoul issuing IOI. Soo llo oxpIanalion for
rosol codo bylo = 05l.

Il slouId bo nolod llal sysloms basod on llo 80386 and liglor microprocossors
can svilcl from proloclod modo lo roaI modo villoul rosolling llo procossor
(by lurning off llo II bil in llo MSW rogislor).


-


-
Tlo mollods of communicalion ovor llo ISA bus lavo boon covorod, incIuding
road and vrilo oporalions, inlorrupl drivon communicalion vill I/O dovicos,
DMA communicalion bolvoon momory and I/O, and bus masloring.
-
Tlo inlorfaco for llo Ioyboard conlroIIor is impIomonlod using an InloI 8042 so-
rios microconlroIIor Inovn as a univorsaI poriploraI inlorfaco. Tlis dovico aIso
sorvos ollor miscoIIanoous syslom funclions. Tlis claplor discussos llo 8042
impIomonlalion of llo combinalion Ioyboard/mouso inlorfaco and llo slan-
dard ISA funclions landIod by llis inlorfaco.

Tlo noxl claplor oxpIains llo inlorfaco bolvoon llo microprocossor and nu-
moric coprocossor. Tlo InloI 80287, 80387 and llo WoiloI coprocossors aro cov-
orod.
-
Ivory ISA syslom incIudos a Ioyboard inlorfaco on llo syslom board and somo
sysloms impIomonl a combinod Ioyboard/mouso inlorfaco. Boll impIomonla-
lions consisl of an InloI 8042 microcompulor vill ils ovn RAM, ROM and I/O.
Tlo 8042 is a soIf-conlainod compulor syslom llal llo syslom board microproc-
ossor communicalos vill using lvo I/O rogislors.

Tlo 8042 communicalos vill llo Ioyboard and llo mouso using lvo indo-
pondonl soriaI inlorfacos. Tlo Ioyboard and llo mouso boll rocoivo lloir
povor from llo syslom board.

Tlo 8042 microprocossor las addilionaI inpul and oulpul pins llal can bo usod
for ollor funclions. Iour of llo oulpul funclions aro ISA spocific: IRQ1 (llo

-

Ioyboard inlorrupl roquosl), IRQ12 (llo mouso inlorrupl roquosl), Hol Rosol
and A20 Galo. Tloso signaIs aro covorod in dolaiI Ialor in llis claplor. Ollor
inpul and oulpul funclions may aIso bo found in ISA sysloms bul aro manufac-
luror spocific.

Tlo Ioy svilclos aro Iaid oul in rovs and coIumns villin llo Ioyboard. An-
ollor 8042 (or a dodicalod parl sucl as an 8052) conlroIIor rosidos in llo Ioy-
board and is conslanlIy scanning llo Ioy malrix lo soo if a Ioy las boon
prossod. Wlon a Ioy is prossod, llo 8042 croalos an 8-bil scan codo llal ropro-
sonls llo Ioy prossod. Tlis codo is commonIy roforrod lo as llo maIo codo.
Tlo scan codo is llon convorlod lo a soriaI bil slroam and sonl lo llo Ioy-
board/mouso inlorfaco on llo syslom board. Wlon llo Ioy is roIoasod, anollor
scan codo is gonoralod and is caIIod llo broaI codo.

Onco an onliro 8-bil scan codo las boon rocoivod, llo Ioyboard/mouso inlor-
faco gonoralos an IRQ1 inlorrupl roquosl lo aIorl llo microprocossor. Tlo mi-
croprocossor jumps lo llo Ioyboard inlorrupl sorvico roulino and an I/O road
from dala porl 60l is porformod lo road llo scan codo from llo 8042 on llo sys-
lom board. IRQ1 romains assorlod unliI llo scan codo is road and is llon
aulomalicaIIy doassorlod.
-
IiIo llo Ioyboard, llo mouso gonoralos an 8-bil codo llal is landIod in llo
samo mannor by llo Ioyboard/mouso inlorfaco. Wlon llo mouso codo is ro-
coivod by llo inlorfaco, il gonoralos an IRQ12 lo aIorl llo microprocossor llal a
bylo is roady lo bo lransforrod.
-
Rofor lo figuro 22-1. Tlo Ioyboard conlroIIor's inpul and oulpul porls lavo ad-
dilionaI Iinos llal can bo usod for ollor funclions bosidos llo Ioyboard and
mouso inlorfaco. Many oIdor ISA sysloms uso llo IocaI inpul porls lo road sys-
lom configuralion informalion from svilclos or jumpors. Tloso inpuls aro do-
finod in various vays and aro manufacluror dopondonl. Hovovor, llo
Ioyboard conlroIIor oulpul signaIs HOT RISIT and A20 GATI aro ISA spocific
and virluaIIy aII manufaclurors impIomonl lloso oulpuls in ordor lo romain
compalibIo. Iiguro 22-1 slovs llo slandard usos of llo IocaI porls.

-




-
Tlo 80286 microprocossor musl bo rosol lo clango llo procossor from proloclod
bacI lo roaI modo. Hol Rosol causos llo CIU onIy rosol noodod lo clango llo
microprocossor from proloclod lo roaI modo. Wriling a IIl lo I/O porl 64l, llo
Ioyboard command porl, causos llo HOT RISIT Iino lo bo puIsod. Rofor lo llo
claplor onlilIod Tlo 80286 Microprocossor for addilionaI informalion on
clanging from proloclod bacI lo roaI modo.

Doponding on llo sclomalic, A20 GATI may bo caIIod A20MASK, IASS A20,
IORCI A20, olc., aII of vlicl appIy lo llo samo funclion and signaI. Wlon
doassorlod, A20 GATI inlibils llo gonoralion of addross Iino A20 during roaI

-

modo oporalion, maIing llo 80286 and liglor microprocossors compalibIo
vill llo sogmonl vrap-around llal occurs on 8086 and 8088 microprocossors.
Nolo llal llo poIarily of llo signaI affocls ils moaning. Wloroas A20 GATI
vouId bo assorlod lo pass A20 from llo microprocossor lo momory,
A20MASK vouId bo doassorlod lo do llo samo lling.

Tlo 8042 microconlroIIor las llroo IocaI porls llal aro usod in mosl configura-
lions as slovn in figuro 22-2. Tloso porls incIudo:

An 8-bil inpul porl usod for Ioyboard dala, mouso dala and miscoIIanoous
inpuls.
An 8-bil oulpul porl usod for Ioyboard dala, mouso dala, Hol Rosol, A20
Galo and miscoIIanoous oulpuls.
A 2-bil losl porl usod lo road llo Ioyboard and mouso cIocI signaIs.


-
-
-
-
-


-

-


-

-
-


-
- -


-

Nolo llal lloso dofinilions aro lypicaI of llo Ioyboard/mouso inlorfaco. Uso of
lloso porls vary doponding on llo spocific impIomonlalion. TabIos 22-1
llrougl 22-3 provido sampIo bil assignmonls for llo 8042's IocaI I/O porls.

-
-
7:2 Nol usod.
1 Mouso Dala inpul Iino.
0 Koyboard Dala inpul Iino.


-
-
7 Koyboard Dala oulpul Iino
6 Koyboard CIocI oulpul Iino
5 IRQ12
4 IRQ1
3 Mouso CIocI oulpul Iino
2 Mouso Dala oulpul Iino
1 Galo Addross Bil 20
0 Rosol microprocossor (Gonoralos Hol Rosol)


- -
- -
0 Koyboard CIocI inpul
1 Mouso CIocI inpul
-
Tlo microprocossor usos lvo I/O rogislors lo communicalo vill llo 8042 Ioy-
board/mouso inlorfaco:

Command/Slalus Iorl 64l
Dala In/Oul Iorl 60l

-

-
To command llo Ioyboard/mouso inlorfaco (llo 8042) lo porform a lasI, llo
microprocossor usos an I/O vrilo lo sond llo command lo llo 8042. Tlo 8042
microcompulor's ROM program llon inlorprols llo command and jumps lo llo
approprialo subroulino (sorios of inslruclions) lo accompIisl llo roquoslod lasI.

Tlo microprocossor issuos commands lo llo Ioyboard/mouso command porl
al I/O addross 0064l. TabIo 22-4 providos a Iisl of lypicaI commands llal can
bo sonl lo llo 8042 Ioyboard/mouso inlorfaco's command porl. Tlo prociso
commands usod by a parlicuIar syslom can vary doponding on llo foaluros
buiIl inlo llo syslom. Ior oxampIo, nol aII sysloms supporl llo passvord foa-
luro llal is found in llo Iisl. In slorl, llo commands Iislod in labIo 22-4 viII nol
nocossariIy malcl llo commands found in aII ISA sysloms. Somo sysloms viII
nol supporl aII of llo commands found in llis Iisl, vliIo ollors may incIudo
addilionaI commands.

Nolo llal llo command porl aIIovs llo microprocossor lo indiroclIy road from
and vrilo lo llo Ioyboard/mouso inlorfaco's IocaI porls. Ior oxampIo, lo road
llo conlonls of llo IocaI inpul porl roquiros llal a C0l bo firsl vrillon lo llo
command porl (64l). Tlis command causos llo vaIuos al llo IocaI inpul porl lo
bo sonl lo llo dala porl (60l) vloro lloy can llon bo road by llo microprocos-
sor.

Tlis command porl can aIso bo road lo oblain slalus informalion from llo Ioy-
board/mouso inlorfaco.


-

- -



-
20 lo
3I
Bils 5 llrougl 0 of llis command dosignalo ono of 64 possibIo 8042 inlornaI
RAM Iocalions lo bo road. As an oxampIo, 23l causos inlornaI RAM Iocalion
03l lo bo road. Ils conlonls aro pIacod in llo dala porl al I/O addross 0060l
so llo microprocossor can road il.
60 lo
7I
Bils 5 llrougl 0 of llis command dosignalo ono of 64 possibIo 8042 inlornaI
RAM Iocalions lo bo vrillon. Tlo noxl bylo vrillon lo llo dala porl al I/O
addross 0060l is vrillon lo llo dosignalod inlornaI RAM Iocalion. As an
oxampIo, 63l causos inlornaI RAM Iocalion 03l lo bo vrillon. Tlo noxl bylo
vrillon lo llo dala porl al I/O addross 0060l is vrillon lo llo dosignalod
Iocalion.
A4 Tosl passvord inslaIIod. Tlis command clocIs for a passvord inslaIIod in
llo 8042's inlornaI RAM. IAl is pIacod in llo dala porl al I/O addross
0060l if llo passvord is inslaIIod. A I1l indicalos il isn'l inslaIIod.
A5 Ioad passvord. Inilialos llo passvord Ioad procoduro. Tlo 8042 llon ac-
copls inpul from llo dala porl al I/O addross 0060l unliI a nuII (00l) is ro-
coivod.
A6 InabIo passvord foaluro.
A7 DisabIo mouso Inlorfaco.
A8 InabIo mouso Inlorfaco.
A9 Mouso inlorfaco losl. Tosls llo mouso cIocI and dala Iinos. RosuIl is pIacod
in llo 8042's dala porl al I/O addross 0060l.
AA SoIf-losl. Runs an 8042 soIf-losl. 55l pIacod in llo dala porl al I/O addross
0060l if no orrors aro doloclod.
AB Koyboard inlorfaco losl. Tosls llo Ioyboard cIocI and dala Iinos. RosuIl is
pIacod in llo 8042's dala porl al I/O addross 0060l.
AD DisabIo Ioyboard inlorfaco.
AI InabIo Ioyboard inlorfaco.
C0 Road inpul porl. AIIovs llo programmor lo road llo conlonls of llo 8042's
IocaI inpul I/O porl. Tlo rosuIl is pIacod in llo dala porl al I/O addross
0060l.
C1 IoII inpul porl Iov. Bils 3:0 of llo 8042's IocaI inpul I/O porl aro road and
pIacod in bils 7:4 of llo slalus rogislor al I/O addross 0064l.
C2 IoII inpul porl ligl. Bils 7:4 of llo 8042's IocaI inpul I/O porl aro road and
pIacod in bils 7:4 of llo slalus rogislor al I/O addross 0064l.
D0 Road oulpul porl. Causos llo 8042 lo road llo curronl slalo of ils IocaI oul-
pul I/O porl and pIaco llo rosuIl in llo dala porl al I/O addross 0060l.
D1 Wrilo oulpul porl. Tlo noxl bylo vrillon lo llo dala porl al I/O addross
0060l is vrillon lo llo 8042's IocaI oulpul I/O porl.

-

D2 Wrilo Ioyboard oulpul buffor. Tlo noxl bylo vrillon lo llo dala porl al I/O
addross 0060l causos a Ioyboard Inlorrupl on IRQ1 (if llo Ioyboard Inlor-
faco is onabIod). Tlo bylo is suppIiod as llo Ioyboard scan codo vlon llo
dala porl is road.
D3 Wrilo mouso oulpul buffor. Tlo noxl bylo vrillon lo llo dala porl al I/O
addross 0060l causos a mouso Inlorrupl on IRQ12 (if llo mouso Inlorfaco is
onabIod). Tlo bylo suppIios llo mouso scan codo vlon llo dala porl is road.
D4 Wrilo lo mouso. Tlo noxl bylo vrillon lo llo dala porl al I/O addross 0060l
is lransmillod lo llo mouso.
I0 Road losl inpuls. Causos llo 8042 lo road llo curronl slalo of llo Ioyboard
and mouso cIocI Iinos. Tlo rosuIls aro slorod in bils 0 and 1, rospoclivoIy, of
llo dala porl al I/O addross 0060l.
I0 lo
II
I/O porl aro puIsod Iov for approximaloIy 6 microsoconds. Bils 3:0 of llis
command indicalo vlicl bils aro lo bo puIsod. 0 indicalos llo rospoclivo bil
slouId bo puIsod, vliIo 1 indicalos llo rospoclivo bil slouIdn'l bo aIlorod.

Tlo Ioyboard/mouso dala porl al I/O addross 0060l is usod lo:

Road llo scan codo sonl from llo Ioyboard or mouso.
Sond dala/commands lo llo Ioyboard.

Scan codos from llo Ioyboard and mouso go diroclIy lo llo oulpul buffor (porl
60l) vloro lloy can bo road from llo microprocossor. Tlo IocaI oulpul porl
and losl porl aIso can bo road al porl 60l. By vriling llo propor command lo
porl 64l, llo conlonls of llo IocaI porls aro sonl lo porl 60l vloro lloy aIso can
bo road by llo microprocossor.

Tlrougl porl 64l, llo Ioyboard Inlorfaco can aIso bo commandod lo vrilo llo
conlonls of porl 60l lo llo IocaI porls. In llis vay, llo Hol Rosol and Galo A20
commands can bo issuod lo llo syslom.
Mosl Ioyboards lavo IID indicalors for scroII IocI, num IocI, caps IocI, olc.,
llal can bo lurnod on and off by issuing commands lo llo Ioyboard.
- -

-


Tlo rocommondod mollod for conlroIIing llo Ioyboard/mouso inlorfaco is
llrougl BIOS funclion caIIs. INT 09l and INT 16l can bo usod lo caII llo Ioy-
board/mouso BIOS roulino.


--


-
Tlo provious claplor providod a dolaiIod doscriplion of llo Ioyboard and
mouso inlorfacos lo llo syslom.
-
Tlis claplor providos a doscriplion of llo numoric coprocossors commonIy
found in ISA sysloms. Tlis incIudos boll InloI and WoiloI coprocossors.

Tlo noxl claplor doscribos llo limors found in aII ISA sysloms.

Wlon InloI vas dosigning llo 8086 and 8088 microprocossors, lloy lad a doci-
sion lo maIo slouId llo 8086 and 8088 bo givon llo abiIily lo porform fIoal-
ing-poinl mallomalics` IIoaling-poinl numbors aro numbors vill docimaI
pIacos. If llis abiIily voro incIudod villin llo microprocossor ilsoIf, il vouId
subslanliaIIy incroaso llo prico of llo microprocossor. MarIoling informalion
indicalod llal mosl usors didn'l nood llis capabiIily, so il vas nol incIudod in
llo finaI procossor dosign. Tlo microprocossor can porform inlogor, or vloIo
numbor, caIcuIalions, bul nol fIoaling-poinl.

Rallor llan compIoloIy oIiminalo llo fIoaling-poinl capabiIily, lovovor, lloy
incIudod looIs on llo microprocossor llal vouId onabIo usors lo incIudo a
companion fIoaling-poinl procossor in dosigns llal roquirod llis capabiIily. Tlo
companion procossor, or coprocossor, vas llo 8087 numoric coprocossor. Il is
aIso roforrod lo as a procossor oxlonsion bocauso il oxlonds llo microprocossor's
inslruclion sol. Wlon llo 80286 and 80386 microprocossors voro inlroducod,
llo samo pliIosoply vas adlorod lo llo 80286 can bo coupIod vill llo
80287 and llo 80386 vill oillor llo 80287 or llo 80387 numoric coprocossor.
Tlo microprocossor lroals llo numoric coprocossor as an I/O dovico. Wlon llo
microprocossor folclos an inslruclion from momory and sonsos llal il is an in-

-

slruclion for llo coprocossor, il aulomalicaIIy porforms a sorios of ono or moro
I/O vrilos lo forvard llo inslruclion lo llo coprocossor, vlicl llon oxoculos
llo inslruclion. Tlo I/O addross rango from 00I8l llrougl 00IIl aro assignod
lo llo coprocossor.

Al llo boginning of llo IOST, llo programmor clocIs llo configuralion RAM
lo soo if a numoric coprocossor is inslaIIod. Bils 1 and 2 of llo microprocossor's
maclino slalus vord (MSW) rogislor aro llon sol according lo labIo 23-1.

-- - -
-
0 0 Coprocossor is inslaIIod. Microprocossor forvards
aII fIoaling poinl inslruclions lo coprocossor. Micro-
procossor doos nol clocI lo soo if llo il las svilclod
lasIs vlon oxoculing fIoaling poinl inslruclions.
Microprocossor oporalos as an 8086 or 8088, singIo-
lasIing.
0 1 Coprocossor is inslaIIod. Microprocossor forvards
aII fIoaling poinl inslruclions lo coprocossor. Micro-
procossor clocIs lo soo if il las svilclod lasIs vlon
oxoculing fIoaling poinl inslruclions. Usod for muIli-
lasIing.
1 0 Coprocossor nol inslaIIod. ImuIalo coprocossor.
1 1 InvaIid.

Nolo: In llo 80386 and liglor microprocossors, llo MSW rogislor is found in
llo Iovor laIf of CR0 (conlroI rogislor 0).
-- -
Rofor lo figuro 23-1. Tlo microprocossor is avaro of llo I/O addrossos of llo
coprocossor's lvo porls. Tlo coprocossor's opcodo, or inslruclion, rogislor ro-
sidos al porl 00I8l in an 80286-basod syslom, 8000I8l in an 80386SX-basod
syslom, and 800000I8l in an 80386DX-basod syslom. Tlo coprocossor's dala
rogislor rosidos al porl 00ICl in an 80286-basod syslom, 8000ICl in an
80386SX-basod syslom, and 800000ICl in an 80386DX-basod syslom. Wlon llo
coprocossor is inslaIIod and llo MI bil is sol lo ono, llo foIIoving aclions laIo
pIaco vlon llo microprocossor folclos a coprocossor inslruclion from momory:

--


1. If llo oxoculion of llo coprocossor inslruclion roquiros a momory road or a
momory vrilo oporalion, llo microprocossor savos llo momory addross,
llo Iongll of llo dala and nolos vlollor a momory road or vrilo is ro-
quirod.
2. If llo coprocossor's BUSY oulpul is doassorlod, indicaling llal il is avaiI-
abIo lo accopl llo noxl inslruclion, llo microprocossor porforms ono or
moro I/O vrilos lo llo coprocossor's inslruclion rogislor al I/O porl 00I8l
(800000I8l for llo 80386DX or 8000I8l for llo 80386SX) in ordor lo for-
vard llo inslruclion lo llo coprocossor. Tlo 80286 and 80386SX microproc-
ossors lavo a 16-bil dala bus, aIIoving ono or lvo bylos lo bo lransforrod lo
llo coprocossor in a singIo bus cycIo. Tlo 80386DX microprocossor, on llo
ollor land, las a 32-bil dala bus, aIIoving from ono lo four bylos lo bo
lransforrod lo llo coprocossor in a singIo bus cycIo. SimpIo inslruclions llal
aro onIy ono or lvo bylos in Iongll can bo lransforrod in a singIo I/O vrilo
bus cycIo, vliIo moro compIox inslruclions consisling of llroo or moro
bylos may roquiro addilionaI I/O vrilo bus cycIos.
3. Wlon llo coprocossor bogins oxoculion of llo inslruclion, il assorls ils
BUSY oulpul, lloroby signaIing llal il cannol accopl anollor inslruclion
from llo microprocossor unliI llo curronlIy oxoculing inslruclion is com-
pIolod. Tlo microprocossor viII nol allompl lo forvard anollor inslruclion
lo llo coprocossor unliI BUSY is doassorlod.
4. If oxoculion of llo inslruclion roquiros llal a momory road or momory
vrilo bus cycIo laIo pIaco, llo coprocossor assorls IIRIQ (procossor oxlon-
sion roquosl) lo roquosl llal llo microprocossor run llo momory road or
vrilo bus cycIo.
5. Tlis slop onIy appIios lo llo 80286. Tlo 80386 microprocossor doos nol
lavo a IIACK oulpul. Tlo 80286 microprocossor rosponds vill IIACK
(procossor oxlonsion acInovIodgo) lo inform llo coprocossor llal llo
lransfor roquosl las boon acInovIodgod.

-


--

6. If llo roquoslod lransfor is a momory vrilo, llo microprocossor porforms
lvo (or moro) bus cycIos lo lransfor llo dala inlo momory. During llo firsl
bus cycIo, llo microprocossor porforms an I/O road from llo coprocossor's
dala rogislor al I/O addross 00ICl (800000ICl for llo 80386DX or
8000ICl for llo 80386SX) lo gol llo dala. Tlo procossor llon porforms a
momory vrilo bus cycIo lo vrilo llo dala inlo llo largol momory Iocalions.

If llo roquoslod lransfor is a momory road, llo microprocossor porforms
lvo (or moro) bus cycIos lo lransfor llo dala from momory lo llo coprocos-
sor. During llo firsl bus cycIo, llo microprocossor porforms a momory road
from llo largol momory Iocalions lo gol llo dala. Tlo procossor llon por-
forms an I/O vrilo lo I/O addross 00ICl (800000ICl for llo 80386DX or
8000ICl for llo 80386SX) lo pass llo dala lo llo coprocossor's dala rogislor.

--

--


--

7. If llo coprocossor incurs an orror vliIo oxoculing llo inslruclion, ils IR-
ROR and BUSY oulpuls aro assorlod. Tlis gonoralos an IRQ13 lo llo mi-
croprocossor and provonls llo microprocossor from forvarding anollor
coprocossor inslruclion. In llo IRQ13 inlorrupl sorvico roulino, llo pro-
grammor roads llo coprocossor's slalus rogislor lo ascorlain llo causo of llo
orror. Any coprocossor orror may bo rosol by vriling 00l lo I/O addross
00I0l. Tlis causos llo coprocossor's RISIT inpul lo bo assorlod, cIoaring
any orror condilions.
8. Wlon llo coprocossor compIolos oxoculion of llo inslruclion, il doassorls
ils BUSY oulpul lo inform llo microprocossor llal il is roady lo accopl an-
ollor coprocossor inslruclion.
-- -
In sysloms incorporaling llo 80287 numoric coprocossor, an oulpul lo I/O porl
I1l is nocossary lo rosol llo 80287 and rolurn il lo roaI modo oporalion aflor
oxoculion of a ISITIM (fIoaling-poinl sol procossor modo) inslruclion. Wriling
any dala lo llis porl causos llo 80287's rosol Iino lo bo assorlod momonlariIy.
Tlo 80387 numoric coprocossor doosn'l roquiro a rosol vlon clanging procos-
sor modos.

Wriling a 00l lo I/O porl I0l causos llo numoric coprocossor lo cIoar ils
BUSY and IRROR oulpuls.

TabIo 23-2 providos a doscriplion of llo InloI coprocossor signaIs invoIvod in
communicalion vill llo microprocossor.


-

---- -


--


-
IIRIQ 287/387 Irocossor oxlonsion roquosl. Assorlod by llo coprocossor vlon a
lransfor lo or from momory is roquirod. In rosponso, llo microproc-
ossor porforms lvo or moro bus cycIos lo lransfor llo dala bolvoon
momory and llo coprocossor.
IIACK 287 Irocossor oxlonsion acInovIodgo. Assorlod by llo 80286 coprocos-
sor in rosponso lo IIRIQ.
BUSY 287/387 Assorlod by llo coprocossor vlon il bogins oxoculing an inslruclion.
Tlo procossor may nol sond anollor inslruclion lo llo coprocossor
vliIo llis signaI is assorlod.
IRROR 287/387 Gonoralod by llo coprocossor vlon an orror condilion is oncoun-
lorod vliIo oxoculing an inslruclion. In an ISA maclino, IRROR is
connoclod lo llo IRQ13 Iino.
D|31:0] 287/387 Dala bus is usod lo lransfor inslruclions or dala lo llo coprocossor
from llo procossor. AIso usod lo lransfor dala or slalus from llo
coprocossor lo llo procossor. Tlo 80286 and 80386SX procossors and
llo 80287 and 80387SX coprocossors lavo a 16-bil dala bus, vliIo
llo 80386DX procossor and llo 80387DX coprocossor lavo a 32-bil
dala bus.
W/R 387 Tlis is llo 80386 procossor's vrilo or road oulpul. During an accoss
lo llo coprocossor, W/R indicalos vlollor a vrilo or road opora-
lion is in progross.
ADS 387 Tlis is llo 80386 procossor's addross slalus oulpul.
Wlon assorlod al llo slarl of a bus cycIo, indicalos lo
llo coprocossor llal il slouId oxamino ils clip-soIocl
inpuls lo dolormino if llo procossor is addrossing llo
coprocossor.
RIADY 387 Tlis is llo samo signaI llal is connoclod lo llo micro-
procossor's RIADY inpul. Il indicalos vlon a bus
cycIo is boing compIolod by llo procossor.
RIADYO 387 Tlis is llo coprocossor's roady oulpul lo llo procossor. Il indicalos
lo llo procossor vlon llo coprocossor is roady lo ond a bus cycIo
inilialod by llo microprocossor.
STIN 387 Slalus InabIo. Tlis pin sorvos as a clip-soIocl lo llo coprocossor.
Wlon sonsod assorlod, llo coprocossor oxaminos ils CMD and NISn
inpuls lo dolormino vlicl of ils inlornaI rogislors is curronlIy boing
addrossod.
NIS1 287/387 Numoric Irocossor SoIocl 1. Wlon assorlod (Iov), indicalos llal an
I/O oporalion is in progross. SlouId bo connoclod lo llo microproc-
ossor's M/IO oulpul. In conjunclion vill NIS2, llo CMD inpul(s)
and STIN (in llo caso of an 80387), il is usod as a clip-soIocl for llo
coprocossor.

--



--


-
NIS2 287/387 Numoric Irocossor SoIocl 2. In conjunclion vill NIS1, llo CMD
inpul(s) and STIN (in llo caso of an 80387), il is usod as a clip-
soIocl for llo coprocossor. In a syslom incorporaling llo 80287,
NIS2 is usuaIIy jusl liod ligl. In an 80386SX/80387SX syslom, il is
liod lo A23, vliIo in an 80386DX/80387DX syslom, il is liod lo A31.
CMD0 or
CMD0
287 (CMD0)
387 (CMD0)
Usod lo soIocl llo largol I/O rogislor in llo coprocossor. In an 80386-
basod syslom, llo procossor's A2 oulpul is connoclod lo CMD0 on
llo 80387. A2 goos ligl vlon llo coprocossor's dala rogislor is ad-
drossod, and Iov vlon ils inslruclion rogislor is addrossod. In an
80286-basod syslom, CMD0 and CMD1 aro usod lo soIocl llo largol
I/O rogislor in llo coprocossor. CMD0 is connoclod lo llo procos-
sor's A1 oulpul.
NIRD 287 Numoric Irocossor Road. Connoclod lo llo bus conlroI Iogic's
IORC Iino. Indicalos lo llo coprocossor vlon an I/O road bus cycIo
is in progross.
NIWR 287 Numoric Irocossor Wrilo. Connoclod lo llo bus conlroI Iogic's
IOWC Iino. Indicalos lo llo coprocossor vlon an I/O vrilo bus
cycIo is in progross.
CMD1 287 In an 80286-basod syslom, CMD0 and CMD1 aro usod lo soIocl llo
largol I/O rogislor in llo coprocossor. CMD1 is connoclod lo llo
procossor's A2 oulpul.

DolaiIod informalion aboul coprocossor programming may bo found in llo foI-
Ioving InloI manuaIs:


- incIuding llo iAIX 286 Numoric
SuppIomonl

-- -
Wlon a syslom running Iolus 1-2-3 rocaIcuIalos a sproadslool, llo docimaI
porlion of llo numbors aro caIcuIalod corroclIy, ovon if llo coprocossor isn'l in-
slaIIod. Sinco llo microprocossor can onIy porform inlogor mallomalics, llis
doosn'l soom possibIo. In llis caso, llo fIoaling-poinl caIcuIalions aro por-
formod by spociaI roulinos Inovn as fIoaling-poinl omuIalion roulinos. Tloso
roulinos aro suppIiod as parl of llo appIicalions program (sucl as Iolus 1-2-3).

Using llo slandard inslruclion sol, fIoaling-poinl caIcuIalions can bo porformod
llrougl Iaborious manipuIalion of fIoaling-poinl numbors slorod in momory.
---- -

-

Tlis procoss is mucl Ioss officionl llan llo fIoaling-poinl inslruclion capabiIily
omboddod villin llo coprocossor. Wloro llo coprocossor can diroclIy oxoculo
a singIo fIoaling-poinl inslruclion vill ils lardvaro, an omuIalion roulino
vouId lavo lo oxoculo lundrods of inslruclions lo accompIisl llo samo ond.
Wlon running appIicalions programs llal aro fIoaling-poinl inlonsivo, llo por-
formanco improvomonl providod by llo coprocossor can bo quilo dramalic.
Improvomonls of from 100 lo 500 aron'l uncommon.

IIoaling-poinl omuIalion roquiros llo foIIoving:

IncIusion of a sol of omuIalion roulinos in llo appIicalions program (sucl
as 1-2-3).
In llo MSW rogislor, llo IM bil musl bo sol lo 1 and llo MI bil sol lo 0.

Tlis soclion doscribos llo aclions laIon vlon a coprocossor isn'l inslaIIod and
llo IM bil is sol lo 1 in llo MSW rogislor.

1. Tlo microprocossor folclos a coprocossor inslruclion from momory. Wlon
llo microprocossor docodos llo inslruclion and sonsos llal il boIongs lo llo
coprocossor, il clocIs llo MI bil in llo MSW rogislor lo soo if a coprocossor
is inslaIIod. If il isn'l (MI = 0), il clocIs llo IM bil lo soo if llo coprocossor
inslruclion is lo bo omuIalod. In llis caso, il is (IM = 1).
2. Tlo microprocossor inlornaIIy gonoralos an oxcoplion 7 inlorrupl roquosl.
As vill any inlorrupl, llo microprocossor rosponds by pusling llo con-
lonls of llo CS, II and IIag rogislors inlo slacI momory. Tlo slorod CS and
II vaIuos poinl lo llo coprocossor inslruclion llal causod llo oxcoplion.
3. Tlo microprocossor jumps lo llo oxcoplion 7 inlorrupl sorvico roulino. Tlis
is llo omuIalion program suppIiod as parl of llo appIicalions program. In
llo roulino, llo programmor roads llo coprocossor inslruclion using llo
momory addross slorod in llo slacI and dolorminos llo lypo of inslruclion
(sucl as a fIoaling-poinl divido). Tlo programmor llon jumps lo llo rou-
lino (in llo pacIago of omuIalion roulinos) llal omuIalos llal parlicuIar
lypo of inslruclion.
4. Upon concIusion of llo inslruclion omuIalion, llo programmor aIlors llo II
vaIuo slorod on llo slacI lo poinl lo llo inslruclion immodialoIy foIIoving
llo coprocossor inslruclion llal causod llo oxcoplion.
5. Tlo programmor oxoculos an IRIT (inlorrupl rolurn) inslruclion. Tlo mi-
croprocossor rosponds by roIoading llo CS, II and IIag rogislors from llo
slacI and rosuming normaI oporalion in ollor vords, llo microprocos-
sor folclos llo noxl inslruclion from llo momory Iocalion poinlod lo by CS
and II. Tlis is llo inslruclion aflor llo coprocossor inslruclion llal causod
llo oxcoplion.

--

--

ISA sysloms may incorporalo oillor an InloI or a WoiloI coprocossor, or boll.
Tlo WoiloI coprocossor doos nol rosido in llo samo addross spaco as llo InloI
coprocossor, so addrossing confIicls viII nol ariso if boll aro impIomonlod.
Rallor llan using I/O addrossos as doos llo InloI coprocossor, llo WoiloI do-
vico is momory-mappod. Il rosponds lo momory addrossos C0000000l llrougl
C1IIIIIIl.
-- -

In a syslom using llo WoiloI coprocossor lo porform fIoaling-poinl caIcuIa-


lions, lvo possibIo sconarios may cooxisl:

By ro-compiIing a program llal usos InloI coprocossor-spocific inslruclions,
llo WoiloI can landIo llo oxoculion of aII InloI coprocossor-spocific in-
slruclions, or aIlornalivoIy a drivor roulino can bo inslaIIod lo aulomalicaIIy
landIo llo inslruclions.
AppIicalions programs can incorporalo WoiloI-spocific inslruclions as in-
Iino codo villin llo appIicalions ilsoIf.

Tlo socond caso is cIoar-cul, bul llo firsl ono morils somo oxpIanalion.
-- --
Mosl dovoIopors llal uso llo WoiloI coprocossor ombod movo inslruclions inlo
lloir fIoaling-poinl codo lo pass llo inslruclion diroclIy lo llo WoiloI Coproc-
ossor. AIlornalivoIy, a WoiloI drivor roulino couId porform a momory vrilo lo
pass llo inslruclion and any dala oporands lo llo WoiloI coprocossor.

In ordor for a drivor lo dirocl aII inslancos of InloI coprocossor-spocific inslruc-
lions lo llo WoiloI, llo IM bil in llo MSW rogislor slouId bo sol lo a ono. An
InloI-spocific fIoaling-poinl inslruclion folclod from momory llon causos llo
procossor lo oxporionco an oxcoplion 7 inlorrupl. As a rosuIl, llo procossor
jumps lo llo oxcoplion 7 landIor roulino. Tlis is llo WoiloI drivor roulino.


-

As iIIuslralod in labIo 23-3, llo momory addross llal is vrillon lo idonlifios
boll llo coprocossor's inlornaI rogislor as voII as llo inslruclion lypo. In addi-
lion, up lo four bylos of dala aro simuIlanoousIy vrillon lo llo WoiloI ovor llo
four dala palls. Upon rocoipl of llo inslruclion, llo coprocossor assorls
RIADY, pormilling llo procossor lo ond llo bus cycIo. Having passod llo in-
slruclion lo llo coprocossor, llo WoiloI drivor roulino modifios llo rolurn ad-
dross poinlor on llo slacI lo poinl lo llo inslruclion aflor llo ono llal causod
llo oxcoplion. Il llon oxoculos an inlorrupl rolurn, or IRIT, inslruclion lo ro-
lurn lo llo originaI program fIov.

--
-- -
A|31:16] Tlo rogislor villin llo WoiloI coprocossor.
A|15:10] Inslruclion opcodo, or lypo.
A|9:7] Sourco 1 rogislor in llo WoiloI.
A|6:2] Sourco 2 or doslinalion rogislor in llo WoiloI.
BI|2:0] AddilionaI informalion rogarding llo sourco 1 rogislor in
llo WoiloI.
-- -- -
In a syslom incorporaling boll coprocossor lypos, llo InloI coprocossor landIos
oxoculion of aII InloI coprocossor-spocific inslruclions, vliIo llo WoiloI lan-
dIos oxoculion of aII WoiloI-spocific codo omboddod villin appIicalions pro-
grams. In llo MSW rogislor, IM is sol lo zoro and MI is sol lo ono lo indicalo
llo prosonco of an InloI coprocossor.


-


-
Tlo provious claplor providod a doscriplion of llo numoric coprocossor inlor-
faco and fIoaling-poinl omuIalion.
-
Tlis claplor doscribos llo syslom limors incorporalod in aII ISA-compalibIo
maclinos.
-
ISA sysloms incIudo a froo-running 14.31818MHz cIocI namod OSC llal may
bo usod by ISA add-in boards. OSC runs al four limos llo loIovision coIor bursl
froquoncy and may bo usod by vidoo dispIay adaplor cards or any ollor dovico
nooding a froo-running cIocI.

Tlo 14.31818MHz OSC osciIIalor signaI is dividod by 12 by Iogic on llo syslom
board lo provido llo 1.19318MHz signaI llal drivos limor 0, limor 1 and limor
2. Tlo OSC signaI vas dividod by 3 by llo 8284 cIocI clip in llo originaI IC lo
provido llo 4.77MHz cIocI llal drovo llo 8088 microprocossor.
-
Tlo syslom limor, limor 0, is a programmabIo froquoncy sourco. Tlo program-
mor spocifios a divisor lo bo dividod inlo llo inpul cIocI lo yioId llo dosirod
oulpul froquoncy. During llo IOST, llo divisor IIIIl, or a docimaI 65535, is
programmod inlo limor 0 al I/O addross 0040l. Basod on llo 1.19318MHz in-
pul cIocI, llo oulpul froquoncy of limor 0 aflor IOST is 18.21Hz.

Rofor lo figuro 24-1. Timor 0s oulpul is connoclod lo llo IRQ0 Ialcl. Wlon
limor 0s oulpul bocomos assorlod, llo Ialcl is sol, sonding IRQ0 lo llo maslor
8259 inlorrupl conlroIIor. In llo IRQ0 inlorrupl sorvico roulino, llo programmor

-

can rosol (doassorl) IRQ0 by solling bil 7 of syslom conlroI porl B al I/O ad-
dross 0061l lo a ono.

Al a froquoncy of 18.21Hz, IRQ0 is gonoralod ovory 54.9ms, causing llo IRQ in-
lorrupl sorvico roulino lo bo oxoculod onco ovory 54.9ms.

In llo originaI IBM IC and XT, llis inlorrupl sorvico roulino vas usod lo main-
lain llo dalo and limo in RAM momory. In llo IBM IC/AT, a roaI-limo cIocI
clip vas addod lo porform llis funclion, bul limor 0 is sliII avaiIabIo for uso as
a gonoraI purposo limor by programmors.

Tloros a funny slory aboul llis limor. In 1989, a numbor of induslry pubIica-
lions roporlod llo aslounding novs llal a dosignor in Taivan lad aIlorod a
IC/AT so llal il couId porform al llo posilivoIy aslounding ralo of 100 MIIS
(miIIion inslruclions por socond). A numbor of bonclmarI (porformanco vorifi-
calion) programs lad boon run on llo syslom lo vorify lis cIaims. Quilo a fov
poopIo in llo induslry voro rooIod in, looI, Iino and sinIor. AII llis guy lad
dono vas ro-program limor 0 lo inlorrupl al a difforonl ralo. Sinco llo boncl-
marI programs usod llis inlorrupl as lloir limobaso, il aIlorod llo rosuIls. Rod
facos aII around.

-
1.19318MHz 18.21Hz
lRQ0
System Control Port B Bit 7
Reset
Clock
lnput
Output
lRQ0
Latch
Timer 0

-

-
Tlo rofrosl limor, or limor 1, is a programmabIo froquoncy sourco. Tlo samo
1.19318MHz signaI (usod by limor 0) providos llo rofrosl limors cIocI inpul.
Tlo programmor spocifios a divisor lo bo dividod inlo llo inpul cIocI lo yioId
llo dosirod oulpul froquoncy. During llo IOST, a divisor of 0012l, or a doci-
maI 18, is vrillon lo llo rofrosl limor al I/O addross 0041l. Tlo inpul cIocI
froquoncy of 1.19318MHz is lloroforo dividod by 18 lo yioId an oulpul fro-
quoncy of 66287.77Hz, or a puIso ovory 15.09 microsoconds.

Tlis is llo rofrosl roquosl signaI llal lriggors llo DRAM rofrosl Iogic lo bo-
como bus maslor onco ovory 15.09 microsoconds so il can rofrosl anollor rov
in DRAM momory llrougloul llo syslom. Ior moro informalion on DRAM ro-
frosl, rofor lo llo claplor onlilIod RAM Momory: Tloory of Oporalion.

In 1988, a numbor of induslry pubIicalions pubIislod a briof bul dangorous ar-
licIo llal addrossod llo issuo of llo rofrosl limor. Il vas rovoaIod llal llis do-
mon limor sloaIs llo busos from your compulor onco ovory 15 microsoconds
lo rofrosl DRAM momory. A smaII program vas providod llal vouId ro-
program llis limor so il couIdnl asI for llo busos quilo so froquonlIy, lloroby
giving moro bus limo lo your compulor.

Tlis vas an oxlromoIy dangorous faclor lo bo mossing around vill. Ils onliroIy
possibIo llal usors vlo impIomonlod llis clango vouId slarl lo oxporionco
myslorious RAM parily orrors from limo lo limo and Ioso aII dala lloy cur-
ronlIy lad in RAM bocauso llo unil IocIod up aflor oulpulling llo mossago.

Timor 2, llo spoaIor limor, rosidos al I/O addross 0042l and, as vill limor 0, is
a programmabIo froquoncy sourco dorivod from llo 1.19318MHz limobaso.

Tlo programmor spocifios a divisor lo bo dividod inlo llo inpul cIocI lo yioId
llo dosirod oulpul froquoncy. Tlo divisor is vrillon lo limor 2 al I/O addross
0042l. Iiguro 24-2 iIIuslralos llo spoaIor limor and ils associalod Iogic.

In ordor for limor 2 lo acluaIIy uso llo inpul cIocI, bil 0 of syslom conlroI porl B
al I/O addross 0061l musl bo a 1. Tlo limor llon dividos llo limobaso by llo
programmor-spocifiod divisor, yioIding an oulpul froquoncy llal is appIiod lo
ono inpul of a lvo inpul AND galo. If llo AND galos ollor inpul is a 1 (from
bil 1 of syslom conlroI porl B al I/O addross 0061l), llo limor 2 oulpul is galod

-

llrougl llo AND galo and appIiod lo llo spoaIor drivor clip, vloro il is am-
pIifiod and appIiod lo llo spoaIor.

Tlo oulpul froquoncy of limor 2 is appIicalions-spocific il can bo pro-
grammod lo maIo lappy or sad sounds, doponding on llo occasion.

--

Tlo valcldog limor is usod lo dolocl iII-bolavod programs. If a muIlilasIing
oporaling syslom, sucl as OS/2, voro lo givo conlroI lo a program llal disabIos
inlorrupl rocognilion for an oxlondod poriod of limo, probIoms couId rosuIl.
Tlo various dovicos gonoraling inlorrupl roquosls lo oblain microprocossor
sorvicing couId oxporionco probIoms duo lo llo rosuIling doIay in sorvicing.

Ono of llo inlorrupl roquosls llal vouIdnl bo sorvicod is llo syslom limor in-
lorrupl, IRQ0. Tlo syslom limor, or limor 0, roquiros sorvicing ovory 54.9ms.
Tlo valcldog limor is dosignod lo dolocl a cossalion of IRQ0 sorvicing.

Many sysloms do nol lavo valcldog limors. Ior lloso llal do lavo limors, llo
addross and funclion of llo limors varios from syslom lo syslom. Tlo foIIoving
discussion appIios lo llo IBM IS/2.

1.19318Mhz
System Port B Bit 0
System Port B Bit 1
Timer
2
Speaker
Driver

-

Iiguro 24-3 iIIuslralos llo valcldog limor and ils associalod Iogic. Tlo valcl-
dog limor al I/O addross 0044l is programmod vill a counl (a numbor). Tlo
oulpul of limor 0 is connoclod lo llo IRQ0 Ialcl and lo llo cIocI inpul of llo
valcldog limor. Wlon limor 0 gonoralos a puIso, il sols llo IRQ0 Ialcl and
gonoralos IRQ0 lo llo inlorrupl conlroIIor. Wlon IRQ0 bocomos assorlod, il on-
abIos llo valcldog limor. Slarling vill llo noxl limor 0 oulpul puIso, llo
valcldog limor bogins lo counl dovn onco for oacl puIso rocoivod on ils cIocI
inpul.

In llo IRQ0 inlorrupl sorvico roulino, llo programmor slouId sol bil 7 of sys-
lom conlroI porl B lo a 1 lo rosol llo IRQ0 Ialcl, lloroby doassorling IRQ0.
Wlon IRQ0 is doassorlod, il disabIos llo valcldog limor so il canl counl dovn
any moro. Tlo programmor slouId aIso roIoad llo slarl counl inlo llo valcl-
dog limor. (Nolo llal llo moaning of llo bils in syslom conlroI porl B al I/O
addross 0061l aro difforonl for an I/O road vorsus an I/O vrilo.)

If inlorrupl rocognilion las boon disabIod for an oxlondod poriod of limo by an
iII-bolavod program, IRQ0 viII nol bo rosol. Tlo valcldog limor viII lloroforo
conlinuo lo counl dovn lovards zoro bocauso of llo ropoalod limor 0 oulpul
puIsos. If llo counl is oxlauslod, llo valcldog limors oulpul is assorlod,
lloroby assorling NMI lo llo microprocossor.

In llo NMI inlorrupl sorvico roulino, llo programmor can clocI bil 4 of syslom
conlroI porl A al I/O addross 0092l lo soo if llo valcldog limor vas llo sourco
of llo NMI. Bil 4 viII bo sol lo 1 if llo valcldog limor gonoralod llo NMI.
Wriling a nov counl lo llo valcldog limor viII doassorl NMI.


-



--

Wlon faslor microprocossors voro inlroducod, sovoraI probIoms bogan lo occur
vill programs llal voro liming sonsilivo. Ior oxampIo, somo gamos ran loo
fasl for roasonabIo usor inloraclion and somo copy proloclion sclomos faiIod lo
oporalo proporIy al llo faslor procossor spoods.

Tlo sIovdovn limor is impIomonlod in sysloms using microprocossors running
al spoods of 16MHz and faslor, lo provido a mollod for arlificiaIIy sIoving
llom dovn. Tlo lorm arlificiaI is usod bocauso llo microprocossors aro nol
sIovod al aII, rallor llo rofrosl loId limo is oxlondod, causing llo microprocos-
sor lo romain in llo loId slalo Iongor llan normaI. Sinco llo procossor is unabIo
lo folcl and oxoculo programs il appoars lo sIov dovn.

Iiguro 24-4 iIIuslralos llo Iogic associalod vill llo sIovdovn limor. Tlo sIov-
dovn limor is lriggorod by llo rofrosl roquosl signaI llal goos lo llo rofrosl
Iogic. Wlon llo rofrosl limor gonoralos rofrosl roquosl, lvo llings occur:
1.19318MHz
18.21Hz Reset
System Port B Bit 7
Enable
Clock
lnput
lRQ0
NMl
Timer
0
lRQ0
Latch
Watchdog
Timer

-


Tlo rofrosl Iogic gonoralos HOID lo soizo llo busos from llo microprocos-
sor. Tlis HOID causos llo OR galo lo gonoralo HOID lo llo microprocos-
sor. Tlo microprocossor is forcod off llo busos.
Tlo sIovdovn limor is lriggorod. Wlon lriggorod, ils oulpul goos ligl for
a pro-dolorminod amounl of limo. Tlo ligl on llis oulpul causos llo OR
galo lo oulpul a ligl.

Tlo rofrosl Iogic onIy Ioops ils HOID oulpul assorlod Iong onougl lo run ono
rofrosl bus cycIo. Il llon doassorls ils HOID oulpul lo roIoaso llo busos bacI lo
llo procossor so il can conlinuo lo folcl and oxoculo inslruclions. Tlo sIov-
dovn limor, lovovor, may nol lavo limod oul yol and ils HOID oulpul may
sliII bo ligl. Tlis vouId doIay llo roIoaso of llo busos bacI lo llo procossor.
Tlo programmor dofinos llo duralion of llo sIovdovn limors oulpul puIso by
vriling a counl inlo ils rogislor al I/O addross 0046l. Tlo IC vondors MODI
command is usuaIIy usod lo program llis limor.


Refresh
Timer
Refresh
Logic
Refresh
Request
Trigger
HOLD
HOLD to
Microprocessor
HLDA from Microprocessor
Slowdown
Timer







--
























--





--

-- - Tlo limo span bolvoon a dovico boing addrossod and vlon il doIivors or
accopls vaIid dala.
soo assorlod
-- - Tlo group of signaI Iinos llal carry an addross from a bus maslor.
-- Ivory dovico llal can bo road from or vrillon lo las an associalod
pioco of Iogic caIIod an addross docodor. Tlo addross docodor soIocls ils associ-
alod dovico vlon an addross villin ils dofinod rango is doloclod.
-- A dovico connoclod lo llo microprocossor's IocaI addross bus. Tlis do-
vico drivos llo addross lo aII dovicos llrougloul llo syslom and Ialclos (loIds)
llo addross for llo duralion of llo bus cycIo. Onco Ialclod, llo Addross Ialcl
oulpuls llo addross lo llo syslom on llo syslom addross (SA) bus, SA19:SA1.
-- A procoss in vlicl llo microprocossor pIacos llo addross for llo
noxl cycIo on ils IocaI addross bus during llo curronl bus cycIo. Tlis can roduco
accoss limo lo syslom momory if dosignod lo laIo advanlago of addross pipoIin-
ing.
-- - Tlo procoss of convorling ono lypo of addross lo anollor. Ior ox-
ampIo: lransIaling llo addross from an ISA bus maslor (SA16:SA0, IA23:IA17
and SBHI) lo a 32-bil momory addross (A31:A2 and BI3:BI0) roquirod by
32-bil momory.
An ISA bus signaI or a pin on llo 8237 DMA conlroIIors. Nolo llal llo samo
namo is usod for lvo difforonlIy-acling signaIs. Wlon llo CIU assorls llo
HIDA signaI, llo ISA bus AIN signaI is assorlod, disabIing aII I/O addross do-
codors lo provonl I/O dovicos from mislaIing llo addross as lloirs during
DMA lransfors. Wlon llo DMA conlroIIor soos ils HIDA inpul assorlod, il as-
sorls ils AIN pin lo onabIo llo oulpuls of ils addross Ialcl and pago rogislor.
Tlo Addross Ialcl InabIo signaI llal conlroIs llo oporalion of llo Addross
Ialcl.
An arbilor is a dovico llal ovaIualos llo ponding roquosls for accoss lo llo bus
and granls llo bus lo a bus maslor basod on a syslom-spocific aIgorillm.
-- A signaI is assorlod vlon il is al ils Iogic lruo slalo. A signaI sucl as HOID is
assorlod vlon il is ligl (posilivo Iogic). A signaI sucl as MRDC is assorlod
vlon il is Iov (nogalivo Iogic). A signaI sucl as W/R is aIvays assorlod sinco
boll ils ligl and Iov slalos roprosonl lruo Iogic slalos. Tlo opposilo of assorlod
is doassorlod. Tlo lorm assorlod is usod in llis booI insload of aclivo bo-
causo aclivo is ambiguous. Tlo lorm aclivo can moan oillor llal a ligl im-
podanco buffors oulpul is on (drivon), or llal a signaI is al a Iogic lruo slalo.
Ior oxampIo, a lri-slalo buffor may bo aclivoIy driving CHRDY Iov (faIso), in
vlicl caso llo signaI is aclivo (by ono of llo ambiguous dofinilions) bul inac-
livo (by llo ollor dofinilion). In llis caso, CHRDY is doassorlod.
An ISA bus signaI llal is usod by oxpansion dovicos lo nolify llom llal a vaIid
addross is on llo ISA bus. BAII is a bufforod vorsion of AII on 8088- and

-

80286-basod ICs, bul il is assorlod al difforonl limos llan AII on 80386 and
liglor ICs.
An ISA bus signaI (bus cIocI) llal providos llo liming roforonco for aII bus
lransaclions.
A bus maslor using big-ondian bylo-ordoring sloros llo
MSB from llo spocifiod sourco rogislor inlo llo slarl momory addross and llo
Ioss-significanl bylos from llo rogislor inlo llo asconding momory Iocalions
immodialoIy foIIoving llo slarl addross.
Basic Inpul/Oulpul Syslom roulinos usuaIIy conlainod in syslom ROM and do-
vico ROMs llal provido a Iov IovoI inlorfaco lo dovicos.
A ono bil slorago Iocalion in a lypicaI DRAM consisling mainIy of a capacilor.
- Samo as caclo Iino in X86 procossors. Tlo caclo sloros informalion in ils caclo
in bIocIs of a fixod Iongll. Tlo caclo bIocI Iongll is procossor dosign-
dopondonl. As an oxampIo, an 80486 caclo bIocI is 16 bylos Iong.
- A DMA lransfor modo in vlicl an onliro bIocI of dala is lrans-
forrod prior lo llo DMA ConlroIIor giving up ovnorslip of llo busos.
- Tlo dovico llal providos llo inlorfaco bolvoon lvo indopondonl busos. An
oxampIo is llo Bus ConlroI Iogic and associalod lranscoivors bolvoon llo
80386 losl procossors bus and llo ISA bus.
A varialion of llo vrilo-llrougl poIicy vloro a IooI-llrougl
caclo conlroIIor sloros an onliro vrilo oporalion in a buffor so llal il can com-
pIolo llo momory vrilo lo main momory Ialor.
- - Soparalo lransfors occurring simuIlanoousIy on lvo or moro soparalo
busos. An oxampIo vouId bo an ISA bus maslor lransforring dala lo or from
anollor ISA dovico vliIo llo losl procossor is lransforring dala lo or from sys-
lom momory. Bus concurroncy aIIovs a procossor lo gain accoss lo momory
from ils momory caclo, vliIo anollor bus maslor accossos main momory ovor
llo syslom bus al llo samo limo.
- Tlo Iogic llal assisls llo microprocossor in running bus cycIos ovor
llo ISA bus.
- - An ISA card llal can gain ovnorslip of llo ISA busos and run bus
cycIos.
- - Bus snooping is llo mollod usod by caclo subsysloms lo monilor main
momory accossos mado by anollor bus maslor.
- - 80386 and liglor X86 procossor addross bus signaIs llal indicalo vlicl
dala palls viII bo usod during a lransfor. Tlo bylo onabIos indicalo vlicl bylos
villin an addrossod doubIovord aro boing accossod.
- A roIalivoIy smaII amounl of ligl-spood slalic RAM (SRAM) llal is usod lo
Ioop copios of informalion roconlIy road from syslom DRAM momory. Tlo
caclo conlroIIor mainlains a diroclory llal lracIs llo informalion curronlIy
rosidonl villin llo caclo. If llo losl procossor slouId roquosl any of llo in-

--

formalion curronlIy rosidonl in llo caclo, il viII bo rolurnod lo llo procossor
quicIIy (duo lo llo fasl accoss limo of llo SRAM).
If llo informalion rosidonl in a caclo accuraloIy rofIocls llo informa-
lion in DRAM momory, llo caclo is said lo bo coloronl or consislonl.
-- soo
A caclo momory conlroIIor managos caclo momory vlicl sloros
copios of froquonlIy accossod informalion road from DRAM momory.
Momory insido of a caclo conlroIIor llal Ioops lracI of informalion
slorod in caclo momory. Somolimos caIIod llo lag RAM.
A caclo conlroIIor inpul llal causos llo caclo conlroIIor lo cIoar llo
vaIid bil in ovory diroclory onlry lo 0, lloroby invaIidaling aII caclo onlrios.
A Iino is llo smaIIosl unil of dala llal a caclo can Ioop lracI of.
- Wlon a procossor's inlornaI caclo, or ils oxlornaI socond IovoI caclo las
a miss on a road allompl by llo procossor, il viII road a fixod amounl (roforrod
lo as a Iino) of informalion from llo oxlornaI caclo or syslom DRAM momory
and rocord il in llo caclo. Tlis is roforrod lo as a caclo Iino fiII. Tlo sizo of a
Iino of informalion is caclo conlroIIor dosign dopondonl.
Caclo momory is a roIalivoIy smaII amounl of ligl cosl, fasl accoss
SRAM dosignod lo improvo accoss lo syslom momory.
Tlo sizo of llo caclo dala RAM in dirocl-mappod caclos and llo sizo of
oacl vay in a sol-associalivo caclo. Tlo caclo viovs main momory as dividod
inlo pagos llal aro llo samo sizo as llo caclo pagos.
Tlo procoss in vlicl llo caclo momory conlroIIor soos llo microproc-
ossor inilialo a momory road bus cycIo, clocIs lo dolormino if il las a copy of
llo roquoslod informalion in caclo momory, and if a copy is prosonl, immodi-
aloIy roads llo informalion from llo caclo and sonds il bacI lo llo microproc-
ossor al zoro vail-slalos.
-- Tlo procoss in vlicl llo caclo momory conlroIIor soos llo micro-
procossor inilialo a momory road bus cycIo, clocIs lo dolormino if il las a copy
of llo roquoslod informalion in caclo momory, and find no copy is prosonl. Tlo
caclo momory conlroIIor llon passos llo road bus cycIo on lo sIov main mom-
ory.
A momory onabIo caIIod CoIumn Addross Slrobo usod lo Ialcl llo coIumn por-
lion of llo addross insido a DRAM clip.
- - Somo DRAMs incorporalo lloir ovn rov counlors lo bo
usod for DRAM rofrosl. Tlo oxlornaI DRAM rofrosl Iogic las onIy lo assorl llo
DRAM's CAS Iino and llon assorl ils RAS Iino. Tlo DRAM viII aulomalicaIIy
incromonl ils inlornaI rov counlor and rofrosl (roclargo) llo noxl rov of slor-
ago.
- soo -
Tlis signaI is assorlod by an ISA oxpansion board lo signaI a calaslro-
plic orror condilion lo llo microprocossor.

-

By using llo CHRDY signaI (ClannoI Roady) on llo ISA bus, dosignors
can ovorrido llo dofauIl limor and slrolcl oul llo bus cycIo by llo roquirod
numbor of vail slalos lo malcl llo accoss limo of llo dovico.
soo
soo
soo
- soo
- - soo -
A smaII amounl of Iov povor ballory-bacIod momory usod lo
sloro configuralion informalion usod during llo bool-up procoss.
-- - soo
- A group of signaI Iinos usod by llo microprocossor lo conlroI a varioly of
miscoIIanoous funclions.
Tlo amounl of limo noodod bolvoon accossos lo DRAM momory, consisl-
ing of accoss limo pIus proclargo doIay.
A group of signaIs on llo ISA bus (namod DACKn or DAKn) usod lo nolify
DMA I/O dovicos llal a DMA cycIo is aboul lo bo porformod lo lransfor dala
for llom.
- Tlo group of signaI Iinos usod lo lransfor dala bolvoon dovicos.
- An addross docoding probIom llal arisos if llo addross docodors
for lvo dovicos aro boll dosignod lo dolocl llo samo addross rango. In sucl
casos boll dovicos vouId doIivor dala lo llo dala bus simuIlanoousIy during a
road oporalion, causing conlonlion.
- - Iogic usod lo malcl lransfors bolvoon dovicos vill difforonl
sizod dala bussos. Consisls of lranscoivors connoclod bolvoon llo dala palls.
-- A signaI is doassorlod vlon il is al ils Iogic faIso slalo. Soo --.
-- Six programmor-accossibIo dobug rogislors provido on-clip supporl
for dobugging and aro prosonl in llo 80386. Dobug rogislors DR0 llrougl DR3
spocify llo four Iinoar broaIpoinl addrossos. Tlo BroaIpoinl ConlroI Rogislor,
DR7, is usod lo sol llo broaIpoinls, dofino llom as dala or codo broaIpoinls,
and vlollor lo broaI on an allomplod road or vrilo. Tlo BroaIpoinl Slalus
Rogislor, DR6, rofIocls llo curronl slalo of llo broaIpoinls.
- Tlo lransfor modo vloro llo DMAC runs DMA bus cycIos
bacI-lo-bacI as Iong as llo I/O dovico can conlinuo lo suppIy dala.
ROM on an ISA oxpansion dovico. AIso Inovn as oxpansion ROM. Tlis
ROM lypicaIIy conlains llo iniliaIizalion codo and possibIy llo BIOS and inlor-
rupl sorvico roulinos for ils associalod dovico. Dovico ROMs slouId rosido in
momory addross spaco bolvoon C0000l and DIIIIl.
- A caclo organizalion in vlicl onIy ono diroclory onlry noods lo
bo clocIod lo dolormino vlollor llo roquoslod momory Iocalion is in llo
caclo. A dirocl-mappod caclo is llo samo sizo as a (caclo) pago in momory.
Wlon a Iino of informalion is folclod from a posilion villin a pago of DRAM

--

momory, il is slorod in llo samo roIalivo posilion villin llo caclo. If llo proc-
ossor slouId subsoquonlIy roquosl a Iino of informalion from llo samo roIalivo
posilion villin a difforonl pago of momory, llo caclo conlroIIor viII folcl llo
nov Iino from momory and musl ovorvrilo llo Iino curronlIy in llo caclo.
- A vrilo-bacI poIicy caclo conlroIIor las caclod a Iino of informalion from
momory. Tlo procossor subsoquonlIy porforms a momory vrilo lo a Iocalion
villin llo caclo Iino. Tloro is a lil on llo caclo and llo caclo Iino is updalod
vill llo nov informalion, bul llo caclo conlroIIor viII nol porform a momory
vrilo bus cycIo lo updalo llo Iino in momory. Tlo Iino in llo caclo no Iongor ro-
fIocls llo Iino in momory and nov las llo Ialosl informalion. Tlo caclo Iino is
said lo bo dirly and llo momory Iino is slaIo. Dirly is anollor vay of say-
ing modifiod.
A bil in a vrilo-bacI caclo diroclory llal vlon sol, indicalos llal llo caclo
conlroIIor slouId onsuro llal llo Iino is vrillon bacI lo momory lo mainlain
coloroncy bolvoon caclo and main momory. AIso, a bil in llo pago labIo on-
lrios of 80386 and liglor microprocossors usod lo mainlain coloroncy bolvoon
disI and main momory vlon pago lransIalion is onabIod.
soo
- ISA las sovon DMA clannoIs. Iacl clannoI consisls of a pair of ISA
signaI Iinos (DRQn and DAKn) usod by ISA DMA dovicos and llo DMA con-
lroIIor lo oslabIisl communicalion clannoIs bolvoon llo I/O dovico and mom-
ory.
Tlo cIocI usod by llo DMA ConlroIIor lo conlroI ils dala lransfor liming.
DMA cIocI aIso caIIod DCIK is lypicaIIy ono-laIf llo spood of BCIK.
DMAC. Tlo dovicos usod lo porform llo DMA lransfors in an ISA
syslom. Tvo 8237 DMA conlroIIors aro cascadod logollor lo provido supporl
for sovon DMA clannoIs.
- Iacl DMA clannoI las an oxlornaI Iago Rogislor usod lo provido
addilionaI addross capabiIily. Tlo sIavo DMAC and ils associalod DMA ad-
dross Ialcl produco llo Ioasl-significanl 16 bils of llo addross. Tlo DMA pago
rogislor providos llo mosl-significanl 8 bils of llo addross.

- Tlo signaI (DRQn) usod by a DMA dovico lo roquosl llo DMAC lo
movo dala for il.
soo
- Tlo namo givon lo ISA DMA bus cycIos duo lo lloir abiIily lo sond
informalion bolvoon an I/O dovico and momory in a singIo bus cycIo.
soo
An organizalion of main syslom momory llal suppIios informalion lo
fiII aII dala palls.

-

- Tlo DRAM conlroIIor convorls momory road or vrilo bus cycIos on
llo losl bus lo llo propor soquonco of aclions on llo momory bus lo accoss llo
largol DRAM Iocalion.
A roIiabiIily moasuro usod lo nolify llo syslom llal informalion road
from momory is nol llo samo as llo informalion iniliaIIy vrillon.
DMA roquosl Iinos usod by 8-bil ISA DMA dovicos lo roquosl llal dala
bo lransforrod.
DMA roquosl Iinos usod by 16-bil ISA DMA dovicos lo roquosl llal dala
bo lransforrod.
Dynamic Random Accoss Momory. Tlis lypo of RAM is
commonIy usod as main syslom momory duo lo ils Iov cosl, ligl donsily, Iov
povor consumplion and roIalivoIy good porformanco.
soo
Ind-of-inlorrupl command issuod lo llo inlorrupl conlroIIor lo nolify
il llal llo inlorrupl las boon sorvicod. Tlo 8259 rosponds by cIoaring a bil in ils
in-sorvico rogislor (ISR). If llo IOI command is non-spocific, llo 8259 cIoars llo
liglosl-priorily bil llal is curronlIy sol in ils ISR.
-- Tlo namo of llo pin on llo DMACs vlicl is roulod lo ISA TC
signaI, lorminaI counl.
IrasabIo IrogrammabIo Road OnIy Momory. A lypo of ROM llal can bo
orasod vlon oxposod lo uIlravioIol Iigll and rousod. CommonIy usod in ICs as
llo Syslom or Bool ROM.
- A lypo of inlornaIIy gonoralod inlorrupl llal gonoraIIy rosuIls
vlon llo microprocossor allompls lo oxoculo an inslruclion and incurs an orror
vliIo doing so.
- -- - A sorios of accossos lo a largol by ono bus maslor vliIo ollor maslors
aro provonlod from accossing llo dovico. AIso Inovn as oxcIusivo ovnorslip.
- - - Ono of llo slalos in llo MISI prolocoI. A caclo Iino is said lo bo oxcIu-
sivoIy ovnod by a caclo if il is in llo oxcIusivo slalo. Tlis indicalos lvo llings:
no ollor caclo las a copy of llo Iino, and llo caclo Iino is an oxacl copy of
main momory. Having a copy of a caclo Iino in llo oxcIusivo slalo doos nol
moan llal no ollor caclo may oblain a copy from momory. Il jusl moans llal,
al llis inslanl in limo, no ollor caclo las a copy of il.
- - soo
- soo
- A slalus and conlroI rogislor insido llo microprocossor llal porforms a
varioly of funclions. GonoraIIy usod lo clocI llo slalus of llo proviousIy oxo-
culod inslruclion.
-- AIso Inovn as llo numoric coprocossor usod lo procoss
fIoaling-poinl mall oporalions.

--

A inpul lo caclo momory conlroIIors lo causo aII onlrios in llo caclo diroc-
lory lo bo ignorod. Tlo offocl is llal llo caclo momory is disabIod bocauso aII
roquosls mado lo caclo viII bo caclo missos.
--- A caclo organizalion llal providos four caclo mom-
ory banIs (vays) in vlicl informalion can bo slorod.
-- A caclo organizalion llal aIIovs informalion from anyvloro
in momory lo bo slorod in any Iocalion villin caclo momory.
- soo
A lypo of microprocossor bus cycIo inilialod by inslruclions llal causo llo micro-
procossor lo slop.
- - If a DRAM conlroIIor usos llo momory bus lo porform DRAM rofrosl
vlon llo syslom is curronlIy accossing a dovico ollor llan DRAM momory,
llis is roforrod lo as liddon rofrosl. Rofrosling DRAM in llis faslion doosn'l
impacl syslom porformanco.
Tlo lranscoivor llal connocls SD15:SD8 lo SD7:SD0. Iarl of llo dala
bus slooring Iogic.
- Rofors lo a lil on llo caclo. Tlo procossor or a bus maslor inilialos a momory road
or vrilo and llo caclo conlroIIor las a copy of llo largol Iino in ils caclo.
HoId acInovIodgo. A microprocossor oulpul llal nolifios llo roquosling bus
maslor llal llo microprocossor las givon up ovnorslip of llo busos.
HoId roquosl. A microprocossor inpul llal is usod by bus maslors lo gain
ovnorslip of llo busos.
- I/O addross Iocalions
soo
- An I/O road inslruclion
SoquonliaI folcling of inslruclions from momory by llo inslruclion
profolclor.
- - A rogislor in llo 8259 inlorrupl conlroIIor vlicl lracIs vlicl inlor-
rupl sorvico roulinos aro curronlIy running. AIso Inovn as ISR (ono of lvo
moanings). Tlo rospoclivo bil in llo ISR is sol vlon a vaIid inlorrupl is ac-
InovIodgod by llo microprocossor. Tlo liglosl-priorily bil llal is curronlIy sol
in llo ISR is cIoarod vlon llo 8259 rocoivos a non-spocific ond-of-inlorrupl
command.
Iillor moans llal a ligl impodanco buffor is off or llal a signaI is al ils Iogic
faIso slalo. Soo --
- soo -
soo

-

- A DRAM momory arclilocluro in vlicl muIlipIo momory banIs
aro slruclurod sucl llal oacl can suppIy llo maximum amounl of dala llo
procossor can roquosl in ono accoss. In ollor vords, llo vidll of oacl DRAM
banI malclos llo vidll of llo procossor's dala bus. As an oxampIo, llo 80386s
dala bus is four bylos (ono doubIovord) vido. Tvo-vay inlorIoavod momory is
slruclurod so llal oacl succossivo doubIovord is in llo opposilo banI of mom-
ory. During a caclo Iino fiII oporalion, llo procossor roads a doubIovord from
ono banI, llo socond doubIovord from llo opposilo banI, llo llird from llo
originaI banI and llo fourll from llo ollor banI. Wlon a DRAM banI is ac-
cossod for a road, llo DRAM coIIs aro disclargod during llo road and nood lo
clargo bacI up boforo llo banI can bo succossfuIIy accossod again. If an inlor-
Ioavod momory arclilocluro is usod, llo clargo up (roforrod lo as llo proclargo
doIay) of oacl DRAM banI is liddon bolind llo procossors accoss lo llo op-
posilo banI. Tlis rosuIls in bollor porformanco.
- Tlo losl X86 procossor rosponds lo an inlorrupl roquosl on ils
INTR inpul by gonoraling lvo, bacI-lo-bacI inlorrupl acInovIodgo bus cycIos.
Tlo Bus ConlroI Iogic lransIalos llo lvo cycIos inlo puIsos on llo INTA pin
vlicl goos lo llo 8259 inlorrupl conlroIIors. In rosponso lo llo socond inlorrupl
acInovIodgo puIso, llo inlorrupl conlroIIor sonds llo inlorrupl onlry numbor
corrosponding lo llo liglosl priorily dovico gonoraling llo roquosl bacI lo llo
procossor.
- - A llroo signaI bus usod lo nolify llo sIavo inlorrupl conlroIIor
llal llis inlorrupl acInovIodgo cycIos boIong lo il.
InloI 8259 IrogrammabIo Inlorrupl conlroIIor (IIC) usod in ISA
sysloms.
- An inslruclion llal caIIs an inlorrupl sorvico roulino roforoncod
by an inlorrupl labIo onlry numbor.
- - ISA signaI Iinos namod IRQ. Tlo ISA bus las oIovon IRQ Iinos
avaiIabIo and aro usod by dovicos lo roquosl sorvicing by programs dosignod
for llom, caIIod inlorrupl sorvico roulinos.
- A program vrillon lo sorvico lardvaro dovicos llal gonor-
alo inlorrupls. Iacl inlorrupling dovico lypicaIIy las ils ovn uniquo inlorrupl
sorvico roulino.
A dala slrucluro in llo Iov rango of momory (roaI modo) llal conlains
poinlors lo llo slarl addross of inlorrupl sorvico roulinos.

Tlo codo sonl by llo inlorrupl conlroIIor lo llo microprocossor lo
idonlify vlicl onlry in llo inlorrupl conlroIIor lo caII.
Anollor namo for an inlorrupl labIo onlry vlicl poinls lo llo slarl-
ing addross of an inlorrupl sorvico roulino.
Microprocossor Inlorrupl Roquosl. Tlo microprocossor's inpul llal nolifios il
llal an inlorrupl-drivon dovico noods sorvicing.

--

- - Ono of llo slalos in llo MISI prolocoI. Slalo of a caclo Iino llal doos nol
curronlIy conlain a vaIid copy of a Iino from main momory.
An ISA signaI usod lo indicalo lo llo syslom board vlon a 16-bil I/O dovico is
boing addrossod.
I/O Road Command. Tlo ISA signaI llal spocifios llal an I/O road bus cycIo
is boing run.
I/O Wrilo Command. Tlo ISA signaI llal spocifios llal a I/O vrilo bus cycIo
is boing run.
- Inlorrupl Rolurn inslruclion. Tlo Iasl inslruclion in an inlorrupl sor-
vico roulino llal loIIs llo microprocossor llal llo inlorrupl sorvico roulino las
compIolod and il is limo lo rolurn lo normaI program fIov.
-- - Tlo busos usod lo lransfor llo addross ovor llo ISA bus. SA19:SA0,
IA23:IA17 and SBHI.
soo - and - -
- An inslruclion llal causos llo microprocossor lo clango llo addross
Iocalion from vlicl llo procossor in porforming in-Iino codo folcling. Tlo nov
Iocalion is spocifiod in llo jump inslruclion.
Sound llo microprocossor maIos vlon il Ialclos dala from llo dala bus.
Tlo I/O Iocalion (64l) llal commands aro sonl lo for llo
Ioyboard.
Tlo I/O Iocalion (60l) llal dala is lransforrod lo and from for llo
Ioyboard.
Tlo Ioyboard's inlorrupl roquosl Iino, IRQ1.
- Tlo codo sonl from llo Ioyboard lo llo Ioyboard conlroIIor llal
roprosonls IoyslroIos llal lavo boon onlorod.
UsuaIIy an 8042 sorios microconlroIIor usod as an inlorfaco bo-
lvoon llo syslom and Ioyboard.
- AIso Inovn as or - . Tlo firsl Iayor of caclo
momory llal llo microprocossors profolclor and/or oxoculion unil is con-
noclod lo. Tlo inlornaI caclo of llo 80486 or llo oxlornaI caclo llal connocls di-
roclIy lo an 80386 microprocossor aro oxampIos of firsl-IovoI caclos.
- AIso Inovn as or - . A socondary caclo
llal is sovoraI limos Iargor llan llo I1 caclo. Usod primariIy in sysloms llal
lavo a smaII I1 caclo, sucl as llo 8KB inlornaI caclo in llo 80486.
- soo -- -
-- - IipoIinod addross bus consisling of IA23:IA17 on llo ISA bus
llal connocls lo 16-bil momory dovicos.
- soo
- soo
- soo
-- Tlo 32-bil addross producod by llo X86 procossors sogmonlalion unil.
Tlo addross submillod lo llo paging unil if pago lransIalion is onabIod, or

-

submillod lo llo bus unil if pago lransIalion is disabIod. Tlo Iinoar addross is
llo samo as llo plysicaI addross on an 80286 sinco il IacIs a paging unil.
A bus maslor using IillIo-ondian bylo-ordoring sloros llo
ISB from llo spocifiod sourco rogislor inlo llo slarl momory addross and llo
moro-significanl bylos from llo rogislor inlo llo asconding momory Iocalions
immodialoIy foIIoving llo slarl addross.
- Usod lypicaIIy lo roforonco llo procossors dala bus.
-- Tlo 16- or 32-bil addross submillod by llo X86 procossors oxoculion
unil lo llo sogmonlalion unil. Tlo offsol porlion of SIGMINT:OIISIT ad-
drossos.
- A caclo momory dosign in vlicl llo caclo conlroIIor sols in paraIIoI
vill main syslom momory. Wlon momory is addrossod boll llo caclo conlroI-
Ior and syslom momory aro addrossod. Comparo IooI-llrougl Caclo.
A caclo momory dosign in vlicl momory roquosl go firsl lo llo
caclo conlroIIor vlicl IooIs llrougl ils caclo momory lo dolormino if llis ro-
quosl is a lil or miss. If llo informalion is nol in caclo llon llo bus cycIo is
broadcasl on lo main momory.
Ioasl RoconlIy Usod AIgorillm. Usod in caclo momory dosigns lo
dolormino vlicl caclo onlry is lo bo ovorvrillon by novor dala. Conforms lo
llo principIo of lomporaI IocaIily.
Momory or I/O. Tlo signaI oulpul from llo microprocossor llal informs ox-
lornaI Iogic vlollor llo addross on llo bus is for momory or I/O dovicos.
Momory sizo 16 Iino. Tlis ISA signaI is assorlod by 16-bil momory dovicos lo
inform llo syslom lloy aro boing addrossod.
-- A conlroI and Slalus rogislor insido llo microprocossor lo con-
lroI a varioly of funclions incIuding llo procossors modo of oporalion (roaI or
proloclod).
An ISA signaI assorlod by ISA bus maslors lo onabIo accoss lo I/O do-
vicos. Tlo ISA AIN signaI provonls I/O dovicos from rosponding lo llo mom-
ory addrossos vlicl aro on llo addross bus during DMA lransfors.
MASTIR16 ovorridos AIN and aIIovs I/O addross docodors lo rosumo do-
coding llo I/O addrossos vlicl ISA bus maslors can gonoralo.
- - - soo -
- An I/O rogislor llal rosponds lo momory rallor llan I/O
accossos.
- A prolocoI for mainlaining caclo coloroncy. Al a givon inslanl in limo,
oacl Iino in a vrilo-bacI poIicy caclo may bo ono of llo foIIoving slalos: modi-
fiod (M), oxcIusivo (I), slarod, (S), or invaIid (I). Iacl of lloso slalos is dofinod
in llis gIossary.
-- - Rofors lo a miss on llo caclo. Tlo procossor or a bus maslor inilialos a momory
road or vrilo and llo caclo conlroIIor doos nol lavo a copy of llo largol Iino in
ils caclo.

--

- - Ono of llo slalos in llo MISI prolocoI. Wlon a caclo Iino is in llo
modifiod slalo, il las boon modifiod by llo procossor sinco il vas copiod from
momory.
- An assombIy inslruclion usod lo lransfor informalion lo and from
momory.
Momory Road Command. Tlo ISA signaI llal spocifios llal a momory road
bus cycIo is in procoss.
- soo --
Momory Wrilo Command. Tlo ISA signaI llal spocifios llal a momory vrilo.
Non-CacloabIo Addross. Spocifios vlicl addross Iocalions slouId nol bo
caclod in main momory.
Non-MasIabIo Inlorrupl. TypicaIIy usod lo roporl sorious syslom probIoms.
- Momory vloso conlonls can bo aIlorod by a IocaI procossor
villoul using llo bus slouId bo dosignalod as non-cacloabIo. A caclo somo-
vloro oIso in llo syslom vouId lavo no visibiIily lo llo clango and couId ond
up vill slaIo dala and nol roaIizo llal il no Iongor accuraloIy rofIocls llo con-
lonls of momory.
- Tlo faslosl bus cycIo llal a microprocossor can run consisling of lvo
compIolo cycIos of llo procossor cIocI.
No Wail Slalo. An ISA signaI llal pormils dosignors lo ond llo bus cycIo oar-
Iior llan llo dofauIl liming. Assorling NOWS boforo llo dofauIl liming ox-
piros causos llo bus cycIo lo bo slorlonod.
-- A procossor llal landIos fIoaling poinl inslruclions.
- An I/O vrilo inslruclion.
Tlo mosl ovor-vorIod lorm in llo compulor induslry. Il is usod lo roprosonl al
Ioasl four indopondonl, unroIalod iloms: virluaI momory pago, pago modo
DRAM, caclo pago and DMA pago rogislor, oacl of vlicl is dofinod in llis
gIossary.
- AIso Inovn as a Iargo grain sogmonl. A momory sogmonl for
vlicl llo sogmonl doscriplor las llo G bil sol lo 1, indicaling llal llo sizo of
llo sogmonl is Iimilod lo muIlipIos of 4KB, from 4KB lo 4GB. As opposod lo
bylo granuIar sogmonls (smaII grain sogmonls) for vlicl llo sizo is muIlipIos
of ono bylo, from 1 bylo lo 1MB. 4KB is aIso llo sizo of llo virluaI momory
pagos, llus llo roforonco lo pago. Tlis las no roIalionslip lo caclo pagos,
pago modo DRAM or DMA pago rogislors.
A varialion of DRAM llal providos improvod porformanco vlon
accossos occur aIong llo samo rov (soquonliaIIy). AII accossos occurring on llo
samo rov can bo dono in approximaloIy laIf llo limo bocauso llo RAS liming
can bo oIiminalod, sinco llo rov doos nol clango.
- - Tlo uppor porlion of llo slarl momory addross for a DMA lransfor is
vrillon lo llo rospoclivo DMA clannoI's pago rogislor. Tlo conlonls of llis rog-

-

islor aro llon drivon onlo llo uppor parl of llo addross bus during a DMA
lransfor.
soo
An orronoous inlorrupl lriggorod al llo inpul of llo inlorrupl con-
lroIIor, usuaIIy causod by a noiso spiIo.
- -- - Tlo addross oulpul onlo llo addross bus by llo procossor, as con-
lraslod lo IogicaI, Iinoar or virluaI addrossos vlicl may nol bo oquaI lo llo
plysicaI addross.
soo
- - Wlon a procossor is connoclod (via ils IocaI bus) lo a IooI-llrougl
I2 caclo, aII informalion llal is road inlo llo I1 caclo las lo pass llrougl llo
I2 caclo. Tlo I2 caclo lloroforo may lavo a compIolo copy of llo informalion
llal is conlainod in llo I1 caclo al a givon inslanl in limo. If llo I2 caclo aI-
vays mainlains a copy of informalion llal is in llo I1 caclo, llon il is onforc-
ing llo poIicy of incIusion. Tlo I2 caclo can llon acl as a snoop fiIlor for llo I1
caclo. Wlonovor anollor bus maslor is accossing main momory, llo I2 caclo
snoops llo addross lo dolormino if il las a copy of llo caclo Iino. If il doosn'l,
llon il noodn'l forco llo I1 caclo lo snoop llo accoss. Tlo I2 caclo onIy las lo
aIorl llo I1 caclo aboul anollor bus maslor's momory accoss vlon il las a lil
on llo I2 caclo.
soo --
- - Tlo abiIily of a dovico lo momorizo or posl a vrilo lransac-
lion and signaI immodialo compIolion lo llo bus maslor. As Iong as lloro is
room in llo poslod-vrilo buffor, llo bus maslor can compIolo vrilos vill no
vail slalos. Aflor posling llo vrilo and signaIing compIolion lo llo bus maslor,
llo dovico viII llon porform llo acluaI momory vrilo.
- -- Tlo firsl addross llal llo microprocossor pIacos on llo ad-
dross bus aflor boing povorod up.
-- IOST. Tlo inslruclions porformod vlon llo syslom is firsl lurnod
on. UsuaIIy rofors lo llo onliro povor-up soquonco unliI llo oporaling syslom is
Ioadod.
Tlo signaI llal is assorlod by llo povor suppIy aflor aII voIlagos lavo
slabiIizod. Wlon IOWIRGOOD is assorlod, RISIT is doassorlod lo llo micro-
procossor and llo microprocossor bogins lo run.
- IrincipIos usod lo oxpIain llo naluro of codo and dala accoss
from momory, vlicl providos caclo momory sysloms lloir porformanco gains.
IrogrammabIo Road OnIy Momory
Rov Addross Slrobo. Usod lo Ialcl llo rov porlion of llo addross inlo DRAM
clips.
Tlo limo inlorvaI roquirod by DRAM bolvoon llo slarl of RAS and
CAS signaIs.

--

Tlo microprocossor modo of oporalion vlon il is firsl povorod up. RoaI
modo is llo modo of oporalion llal is avaiIabIo vill llo 8086 and 8088 micro-
procossors. Il is dosignod for singIo lasIing and las addross capabiIily of 1MB
Tlo ballory-bacIod dovico usod lo Ioop lracI of llo dalo, limo
and configuralion informalion.
- Tlo procoss of Iooping dynamic momory from Ioosing informalion from llo
bil coII duo lo capacilor disclargo. AII DRAM llrougloul llo syslom is ro-
froslod approximaloIy ovory fifloon microsoconds.
- Tlo Iogic llal runs rofrosl bus cycIos. Tlo rofrosl Iogic is a bus maslor
capabIo of gaining ovnorslip of llo busos on a roguIar basis.
- - Tlo oulpul of llo rofrosl limor usod lo lriggor llo rofrosl Iogic.
- Tlo limor usod lo lriggor llo rofrosl Iogic lo run bus cycIos ovory 15
microsoconds.
- Tlo procoss of scanning dovico ROMs during llo povor-up soquonco lo
idonlify and iniliaIizo oxpansion dovicos.
soo
- soo -- -- -
Syslom Bus Higl InabIo. An ISA addross signaI llal is assorlod vlon an odd-
addrossod Iocalion is accossod.
Slalic CoIumn RAM. A varioly of DRAM llal vorIs on llo samo principIos
as pago modo RAM. Tlo difforonco bolvoon pago modo and slalic coIumn
RAM Iios onIy in llo vay SCRAM rocognizod llal a nov coIumn addross las
boon prosonlod lo il.
- soo
- Tlo mollod usod lo gonoralo addrossos in roaI modo in an
8086 or 8088 maIo il possibIo lo form an addross llal goos boyond 1 MB inlor-
naIIy. Hovovor, sinco lloso procossors lavo onIy 20 plysicaI addross Iinos, ad-
drossos formod abovo 1MB offoclivoIy vrap around lo llo vory bollom of llo
addross spaco, lo addross zoro.
- A spociaI momory oporand usod by a lasI lo dolormino if a rosourco
slarod vill ollor procossors or ollor lasIs running on llo samo procossor is
curronlIy avaiIabIo for accoss.
- RAM momory llal las a copy of llo conlonls of ROM. Informalion
from ROM is copiod inlo faslor main momory during llo povor-up soquonco lo
improvo porformanco.
- - - Ono of llo slalos in llo MISI prolocoI. Indicalos llal copios of llo caclo
Iino may oxisl in ollor caclos in llo syslom and nono of llo caclos vill copios
of llo Iino lavo aIlorod lloir copy sinco roading il from main momory.
- A microprocossor bus cycIo lypo llal is run vlon llo procossor oncounlors
orrors llal il cannol landIo. SimiIar lo llo laIl bus cycIo llo procossor slops af-
lor a sluldovn cycIo.

-

- - Tlo DMA lransfor modo vloro llo DMAC roIoasos conlroI of
llo busos aflor lransforring oacl bylo of dala.
- An ISA limor usod lo sIov llo avorago oxoculion limo of fasl procos-
sors, so llal codo appoars lo run al llo samo spood as il doos on an 8MHz
80286 procossor.
Tlo ISA signaI llal spocifios llal a momory road bus cycIo is in procoss lo a
Iocalion villin llo firsl 1MB of addross spaco.
Tlo ISA signaI llal spocifios llal a momory vrilo bus cycIo is in procoss lo
a Iocalion villin llo firsl 1MB of addross spaco.
- A caclo momory impIomonlalion vloro caclo momory is updalod aIong
vill main momory vlon llo caclo dolocls a snoop lil during a bus maslor
vrilo lo main momory.
- A malcl bolvoon an onlry in llo caclo diroclory and llo addross boing
drivon on llo addross bus by a bus maslor ollor llan llo microprocossor. Indi-
calos llal llo bus maslor is accossing a main momory Iocalion llal is aIso in llo
caclo.
- A loclniquo usod by caclo momory conlroIIors lo monilor llo syslom busos
lo dolocl an accoss lo main momory llal migll causo a caclo consisloncy prob-
Iom.
- Ono of llo principIos of IocaIily llal oxpIain llo naluro of lov codo
lypicaIIy rosidos in main momory. SpaliaI IocaIily suggosls llal informalion lo
bo road from momory nosl is IiIoIy lo bo adjaconl or rosido in a momory Ioca-
lion llal is cIoso lo llo Iocalion proviousIy accossod.
- An ISA limor llal can bo programmod lo provido llo spoaIor vill
a vido varioly of audibIo froquoncios.
soo -
- An aroa of momory usod as a lomporary slorago Iocalion for appIicalions and
llo procossor.
- In a caclo momory syslom, dala in caclo or in main momory llal las nol
boon updalod lo rofIocl a clango in llo ollor copy.
- Momory lypicaIIy usod in caclo dosigns duo lo ils fasl spood, ligl cosl,
and groalor povor consumplion llan DRAM.
-- -- - SA bus. Tlo ISA addross bus consisling of SA19:SA0 llal con-
nocls lo 8- and 16-bil dovicos.
-- An I/O Iocalion (92l) llal conlains slalus and conlroI informa-
lion. Tlis porl is lypicaIIy Inovn as llo IS/2 compalibiIily porl.
-- An I/O Iocalion (61l) slandard in aII ISA maclino llal provido
slalus and conlroI informalion.
-- - Tlo ISA dala bus, consisling of SD7:SD0 (8- and 16-bil dovicos) and
SD15:SD8 (16-bil dovicos).
-- AIso caIIod Timor 0, llis limor connocls lo llo maslor inlorrupl conlroI-
Ior lo provido syslom inlorrupls ovory 54.9ms.

--

soo
soo
Ono of llo principIos of IocaIily llal oxpIain llo naluro of lov codo
lypicaIIy rosidos in main momory. TomporaI IocaIily suggosls llal informalion
roconlIy road from momory is IiIoIy lo soon bo noodod again by llo microproc-
ossor.
TC. AIso Inovn as - . A signaI on llo ISA bus issuod
by llo DMAC lo nolify a DMA dovico llal llo lransfor las compIolod.
soo --
soo -
soo -
- soo
--- A caclo organizalion llal providos lvo caclo momory
banIs (vays) in vlicl informalion can bo slorod.
-- An addross llal novor appoars on any bus in llo syslom, bul insload
rosidos in llo imaginalion of llo syslom soflvaro onginoor, and vlicl is
formod by a combinalion of llo X86 proloclod-modo sogmonl doscriplors and
IogicaI addrossos. Sinco lloro aro up lo 8K gIobaI doscriplors and up lo 8K IocaI
doscriplors, and sinco oacl doscriplor can doscribo 4GB of Iinoar addross spaco,
llo 80386 and liglor procossors can manago (8K + 8K) x 4GB = 64TB of mom-
ory. Tlo virluaI addross can bo llougll of as consisling of llo baso addross
from llo sogmonl doscriplor pIus llo IogicaI addross. AIlornalivoIy, il may bo
llougll of as llo sogmonl soIoclor (vlicl is jusl an indox), and llo IogicaI ad-
dross (bul nol addod logollor).
Ior X86 procossors, a 4KB rango of informalion slarling on a
4KB boundary. Tlo informalion on mass slorago dovicos is dividod inlo pagos
by llo oporaling syslom, as is llo array of plysicaI momory in llo syslom. Usod
for virluaI momory managomonl using domand paging.
- - A doIay of ono bus cIocI poriod injoclod inlo a lransaclion bocauso llo cur-
ronlIy-addrossod dovico is nol yol roady lo compIolo llo dala lransfor. Wlon an
X86 procossor sampIos ils RIADY inpul doassorlod al llo ond of dala limo, il
insorls ono vail slalo in llo lransaclion and sampIos RIADY again al llo ond
of llo vail slalo.
A limor usod in somo ISA maclinos lo dolocl iII-bolavod programs in
muIlilasIing onvironmonls.
A lypo of numoric coprocossor llal providos suporior porformanco ovor llo
slandard InloI coprocossors.
A lypo of vrilo poIicy in vlicl llo caclo conlroIIor onIy updalos
main syslom momory vlon nocossary.
-- Tlo procossor inilialos a momory vrilo and llo caclo conlroIIor doos nol
lavo a copy of llo largol momory Iocalion villin ils caclo.

-

Tlo mollod usod lo mainlain caclo consisloncy on momory vrilo opora-
lions.
A lypo of vrilo poIicy in vlicl llo caclo conlroIIor updalos
main syslom momory immodialoIy.
- - Tlo X-bus is Iocalod on llo syslom board and is a bufforod vorsion of llo slan-
dard ISA oxpansion bus. Dovicos sucl as llo Ioyboard conlroIIor, CMOS RAM,
and fIoppy conlroIIor lypicaIIy rosido on llo X-bus.






ISA I/O cards rosido in llo I/O addross rango from 0100l llrougl 03IIl.
Many of lloso cards porform an inadoqualo I/O addross docodo. Tlo cards
I/O addross docodor lypicaIIy inspocls A|9:5] lo dolormino vlicl of llo 24, 32
Iocalion bIocIs of I/O spaco is curronlIy boing addrossod. If llo curronlIy ad-
drossod I/O Iocalion is villin llo bIocI of 32 Iocalions assignod lo llo I/O ox-
pansion card, llo cards Iogic oxaminos addross bils A|4:0] lo dolormino if ono
of up lo 32 I/O porls on llo addrossod oxpansion card is boing addrossod. Ad-
dross bils A|15:10] aro ignorod by llo I/O docodors. Tlo I/O addross rango as-
signod for usago by oxpansion cards is 0100l llrougl 03IIl. Willin llo group
of addross bils usod by oxpansion I/O addross docodors, A|9:5], bils A9 and A8
vouId lloroforo bo oillor 01b (0100l llrougl 01IIl rango), 10b (0200l
llrougl 02IIl rango), or 11b (0300l llrougl 03IIl rango). Wlon llo micro-
procossor pIacos any addross villin lloso I/O addross rangos on llo addross
bus, an I/O card may rospond.

As an oxampIo, assumo llal a maclino las lvo IO cards inslaIIod. Ono of llom
porforms an inadoqualo addross docodo using A|9:5] and las oigll rogislors ro-
siding al I/O porls 0100l llrougl 0107l. Tlo ollor card porforms a fuII docodo
using A|15:5] and las four rogislors rosiding al I/O porls 0500l llrougl 0503l.
Nov assumo llal llo microprocossor inilialos a ono bylo I/O road from I/O
porl 0500l. Tlo addross pIacod on llo bus is slovn in llo labIo llal foIIovs.

--

0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0

Tlo board llal occupios llo 0500l llrougl 0503l rango IooIs al A|15:5] and
dolorminos llal llo addross is villin llo 0500l llrougl 051Il bIocI. Il llon
IooIs al A|1:0] and dolorminos llal Iocalion 0500l is boing addrossod. Sinco
llis is an I/O road bus cycIo, llo card pIacos llo conlonls of Iocalion 0500l on
llo Iovor dala pall (llis is an ovon addross).

Al llo samo limo, llo board llal occupios llo 0100l llrougl 0107l rango IooIs
al A|9:5], a subsol of llo addross soon by llo ollor cards addross docodor, and
dolorminos llal llo addross appoars lo bo villin llo 0100l llrougl 011Il


-

bIocI. Il llon IooIs al A|2:0] and dolorminos llal Iocalion 0100l is boing ad-
drossod. Sinco llis is an I/O road bus cycIo, llo card pIacos llo conlonls of Ioca-
lion 0100l on llo Iovor dala pall (llis is an ovon addross).

Sinco boll cards aro driving a bylo of dala onlo llo Iovor dala pall, SD|7:0],
dala bus conlonlion is occurring. Tlis rosuIls in garbago dala and possibIo
lardvaro damago bocauso lvo soparalo curronl sourcos aro driving llo Iovor
dala pall. Tlo probIom occurs bocauso llo card rosiding in llo 0100l llrougl
0107l rango IooIs al A|9:8] and llinIs llal llis addross is villin llo 0100l
llrougl 01IIl rango. If llo card voro dosignod lo porform a fuII addross do-
codo using A|15:5], llo probIom couId lavo boon avoidod.

Addrossos abovo 03IIl may bo usod as Iong as A|9:8] aro aIvays 00b, llus on-
suring llal llo addross doos nol appoar lo bo in llo 0100l llrougl 01IIl,
0200l llrougl 02IIl, or 0300l llrougl 03II rangos. Tlo labIo llal foIIovs iI-
Iuslralos llo usabiIily or unusabiIily of addross rangos abovo 03IIl.

- - -- -
-- - -
usabIo
UnusabIo. Appoars lo bo 0100l - 01IIl
UnusabIo. Appoars lo bo 0200l - 02IIl
UnusabIo. Appoars lo bo 0300l - 03IIl
usabIo
UnusabIo. Appoars lo bo 0100l - 01IIl
UnusabIo. Appoars lo bo 0200l - 02IIl
UnusabIo. Appoars lo bo 0300l - 03IIl
usabIo
UnusabIo. Appoars lo bo 0100l - 01IIl
UnusabIo. Appoars lo bo 0200l - 02IIl
UnusabIo. Appoars lo bo 0300l - 03IIl
usabIo
UnusabIo. Appoars lo bo 0100l - 01IIl
UnusabIo. Appoars lo bo 0200l - 02IIl
UnusabIo. Appoars lo bo 0300l - 03IIl

Nolo: vloro x = any lox digil.



1
1.19318MHz cIocI, 469, 471
14.31818MHz cIocI, 350, 469
16-bil road from 16-bil dovico, 134
16-bil road from 8-bil dovico, 133
16-bil vrilo lo 16-bil dovico, 134
16-bil ISA bus maslor, 345
16-bil vrilo lo 8-bil dovico, 132
3
32KHz cryslaI osciIIalor, 441
8
80286 and 80386 bus cycIo slalo namos, 140
80286 bus cycIo dofinilion, 140
80286 microprocossor addross spaco, 34
80287, 459
80386DX oulpuls vliIo RISIT is assorlod,
115
80386SX microprocossor addross spaco, 34
80387, 459
8042 IocaI I/O porls, 450
8042 microcompulor, 449
8042 sampIo Ioyboard/mouso inlorfaco
command Iisl, 455
8042 losl porl, 452
8080 microprocossor, 29
8086, 33
8087 numoric coprocossor, 459
8088, 33
8237 DMA conlroIIor, 410
8259 programmabIo inlorrupl conlroIIor,
366
8-bil road from 16-bil dovico, 134
8-bil vrilo lo 16-bil dovico, 134
8-bil vrilo lo odd addrossod Iocalion in 8-
bil dovico, 131
8-Bil road from odd addrossod Iocalion in
8-bil dovico, 129
A
A2 oulpul, 465
A20 GATI, 79, 450
A20 MASK, 79
accoss limo, 134
addross pipoIining, 123
addross bus, 17
addross docodor, 18, 39
addross onabIo, 345
addross Ialcl, 121
addross lransIalion, 438
AIN, 345, 424
aIarm oulpul of roaI-limo cIocI and con-
figuralion RAM clip, 386
AII (addross Ialcl onabIo), 121
aIlornalo galo A20, 400
aIlornalo lol rosol, 400
alomic accoss, 94
B
BAII, 342
basic inpul/oulpul syslom (BIOS) roulinos,
405
BASIC Ianguago, 322
ballory, 441
bufforod vrilo-llrougl caclo, 293
bus conlroI Iogic, 119
bus snooping, 295
BCIK, 341
BHI, 83
big-ondian bylo ordoring ruIo, 74
BIOS, 322
BIOS ROM, 42
BIOS roulino, 43, 404
bil coII, 244, 315, 318
BII, 188
bool program, 322
bool ROM, 42, 116
BOUND rango oxcoodod oxcoplion, 403
broaIpoinl, 403
bufforod addross Ialcl onabIo, 342
bus cIocI, 341

-

bus concurroncy, 278
bus ligl onabIo (BHI), 83
bus Iov onabIo (BII), 188
bus maslor capabiIily, ISA, 433
BUSY, 461, 464
C
caclo coloroncy, 292
caclo IIUSH, 313
caclo landIing of non-cacloabIo momory,
312
caclo Iino, 283
caclo momory, 279
caclo momory conlroIIor, 274
caclo road lil, 274
caclo road miss, 275
caclo vays, 305
caclo, advanlago of, 276
CAS (coIumn addross slrobo), 236, 242
CAS-boforo-RAS rofrosl, 248
CBR rofrosl, 248
caclo and losling momory, 313
caclo consisloncy, 279
caclo diroclory, 281
caclo landIing of I/O informalion, 311
caclo Iino sizo, 308
caclo managomonl Iogic, 281
caclo porformanco, 278
caclo sizo, 310
coIumn addross docodor, 237
coIumn addross Ialcl, 236
coIumn addross slrobo (CAS), 242
clannoI or I/O clocI, 349, 400
clannoI roady, 342
CHCHK, 349
clocIsum orror, 331
clocIsumming, 322
CHRDY, 137, 342
cIoar inlorrupl onabIo inslruclion, 368
CII, 368
CMD0, 465
CMD0, 465
CMD1, 465
CMOS addross docodor, 442
CMOS addross porl, 442
CMOS conlury parl of limo and dalo func-
lion, 446
CMOS clocIsum vaIuo, 446
CMOS dala porl, 442
CMOS diagnoslic slalus bylo, 446
CMOS disIollo drivo lypo bylo, 446
CMOS oquipmonl inslaIIod bylo, 446
CMOS fixod disI drivo lypo bylo, 446
CMOS indicalor for momory abovo 1MB,
446
CMOS Iov and ligl baso momory bylos,
446
CMOS RAM momory, 441
CMOS RAM vaIid, 445
CMOS rosol codo bylo, 446, 447
CMOS syslom informalion bylo, 446
CMOS, accossing, 442
codo caclo, 291
coIumn addross, 236, 238, 239, 242
combinod caclo, 290
command oulpuls, 145
command porl, 36
configuralion RAM, 460
configuralion RAM usago, 446
conlroI bus, 19
conlroI/aIlornalo/doIolo sofl rosol, 111, 447
coprocossor clip-soIocl, 465
coprocossor omuIalion, 460, 465
coprocossor orror, 403
coprocossor orror condilions, cIoaring, 463
coprocossor RISIT, 463
coprocossor slalus rogislor, 463
coprocossor's dala rogislor, 460
coprocossor's opcodo, or inslruclion, rogis-
lor, 460
coprocossor, sysloms using InloI and
WoiloI, 468
coprocossor/procossor communicalion
signaIs, 464
copy proloclion sclomo, 474
D
DAK0:DAK3, 345
DAK2, 412
DAK4, 417



DAK5:DAK7, 345
DaIIas Somiconduclor roaI-limo cIocI and
configuralion RAM clip, 441
dala bus, 19
dala bus conlonlion (addross confIicls), 41
dala bus lranscoivors, 124
dala caclo, 291
DATA INABII, 126
dala porl, 37
dalo and limo, 441, 470
dala bus slooring Iogic, 126
dofauIl roady limor, 135
dirocl-mappod caclo, 301
dynamic RAM (DRAM) momory, 235
dodicalod caclo, 290
doscriplor, 101, 162
doscriplor priviIogo IovoI (DII), 105
dovico ROMs, 330
divido-by-zoro condilion, 402
DMA acInovIodgo, 412
DMA acInovIodgo for clannoIs 0 llrougl
3 and 5 llrougl 7, 345
DMA addross Ialcl, 424, 431
DMA ADSTB signaI, 424
DMA AIN signaI, 424
DMA bIocI lransfor modo, 416
DMA bus cycIo, 420
DMA bylo or vord lransfors, 423
DMA clannoIs, 410
DMA cIocI, 420
DMA comprossod liming, 421
DMA conlroIIor (DMAC), 409, 414
DMA conlroIIors cascadod, 419
DMA domand lransfor modo, 416
DMA diroclion of lransfor vill roforonco lo
momory, 410
DMA oxlondod vrilo oplion, 422
DMA maslor and sIavo conlroIIors, 417
DMA momory addross Iogic, 425, 426
DMA pago rogislor, 423, 424
DMA road lransfor, 414
DMA roquosl, 412
DMA roquosl for clannoIs 0 llrougl 3 and
5 llrougl 7, 345
DMA singIo lransfor modo, 415
DMA slarl momory addross, 410
DMA lransfor counl, 410
DMA lransfor counl oxlauslod, 413
DMA lransfor modos, 414
DMA lransfor ralo, 431
DMA lransfor lypos, 414
DMA vorify lransfor, 414
DMA vrilo lransfor, 414
DMA, IOI (ond-of-procoss), 413
DMA, fIy-by lransfor, 409
DMA, TC (lorminaI counl roaclod), 413
DMAC, 409
DMAC conlroI rogislor, 431
DMAC iniliaIizalion during IOST, 431
DMAC modo rogislor, 431
DMAC slalos, 420
don'l caro bils, 46
doubIo oxcoplion doloclod, 403
DII, 105
DRAM, 235
DRAM addrossing soquonco, 236, 242
DRAM accoss limo, 250
DRAM addross docodor, 240
DRAM addrossing Iogic, 238
DRAM addrossing muIlipIoxor, or MUX,
240
DRAM banI, 251
DRAM banI vidll, 253
DRAM momory clip bIocI diagram, 237
DRAM parily, 256
DRAM rofrosl Iogic, 471
DRAM rofrosl, 244
DRAM, bursl modo, 265
DRAM, cycIo limo, 250
DRAM, doslruclivo road, 250
DRAM, onlancod pago-modo, 264
DRAM, inlorIoavod momory arclilocluro,
269
DRAM, nibbIo modo, 265
DRAM, pago-modo, 259
DRAM, pro-clargo doIay, 250
DRAM, slalic coIumn RAM (SCRAM), 267
DRQ0:DRQ3, 345
DRQ2, 412
DRQ4, 417
DRQ5:DRQ7, 345
DT/R, dala lransmil or rocoivo, 126

-

I
ICC momory, 259
IIIROM, 319
IM bil, 460, 466
INABII IOWIR, 126
INABII UIIIR, 126
IOI (ond-of-inlorrupl) command, 379
IOI (ond-of-inlorrupl) command, for sIavo,
388
IOI (ond-of-procoss), 413
IIROM, 318
IRROR oulpul of llo numoric coprocos-
sor, 386, 463, 464
orror-clocIing-and-corrocling momory, 259
oxcoplion 7 inlorrupl roquosl, 466
oxcoplion 7 inlorrupl sorvico roulino, 466
oxcoplion inlorrupls, 402
oxlondod momory bIocI-movo rolurn, 447
I
firsl IovoI caclo, 289
four-vay sol-associalivo caclo, 307
fuIIy associalivo caclo, 299
fixod disI aclivily IID, 400
fIag rogislor, 374
fIoaling galo, 318
fIoaling-poinl, 459
fIoaling-poinl caIcuIalions, 466
fIoaling-poinl procossor, 459
fIoppy disI conlroIIor, 387
IIUSH, 313
IORCI A20, 79, 451
G
GDT, 101
GDTR, 102
gonoraI proloclion soflvaro oxcoplion, 403
gIobaI doscriplor labIo (GDT), 101
gIobaI doscriplor labIo rogislor (GDTR), 102
H
laIl, 150, 230
laIl or sluldovn bus cycIo, 150
lard disI conlroIIors, 387
Hi/Io bylo copior, 130
liddon rofrosl, 248
ligl momory aroa, 79, 327
HIDA, 412
HMA, 79, 327
HOID, 412, 475
loId limo, 149
lol rosol, 450
I
I/O addross docodor, syslom board, 47
I/O addross rango assignod lo syslom
board dovicos, 52
I/O bus, 335
I/O clocI, 349
I/O porls, 30, 36
I/O road command, 340
I/O sizo 16, 344
I/O vrilo command, 340
ICW1, 397
ICW2, 371, 397
ICW3, 397
ICW4, 397
IDT, 101
IDTR, 102
inlorIoavod momory arclilocluro, 269
IMR, 397
IN inslruclion, 32
in-Iino codo folcl, 14
in-sorvico rogislor, 371
inslruclion caclo, 291
INT inslruclion, 403
INTA, 369
inlogor mall, 465
inlorrupl acInovIodgo, 369, 374
inlorrupl cascado bus, 387
inlorrupl conlroIIor, 366
inlorrupl conlroIIor cascading, 383
inlorrupl conlroIIor, sIavo, 387



inlorrupl doscriplor labIo (IDT), 101
inlorrupl doscriplor labIo rogislor (IDTR),
102
inlorrupl ID, 371
inlorrupl inslruclion, 403
inlorrupl masI rogislor, 397
inlorrupl on ovorfIov, 403
inlorrupl priorily sclomo, 368, 384
inlorrupl roquosl, 365
inlorrupl roquosl (IRQ) Iinos, 347, 366
inlorrupl roquosl IovoI 0, 384
inlorrupl roquosl IovoI 7, 384
inlorrupl roquosl rogislor (IRR), 371, 399
inlorrupl rolurn inslruclion, 379
inlorrupl sorvico roulinos, 43, 322, 366, 369
inlorrupl sorvicing fIovclarl, 367
inlorrupl sorvicing, cIoaring llo inlorrupl
onabIo fIag, 378
inlorrupl sorvicing, jumping lo llo ISR, 378
inlorrupl sorvicing, saving inslruclion
poinlor, 374
inlorrupl labIo, 369
inlorrupl labIo onlry assignmonls, 388
inlorrupl labIo onlry numbor, 371
inlorrupl labIo iniliaIizalion, 371
inlorrupl lypo codo, 371
inlorrupl voclor, 371
inlorrupls, dodicalod IRQ Iinos, 386
inlorrupls, odgo-lriggorod modo, 397
inlorrupls, ond-of-inlorrupl, or IOI, com-
mand, 397, 398
inlorrupls, oxcoplion, 402
inlorrupls, iniliaIizalion command vords,
or ICWs, 396
inlorrupls, iniliaIizalion soquonco for llo
maslor inlorrupl conlroIIor, 397
inlorrupls, iniliaIizalion soquonco for llo
sIavo inlorrupl conlroIIor, 398
inlorrupls, in-sorvico rogislor, 398
inlorrupls, maslor's inlorrupl ID, 397
inlorrupls, oporalion command vords, or
OCWs, 396
inlorrupls, programming llo 8259, 396
inlorrupls, soflvaro inlorrupls, 402
inlorrupls, spociaI fuIIy-noslod modo, 397
inlorrupls, spociaI masI modo, 399
INTR, 368
invaIid opcodo oxcoplion, 403
invaIid lasI slalo sogmonl, 403
IO16, 128
IORC, 340
IOWC, 340
IRIT (inlorrupl rolurn) inslruclion, 379, 404
IRQ Iinos, 347
IRQ0, 386, 472
IRQ0 froquoncy, 470
IRQ0 inlorrupl sorvico roulino, 470
IRQ0 Ialcl, 469, 473
IRQ0 llrougl IRQ7, 386
IRQ0, rosolling, 470
IRQ1, 372, 386, 449
IRQ10, 387
IRQ11, 387
IRQ12, 387, 450
IRQ13, 386, 463, 464
IRQ13 inlorrupl sorvico roulino, 463
IRQ14, 387
IRQ15, 387
IRQ2, 383, 386, 387
IRQ2 rodirocl, 387, 389
IRQ3, 386
IRQ4, 386
IRQ5, 386
IRQ6, 387
IRQ7, 387
, 391, 395
IRQ8, 386, 444
IRQ8 llrougl IRQ15, 386
IRQ9, 387
IRR, 371
ISA addross bus, 338
ISA bus cycIo dofinilion, 339
ISA bus cycIo liming, 341
ISA bus maslor capabiIily, 433
ISA command Iinos, 340
ISA connoclor, 337
ISA connoclor, 16-bil, 336
ISA connoclor, 8-bil, 336
ISA dovico sizo Iinos, 343
ISA DMA lransfor ralos, 431
ISA DMA-roIalod signaIs, 345
ISA orror roporling signaI, 349

-

ISA inlorrupl roquosl (IRQ) Iinos, 347
ISA inlorrupl-roIalod signaIs, 347
ISA miscoIIanoous signaIs, 350
ISA rosol signaI, 344
ISR, 366
ISRs, 369
}
jump inslruclion, 13
K
Ioy malrix, 450
Ioyboard, 449, 450
Ioyboard BIOS roulino, 457
Ioyboard broaI scan codo, 450
Ioyboard command porl,, 451
Ioyboard dala porl, 450
Ioyboard inlorrupl roquosl, 450
Ioyboard inlorrupl roquosl Iino, 386
Ioyboard inlorrupl sorvico roulino, 372, 450
Ioyboard maIo scan codo, 450
Ioyboard scan, 450
Ioyboard scan codo, 450
Ioyboard/mouso command/slalus porl,
454
Ioyboard/mouso dala porl, 456
Ioyboard/mouso inlorfaco, 449
I
IA bus, 122
IA23:IA17, 338
IalclabIo addross bus, 122, 338
IDT, 101
IDTR, 102
Iino, 283, 308
IillIo-ondian bylo ordoring ruIo, 74
Ioasl roconlIy usod (IRU) aIgorillm, 307
IocaI dala bus, 126
IooI-asido caclo, 287
IocaI doscriplor labIo (IDT), 101
IocaI doscriplor labIo rogislor (IDTR), 102
IooI-llrougl caclo, 283
M
M/IO, 33
M16, 128, 344
maclino slalus vord (MSW) rogislor, 116
masIabIo inlorrupl roquosl Iino (INTR), 368
maslor inlorrupl conlroIIor, 383
MASTIR16, 345, 435
MC146818 roaI-limo cIocI and configura-
lion RAM clip, 441
momory addross bus, 236, 241
momory parily orror, 399
momory road command, 340
momory sizo 16, 344
momory vrilo command, 340
momory-basod somaploro, 93
miscoIIanoous ISA signaIs, 350
MODI command, 475
MoloroIa MC146818 roaI-limo cIocI and
configuralion RAM clip, 441
mouso, 449, 450
mouso BIOS roulino, 457
mouso inlorfaco, 387
mouso inlorrupl roquosl, 450
MOV inslruclion, 33
MI bil, 460, 466
MRDC, 340
MROM, 317
MS-DOS funclion caIIs, 404
MSW rogislor, 460
muIlilasIing oporaling syslom, 472
MUX, 240
MWTC, 340
N
NCA, 312
NMI, 349, 399, 442, 473
no vail slalo, 343
non-spocific IOI, 379
NOWS, 138, 343
NIRD, 465
NIS1, 464
NIS2, 465
NIWR, 465



numoric coprocossor, 459
numoric coprocossor conlroI bils in llo
MSW rogislor, 460
numoric coprocossor inslaIIod, doscriplion
of oporalion, 460
numoric coprocossor, WoiloI, 467
numoric procossor road, 465
numoric procossor soIocl 1, 464
numoric procossor soIocl 2, 465
numoric procossor vrilo, 465
O
OCW1, 397
oplion ROM, 43
OSC, osciIIalor signaI, 350
OUT inslruclion, 32
ovorrun condilion, 369
I
pago fauIl, 403
paraIIoI porl 1, 387
paraIIoI porl 2, 386
parily, 256
parily gonoralor/clocIor, 256
IASS A20, 451
IIACK, 461, 464
IIRIQ, 461, 464
IIC, 366
IOST, 322
IOST/BIOS ROM, 42
IOWIRGOOD, 113
povor-on rosol, 447
povor-on roslarl addross, 12, 116
povor-on soIf-losl, or IOST, 116, 322
pago-modo DRAM, 259
principIo of IocaIily, 277
profolclor, 54
procossor oxlonsion acInovIodgo
(IIACK), 461, 464
procossor oxlonsion nol avaiIabIo oxcoplion,
403
procossor oxlonsion roquosl (IIRIQ), 461,
464
procossor oxlonsion sogmonl ovorrun ox-
coplion, 403
program, 12
IROM, 317
prolocl onabIo, 62
proloclod modo, 62, 98, 162
proloclod modo lo roaI modo, 447
R
RAM parily clocI, 400
RAM rofrosl Iogic, 433
RAM, duaI-porlod, 312
RAS, 236, 242
RAS/CAS doIay, 236, 242
RAS/CAS gonoralion Iogic, 240
RAS-onIy rofrosl, 245
road, 12
road bus cycIo, 141
road-onIy momory, 315
roady Iino, 141
roady limor, 135
RIADY, 141
RIADYO, roady oulpul, 464
roaI modo, 369
roaI-limo cIocI bylos, 443
roaI-limo cIocI clip, 470
roaI-limo cIocI funclion, 443
rofrosl, 474
rofrosl and ISA bus maslors, 439
rofrosl inlorvaI, 249
rofrosl Iogic, 245, 433
rofrosl roquosl, 400
rofrosl roquosl signaI, 471
rofrosl rov counlor, 245
rofrosl limor, 471
rofrosl limor, roprogramming, 471
RIIRISH, 247, 350
roquoslor priviIogo IovoI (RII), 102, 105
RISDRV (rosol drivo) signaI, 344
rosol codo bylo, 447
rosol rogislor vaIuos, 115
RISIT signaI, 113
ROM addross docodor, 42
ROM clocIsum, 322
ROM clip-onabIo, 321

-

ROM clip-soIocl, 321
ROM momory`: lloory of oporalion, 315
ROM oulpul onabIo, 321
ROM programmor, 316
ROM scan, 330
ROM, dovico ROM signaluro, 331
ROM, dovico ROMs, 330
ROM, oIoclricaIIy orasoabIo programmabIo
road-onIy momory (IIIROM), 319
ROM, orasoabIo programmabIo road-onIy
momory (IIROM), 318
ROM, orasing conlonls of IIROM, 319
ROM, fIasl IIIROM, 320
ROM, fusibIo-IinI IROM, 317
ROM, masIod ROM (MROM), 317
ROM, syslom board, 322
rov addross, 236, 238
RII, 102, 105
road from ovon addrossod Iocalion in 8-bil
dovico, 128
rofrosl limor, 245
rov addross docodor, 237
rov addross slrobo (RAS), 242
rov Ialcl, 236
RTC 24-lour modo, 444
RTC aIarm inlorrupl onabIo, 444
RTC aIarm inlorrupl fIag, 445
RTC BIOS conlroI, 445
RTC clip, 441
RTC clip's slalus rogislors A llrougl D,
444
RTC dalo modo, 444
RTC dayIigll-savings onabIo, 444
RTC inlorrupl roquosl fIag, 445
RTC poriodic inlorrupl onabIo, 444
RTC poriodic inlorrupl fIag, 445
RTC ralo soIoclion bils, 444
RTC sol bil, 444
RTC squaro-vavo onabIo, 444
RTC slalus rogislor A, 444
RTC slalus rogislor B, 444
RTC slalus rogislor C, 445
RTC updalo in progross, 444
RTC updalo-ondod inlorrupl onabIo, 444
RTC updalo-ondod inlorrupl fIag, 445
S
SA19:SA0, 338
SBHI, 338
scan codo, 450
SCRAM, 267
SD15:SD8, 339
SD7:SD0, 339
socurily IocI Ialcl, 400
sogmonl doscriplor, 101
sogmonl nol prosonl, 403
sogmonl vrap-around, 452
sogmonl vraparound, 79
soIf rofrosl, 248
soIf-modifying codo, 16
somaploro, 93
soriaI porl 1, 386
soriaI porl 2, 386
sol inlorrupl onabIo inslruclion, 368
solup limo, 149
sladov RAM, 324
slarod rosourco, 92
sluldovn, 108, 151, 185, 230
singIo slop, or lrap, inlorrupl, 403
sIavo ID, 387, 398
sIavo ID rogislor, 383, 387
sIavo inlorrupl conlroIIor, 383, 387
sIovdovn limor, 474
SMRDC, 340
SMWTC, 340
snoop lil, 295
soflvaro inlorrupl inslruclion, 403
soflvaro inlorrupls, 402
soflvaro-onforcod coloroncy, 298
spoaIor dala limor, 471
spIil caclo, 290
SRAM, 271
socond IovoI caclo, 289
snarfing, 295
snooping, 295
spaliaI IocaIily, 277
slalic RAM (SRAM), 271
syslom addross (SA) bus, 121
slacI, 374



slacI sogmonl ovorrun or nol prosonl ox-
coplion, 403
slaIo dala, 279
slalus onabIo, 464
slalus porl, 37
STIN, 464
STI (Sol Inlorrupl InabIo) inslruclion, 368
synclronous DRAM, 268
syslom addross (SA) bus, 338
syslom bus ligl onabIo, 338
syslom configuralion informalion, 446, 450
syslom conlroI porl A, 400, 473
syslom conlroI porl B, 400, 471, 473
syslom dala (SD) bus, 126
syslom dala bus, Iovor pall, 339
syslom dala bus, uppor pall, 339
syslom momory road command, 340
syslom momory vrilo command, 340
syslom limor, 386, 469
syslom limor froquoncy, 469
syslom limor inlorrupl, 472

T1, 140
T2, 140
Tc, 140
TC (DMA lorminaI counl), 345, 413
limo doIay dovico, 239
limor 0, 469
limor 0 froquoncy, 469
limor 1, 471
limor 2, 471
limor 2 (spoaIor limor) oulpul, 400
lransfor compIolo, 345
lrap inlorrupl, 403
Ts, 140
lag RAM, 281
lomporaI IocaIily, 277
lvo-vay sol-associalivo caclo, 304
U
UMB, 327
unifiod caclo, 290
uppor momory bIocIs, 327
W
valcldog limor, 472
valcldog limor slalus, 400
WoiloI inlorprolalion of llo momory ad-
dross, 468
WoiloI numoric coprocossor, 467
WoiloI-spocific drivor roulino, 467
vraparound, 79
vrilo, 12
vrilo bus cycIo, 146
vrilo poIicy, 292
vrilo-bacI caclo, 294
vrilo-llrougl caclo, 293

Você também pode gostar