COE305 Chapter 9
-
Upload
rajesh-tiwary -
Category
Documents
-
view
220 -
download
0
Transcript of COE305 Chapter 9
-
8/3/2019 COE305 Chapter 9
1/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Chapter 9
8086/8088 Hardware Specifications
WK 3
-
8/3/2019 COE305 Chapter 9
2/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Objectives
Describe the functions of all 8086/8088 pins Understand DC characteristics and fan out
Using the clock generator 8284A chip
Connect buffers and latches to the buses Interpret timing diagrams
Describe wait states and design their circuits
Explain difference between minimum andmaximum modes of using the 8086/8088
Introduce the 8087 floating point processor
-
8/3/2019 COE305 Chapter 9
3/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
The 8086/8088
Fairly old microprocessors, but still considereda good way to introduce the Intel family
Both microprocessors use 16-bit registers and20-bit address bus (supporting 1 MB memory),but:
- The 8086 (1978): 16-bit external data bus
- The 8088 (1979): 8-bit external data bus Still used in embedded systems (cost is less
than $1)
-
8/3/2019 COE305 Chapter 9
4/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
BasicOperation
Operation with aMath Coprocessor
I/P Selects
Min/Max Mode
Minimum modeMaximum mode
8086 8088
Pin budget:8086, Min mode:
20 Address16 Data20 Control & Status3 Power
59Total> 40 pins available
Use multiplexing
2 Modes:8/9 pins haveDifferent
FunctionsDependingOn the mode
-
8/3/2019 COE305 Chapter 9
5/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
DC Pin Characteristics: Voltages
Standard TTLOutput and Input Voltage Levels
0 Logic Level
GuaranteedOutput Levels
AcceptedInput Levels
0-Level
Noise Margin
1-Level
Noise Margin
Forbidden
5.0 VVcc
0 Logic Level
1 Logic Level
ForbiddenRegion
0Logic
Level
1 Logic Level
-
8/3/2019 COE305 Chapter 9
6/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
DC Pin Characteristics: Currents
OFF
ON
StandardTTL Gate
I/P
O/P can sink up to16 mA max
An I/P sourcesup to 1.6 mA
0-level Fanout = Maximum number of inputs that the output can support= 16 mA/1.6 mA = 10
Fan out for a standard TTL output
How many inputs can an output support?
For the 1 logic Level: (output sources current)
O/P can source up to400 QA max
I/P sinksup to 40 QA 1-Level fan out = 10 also
OFF
ON
For the 0 logic Level: (output sinks current)
0
1
If different,take the smallestof the two numbers
-
8/3/2019 COE305 Chapter 9
7/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
8088/86 Pin Characteristics: DC
Input pinsOutput pins
QP
*
* = 16 mA for standard 74 TTL# = 0.40 V for standard 74 TTL
#
* = 1.6 mA for standard 74 TTL# = 40 QA for standard 74 TTL
*
#
0 level noise margin = 0.8 0.45 = 0.35 V (QP)but = 0.8 0.40 = 0.40 V
(for standard 74 TTLO/P)
0 level fan-out toTTL
gate = 2 z 1.6 } 1 (8086/88 QP)but = 16 z 1.6 = 10(for standard 74 TTLO/P)
Aprocessoroutputcan drive:
One Standard 74XX input,or One 74SXX input,or Five 74LSXX inputs,or Ten 74ALSXX inputs,or
Ten 74HCXX inputs
8086/88 Qp does not strictly complywith the DC characteristicsof the TTL family
+: Current into pin (sink)- : Current out of pin (source) Two problems:
- Lower fanout
- Lower noise margin
-
Guaranteed
Output levels
Accepted
Input levels
Standard 74 TTLGate
-
8/3/2019 COE305 Chapter 9
8/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
8088/86 Pin Characteristics: DC Input pins are TTL compatible and source(0)/sink(1) only 10A
of current (actually better thanTTL!
) Output pins are TTL fully compatible at logic 1, but have
problems at logic 0:
- A highermaximum logic 0 voltage of 0.45 V (instead of theTTL standard of 0.4 V)This reduces logic 0 noise margin from 400 mV to 350 mV
be careful with long wiring from output pins
- A lowerlogic 0 sink current of 2.0 mA (instead of the 16 mAfor the standard 74 TTL)
This reduces fan out capability for standard TTL loads
better use 74LS, AL, or HC circuits for interfacing, or use buffers
-
8/3/2019 COE305 Chapter 9
9/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
The Buses: Address & Data
For both QPs: Address bus signals
are A0-A19 (20 lines) for 1M byte ofaddressing space Data bus signals are
- D0-D7 for the 8088- D0-D15 for the 8086
The address & data pins
are multiplexed as:-AD0-AD7 (8088)- orAD0-AD15 (8086)
Address/Status pins are MUXed- A/S for A16-19 (both QPs)
The ALE O/P signal is used to demultiplex the address/data (AD) bus andthe address/status (A/S) bus.
Address, A (for memory & I/O) y Data, D
y Control lines y Status, SSome functions are multiplexed on the same pins to reduce chip pin count
Latchaddresstoa buffer
DataAD15-0Pins - 86
Address
ALE: Latchaddresso/pstoa buffer
Write Cycle
8886
-
8/3/2019 COE305 Chapter 9
10/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
The Status (S) Bus 86: Address bits A16-A19 & #BHE: muxed with the status bits S3-S7.
S3 & S4 indicate which segmentregister is used with the current
instruction:
S5 = the IF (Interrupt flag) bitin FLAGS
S6: 0
S7: 1
Spare
ALE: Latchaddress, #BHE o/pstoa buffer
Status bits
#S0,1,2 are not MUXed. They encode bus status (current bus cycle)
Available only in the MAX mode for use by a bus controller chip
Indicates status of processor and bus cycle
86: #S0-S2, S3-S788: #S0-S2, S3-S6, #SS0
#SS0: Not Muxed, Min mode
-
8/3/2019 COE305 Chapter 9
11/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Main Control Signals
The read output (#RD)(i.e. RD): indicates aread operation
Note: The write (#WR)output: indicates a write(a MIN/MAX output)
The READY input: whenlow (= not ready), forces
the processor to entera wait state. Facilitatesinterfacing the processorto slow memory chips # or = Active low signal
1. Signals that are common to both MIN and MAX modes:
-
8/3/2019 COE305 Chapter 9
12/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Main Control Signals, Contd.
INT
R input: Hardware interruptrequest. Honored only if the IFflag is set. The Qp enters aninterrupt ACK cycle by loweringthe #INTA output
The IF flag bit is set (to enableinterrupts) by the STI instruction,and cleared by CLI
NMI input: Hardware non-maskable interrupt request.Honored regardless of the statusof the IF flag. Uses interruptvector 2
#TEST input: Example: interfacingthe QP with the 8087 mathcoprocessor. Checked by theWAIT instruction that precedeseach floating point instruction. Ifhigh, the instruction waits till input
signal goes low and then gives FPinstruction to the math processor
8086processor
8087Math
CoprocessorBusyO/P
#TEST
Two hardware interrupt inputs:
Synchronizes
processor execution to external events
Test for low
-
8/3/2019 COE305 Chapter 9
13/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Main Control Signals, Contd. CLK input: Basic timing clock for the
processor. 1:3 duty cycle
(Get from clock generator chip) MN/#MX input: Selects either
Minimum (+ 5V directly) or Maximummode (GND)
#BHE/S7 output (MUXed):#BHE: (Bus High Enable) Enables
writing to the high byte of the 16-bitdata bus on the 8086Not on 8088 (it has an 8-bit data bus-no high byte!)
RESET input: resets themicroprocessor (to reboot the
computer). Causes the processor tostart executing at address FFFF0H(Start of last 16 bytes ofROM at thetop of the 1MB memory) afterdisabling the INTR input interrupts(CLR IF flag). Input must be kepthigh for at least 50 Qs. Sampled bythe processor at the + ive clock edge
(Get from clock generator chip)
-
8/3/2019 COE305 Chapter 9
14/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
2. The 8/9 Signals that depend on mode: Their Min Mode States
M/#IO or IO/#M output: indicateswhether the address on theaddress bus is a memoryaddress (IO/#M = 0) or an I/Oaddress (IO/#M = 1)
#WR output: indicates a write
operation. #INTA output: interruptacknowledgement. Goes low inresponse to a hardware interruptrequest applied to the INTR input.Interrupting device uses it to putthe interrupt vector number on
the data bus. The Qp reads thenumber and identifies the ISR* ALE (address latch enable)
output: Indicates that the muxedAD bus now carries address(memory or I/O). Use to latchthat address to an external circuitbefore the processor removes it!.
For the processor to operate in the minimum mode, connect MN/#MXinput directly to +5V. Theirmin mode states:
Note: Address on the bus can be either formemory or I/O devices. M/#IO signal indicateswhich one is intended by the current instruction
*ISR = Interrupt Service Routine
-
8/3/2019 COE305 Chapter 9
15/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Minimum Mode Signals, Contd.
DT/#R output: indicates if the data busis transmitting (outputing) data (=1) orreceiving (inputting) data (=0). Use tocontrol external bidirectional buffersconnected to the data bus.
#DEN output: (data bus enable). Activewhen AD bus carries data not address
Use to activate external data buffers. HOLD input: Requests a direct memoryaccess (DMA) from the QP. In response,the QP stops execution and places thedata, address, and control buses atHigh Z state (floats them).
HLDA output: Acknowledges that the
processor has entered a hold state inresponse to HOLD. #SS0 output (8088) : Equivalent
to the S0 status output of themaximum mode. Use with IO/#Mand DT/#R to decode the currentbus cycle (Table 9-5)
For the processor to operate in the minimum mode, connect MN/#MXinput directly to +5V.
Bidirectional
Data Buffer
Enable Direction
#DEN DT/#R
QP
-
8/3/2019 COE305 Chapter 9
16/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Multiprocessor System
Sync
ClockGenerator
Xtal
ClockGenerator
-
8/3/2019 COE305 Chapter 9
17/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
2. The 8/9 Signals that depend on mode: Their Max Mode States
#S0,
#S1,
#S2 outputs: Status bits thatencode the type of the current bus cycle,
Used by the 8288 bus controllerand the8087 coprocessor (Table 9-6)
#RQ/GT0, #RQ/GT1: Bidirectional linesfor requesting and granting access to ashared bus (Request/Get). For use inmultiprocessor systems. The RG/GT0
line has higher priority #LOCK output: Activated for the duration
ofQP instructions having the LOCKprefix. Can be used to prevent othermicroprocessors from using the systembuses and accessing shared memory orI/O for the duration of such instructions,
e.g.LOCK:MOV AL,[SI]
QS0, QS1 (Queue Status) outputs:indicate the status of the internalinstruction queue (Table 9-7). For use bythe 8087 coprocessorto keep in step with
the QP.
For the processor to operate in the minimum mode, connect MN/#MXinput to ground.
Table 9-6
Table 9-7
-
8/3/2019 COE305 Chapter 9
18/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Clock Generator (8284A)
Provides the following functions: Generates Clock signals:
- Generates a CLK signal for the 8086/8088
- Provides a CLK sync signal (OSC) for use byslave processors on a multiprocessor8086/8088 systems
- Provides a TTL-level peripheral clock signal(PCLK)
Provides synchronization for externalinput signals to the processor: The RESET input
The READY input for wait state generation
-
8/3/2019 COE305 Chapter 9
19/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Clock Generator (8284A): Signals
X1 and X2: Crystal Oscillator pins. Connect a crystal
of the correct frequency between these two terminalsto generate the clock signal.
EFI: External frequency input. Signal can be used asthe clocking source to the 8284A instead ofthecrystal oscillator.
F/#C input: Selects external EFI input (1) or thecrystal oscillator (0) as the clocking source for the
8284A CLK output: The clock signal produced for
connecting to the CLK input on the 8086/8088.At 1/3 rd of the crystal or EFI input frequency with1:3 duty cycle: fclock = fxtal/3 = fEFI/3
OSC: Oscillator output. Same frequency as crystal orEFI. Connect to EFIs on other 8284As in
multiprocessor systems (synchronized clocks)fosc = fxtal= fEFI
PCLK output: peripheral clock signal at 1/6 th of thecrystal or EFI input frequency (1/2 clock freq) with 1:2duty cycle. Use to drive peripheral equipment in thesystem fpclk = fxtal/6 = fEFI/6
CSYNC input: Clock synchronization input. Should
be used if EFI is used, otherwise must be grounded.
Clocks & Clock Synchronization Signals
Crystal
z3 z2XTALorEFI
CLKtoQP
PCLK
to Per
OSC:
EFITootherQPs
-
8/3/2019 COE305 Chapter 9
20/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Clock Generator (8284A): Signals
#AEN1 and #AEN2 address enable inputs:Used with RDY1 and RDY2 inputs to generatethe READY output. The READY output is
connected to the READY input on the8086/8088 QP to control memory wait states.
#ASYNC input: for READY outputsynchronization. Selects 1 or 2 stages ofsynchronization for the RDY1 and RDY2inputs.
READY Signals
RESET Signals
#RES Reset input: Active low. Usuallyconnected to an RC circuit to provideautomatic reset at power on.
RESET output: Synchronized to Clk. Connectto the 8086/8088 RESET input.
To QP
-
8/3/2019 COE305 Chapter 9
21/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Clock Generator (8284A): Block DiagramHysteresis toavoid
jitterduetoslowly
varyinginputs
Active High,
toQPSynchronize
with ive clockedge
Switch/RC circuit
Crystal
RESET
CLOC
K
&
Sync
READY
Select CrystalOsc
orEFI
SynchronizeclockifEFIisused withmultiprocessorsystems
PeripheralClock.f= 1/6th
ofcrystalorEFI
Frequency,
1:2 duty cycle
ToprocessorCLK input.
f= 1/3rd ofcrystalorEFI
Frequency,1:3 duty cycle
Useas EFIin
Multiprocessor
systems
ExternalFrequency I/P
z 3 z 2
Inverting buffer
Selectclockingsource
Schmitttrigger
Starts 4 clockpulses max afterpowerup Must bekept Highforatleast 50 Qs
0 = 2stages, 1 = 1 stageofsynchronization
-
8/3/2019 COE305 Chapter 9
22/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
f/3frequency, f
RC circuit forautomatic Reset on power up
PCLK2.5MHz
f/6Grounded whenXtal Osc is used
ManualReset
push buttonSwitch
Typical Application of the 8284A for clock and Reset signal generation
RC time constant large enough
for 50 Qs min Reset pulseat worst trigger conditions (1.05 V Threshold)
RESET
50 QsMinimum
Effective
Digital
#RES Input
R
C
OSCf
15MHz
Synced
To CLK
-
8/3/2019 COE305 Chapter 9
23/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Bus Demultiplexing and Buffering
Demultiplexing:The address/data and address/status buses aremultiplexed to reduce the device pin count.These buses must be demultiplexed (separated)to obtain the signals required for interfacing other
circuits to the QP Use the ALE output from the microprocessor to latch
the address/status information that appearbriefly on themultiplexed bus
This makes the latched address information available
for long enough time for correct interfacing, e.g. tomemory
Buffering:Fan out is limited, so output signals should be
buffered in large systems
-
8/3/2019 COE305 Chapter 9
24/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Using the ALE signal to Demultiplex:-The Address lines A0-7from the AD0-7 muxed bus-The A16-19 lines from theA16/S3-A19/S6 muxed bus
Not
Muxed
Demultiplexing the 8088 Processor
OctalD-type
Transparent Latch
(notedgetriggere
Memory write cycle for the 8088(non-muxed line are not shown)
Data and address lines must remainvalid and stable for the duration of the cycle
20-bit
Data
Demuxed
A0-A7
Latch(Transparent)
Delay
Use as data bus, with #DEN active
Latch
I/P
Output
Enable
74373 is an Octal D-type transparentL
atch with 3-state outputsFeature Not utilized!
-
8/3/2019 COE305 Chapter 9
25/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Demultiplexing the8086 Processor
Address/Data bus
20-bit
16-bit
with#DEN active
-
8/3/2019 COE305 Chapter 9
26/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
D O/P
Transparency
Last O/PMaintained
(latched)
-
8/3/2019 COE305 Chapter 9
27/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
BufferingSince the microprocessor output pins provide minimum drive
current at the 0 logic level, buffering is often needed if moreTTL loads are connected to any bus signal: Consider 3 typesof signals
For demuxed signals: Latches used fordemuxing, e.g. 373,can also provide the buffering for the demuxed lines: 0-level output can sink up to 32 mA (20 x 1.6 mA loads) 1-Level output can source up to 5.2 mA (1 load = 40 QA)
For non-demuxed unidirectional (always output) address andcontrol signals (e.g. A8-15 on the 8088), buffering is required-often using the 74ALS244 (unidirectional) buffer.
For non-demuxed bidirectional data signals (pin used forboth
in and out), buffering is often accomplished with the 74ALS245bidirectional bus buffer
Caution: Buffering introduces a small delay in the bufferedsignals. This is acceptable unless memory or I/O devicesoperate close to the maximum bus speed
So, Fan out = ?Which casesets the limit?
-
8/3/2019 COE305 Chapter 9
28/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Fully DeMuxedand buffered 8088
Non-DeMuxedAddress Lines(unidirectional-
Always O/Ps)
244 Buffer
Non-DemuxedBidirectionalData Lines
245 Buffer
DIR Direction
1:AB0:AB
Enableexternal buffers
A B isolation
with G = 1
DeMuxedAddress Lines(unidirectional-
Always O/Ps)
Latch providesthe buffering
74244 is an Octal Buffer
with 3-state outputs
Feature Not utilized!
74245 is an Octal BusTransceiver with 3-state outputs
Feature utilized!
-
8/3/2019 COE305 Chapter 9
29/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Fully DeMuxed and buffered 8086
-
8/3/2019 COE305 Chapter 9
30/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
(NotTransceivers)
Use to determineFanout
-
8/3/2019 COE305 Chapter 9
31/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e A-B: Open circuit, No connection
-
8/3/2019 COE305 Chapter 9
32/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Timing in General
Bus Timing
A data transfer operation to/fromthe QP occupies at least onebus cycle
Each bus cycle consists of
4 clock cycles,T
1,T
2,T
3,T
4,each of period T With 5 MHz processor clock:
- T = 1/5 MHz = 0.2 Qs- Bus cycle = 4 T = 0.8 Qs
- Max rate for memory and I/Otransactions = 1/0.8 = 1.25 Moperations per sec (Fetch speed).
- Processor executes2.5 Million Instructions per sec
(MIPS) (Execute speed)
Clock Cycle
Fetch is slower than execute. Effect on pipelining?
-
8/3/2019 COE305 Chapter 9
33/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Bus Timing in General, Contd. T1:- Address is emitted from the Processor- Control signals such as ALE, DT/#R, IO/#M, etc. are also initiated
T2- Used primarily for changingthe direction of the AD busduring read operations ( then )- Read or write controls are setup,e.g. #DEN, #RD (#INTA) or#WR
* If a Write operation, Data to be written is put on the bus for the external device to take* If a Read operation, AD bus is floated, so external device can put the read data on it
T3 & T4:Actual Data transfers occur during T3 & T4.- In Read operations, Data In on the data bus is normally strobed into the processoratthe start ofT4
- In Write operations, Data out on the bus is strobed into the external device at thetrailing edge of the #WR signal Wait States: If addressed device is too slow to allow normal data transfer, it setsREADY input low (NOT READY)* The processor samples the READY input at the end ofT2. If found low, T3 isconsidered a Wait'' state (TW). Ready is checked again at the middle of that wait state.
If high, it is followed by properT
3 andT
4. If low (not ready), the next clock cycle isconsidered an additional wait state, and so on
Clock Cycle
Read Data
(Normal)Check READY
TW T3 T4
Read Data
(withWait)
Note: #RD,#WR,#INTAare all inactive high during T1
-
8/3/2019 COE305 Chapter 9
34/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Timing in General: Read & Write with waits
Samplethe READYI/P
Read Cycle with 1 TW Write Cycle with 1 TW
WR
DataBuffer
Direction
INOUT
EnableData
Buffers
Latch
Address
AddressO/P Data AddressO/P Data
Muxed
Lines
QP strobes datain
Devicestrobes datain
WK 5
TW TW
XX
HiZ
Latch
Address
Note:#
RD,#
WR,#
INT
Aare all inactive high during T1
, #INTA
-
8/3/2019 COE305 Chapter 9
35/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Basic Data Read Timing
Bus Timing, Contd.
Timing for a basic Read cycle
Can be for either memory or I/O
On the 8088:- For memory, IO/#M = 0
- For I/O: IO/#M = 1
Bus
ToDevice
OrI/ODevice
QP floats bus (HiZ)
QP strobes
datainAlso DT/#R = 0
-
8/3/2019 COE305 Chapter 9
36/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Detailed Memory READ Timing for the 8088
Latch
MUXed
Address Lines
A15-A8 NotMuxed
A7-A0 Muxed
A19-A16
Muxed
Data BusDirection:In
EnableData bus
Startof
T4
READYTiming
Read
Standard Bus Cycle = 4T, NoWait States
2. Latch/BufferDelay Time
3Tfortheprocessor
Toget datafrom memory
Maximum allowed memory
accesstime
3. Setup
Time
1. Valid Address
Delay Time
See Fig. 9-12 for Detailed Timing Specifications
Assume
NoWaits Required
QP strobes
datain
t=0
Valid Address
MaxMemory
AccessTimeHold Time
-
8/3/2019 COE305 Chapter 9
37/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
READ Timing Budget: 8088, 5MHz Clock
It takes the processor about 3 clock cycles (3T = 3 x 200 = 600ns with a 5 MHz clock) to take-in the memory data Not all this time is available for the memory device to retrieve
the data and put it on the bus, there is: (See Fig. 9-12)1. Address Valid Delay, TCLAV = 110 ns max
2. Delay in address latch/buffer and decoders } 40 ns3. Data-in Setup time (required), TDVCL = 30 ns
Maximum allowed memory access time to operate without waits= 3 x 200 (110+40+30) = 420 ns
If memory has a larger access time, it needs to request waitstates from the processor using the READY input
#RD signal should be wide enough, TRLRH = 325 ns,as there may be hold time requirements for the Data-In.#RD signal is extended with the insertion of wait states
Incurred
DelaysRequired
-
8/3/2019 COE305 Chapter 9
38/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
INTA Read Timing, 8088
3.Interrupting deviceseesthis
and putsabyte-long pointerto
Interrupt Vector
onthe data bus
2. ProcessorfloatstheAD7-AD0
busand Acknowledgesthe
Interrupt by lowering #INTA
1. Interrupting deviceRaises INTR
4. Processorlatchesin
vectorpointerfrom the
data bus
Pointer to InterruptVector. Supplied bythe interrupting device
See Fig. 9-12 for Detailed Timing Specifications
Upon accepting a hardware interrupt request from a device (on INTR), the processoracknowledges this to the device and initiates an #INTA read cycle for the 1-byte interruptnumber which the processor reads and uses as a pointer to the interrupt service routine
to be executed
Controls
for a READoperation
Similar to a memory or I/O read cycle, with #INTA replacing #RD
-
8/3/2019 COE305 Chapter 9
39/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Basic Data Write Timing
Bus Timing
Timing for a basic write cycle
Can be for either memory or I/O
On the 8088:- For memory, IO/#M = 0
- For I/O: IO/#M = 1
Device
strobes datain
Also DT/#R = 1
-
8/3/2019 COE305 Chapter 9
40/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Detailed Write Timing for the 8088
EnableData bus
1. Address established2. Processor puts data on data bus
Also DT/#R = 1
Data shouldremainvalid for 88 nsafter#WR rise
3 partsof the address
-
8/3/2019 COE305 Chapter 9
41/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
READY and Wait States: 5 MHz Clock
If the memory or I/O device is too slow to use the
standard 4T read cycle (access time > 420 ns) , waitstates must be inserted into the cycle by using theREADY input to the processor
Wait states are additional clock cycles that increase thelength of access time allowed for memory or I/O devices
Wait states are inserted between the standard T2 andT3 cycles
Wait time is inserted as whole clock cycles: i.e. if accesstime = 430 ns insert 1 complete wait state of 200 ns!
Inserting n wait states increase the maximum allowedaccess time from the normal typical value of 420 ns (withno waits) to 420 + n 200 ns
The READY signal is sampled by the microprocessor at
the start ofT
3 and again at the middle ofeach wait state.
-
8/3/2019 COE305 Chapter 9
42/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Detailed Ready TimingReadySampling
RDYInput to 8284A
READYOutput from 8284A(Input to 8086)
35 ns
0 ns
118 ns
30 ns
8 nsInactive(Not Ready)
Active(Ready)
Internal Sync circuits
In the 8284A ensure thatREADY output to processor meets the above timing requirements
0: 2 stages, 1: 1 stage of sync
(Tw)
Sample
atend
ofT2
Then
Sample
atmiddle
ofeachTW
#RD t d b th
-
8/3/2019 COE305 Chapter 9
43/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Generation of 0-7 wait statesUsing one of the two RDYinputs to the 8284A
8-bit Shift Register
JumperSelects
# ofWait
States
CLR shift Register:No Shifting
Requiringwaitstates
CLR Shift RegisterDuring T1
1
1
1
Effectively,RDY1 = (Selected Q + RD)(when the slow memorydevice is accessed)
Processor
0 W
1 W
QA
QB
QC
RDY1
RD(Gated)
RD(Gated)
OR
SerialI/P
1st bus cycle state
2 W
Note: #RD,#WR,#INTAare all inactive high during T1
Note: #RD is extended with
the addition of wait states
#RDgated by the
forthe memory device
SynchronousShift rights
-
8/3/2019 COE305 Chapter 9
44/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Minimum and Maximum Modes MN/#MX input on 8088/8086 selects min (0V) or max (+V)
mode Minimum mode is the least expensive way to configure a 8086/8088 system:
Bus control signals are generated directly by processor
Good backward compatibility with earlier 8085A 8 bit processor
- Same control signals
- Support same peripherals
Maximum mode provides greater versatility at higher cost. New control signals introduced to support 8087 coprocessor (e.g. QS0 &QS1)
and multiprocessor operation (e.g. #RQ/GT0 & RQ/GT1)
Control signals omitted must be externally generated using an external
bus controller, e.g. 8288. The controllerdecodes those control signalsfrom the now compressed form of 3 control bits (#S0,#S1,#S2)
Can be used with the 8087 math coprocessor
Can be used with multiprocessor systems
Maximum mode no longer supported since 80286
U f 8086 i th Mi i M d
-
8/3/2019 COE305 Chapter 9
45/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Use of 8086 in the Minimum Mode
AddressDemultiplexing
BidirectionalData Buffering
InterruptHandling Several Interrupt
Requests
RAM I/OROM
PreventsTransceiver from
driving the AD buswhen interruptcontrollerIs using it
Basic control signals are directly available from processor
Microprocessor-based System
AddressDecoding
Here the Interrupt controlleraccesses the AD bus beforedemultiplexing - careful!
AD Bus
Direction
8086 M i M d
-
8/3/2019 COE305 Chapter 9
46/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
8086 Maximum Mode
8086 Chipset
8288 Bus Controller chip: Necessary in this mode.Generates essential control signals not provided directly by QPform the S0-S2 O/Ps
Control signals are more specific, e.g. separate lines forM and I/O operations
-
8/3/2019 COE305 Chapter 9
47/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
8288 Bus Controller
20-Pin Chip
Familiar 8088/8086Outputs
SelectsMode:1. I/O Bus2. System Bus
bus
More specific Outputs,Replace #RD, #WR,M/#IO
-
8/3/2019 COE305 Chapter 9
48/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
8288 Bus Controller: Pin Functions S0, S1, S2 inputs: Status bus bits
from processor. Decoded by the 8288to produce the normal control signals
CLK input: From the 8284A clockgenerator
ALE output: Address latch enableoutput for demuxing address/data
DEN output: Data bus enable outputto enable data bus buffer. Noteopposite polarity to #DEN output in
minimum mode. DT/#R output: Data transmit/Receiveoutput to control direction of thebi directional data bus.
#INTA output:Acknowledge ahardware interrupt applied to theINTR input of the processor.
IOB input: I/Obus mode input.
Selects operation in either I/Obusmode or system bus mode. #AEN input: Address Enable input.
Used by the 8288 to enable memorycontrol signals. Supplied by a busarbiter in a multiprocessor system
CEN input: Control Enable input.Enables the generation ofcommand
outputs from the 8288.
#IORC output: Input/Output readcontrol signal.
#IOWC output: Input/Output writecontrol signal. #AIOWC output:Advanced
Input/Output control signal. #MRDC output: Memory read control
signal. #MWTC output: Memory write control
signal.
#AMWT output: Advanced Memorywrite control signal.
MCE/#PDEN output: Mastercascade/Peripheral data output.Selects cascade operation if IOB=0 orenables I/Obus transceivers ifIOB=5V
Effective only in the system bus mode
The Math Coprocessor Chapter 14
-
8/3/2019 COE305 Chapter 9
49/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
The Math Coprocessor: Chapter 14(Numeric Data Processor (NDP))
T
he 8086 performs integermath operations Floating point operations are needed, e.g. for Sqrt (X),sin (x), etc.
These are complex math operations that require largeregisters, complex circuits, and large areas on the chip
A general data processor avoids this much burdenand delegates such operations to a processordesigned specifically for this purpose -e.g. math coprocessor (8087) for the 8086
The 8086 and the 8087 coprocessors operate inparallel and share the busses and memory resources The 8086 marks floating point operations as ESC
instructions, will ignore them and 8087 will pick themup and execute them
-
8/3/2019 COE305 Chapter 9
50/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
The 8087 Coprocessor: Organization
CU and NEU units
Eight 80-bit FP Registers Supports 68 FP (ESC)
instructions Speeds up 8086
performance on FPoperations by a factor
of 50-100 time 8087 Tracks activities
of the 8086 by monitrng:- Bus status (S0-S2 bits)- Queue status (QS0,1)
- Instruction beingfetched (to check if its anESC instruction)
Synchronize with WAITusing the BUSY-#TESTsignals
A stack of 8 x 80-bitFP Registers
8086
Busy#Test
ST(0)
ST(7)
Topof
the data
Stack
-
8/3/2019 COE305 Chapter 9
51/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
8086 Maximum mode outputs for NDP Connection Bus StatusOutputs S0-S2:
Status bits that encode the type
of the current bus cycle
Bus Request/GrantOutputs RQ0/GT0:Allow 8087 to request use of the bus,e.g. for DMA memory access
Queue StatusOutputsQS1,QS0:
- For use by coprocessors that receive their instructions via ESC prefix.
- Allow the coprocessor to track the progress of an instruction through the8086 queue and help it determine when to access the bus for the escapeop-code and operand.
- Indicate the status of the internal instruction queue as given in the table:QS1 QS0
0 0 Queue is idle0 1 First byte of opcode from queue1 0 Queue is empty1 1 Subsequent byte of opcode from queue
Table 9-7
-
8/3/2019 COE305 Chapter 9
52/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
AD BeforeDemuxing
The 8086 with an 8087 Coprocessor8086 is operating in the MAX mode
Inputs commonwith the 8086
Can interruptthe 8086
-
8/3/2019 COE305 Chapter 9
53/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Synchronization between 8086 & the 8087 Coprocessor
The assembler marksall FP instructions asESC instructions having aspecial range of opcodes.The Coprocessor monitorsthe 8086 bus activities andIntercepts such instructions,captures them for execution
WAIT instructions
can be used to halt the8086 to ensure that the8087 has finished a crucialstep,e.g. storing a result inmemory.
-
8/3/2019 COE305 Chapter 9
54/55
2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e
Programming the 8087Sequence of FP operations:
1. Operand data is loaded from memory into 8087registers
2. Do the FP operation in the 8087
3. Store FP results from the 8087 to memory
FP Instructions use the top of the 80-bit register data stack asthe default operand (needs not be mentioned), e.g.
FLDPI ; loads PI (= T) into the top of the stack
; i.e. into register ST(0) When something is put on top of the stack, a stack PUSH occursautomatically
When something is removed from the top of the stack, an
automatic stack POP occurs
-
8/3/2019 COE305 Chapter 9
55/55
Programming the80387: Example
Define
Double
Word
Results in stack
afterInstruction Execution
Note: 8087 automatically convertsData from integer to FP whenmoving it from memory to its datastack
Push
Two 5 x 4-byte array
RAD(radii)
AREA;ECX, also used as loop counter
. ST = Stacktopwhichisalso ST(0)
Instructions
Starting withF are FPInstructionsFor the 80387
80386 Program