[comp.sys.amiga] Math Chip Interface

iphwk@MTSUNIX1.BITNET (Bill Kinnersley) (01/07/89)

[In "Re: Math Chip Interface", Dale Luck said:]
:
: If there is 680x0 and an 881 as a memory mapped io device then the ieee
: libraries will talk to the chip as a peripheral device spoon feeding
: and extracting the numbers.

How do the libraries determine where my 68881 is located in memory?
(How do *I* determine where it is located?)


--
--Bill Kinnersley
  Physics Department   Montana State University    Bozeman, MT 59717
  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1

dale@boing.UUCP (Dale Luck) (01/07/89)

In article <8901070305.AA02117@terra.oscs.montana.edu> iphwk@MTSUNIX1.BITNET (Bill Kinnersley) writes:
>[In "Re: Math Chip Interface", Dale Luck said:]
>:
>: If there is 680x0 and an 881 as a memory mapped io device then the ieee
>: libraries will talk to the chip as a peripheral device spoon feeding
>: and extracting the numbers.
>
>How do the libraries determine where my 68881 is located in memory?
>(How do *I* determine where it is located?)

You autoconfig software should create a resource structure like the
following and add it via AddResource().
The ieee libraries call OpenResource("MathIEEE.resource",0)
If it succeeds then it checks the contents of the resource structure.
----------------------------------------------------------------
A portion in reproduced here of mathresource.h
This file should be in your V1.3 include files.
struct MathIEEEResource
{
        struct  Node    MathIEEEResource_Node;
        unsigned short  MathIEEEResource_Flags;
        unsigned short  *MathIEEEResource_BaseAddr; /* ptr to 881 if exists */
        void    (*MathIEEEResource_DblBasInit)();
        void    (*MathIEEEResource_DblTransInit)();
        void    (*MathIEEEResource_SglBasInit)();
        void    (*MathIEEEResource_SglTransInit)();
        void    (*MathIEEEResource_ExtBasInit)();
        void    (*MathIEEEResource_ExtTransInit)();
};

/* definations for MathIEEEResource_FLAGS */
#define MATHIEEERESOURCEF_DBLBAS        (1<<0)
#define MATHIEEERESOURCEF_DBLTRANS      (1<<1)
#define MATHIEEERESOURCEF_SGLBAS        (1<<2)
#define MATHIEEERESOURCEF_SGLTRANS      (1<<3)
#define MATHIEEERESOURCEF_EXTBAS        (1<<4)
#define MATHIEEERESOURCEF_EXTTRANS      (1<<5)
---------------------------------------------------------------
If you have a 68881 in your system as a memory mapped device then
a ptr to the base address should be put in MathIEEEResource_BaseAddr.

If you have some other type of ieee math device that is not a 68881 then
this gets a little more complicated. However it should be possible.

>
>
>--
>--Bill Kinnersley
>  Physics Department   Montana State University    Bozeman, MT 59717
>  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1


-- 
Dale Luck     GfxBase/Boing, Inc.
{uunet!cbmvax|pyramid}!amiga!boing!dale

iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) (01/16/89)

[In "Re: Math Chip Interface", Dale Luck said:]
:
: In article <8901070305.AA02117@terra.oscs.montana.edu> iphwk@MTSUNIX1.BITNET
: (Bill Kinnersley) writes:
: >[In "Re: Math Chip Interface", Dale Luck said:]
: >:
: >: If there is 680x0 and an 881 as a memory mapped io device then the ieee
: >: libraries will talk to the chip as a peripheral device spoon feeding
: >: and extracting the numbers.
: >
: >How do the libraries determine where my 68881 is located in memory?
: >(How do *I* determine where it is located?)
:
: You autoconfig software should create a resource structure like the
: following and add it via AddResource().
: The ieee libraries call OpenResource("MathIEEE.resource",0)
: If it succeeds then it checks the contents of the resource structure.
: ----------------------------------------------------------------
: A portion in reproduced here of mathresource.h
: This file should be in your V1.3 include files.
: struct MathIEEEResource
: {
:         struct  Node    MathIEEEResource_Node;
:         unsigned short  MathIEEEResource_Flags;
:         unsigned short  *MathIEEEResource_BaseAddr; /* ptr to 881 if exists */
:         void    (*MathIEEEResource_DblBasInit)();
:         void    (*MathIEEEResource_DblTransInit)();
:         void    (*MathIEEEResource_SglBasInit)();
:         void    (*MathIEEEResource_SglTransInit)();
:         void    (*MathIEEEResource_ExtBasInit)();
:         void    (*MathIEEEResource_ExtTransInit)();
: };
:
: ---------------------------------------------------------------
: If you have a 68881 in your system as a memory mapped device then
: a ptr to the base address should be put in MathIEEEResource_BaseAddr.
:
: If you have some other type of ieee math device that is not a 68881 then
: this gets a little more complicated. However it should be possible.
:
: Dale Luck     GfxBase/Boing, Inc.
: {uunet!cbmvax|pyramid}!amiga!boing!dale
:
When I posted this, I was assuming that my 68010/68881 board (from
Netch Computer Products) was, as you say, a memory-mapped I/O device,
and that all I had to do was figure out where in memory it was located.
After poking around, I'm not so sure.  It may not be located anywhere!

My goodness, my little 68010's got all kinds of registers I never realized
were in there.

It apparently talks to the 68881 by using the "CPU address space".
It loads 7 into the Function Code registers (SFC and DFC) then sends
stuff to the 68881 registers using the MOVES instruction.

That's just the way they describe how the coprocessor interface is
supposed to work in the 68020 manual (the part of the manual I never
read).

Probably means I am out of luck for 1.3 support, doesn't it?


--
--Bill Kinnersley
  Physics Department   Montana State University    Bozeman, MT 59717
  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1

dale@boing.UUCP (Dale Luck) (01/18/89)

In article  iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) writes:
>[In "Re: Math Chip Interface", Dale Luck said:]
>It apparently talks to the 68881 by using the "CPU address space".
>It loads 7 into the Function Code registers (SFC and DFC) then sends
>stuff to the 68881 registers using the MOVES instruction.

>Probably means I am out of luck for 1.3 support, doesn't it?

Yup, using the cpu space stuff means the 68881 software would not work
on a 68000 equiped machine. Since there were many more 68000 machines
than 68010 machines we chose to only include support for what we felt
would be the 99% of the cases.

Also the extra time required to use the cpu space by changing the SFC and
DFC would have only added additional overhead to an already overhead
bound feature.

>


-- 
Dale Luck     GfxBase/Boing, Inc.
{uunet!cbmvax|pyramid}!amiga!boing!dale