Documente Academic
Documente Profesional
Documente Cultură
Coprocessor
Operation performed :
They are Unable to fetch the code from the memory so they work under the
control of main processor .
Architecture of 8087
Intel 8087
Numeric Processor.
Packed in 40 pin ceramic DIP package.
Available in 5 MHz, 8MHz, 10MHz versions compatible with 8086,
8088, 80186, 80188.
It adds 68 new instruction to the instruction set of 8086.
How it works :
The 8087 instruction may lie interleaved in the 8086 program, but it
is the task of 8086 to identify the 8087 instructions from the program,
send it to 8087 for further execution & after the completion of
execution cycle the result may be referred back to CPU.
Operation of 8087 does not require any software support from the
system software or operating system.
6
Architecture of 8087
Control unit
Numeric Execution unit
Control Unit :
Function :
It interface the coprocessor to the microprocessor
system data bus.
Monitors the instruction stream.
If the instruction is an ESCape (coprocessor)
instruction, the coprocessor executes it; if not the
microprocessor executes it.
It receives , decodes instructions, read and write
memory operands and executes the 8087 instruction.
8
Programmable shifter :
Responsible for shifting the operands during the execution of
instruction like FMUL and FDIV.
9
10
11
1) B busy bit
4) ES error summary
5) PE precision error
12
6) UE Underflow Error
7) OE Overflow Error
8) ZE Zero Error
Indicates the divisor was zero while the dividend is a noninfinity or non zero number.
9) DE Denormalized error
14
Control register
1)
IC Infinity Control
2)
RC Rounding Control
00
01
10
11
15
3) PC Precision Control
00
01
10
11
4) Exception Masks
5) Zero Divide
6) Denormalized Operand
17
18
1)
AD0 - AD15 :
2) A19/S6 A16/S3 :
3) BHE / S7 :
4) Qs1 , Qs0 :
Qs1 , Qs0 are queue status input signals.
These enable 8087 to keep track of the instruction prefetch
queue status of the CPU, to maintain synchronism with it.
Qs1
0
0
1
1
Qs0
0
1
0
1
Queue Status
No operation.
First byte of opcode from queue
Empty Queue
Subsequent byte from queue.
20
5) INT
6) BUSY
7) READY
8) RESET
9) CLK
10) VCC
A +5V supply
11) GND
22
S1
S0
Queue status
unused
Unused
Memory read
Memory write
passive
23
13) RQ / GT0
The request / grant pin is used to gain control of the bus from
the host (8086/ 8088) for operand transfer.
An active low pulse of one clock duration is generated by
8087 for the host to inform it that it wants to gain control of
the local bus either for itself or for other coprocessor
connected to RQ/ GT1 pin of 8087.
The 8087 waits for the grant pulse from the host.
When it is received, it either initiates a bus cycle if the
request is for itself or else, it passes the grant pulse to
RG/GT1, if the request is for the other coprocessor.
24
14) RQ / GT1
Bidirectional pin
Used by other bus masters to convey their need of the local
bus access to 8087.
25
26
27
28
In 80186 / 80188 systems these QS0 and QS1 lines are passed to
the CPU through the bus controller.
In case of 8086 / 8088 based system the RQ/ GT0 of 8087 may be
connected to RQ / GT1 of 8086/ 8088.
The clock pin of 8087 may be connected with the CPU 8086/ 8088
clock input.
The interrupt output of 8087 is routed to 8086/8088 via a
programmable interrupt controller.
The pins AD0 AD15 , RESET , A19 /S6 - A16 /S3 , BHE / S7 are
connected to the corresponding pin of 8086/8088.
In case of 80186/ 80188 system the RQ/ GT lines of 8087 are
connected with the corresponding RQ / GT lines of 82188.
29
30
1.
2.
3.
4.
5.
6.
31
1)
;
;
ST (6)
2) FIST/FISTP
The instruction work in exact similar manner as FST/
FSTP except the fact that the operand are integer
operand.
34
Arithmetic Instructions
1.
2.
3.
4.
5.
6.
FADD
FSUB
MUL
FDIV
FSQRT
FABS
35
Transcendental Instructions
The operand usually are ST(0) and ST(1) or only ST(0)
FPTAN :
Instruction calculates the tangent of an angle O, where O, must
FPATAN :
Instruction calculates the inverse tangent
The result is stored on the top of the stack.
The content of ST and ST(1) should follow the inequality.
0<=ST(1) < ST< infinity
F2XMI :
Instruction calculates the expression (2x - 1)
Value of x is stored at the top of the stack.
Result is stored back at the top of the stack.
36
FLY2X
It calculate ST(1) * Log2 ( ST)
Result is stored back at the top of stack.
ST must be in the range of 0 to +infinity.
ST(1) must be in the range of -infinity to +infinity.
FLY2XP1
It calculate ST(1) * log2[ (ST)+1 ]
Result is stored back on the stack top.
|ST| must lie between 0 and (1- 21/2 /2).
Value of ST(1) must lie between infinity and + infinity
37
Comparison Instruction
All the comparison instructions compare the operands and modify the
condition code flags
Comparison
C3
C0
Not Comparable
1
38
1.
FCOM
2. FIST
39
2. FLDPI
Load pi(3.14) o stack top
3. FLDLG2
Load the constant Log10 2 to the stack pointer.
40
I. FINIT
II. FENI
III. FDISI
IV. FLDCW
V. FSTSW
VI. FCLEX
VII. FFREE
VIII. FNOP
IX. FWAIT
41
42