[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Math Coprocessor - who has a need for it???



In article <1993Jul14.131449.27013@actrix.gen.nz>, David Empson writes...
> 
> In article <1993Jul14.060915.24034@sinkhole.unf.edu> swarde@unf6.cis.unf.edu (Rico) writes:
> > 
> > Does the GS automatically invoke the Math Coprocessor when processing
> > math functions?
> 
> No.  The Coprocessor card acts as a peripheral device, not a
> coprocessor.  The 65816 program sends maths commands to be processed by
> the 68882, by writing them out to I/O addresses (I don't know the
> exact details here).  I assume it then waits for a "finished"
> indication from the card, and reads the results back.

Yes, there is an address which changes value when the result is complete.
If you access the FPE registers (through mem reads) prior to this time
the results are invalid.  This is only noticed when programming in
assembly; the C routines make it transparent.

BTW, the FPE uses a 68881.  (Yes, I know you were referring to the other
COP card when you mentioned a 68882.)

> There are two ways in which the card can be used:
> 
> 1. The program specifically looks for the card and communicates
> directly with it.  This is supported by ORCA/C and ORCA/Pascal
> programs - you can use some compiler directives and a different version
> of the library to make direct calls to the FPE card (or compatible).
> I think that this requires the card to be present.

Yes.  While Orca/C 2.0 will allow the card to be in any slot (location
must be known, though), if you link with the FPE library and don't have
the card, then you will get a crash.

> 2. The FPE card was originally supplied with a program which patched
> the SANE toolset so that calls to SANE were re-routed to the floating
> point coprocessor (some glue code copied the arguments into the
> coprocessor, invoked the appropriate command, and copied the results
> back).

I've heard some people say that this patch doesn't work.  I've never
noticed any inconsistencies -- does anyone _know_ what the actual
problems are and with which version of the patch? (There was more than
one.)

> Another minor problem: you don't get exactly the same answers from a
> maths coprocessor as you would have got from the SANE code.

While the answers are not the same, they are still "correct".  If I
remember correctly, the FPE has the same number of significant digits in
most calculations; where it does not, I think the difference is one
one significant (decimal) digit.  (I assume most are familiar with the
difference between "correct" and "common".)

> I've never seen one of these cards in operation, so I can't give
> benchmarks, but there must have been some kind of review in one of the
> magazines a few years ago.

I shall try (no promises) to post the results of some of the benchmarks
that come with Orca/C ... things are kind of busy, so it may be a few
days ...

--
	G. Devin Reade		glyn@cs.ualberta.ca