Page 1 of 2

Wow -- Floating point FPU

Posted: Wed Aug 07, 2013 11:48 pm
by basicchip
One of our consulting projects is using the LPC4078, which is an M4 ARM that can run 120 MHz and includes an FPU (floating point unit)

I found the code and libraries to use that and built a version of BASIC firmware with it and did some quick bench marks.

2000000 integer operations 0.1 seconds

2000000 floating adds 1.9 seconds

2000000 floating adds with FPU 0.44 seconds

This may need to become the next product

Not bad for a small ARM -- close to 5 MFLOPs

Re: Wow -- Floating point FPU

Posted: Thu Aug 08, 2013 12:04 am
by carlosDanger
smokin'

Re: Wow -- Floating point FPU

Posted: Tue Sep 04, 2018 2:00 am
by TodWulff
I believe that one of the cores in the 54102 has a FPU baked in. What sort of penalty does the firmware take, wrt size, when including the FPU libraries?

Re: Wow -- Floating point FPU

Posted: Tue Sep 04, 2018 2:24 am
by basicchip
The LPC54102 does indeed have an FPU, and the floating point is included in the BASIC firmware with similar performance enhancement.

No overhead from the user perspective.

Re: Wow -- Floating point FPU

Posted: Tue Sep 11, 2018 2:40 pm
by TodWulff
Nice. Thanks!

Re: Wow -- Floating point FPU

Posted: Tue Sep 11, 2018 5:07 pm
by TodWulff
Follow-on questions:
  1. What firmware routines exist that can be called from user code, to make use of the FPU libs/peripheral baked into the firmware/hardware?
  2. Are these documented in one or more of the help resources available to AB users?
    • I've searched the local .pdf, the web .pdf, and the online .html help. The only reference to FPU I found was in SPI sample code for Cam's (MicroMega's) external FPU ASIC.
Please advise. TIA.

-t

Re: Wow -- Floating point FPU

Posted: Tue Sep 11, 2018 7:50 pm
by basicchip
Any floating point on the M4-FPU, uses the FPU, as all of those operations call compiled C code that engages the FPU

Re: Wow -- Floating point FPU

Posted: Tue Sep 11, 2018 11:38 pm
by TodWulff
Copy. Thanks.

Re: Wow -- Floating point FPU

Posted: Thu Sep 13, 2018 4:29 am
by TodWulff
basicchip wrote:
Tue Sep 11, 2018 7:50 pm
Any floating point on the M4-FPU, uses the FPU, as all of those operations call compiled C code that engages the FPU
I find that I am questioning if, besides the simple add, subtract, multiply, and divide, are there any other float functions in the firmware that would call these runtime float functions you've built into the firmware? What I am noodling around in muh noggin is the AB_Maths lib I crafted some time ago ... in that I am wondering if there is an opportunity to improve it's performance/accuracy with anything that you might have addressed with more robust/faster code in the runtime.

Re: Wow -- Floating point FPU

Posted: Thu Sep 13, 2018 11:59 am
by basicchip
No double secret hidden code I can think of.