- 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
SIGNAL DESCRIPTIONS OF 8087
· AD0 –AD5 :- Time multiplexed address/data lines. These lines carry address during T1 & data during T 2 , T3, TW& T4 states. A0 used when transfer is an lower byte(D0-D7) of data bus, to derive chip select. These act as input lines for CPU driven bus cycle.
· A19/S6-A16/S3 :- Time multiplexed address/status lines.
1. These functions are similar to the pins of 8086
2. S6,S4 & S3 are permanently high , S5 permanently low.
· BHE/S7 :-During T1 BHE/S7 pin used to enable data on the higher byte of 8086 data bus .During T 2 , T3, TW& T4 status line S7
· QS1-QS0 :- Queue status i/p signal, enable 8087 to keep track of prefetch status of the CPU.
Status of these lines is decoded as:-
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
|
PIN DIAGRAM OF 8087
· INT:- Interrupt output used to indicate unmasked exception has been received during execution
· BUSY:-o/p signal ,When high ,indicates instruction.
· READY:- i/p signal used to inform the coprocessor that the addressed device will complete the data transfer from its side & the bus is likely to be free for the next cycle
· RESET:- i/p Signal used to abandon the internal activities of coprocessor & prepare it for further execution
· CLK:-Provide CLK input
· VCC:-Supply +5 V
· GND :-Power supply
· S2 ,S1 & S0 :- 8087 driven or externally driven by CPU.
If these are driven by 8087
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
|
· RG/GT6:-Request/Grant pin used to gain control of bus from host 8086/8088 for operand transfer.
· An active low pulse of one clock duration generated for the host to inform it that it wants to gain control of the local bus either for itself or for other Co processor connected to RQ/GT Pin.
· RQ/GT1:- Bidirectional pin used by other bus masters to convey their need of local bus access to 8087.
REGISTER SET OF 8087
· Set of 8 bit registers
· Used either as a stack or a set of general registers
· When operating as a stack, it operates from the top on one or two registers
· While operating as a register set used only with the instruction designed for them.
· Divided into three
1. Sign(1 bit)
2. Exponent(15 bits)
3. Significant(64 bits)
· Two bit tag field to indicate the status of contents
· Instruction may address data registers either implicitly or explicitly
· An internal status register field Top is used to address any one of the eight registers implicitly. While explicitly addressing the registers, They may be addressed relative to Top.
STATUS WORD OF 8087
15 0
TAG (7)
|
TAG(6)
|
TAG (5)
|
TAG (4)
|
TAG (3)
|
TAG (2)
|
TAG (1)
|
TAG (0)
|
TAG VALUES
00=VALID 01=ZERO
10=SPECIAL 11=EMPTY
- 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.
CONDITION CODE TABLE
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
CONTROL WORD REGISTER
- 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
0 comments:
Post a Comment