Shop OBEX P1 Docs P2 Docs Learn Events
Floating point with and without uM-FPU — Parallax Forums

Floating point with and without uM-FPU

diafysaldiafysal Posts: 92
edited 2004-12-02 21:15 in General Discussion

Hi

I wonder about the "speed" of the uM-FPU Floating Point Coprocessor, haven’t really seen anything about that. I suppose that for example that Sin, Cosin, Tan and Sqrt is faster with the uM-FPU. But the data has to be transferred to and from the uM-FPU. And as I said, I haven’t seen anything about the "speed"(I might have looked in the wrong place).

Opinions anyone ? (or facts)

Comments

  • diafysaldiafysal Posts: 92
    edited 2004-10-12 19:26
    Anyone?
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-15 13:29
    OK. What's a uM-FPU? Who makes it? (OK, I assume it is some kind of
    external floating-point chip, but how is data transferred?)
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-15 13:43
    The uM-FPU is available from Parallax. That said, I haven't used it yet either.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2004-10-15 15:38
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-15 20:23
    Aha. So it is an 8-pin device, which uses 'SPI' (SHIFTOUT/SHIFTIN) for data transfer.
    Cool.
  • AlWilliamsAWCAlWilliamsAWC Posts: 135
    edited 2004-10-15 21:28
    I haven't used the uM-FPU, but you might be interested in the Javelin class at www.al-williams.com/pak1java.htm

    Al Williams
    AWC
    ·
  • diafysaldiafysal Posts: 92
    edited 2004-10-17 13:24
    So there is:
    Java code only.
    Micromega, Math coprocessor (uM-FPU)
    AWC, Math coprocessor.

    And probably more. It would be nice to see a comparison.
  • camtcamt Posts: 45
    edited 2004-12-02 21:15
    Hi,
    I assume that when you wonder whether "Sin, Cosin, Tan and Sqrt is faster with the uM-FPU" you mean in comparison to the Float32/Float32Math classes. There is an overhead for communication with the uM-FPU, but this is small in comparison to the overhead required to do floating point in Java (as Float32) does. Using the uM-FPU requires much less code space and results in significantly faster execution. Comparison are as follows:

    uM-FPU vs Float32/Float32Math

    Add, Subtract: up to 7 times faster
    Multiply: up to 40 times faster
    Divide: up to 70 times faster
    Sqrt: up to 55 times faster
    Sin, Cos: up to 90 times faster
    Tan: up to 120 times faster
    Exp: up to 90 times faster

    You can see that there is a significant speed improvement using the uM-FPU. One of the nice things about the uM-FPU Java class is that it is a drop in replacement for Float32/Float32Math. In most cases all you need to do is change the import statement to point to the uM-FPU clases. The chip inself is an 8-pin DIP, making it easy to add to a project.

    You can find additional information, including instruction timing at:
    http://www.micromegacorp.com/downloads.html

    Regards,
    Cam Thompson
    Micromega Corporation
Sign In or Register to comment.