
PROGRAMMING NUMERIC APPLICATIONS
No special programming techniques are required to gain the advantages of concurrent execution; numeric instructions for the NPX are simply placed in line with the instructions for the CPU. CPU and numeric instructions are initiated in the same order as they are encountered by the CPU in its instruction stream. However, because numeric operations performed by the NPX generally require more time than operations performed by the CPU, the CPU can often execute several of its instructions before the NPX completes a numeric instruction previously initiated.
This concurrency offers obvious advantages in terms of execution performance, but concurrency also imposes several rules that must be observed in order to assure proper synchronization of the 80286 CPU and 80287 NPX.
All Intel
Managing Concurrency
Concurrent execution of the host and 80287 is easy to establish and maintain. The activities of numeric programs can be split into two major areas: program control and arithmetic. The program control part performs activities such as deciding what functions to perform, calculating addresses of numeric operands, and loop control. The arithmetic part simply adds, subtracts, multiplies, and performs other operations on the numeric operands. The NPX and host are designed to handle these two parts separately and efficiently.
Managing concurrency is necessary because both the arithmetic and control areas must converge to a
Normally, the host waits for the 80287 to finish the current numeric operation before starting another. This waiting is called synchronization.
Managing concurrent execution of the 80287 involves _~ree types of synchronization:
1.Instruction synchronization
2.Data synchronization
3.Error synchronization
For programmers in
_____ | ||
.... 1"'" | __ . | |
Instruction Synchronization
Instruction synchronization is required because the 80287 can perform only one numeric operation at a time. Before any numeric operation is started, the 80287 must have completed all activity from its previous instruction.