Professional Documents
Culture Documents
2 Advanced+Microprocesor
2 Advanced+Microprocesor
2 Advanced+Microprocesor
Computer Architecture
Mother Board
Microprocessor
IO,
keyboard,
Monitor
RAM (OS)
Features of 8086
• Minimum mode:
– Pull MN/MX to logic 1
– Typically smaller systems and contains a single
microprocessor
• Maximum mode
– Pull MN/MX logic 0
– Larger systems with more than one processor
Minimum-mode and Maximum-mode
Systems
Signals common to
both minimum and
maximum systems
Minimum mode unique signals
8086 Minimum-mode block diagram
BASIC 8086 MINIMUM MODE SYSTEM
MN/
CLK MXM/IO
8284A
READY
CLOCK INTA
RESET
GENE-
RD
RATOR
WR
8282
DT/R
LATCH
DEN
ALE ADDR
WAIT STATE
GENERATOR AD0-
AD15
A16-A19
8286
TRAN-
ADDR/DATA CEIVER
DATA
CLK
M/IO
ALE
MEMORY ACCESS TIME
ADDR/ RESERVED VALID
DATA A15-A0
FOR DATA D15-D0
ADDR/
A19-A16
STATUS
RD/INTA
READY
DT/R
DEN
T1 T2 T3 TW T4
CLK
M/IO
ALE
ADDR/
DATA A15-A0 DATA OUT (D15-D0)
ADDR/
A19-A16
STATUS
WR
READY
DT/R
DEN
Minimum Mode Interface
• Address/Data bus: 20 bits vs 8 bits multiplexed
• Status signals: A16-A19 multiplexed with status
signals S3-S6 respectively
– S3 and S4 together form a 2 bit binary code
that identifies which of the internal segment
registers was used to generate the physical address
that was output on the address bus during the
current bus cycle.
– S5 is the logic level of the internal interrupt
enable flag, s6 is always logic 0.
S4 S3 Address status
0 0 Alternate(relativeto ES
segment)
0 1 Stack (relative to SS
Segment)
1 0 Code/None (relative to
CS segment or a default
zero)
1 1 Data (relative to DS
segment)
Maximum mode unique signals
Maximum-mode interface circuit
diagram (8086)
Maximum Mode 8086 System
Continued…
Maximum Mode Interface
For multiprocessor environment
• 8288 Bus Controller is used for bus control
• WR¯,IO/M¯,DT/R¯,DEN¯,ALE, INTA¯ signals
are not available
• Instead:
– MRDC¯ (memory read command)
– MWRT¯ (memory write command)
– AMWC¯ (advanced memory write command)
– IORC¯ (I/O read command)
– IOWC¯ (I/O write command)
– AIOWC¯ (Advanced I/O write command)
– INTA¯ (interrupt acknowledge)
Status Bits
They indicate the function of the current bus
cycle. They are normally decoded by the
8288 bus controller
– The signals shown above are produced by 8288
depending on the state of S0, S1 and S2.
• DEN, DT/R¯ and ALE signals are the same as
minimum-mode systems
• LOCK¯: when =0, prevents other processors
from using the bus
• QS0 and QS1 (queue status signals) : informs about
the status of the queue
• RQ¯/GT ¯0 and RQ¯/GT ¯1 are used instead of
HOLD and HLDA lines in a multiprocessor
environment as request/grant lines.
Memory Read timing in
Maximum Mode
03FCH
Available
Interrupts
Type 32 (Available)
(224)
080H
Type 31 (Reserved)
07FH Reserved
Interrupts
(27)
Type 5
Reserved
0014H
Interrupt Vector Table
INT Number Physical Address
INT 00 00000
INT 01 00004
INT 02 00008
: :
: :
INT FF 003FC
Example
Find the physical address in the interrupt vector
table associated with
a) INT 12H b) INT 8H
Solution: a) 12H * 4 = 48H
Physical Address: 00048H ( 48 through
4BH are set aside for CS & IP)
b) 8 * 4 = 20H
Memory Address : 00020H
Functions associated with
INT00 to INT04 (Exceptions)
8086
5v
NMI
Mov AL , 64
Mov BL , 64 0100 0000 +64
0100 0000 +64
ADD AL , BL
1000 0000 +128
INT 0 ; 0F = 1
INT 0 causes the cpu to perform “INT 04” and
jumps to physical location 00010H of the vector
table to get the CS : IP of the ISR
HARDWARE INTERRUPTS
NMI : Non maskable interrupts
INTR : Interrupt request
Edge triggered
Input
NMI
Level triggered
INTR Input
INTA Response to
INTR input
8086
Hardware Interrupts
WAIT instructions
can be used to halt the
8086 to ensure that the
8087 has finished a crucial
step,
e.g. storing a result in
memory.
Direct Memory Access (DMA)
Direct Memory Access (DMA) - device other than
processor controls transfer of data between memory and
an I/O device – contrast with processor/memory accesses
and I/O instructions
A DMA controller, or DMAC, is specialized logic
(processor) that is optimized for the task of transferring
data between I/O devices and memory without involving
main processor (CPU)
A DMA channel is the set of control and data lines a DMA
controller uses to perform the transfer of data
a DMA controller can have multiple channels so DMA
accesses can be performed for multiple devices (but
only one at a time, and only for a set of similar devices)
At minimum, a DMA operation needs the channel
number (which I/O device requires the DMA), a
beginning address in memory for the transfer, the
number of bytes to transfer, and the direction of
transfer (I/O to memory, or vice-versa)
The processor kicks off the DMA activity with an
ordinary I/O write to a control register in the DMA
controller, then continues fetching and executing
instructions as usual
When DMA activity is finished, DMA controller
interrupts the processor, resulting in execution of
ISR for the DMAC
DMAC more efficiently transfers data blocks
between I/O device and memory than the CPU
(why?) -- also, the CPU is freed to perform other
tasks (overlapped or concurrent)
DMAC Connection
3 Modes of DMA Operation