Shop OBEX P1 Docs P2 Docs Learn Events
um-FPU 32/64 coprocessor vs Propeller — Parallax Forums

um-FPU 32/64 coprocessor vs Propeller

Alex.StanfieldAlex.Stanfield Posts: 198
edited 2014-04-11 15:07 in Propeller 1
Has anyone used the micromega FPU coprocessors? I was reading the specs which seem impressive with all the additional functions. Then I saw the performance numbers for each operation...

In particular integer math have for example these numbers

LMUL 7.1 uS
LDIV ~20 uS

With a PASM routine: Doesn't it take less time to do integer multiplication/division?

What's your experience?

Alex

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-04-10 14:10
    I've used the 32-bit version but unless you program complex equations into the chip, you're probably better off with F32. The calculations on the chip may be fast but you still have to send data and receive the answer through some sort of serial connection which will likely eat up any time savings you may have won by having the chip do your calculations.

    IMO, the 64-bit version looks very interesting. With 64-bit math, it might be worth having to deal with the data transfer times.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-04-10 15:09
    I've been curious about that chip for a while since I do a fair amount of inverse kinematics. In an example on their website they program the whole IK calculation onto the chip which would definitely be worth it. They also have built in GPS support which is also another natural for a floating point coprocessor.
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-04-10 15:18
    Martin_H wrote: »
    ...
    In an example on their website they program the whole IK calculation onto the chip which would definitely be worth it.
    ...

    I agree it looks great, my doubt is only related to speed. I haven't seen the particular example, but isn't an equation just a script of operations that get sequentially executed? In that case wouldn't it be cheaper to launch a cog dedicated to equation calculation?

    Alex
  • Heater.Heater. Posts: 21,230
    edited 2014-04-10 15:26
    Just get an STM32 F4 and program it in JavaScript. It will be faster, easier and cheaper.. http://www.espruino.com/
  • Martin_HMartin_H Posts: 4,051
    edited 2014-04-10 16:14
    Heater. wrote: »
    Just get an STM32 F4 and program it in JavaScript. It will be faster, easier and cheaper.. http://www.espruino.com/

    At $40 the espruino isn't cheap, but it does have the advantage of code portability, so it has that going for it.
  • KeithEKeithE Posts: 957
    edited 2014-04-10 20:43
    Martin_H wrote: »
    At $40 the espruino isn't cheap, but it does have the advantage of code portability, so it has that going for it.

    He has links to other boards that should work. e.g. STM32VLDISCOVERY for $10 and of course the chip alone would be cheaper. I would buy one of the official boards for ease of getting started and to support them, but it's not necessary.

    A question I would ask is how well verified is the math that's in the espruino? One could imagine that micromega might do a better job of verification since it's their main reason for existing. Take a look through the espruino forums and see what issues are being reported, how compliant it is with javascript, etcetera.
  • LeonLeon Posts: 7,620
    edited 2014-04-11 02:00
    Those Micromega chips appear to be 16-bit PIC24s, if it's of any interest
  • caskazcaskaz Posts: 957
    edited 2014-04-11 03:13
    Hi.
    I had used uM-FPUv3.1 to calculate inverse-kinematics-calculation for delta-robot in 2012 Oct.
    I had wrote inverse-kinematics-calculation to eeprom inside uM-FPUv3.1(PIC).
    PropForth send (x,y,z) to uM-FPUv3.1. And uM-FPUv3.1 return values(sv1,sv2,sv3) of pulse-width for 3 servos.

    http://youtu.be/fhyy_JcLuFQ
  • Heater.Heater. Posts: 21,230
    edited 2014-04-11 03:45
    Martin_H,

    I use an STM32F4 Discovery with the Espruino software, only 15 dollars.
    http://www.cnx-software.com/2011/10/28/st-micro-15-usd-stm32f4-discovery-cortex-m-development-kit/

    The OLIMEX boards are cheap. Or just use the chip on your own boards.

    KeithE,
    A question I would ask is how well verified is the math that's in the espruino? One could imagine that micromega might do a better job of verification since it's their main reason for existing. Take a look through the espruino forums and see what issues are being reported, how compliant it is with javascript, etcetera.
    Strange thing to worry about.

    The STM32 chips have floating point in hardware. If any bugs turn up in the maths in JavaScript I'm sure Gordon Williams will get them fixed pretty quickly. I see no reason why this software should be suspected of being more buggy than whatever they programmed into the PIC24 for UN-FPU.

    Gordon has done an amazing job creating the JavaScript interpreter. I would not be surprised if there were odd corner cases of the JS language that are broken. Most would admit that JS itself has a lot of "broken" features by design (Thank you MicroSoft). Not to worry, again Gordon has been very good ant getting things fixed. And heck, don't do weird stuff.

    Alex.Stanfield, why not just do the floating point on the Propeller with the F32 object?
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-04-11 05:24
    Heater. wrote: »
    ...
    Alex.Stanfield, why not just do the floating point on the Propeller with the F32 object?

    I may do that after all. After seeing the speed values for each operation...

    Alex
  • KeithEKeithE Posts: 957
    edited 2014-04-11 09:07
    Heater. wrote: »
    Martin_H,
    Strange thing to worry about.

    The STM32 chips have floating point in hardware. If any bugs turn up in the maths in JavaScript I'm sure Gordon Williams will get them fixed pretty quickly. I see no reason why this software should be suspected of being more buggy than whatever they programmed into the PIC24 for UN-FPU.

    A little browsing of the forums shows these recent math related (?) bugs. Looks like 2 out of 3 are closed, but to me it indicates how new and potentially buggy this is. It doesn't mean it shouldn't be used, but I would look into the test suite. It looks like it's missing coverage.

    http://forum.espruino.com/conversations/1065/
    http://forum.espruino.com/conversations/1004/
    http://forum.espruino.com/conversations/902/

    How would you interface between a propeller and espruino for this application? I would think that you want to send the floats in binary format.
  • fridafrida Posts: 155
    edited 2014-04-11 11:00
    Remember, this is a one man show, so he's come a long way. And we are there to test the software. It does not matter, there are some errors. For we will find them as long as we use the language.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-11 12:27
    KeithE,


    You seem determined to throw doubt on the Espruino.


    Perhaps you remember the the Intel Pentium "FOOF" bug. Google it if not.


    Perhaps you remember that the Intel 286 when asked to multiply by an immediate integer value that happened to be negative always gave the wrong result.


    Everything has bugs some time.


    Now, whatever program you write I'm sure you are going to test it. Right? If there is a bug Gordon will fix it.
    How would you interface between a propeller and espruino for this application? I would think that you want to send the floats in binary format.
    No way.


    Send it commands in ASCII over a serial link.


    At that point you find out it's quicker to do the calcs in the Propeller with F32. Or move the bulk of the intelligence to the Espruino and let the Prop take care of the IO.
  • KeithEKeithE Posts: 957
    edited 2014-04-11 13:43
    Heater - I'm just saying go in with eyes open. In my opinion you seemingly presented it as a complete well tested solution "faster, easier, faster, and cheaper". Espruino is a cool project that I've considered purchasing, but I think that the "easier and faster" would need to be explored before making a decision for this application.

    FYI - I've worked with the people who designed the Weitek and NexGen FPUs.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-11 14:16
    I agree, "eyes open".

    The "faster, easier, cheaper" thing was all in comparison to bolting the proposed FPU onto a Propeller. I suspect that is just a naff kludge of an idea.

    By the way, what application? None has been mentioned here.
  • KeithEKeithE Posts: 957
    edited 2014-04-11 15:07
    Heater. wrote: »
    By the way, what application? None has been mentioned here.
    I don't know, but was just trying to say that it would influence the decision.
Sign In or Register to comment.