This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129 vs Hercules Floating Math processing



I am not familiar with LaunchPad but I am planning to use one, so here is my question:

My project needs a huge calculation of floating point math , So, which is better, and have less processing/computational time (delay), Hercules series Microcontroller, or Tiva C (TM4C129 specifically) ?

Thanks

  • Maria Wahono said:
    My project needs a huge calculation of floating point math 

    If you say so - but so often our small group finds that float types are not essential - in each/every calculation.  (or w/in key/bounding aspects of a multi-variable, sequential calculation)  MCU time & resources are greatly reduced via the selective use of "integer math" - which may be exploited by a more critical review of the numeric process.

    Review of the candidate MCUs capacity & handling of floating point - along with System Clocks and any intermediate storage buffers/pass offs should advise your conclusion...

  • Hi Maria,

    Having recently moved a still-developing code base from the M3 to the M4 architecture, I freely admit that having _fast_ floating point is most welcome.  As CB1 commented, there are few algorithms where scaled-integer processing cannot rise to the challenge, but it can take a lot of careful analysis to avoid over/under flow in all cases. The effort required to wrangle integer math into service can dominate the firmware timeline.  Those (fortunate enough) to develop in MatLab may concur...  Looking forward, you can expect hardware floating point to become a standard feature of new architectures.

    Now to your question:  The TIVA does a very nice job with single-precision floating point.  Most operations are single cycle (with a delay slot).  The Keil compiler is fairly adept at shuffling instructions to avoid a stall in the delay slot, but at worst a single-cycle instruction stretches to 2 cycles.  If your algorithm needs double precision, you can expect a large decrease in performance.  I think I have some benckmark data at work if you are interested.

    I have not used the Hercules.  Although it has double-precision support, the FPU (V3FPU) is cited as "single-precision optimized".  I don't think the FPU is multiple issue, so (at best) it could match the TIVA cycle for cycle on single-precision.  On double-precision the Hercules should leave it in the dust.  And then there's the 220MHz vs. 120MHz...

    If you do any hands-on benchmarking, I hope you will share it with the group!

    Regards,

    Dave

     I have read that this effort often exceeds that of the original algoritm wrangling of integers to

  • @ Dave,

    Alas - apparent, "senior moment" invaded your closing sentence.  (Or - pesky Com-Ed bill exceeded grace period - dimmed your usual, incandescent analysis...)

    Poster provides little "proper" justification for any form, floating point.  (i.e. requirement is precisely described as, "huge!")   Stand by the belief that such demonstrated "imprecision" signals similar in the code type/architecture phase.  Thus it may well prove that: fast, resource-lite, scaled integer may be adequate for such, "Gov't Work..."

  • @Maria,

    The Hercules products are based on the Cortex R4(F) which is a higher performance CPU than the Cortex M4F that is used in the Tiva C series.

    My understanding is that the FPU's are similar between the two products.   But the Cortex R4 has 2x independent 64-bit interfaces to RAM that operate concurrently and a separate x64 bit interface to flash, plus a x64 bit AXI interface to peripherals and external memory.  So it is more like a classical DSP architecture than Cortex M which is more like a microcontroller.   You will see a big difference in benchmarks due to this.  

    Also the Cortex R4 that is in the Hercules product line can run faster than the Cortex M.  We have 200Mhz products with tightly - coupled memory today and there will probably be a faster part coming.

    Now, after saying this I should mention that the Hercules *launchpad* uses the RM42x part which is configured as Cortex R4 -- not Cortex R4F -- so if you're using launchpads exclusively you won't get floating point on the RM42x launchpad.   You would need to go to the RM46x or RM48x to get floating point support.   We have low cost development kits for these products too but they're more like $80ish (control cards).

    If you really need to have mind blowing floating point performance, you should look at one of the DSP product lines, like the C28x or the C6x.    You can find parts in these product lines that have an ARM core plus a DSP and that is probably your best bet if your needs go past what you can get with a Cortex M or R...