MPMC Unit-1
MPMC Unit-1
Tech II Sem
UNIT I
8086 Architecture
Contents:
ACC
8 bit
Temp
Reg-8 bit
Flags
5 bit
Instruction
Reg 8 bit
ALU
8 bit
Instruction
decoder
and
machine
cycle
encoder
Timing and
Controller
Address Buffer
8 bit
Data/Address
Buffer 8 bit
Data Bus: It has an 8-bit bidirectional data bus which is used for data input as well as data output in
the form of 8 bit words.
2 Ravindranath M, Asst.Prof, Tirumala Engineering College
Timing & Control: Is used to generate proper timing & control signals which control &
synchronize all the operations performed by various sections.
Interrupt Controller: It receives hardware interrupt signals & sends an acknowledgement for
receiving the interrupt signals.
Serial I/O control: It has two control signals named SID & SOD for serial data transmission.
HOLD, HLDA
HOLD signal is generated by the DMA controller circuit. On receipt of this signal, the
microprocessor acknowledges the request by sending out HLDA signal and leaves out the
control of the buses. After the HLDA signal the DMA controller starts the direct transfer of
data.
READY (input)
Memory and I/O devices will have slower response compared to microprocessors.
Before completing the present job such a slow peripheral may not be able to handle further
data or control signal from CPU.
The processor sets the READY signal after completing the present job to access the data.
The microprocessor enters into WAIT state while the READY pin is disabled.
EXECUTION UNIT:
The Execution unit is responsible for decoding and executing all instructions.
The EU extracts instructions from the top of the queue in the BIU, decodes them, generates
operands if necessary, passes them to the BIU and requests it to perform the read or write
bys cycles to memory or I/O and perform the operation specified by the instruction on the
operands.
During the execution of the instruction, the EU tests the status and control flags and updates
them based on the results of executing the instruction.
If the queue is empty, the EU waits for the next instruction byte to be fetched and shifted to
top of the queue.
When the EU executes a branch or jump instruction, it transfers control to a location
corresponding to another set of sequential instructions.
Whenever this happens, the BIU automatically resets the queue and then begins to fetch
instructions from this new location to refill the queue.
Accumulator: register consists of two 8-bit registers AL and AH, which can be combined together
and used as a 16-bit register AX. AL in this case contains the low order byte of the word, and AH
contains the high-order byte. Accumulator can be used for I/O operations and string manipulation.
10 Ravindranath M, Asst.Prof, Tirumala Engineering College
Base register: consists of two 8-bit registers BL and BH, which can be combined together and used
as a 16-bit register BX. BL in this case contains the low-order byte of the word, and BH contains
the high-order byte. BX register usually contains a data pointer used for based, based indexed or
register indirect addressing.
Count register: consists of two 8-bit registers CL and CH, which can be combined together and
used as a 16-bit register CX. When combined, CL register contains the low order byte of the word,
and CH contains the high-order byte. Count register can be used in Loop, shift/rotate instructions
and as a counter in string manipulation
Data register: consists of two 8-bit registers DL and DH, which can be combined together and used
as a 16-bit register DX. When combined, DL register contains the low order byte of the word, and
DH contains the high-order byte. Data register can be used as a port number in I/O operations. In
integer 32-bit multiply and divide instruction the DX register contains high-order word of the initial
or resulting number.
Stack Pointer (SP) is a 16-bit register pointing to program stack, i.e, it is used to hold the address of
the top of stack. The stack is maintained as a LIFO with its bottom at the start of the stack segment
(specified by the SS segment register).Unlike the SP register, the BP can be used to specify the
offset of other program segments.
Base Pointer (BP) is a 16-bit register pointing to data in stack segment. It is usually used by
subroutines to locate variables that were passed on the stack by a calling program. BP register is
usually used for based, based indexed or register indirect addressing.
Source Index (SI) is a 16-bit register. SI is used for indexed, based indexed and register indirect
addressing, as well as a source data addresses in string manipulation instructions. Used in
conjunction with the DS register to point to data locations in the data segment.
Code segment (CS) is a 16-bit register containing address of 64KB segment with processor
instructions. The processor uses CS segment for all accesses to instructions referenced by
instruction pointer (IP) register. CS register cannot be changed directly. The CS register is
automatically updated during far jump, far call and far return instructions.
Stack segment (SS) is a 16-bit register containing address of 64KB segment with program stack. By
default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer
(BP) registers is located in the stack segment. SS register can be changed directly using POP
instruction.
Data segment (DS) is a 16-bit register containing address of 64KB segment with program data. By
default, the processor assumes that all data referenced by general registers (AX, BX, CX, and DX)
and index register (SI, DI) is located in the data segment. DS register can be changed directly using
POP and LDS instructions.
Extra segment (ES) used to hold the starting address of Extra segment. Extra segment is provided
for programs that need to access a second data segment. Segment registers cannot be used in
arithmetic operations.
Instruction Pointer (IP) is a 16-bit register. This is a crucially important register which is used to
control which instruction the CPU executes. The IP, or program counter, is used to store the
memory location of the next instruction to be executed. The CPU checks the program counter to
ascertain which instruction to carry out next. It then updates the program counter to point to the
next instruction. Thus the program counter will always point to the next instruction to be executed.
Flag Register contains a group of status bits called flags that indicate the status of the CPU or the
result of arithmetic operations. There are two types of flags
1) The status flags which reflect the result of executing an instruction. The programmer
cannot set/reset these flags directly.
2) The control flags enable or disable certain CPU operations. The programmer can set/reset
these bits to control the CPU's operation.
0011
--------------------------------------------------------------Physical address
0010 0011
0 1 1 0 0 0 1 1 0 1 0 1 (23535H)
MEMORY ACCESS
Fig(a) shows how a byte-memory operation is performed to address X, an even-addressed
storage location. A0 is set to logic 0 to enable the low bank of memory and BHE to logic 1
to disable the high bank. Data are transferred to or from the lower bank over data bus lines
D0 through D7.
Fig(b) shows how a byte-memory operation is performed to an odd-addressed storage
location such as X + 1. A0 is set to logic 1 and BHE to logic 0. This enables the high bank
of memory and disables the low bank. Data are transferred over bus lines D8 through D15.
D8 represents the LSB.
16 Ravindranath M, Asst.Prof, Tirumala Engineering College
The Microprocessor 8086 is a 16-bit CPU available in different clock rates and
packaged in a 40 pin CERDIP or plastic package.
The 8086 operates in single processor or multiprocessor configuration to achieve high
performance. The pins serve a particular function in minimum mode (single processor
mode) and other function in maximum mode configuration (multiprocessor mode).
The 8086 signals can be categorized in three groups.
o The first are the signal having common functions in minimum as well as
maximum mode.
o The second are the signals which have special functions for minimum mode
o The third are the signals having special functions for maximum mode.
A19/S6, A18/S5, A17/S4, A16/S3: These are the time multiplexed address and status lines.
o During T1 these are the most significant address lines for memory operations.
18 Ravindranath M, Asst.Prof, Tirumala Engineering College
S3
Indication
0
0
1
1
0
1
0
1
Alternate Data
Stack
Code or None
Data
BHE/S7: The bus high enable is used to indicate the transfer of data over the higher order (D15D8) data bus as shown in table. It goes low for the data transfer over D15-D8 and is used to derive
chip selects of odd address memory bank or peripherals.
RD Read: This signal on low indicates the peripheral that the processor is performing memory or
I/O read operation. RD is active low and shows the state for T 2, T3, Tw of any read cycle. The signal
remains tri-stated during the hold acknowledge.
READY: This is the acknowledgement from the slow device or memory that they have completed
the data transfer. The signal made available by the devices is synchronized by the 8284A clock
generator to provide ready input to the 8086. The signal is active high.
INTR-Interrupt Request: This is a triggered input. This is sampled during the last clock cycles of
each instruction to determine the availability of the request. If any interrupt request is pending, the
processor enters the interrupt acknowledge cycle. This can be internally masked by resulting the
interrupt enable flag. This signal is active high and internally synchronized.
CLK- Clock Input: The clock input provides the basic timing for processor operation and bus
control activity. Its an asymmetric square wave with 33% duty cycle.
HOLD, HLDA- Acknowledge: When the HOLD line goes high, it indicates to the processor that
another master is requesting the bus access. The processor, after receiving the HOLD request,
issues the hold acknowledge signal on HLDA pin, in the middle of the next clock cycle after
completing the current bus cycle.
20 Ravindranath M, Asst.Prof, Tirumala Engineering College
S2 S1 S0 Indication
0
Interrupt Acknowledge
Halt
Code Access
Read Memory
Write Memory
Passive
LOCK: This output pin indicates that other system bus master will be prevented from gaining the
system bus, while the LOCK signal is low. The LOCK signal is activated by the LOCK prefix
instruction and remains active until the completion of the next instruction. When the CPU is
executing a critical instruction which requires the system bus, the LOCK prefix instruction ensures
that other processors connected in the system will not gain the control of the bus.
No Operation
Empty Queue
RQ/GT0, RQ/GT1 Request/Grant: These pins are used by the other local bus master in
maximum mode, to force the processor to release the local bus at the end of the processor current
bus cycle. Each of the pin is bidirectional with RQ/GT0 having higher priority than RQ/GT1.
21 Ravindranath M, Asst.Prof, Tirumala Engineering College
Maximum mode
o In the maximum mode, the 8086 is operated by strapping the MN/MX pin to ground.
o In this mode, the processor derives the status signal S2, S1, S0. Another chip called bus
controller derives the control signal using this status information.
o In the maximum mode, there may be more than one microprocessor in the system
configuration.
22 Ravindranath M, Asst.Prof, Tirumala Engineering College
o Hold Response sequence: The HOLD pin is checked at leading edge of each clock pulse. If
it is received active by the processor before T4 of the previous cycle or during T1 state of
the current cycle, the CPU activates HLDA in the next clock cycle and for succeeding bus
cycles, the bus will be given to another requesting master.
o The control of the bus is not regained by the processor until the requesting master does not
drop the HOLD pin low. When the request is dropped by the requesting master, the HLDA
is dropped by the processor at the trailing edge of the next clock.
It derives the outputs ALE, DEN, DT/R, MRDC, MWTC, AMWC, IORC, IOWC and
AIOWC.
Here the only difference between in timing diagram between minimum mode and maximum
mode is the status signals used and the available control and advanced command signals.
S0, S1, S2 are set at the beginning of bus cycle. 8288 bus controller will output a pulse as
on the ALE and apply a required signal to its DT / R pin during T1.
In T2, 8288 will set DEN=1 thus enabling transceivers, and for an input it will activate
MRDC or IORC. These signals are activated until T4. For an output, the AMWC or
AIOWC is activated from T2 to T4 and MWTC or IOWC is activated from T3 to T4.
The status bit S0 to S2 remains active until T3 and become passive during T3 and T4.
If reader input is not activated before T3, wait state will be inserted between T3 and T4.
Write Cycle
Read Cycle