EmbeddedRelated.com
Forums

FPGA vs. ARM MCU for floating point operations

Started by Michael March 10, 2008
Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of
floating point operations (mostly multiplies with a decent amount of
trig as well). It does OK - but my floating point needs are soon going
to be expanding (by about twenty-fold) and I'm starting to worry that
the SAM7X part just won't have enough horsepower for this.

I thought about going with a DSP - but then the idea of using an FPGA
hit me. I have very little experience with FPGAs - but would love an
excuse to get more experience with them. I really like the idea of
them - being able to do many things at once makes me very happy.

I should mention: the reason I'm not as attracted to DSPs is that, as
far as I know, open source/free compilers/dev tools for them don't
really exist. My project that this is for is entirely open source -
but an open source project that requires expensive tools just doesn't
make sense to me.

Anyways - does anybody know how an ARM would compare to an FPGA at
these tasks?

Thanks!

-Michael
Michael wrote:
> Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of > floating point operations (mostly multiplies with a decent amount of > trig as well). It does OK - but my floating point needs are soon going > to be expanding (by about twenty-fold) and I'm starting to worry that > the SAM7X part just won't have enough horsepower for this. > > I thought about going with a DSP - but then the idea of using an FPGA > hit me. I have very little experience with FPGAs - but would love an > excuse to get more experience with them. I really like the idea of > them - being able to do many things at once makes me very happy. > > I should mention: the reason I'm not as attracted to DSPs is that, as > far as I know, open source/free compilers/dev tools for them don't > really exist. My project that this is for is entirely open source - > but an open source project that requires expensive tools just doesn't > make sense to me. > > Anyways - does anybody know how an ARM would compare to an FPGA at > these tasks?
That will depend on if you can 'spead' the task. A FPGA can give you a LOT of DSP Cells, and if they can all humm along in parallel, you will get large speed gains. Atmel have some ARM9's with flash at 200MHZ that may get you some more legs.... -jg
On Mar 10, 11:20=A0pm, Jim Granville <no.s...@designtools.maps.co.nz>
wrote:
> Michael wrote: > > Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of > > floating point operations (mostly multiplies with a decent amount of > > trig as well). It does OK - but my floating point needs are soon going > > to be expanding (by about twenty-fold) and I'm starting to worry that > > the SAM7X part just won't have enough horsepower for this. > > > I thought about going with a DSP - but then the idea of using an FPGA > > hit me. I have very little experience with FPGAs - but would love an > > excuse to get more experience with them. I really like the idea of > > them - being able to do many things at once makes me very happy. > > > I should mention: the reason I'm not as attracted to DSPs is that, as > > far as I know, open source/free compilers/dev tools for them don't > > really exist. My project that this is for is entirely open source - > > but an open source project that requires expensive tools just doesn't > > make sense to me. > > > Anyways - does anybody know how an ARM would compare to an FPGA at > > these tasks? > > That will depend on if you can 'spead' the task. > A FPGA can give you a LOT of DSP Cells, and if they can all > humm along in parallel, you will get large speed gains. > Atmel have some ARM9's with flash at 200MHZ that > may get you some more legs.... > > -jg
Well, some things I can kinda do in parallel... I mean one of the big things that I do is multiply 4x4 floating point arrays with each other. That's a pretty computationally expensive operation. Is that the kind of thing that an FPGA would do well? The main other things going on on the SAM7X256 (that the FPGA would then have to handle) is there are a couple serial data streams coming in that have to be processed (no math - just parsing text - lots of scanfs), various timers runnings, varous buttons and LEDs that need to be monitored and controlled, and that's just about it. Oh, and it also is doing a large amount of CAN communication. There seems to be an open source CAN core though - so I figure I'm probably OK there... -Michael
On Mar 10, 9:58=A0pm, Michael <nleah...@gmail.com> wrote:
> Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of > floating point operations (mostly multiplies with a decent amount of > trig as well). It does OK - but my floating point needs are soon going > to be expanding (by about twenty-fold) and I'm starting to worry that > the SAM7X part just won't have enough horsepower for this. >
why not use a ARM with a vector floating point coprocessor, I think it does single cycle floating point multplies http://www.standardics.nxp.com/products/lpc3000/lpc3180/ other micros with floating point HW are MPC5554, infineon etc
"Michael" <nleahcim@gmail.com> skrev i meddelandet 
news:2f958bd3-e014-4b8e-bd36-38d2b2a379a0@59g2000hsb.googlegroups.com...
> Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of > floating point operations (mostly multiplies with a decent amount of > trig as well). It does OK - but my floating point needs are soon going > to be expanding (by about twenty-fold) and I'm starting to worry that > the SAM7X part just won't have enough horsepower for this. > > I thought about going with a DSP - but then the idea of using an FPGA > hit me. I have very little experience with FPGAs - but would love an > excuse to get more experience with them. I really like the idea of > them - being able to do many things at once makes me very happy. > > I should mention: the reason I'm not as attracted to DSPs is that, as > far as I know, open source/free compilers/dev tools for them don't > really exist. My project that this is for is entirely open source - > but an open source project that requires expensive tools just doesn't > make sense to me. > > Anyways - does anybody know how an ARM would compare to an FPGA at > these tasks? > > Thanks! > > -Michael
The SAM9260A will give you 400 MHz, while beeing compatible with what you have in terms of peripherals. If you run the SAM7X in ARM mode, you are probably seeing max 25 MIPS. Multiplies are 4 clock cycles. The ARM9 has a faster core and Tightly coupled memory so you can run up to 32 kB of SRAM with 1 clock cycle access, and 32 kB instruction cache with 1 clock cycle access. Then you have a V5 architecture with 1 clock multiply, I think it will give you at least 20 x performance boost. No CAN controller though. The AVR32 core can do up to 4 x 8 bit multiuples per clock cycle, or 2 x 16 bit per clock cycle, and it has the same peripherals as the SAM7X. maxes out at 150 MHz though. There is an ARM9 + 1 Gflops floating point DSP coming, I have a development board, but I am afraid that the compiler is not open source. -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
On Mar 11, 5:06=A0pm, "Ulf Samuelsson" <u...@a-t-m-e-l.com> wrote:
> "Michael" <nleah...@gmail.com> skrev i meddelandetnews:2f958bd3-e014-4b8e-=
bd36-38d2b2a379a0@59g2000hsb.googlegroups.com...
> > > > > > > Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of > > floating point operations (mostly multiplies with a decent amount of > > trig as well). It does OK - but my floating point needs are soon going > > to be expanding (by about twenty-fold) and I'm starting to worry that > > the SAM7X part just won't have enough horsepower for this. > > > I thought about going with a DSP - but then the idea of using an FPGA > > hit me. I have very little experience with FPGAs - but would love an > > excuse to get more experience with them. I really like the idea of > > them - being able to do many things at once makes me very happy. > > > I should mention: the reason I'm not as attracted to DSPs is that, as > > far as I know, open source/free compilers/dev tools for them don't > > really exist. My project that this is for is entirely open source - > > but an open source project that requires expensive tools just doesn't > > make sense to me. > > > Anyways - does anybody know how an ARM would compare to an FPGA at > > these tasks? > > > Thanks! > > > -Michael > > The SAM9260A will give you 400 MHz, while beeing compatible with what you > have > in terms of peripherals. > If you run the SAM7X in ARM mode, you are probably seeing max 25 MIPS. > Multiplies are 4 clock cycles. > > The ARM9 has a faster core and Tightly coupled memory so you can run > up to 32 kB of SRAM with 1 clock cycle access, and 32 kB instruction cache=
> with 1 clock cycle access. > Then you have a V5 architecture with 1 clock multiply, > I think it will give you at least 20 x performance boost. > > No CAN controller though. > > The AVR32 core can do up to 4 x 8 bit multiuples per clock cycle, > or 2 x 16 bit per clock cycle, and it has the same peripherals as the SAM7=
X.
> maxes out at 150 MHz though. > > There is an ARM9 + 1 Gflops floating point DSP coming, > I have a development board, but I am afraid that the compiler is > not open source. > > -- > Best Regards, > Ulf Samuelsson > This is intended to be my personal opinion which may, > or may not be shared by my employer Atmel Nordic AB
Hi Ulf - unfortunately, none of the solutions you mentioned has CAN. Being able to easily add CAN (or anything else, for that matter) to an FPGA is my big draw to the FPGA world. I've used external CAN controllers in the past - but that adds in a lot of overhead for the processor that I would like to avoid. The whole parallel processing thing is also really nice sounding... You know - when I heard about the SAM9X parts coming out - I was so excited thinking it'd be essentially the same chip just with an ARM9 and maybe some extra added bonuses. But the lack of CAN really makes me sad. Thanks, -Michael
Michael wrote:
> > Hi Ulf - unfortunately, none of the solutions you mentioned has CAN. > Being able to easily add CAN (or anything else, for that matter) to an > FPGA is my big draw to the FPGA world. I've used external CAN > controllers in the past - but that adds in a lot of overhead for the > processor that I would like to avoid.
?? Why should an external peripheral, take more overhead than an internal one ? In fact, if that external peripheral is a small CAN uC, you should have LESS overhead.
> The whole parallel processing thing is also really nice sounding... > > You know - when I heard about the SAM9X parts coming out - I was so > excited thinking it'd be essentially the same chip just with an ARM9 > and maybe some extra added bonuses. But the lack of CAN really makes > me sad.
Work from the hardest problem first. CAN has many solutions, and there are many CAN uC that can slave. The Floating point load sounds the hardest to meet, so crack that first. TI have just released some higher end OMAP devices. If volumes are small, FPGAs are nice to work with as an essentially 'soft' solution. -jg
Hi,

If you only using single-precision floating point, you can use MicroBlaze 
with a FPU.
It has decent floating-point performance.

There is also tons of other peripherals that you can add to MicroBlaze.

G&#4294967295;ran Bilski

"Michael" <nleahcim@gmail.com> wrote in message 
news:2f958bd3-e014-4b8e-bd36-38d2b2a379a0@59g2000hsb.googlegroups.com...
> Hi - I'm currently using an Atmel AT91SAM7X256 to do a large amount of > floating point operations (mostly multiplies with a decent amount of > trig as well). It does OK - but my floating point needs are soon going > to be expanding (by about twenty-fold) and I'm starting to worry that > the SAM7X part just won't have enough horsepower for this. > > I thought about going with a DSP - but then the idea of using an FPGA > hit me. I have very little experience with FPGAs - but would love an > excuse to get more experience with them. I really like the idea of > them - being able to do many things at once makes me very happy. > > I should mention: the reason I'm not as attracted to DSPs is that, as > far as I know, open source/free compilers/dev tools for them don't > really exist. My project that this is for is entirely open source - > but an open source project that requires expensive tools just doesn't > make sense to me. > > Anyways - does anybody know how an ARM would compare to an FPGA at > these tasks? > > Thanks! > > -Michael
> Hi Ulf - unfortunately, none of the solutions you mentioned has CAN.
"There is an ARM9 + 1 Gflops floating point DSP coming,..." This one has two CAN controllers... No open source compiler for the DSP though -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
Ulf Samuelsson wrote:

>>Hi Ulf - unfortunately, none of the solutions you mentioned has CAN. > > > "There is an ARM9 + 1 Gflops floating point DSP coming,..." > > This one has two CAN controllers... > No open source compiler for the DSP though
What package, and Memory ? -jg