- Divided into two sections internally Control Unit(CU) & Numeric Extension Unit (NEU)
- NEU execute all the numeric processor instructions
- CU receives, read & write memory operands & executes the 8087 control instructions
- These two units works asynchronously with each other
- CU responsible for communication b/w CPU & Memory also co-coordinating the Internal Coprocessor execution.
- CU internally maintains a parallel queue, identical to status queue of main CPU
- CU automatically monitors BHE/S7 line to detect CPU type
- 8087 uses QS0 & QS1 pins to obtain & identify the instruction fetched by the host CPU
- Identifies coprocessor instructions using ESCAPE code bits
- Once CPU recognize ESCAPE code, it triggers the execution of the numeric processor instruction in 8087
- While executing ESCAPE code identifies the coprocessor instruction that requires memory operand & also one does not require any memory operands
- If instruction requires memory operand to be fetched from memory, then the physical address of the operand is calculated using any one of the addressing modes allowed in 8086 & a dummy read cycle is initiated by CPU
- If the CPU does not require any memory operand , it directly executed.
- 8087 is ready with execution results, CU gets the control of bus from 8086 &executes a write cycle to write the results in the memory at the prespecialised address
- NEU execute all instructions including arithmetic, logical 68 bit fraction 15 bit exponent & a sign bit
- When NEU begins by it , the CPU recognize that the instruction execution not yet complete .This make 8086 wait till the busy pin of 8087.
- TEST input pin of 8086 goes low.
- Microcode control unit generate control signals required for execution of the instruction
- Programmable shifter responsible for shifting the operands during the execution of instructions like FMUL & FDIV
QS1
|
QS0
|
Queue status
|
0
|
0
|
No Operation
|
0
|
1
|
First byte of opcode from queue
|
1
|
0
|
Empty queue
|
1
|
1
|
Subsequent byte from queue
|
S2
|
S1
|
S0
|
Queue status
|
0
|
X
|
X
|
Unused
|
1
|
0
|
0
|
Unused
|
1
|
0
|
1
|
Memory Read
|
1
|
1
|
0
|
Memory Write
|
1
|
1
|
1
|
Passive
|
TAG (7)
|
TAG(6)
|
TAG (5)
|
TAG (4)
|
TAG (3)
|
TAG (2)
|
TAG (1)
|
TAG (0)
|
- B0- B5 :- Indicate that an exception has been deleted
- B7 :- bit set if any unmasked exception has been detected otherwise cleared
- B12 – B14 :-3 bits are used as the current top of the stack pointer to any of these eight registers.
- B6 – B10& B14 :- 4 condition code bits reflects as status of the results calculated by 8087
- B15 :- Busy bit shows the status NEU B14 =1, NEU is busy with execution otherwise free.
Instruction type
|
C3
|
C2
|
C1
|
C0
|
Interpretation
|
compare test
|
0
|
0
|
X
|
0
|
ST>Source or 0(FTST)
|
0
|
0
|
X
|
1
|
ST>Source or 0(FTST
| |
0
|
0
|
X
|
0
|
ST>Source or 0(FTST
| |
Remainder
|
1
|
0
|
X
|
1
|
Complete reduction with three low bits of quotient
incomplete reduction
|
Q1
|
0
|
Q0
|
Q2
| ||
Examine
|
U
|
1
|
U
|
U
|
Valid, positive un normalized
|
0
|
0
|
0
|
0
|
Invalid,positive, exponent=0
| |
0
|
0
|
0
|
1
|
Valid, negative, un normalized
| |
0
|
0
|
1
|
0
|
Valid, negative , exponent=0
| |
0
|
0
|
1
|
1
|
Invalid, positive, normalized
| |
0
|
1
|
0
|
0
|
Valid, positive, normalized
| |
0
|
1
|
0
|
1
|
Infinity, positive
| |
0
|
1
|
1
|
0
|
Valid, negative, normalized
| |
0
|
1
|
1
|
1
|
Infinity, negative
| |
1
|
0
|
0
|
0
|
Zero, positive
| |
1
|
0
|
0
|
1
|
Empty
| |
1
|
0
|
1
|
0
|
Zero, negative
| |
1
|
0
|
1
|
1
|
Empty
| |
1
|
1
|
0
|
0
|
Invalid, positive, exponent=0
| |
1
|
1
|
0
|
1
|
Empty
| |
1
|
1
|
1
|
0
|
Invalid, Negative, exponent=0
| |
1
|
1
|
1
|
1
|
Empty
|
- Instruction & Data pointer: - Used to enable the programmers to write their own exception handling subroutines. Before executing a mathematical instruction, the 8087 forms a table in memory containing the instruction address in the field of instruction, operand address in the field of data pointer TAG word Status word , Control word in their respective fields table
- Allows the programmer to select the required processing options out of available once
- 16 – bit control word register is used to control the operation of 8087
- B0- B5 used for masking the different











