Wow -- Floating point FPU

What products would you like to see?
basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Wow -- Floating point FPU

Post 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



carlosDanger
Posts: 1
Joined: Fri Aug 02, 2013 4:36 pm

Re: Wow -- Floating point FPU

Post by carlosDanger »

smokin'

TodWulff
Posts: 70
Joined: Fri Oct 19, 2012 4:03 am
Location: The Mitten State - Shores of Lake Huron

Re: Wow -- Floating point FPU

Post 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?

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Wow -- Floating point FPU

Post 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.

TodWulff
Posts: 70
Joined: Fri Oct 19, 2012 4:03 am
Location: The Mitten State - Shores of Lake Huron

Re: Wow -- Floating point FPU

Post by TodWulff »

Nice. Thanks!

TodWulff
Posts: 70
Joined: Fri Oct 19, 2012 4:03 am
Location: The Mitten State - Shores of Lake Huron

Re: Wow -- Floating point FPU

Post 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

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Wow -- Floating point FPU

Post 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

TodWulff
Posts: 70
Joined: Fri Oct 19, 2012 4:03 am
Location: The Mitten State - Shores of Lake Huron

Re: Wow -- Floating point FPU

Post by TodWulff »

Copy. Thanks.

TodWulff
Posts: 70
Joined: Fri Oct 19, 2012 4:03 am
Location: The Mitten State - Shores of Lake Huron

Re: Wow -- Floating point FPU

Post 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.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Wow -- Floating point FPU

Post by basicchip »

No double secret hidden code I can think of.

Post Reply