Author Topic: is it worth running a soft arduino on spartan FPGA  (Read 8750 times)

0 Members and 1 Guest are viewing this topic.

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
is it worth running a soft arduino on spartan FPGA
« on: April 17, 2014, 05:54:56 pm »
can I make use of the full power of the FPGA if i use the arduino soft core on this FPGA board http://proto-pic.co.uk/papilio-pro-lx9/ is it worth it or should i wait for the Arduino tre.

What im planning todo is read an ADC (i would like more than 8 bit resolution) and wright to a DAC and draw on an LCD

so is it worth it?
follow me on twitter @get_your_byte
 

Offline Hideki

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: no
Re: is it worth running a soft arduino on spartan FPGA
« Reply #1 on: April 17, 2014, 06:50:44 pm »
no
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: is it worth running a soft arduino on spartan FPGA
« Reply #2 on: April 17, 2014, 07:07:42 pm »
It's almost never a good idea to run a soft core inside an FPGA unless you somehow already have the space available in the fabric and are also physically space limited on the PCB.

In a final production unit, it will always be more cost-effective and more power-efficient to use an external hard microprocessor and leave the FPGA resources available for doing what it does best. 

You also have many more choices for an external microprocessor than you do for an internal soft-core.

Finally, when you aren't trying to stuff a soft core into the FPGA, you can downsize it to a smaller, cheaper FPGA or even a CPLD and it can sometimes only cost 1/5th as much as your savings to add back the hard microprocessor chip.
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #3 on: April 17, 2014, 07:10:23 pm »
Well the thing is I want the eas of arguing and the power of the FPGA and I have no experience programming FPGAs
follow me on twitter @get_your_byte
 

Online amyk

  • Super Contributor
  • ***
  • Posts: 8276
Re: is it worth running a soft arduino on spartan FPGA
« Reply #4 on: April 17, 2014, 07:22:48 pm »
A soft-core Arduino!? :o

The task you describe doesn't even require an FPGA. A regular Arduino would be enough.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #5 on: April 17, 2014, 07:24:18 pm »
Quote
is it worth it

Whether it is worth it or not is highly subjective and only you know for sure. No one else can answer that for you.

If you tell us what you are looking for in this exercise, we may be able to better advise you.
================================
https://dannyelectronics.wordpress.com/
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #6 on: April 17, 2014, 07:35:08 pm »
well i need the ease of arduino programming and the power of an FPGA, so no an arduino micro on its own is not going to be enough for my aplication
follow me on twitter @get_your_byte
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #7 on: April 17, 2014, 07:39:00 pm »
Quote
well i need the ease of arduino programming and the power of an FPGA,

Sounds like you want to run Arduino on FPGA.

Then, other than an Arduino soft-core on FPGA, you have no other choices.

Whether it is worth or not doesn't even come into play at all.

================================
https://dannyelectronics.wordpress.com/
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: is it worth running a soft arduino on spartan FPGA
« Reply #8 on: April 17, 2014, 07:43:57 pm »
well i need the ease of arduino programming and the power of an FPGA, so no an arduino micro on its own is not going to be enough for my aplication

To read from an ADC, write to a DAC, and draw on an LCD?  How fast are you updating the ADC/DAC and/or how big is this LCD???

Is it "worth it" from an educational perspective - IE: learning how to implement a soft-core processor on an FPGA - absolutely
Is it "worth it" from a cost/power perspective - absolutely not
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: is it worth running a soft arduino on spartan FPGA
« Reply #9 on: April 17, 2014, 07:44:30 pm »
I have no experience programming FPGAs
Then pick up a book on VHDL/Verilog and start reading.
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #10 on: April 17, 2014, 07:47:06 pm »
well i need the ease of arduino programming and the power of an FPGA, so no an arduino micro on its own is not going to be enough for my aplication

To read from an ADC, write to a DAC, and draw on an LCD?  How fast are you updating the ADC/DAC and/or how big is this LCD???



needs to do everything in about a second; and im not sure how big the lcd is, i may use the VGA "wing"
follow me on twitter @get_your_byte
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: is it worth running a soft arduino on spartan FPGA
« Reply #11 on: April 17, 2014, 07:52:40 pm »
needs to do everything in about a second; and im not sure how big the lcd is, i may use the VGA "wing"

A second is slow in processor-land.  If you were running the ADC/DAC in the tens/hundreds of kHz or up in to the MHz range, then I could see the benefit of throwing in an FPGA, but any microcontroller can handle 1 ADC read, 1 DAC push, and an LCD update in a second.
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #12 on: April 17, 2014, 07:58:20 pm »
needs to do everything in about a second; and im not sure how big the lcd is, i may use the VGA "wing"

A second is slow in processor-land.  If you were running the ADC/DAC in the tens/hundreds of kHz or up in to the MHz range, then I could see the benefit of throwing in an FPGA, but any microcontroller can handle 1 ADC read, 1 DAC push, and an LCD update in a second.

obviously the faster the better but im being realistic because there will be maths to do between the adc read and the screen update
follow me on twitter @get_your_byte
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: is it worth running a soft arduino on spartan FPGA
« Reply #13 on: April 17, 2014, 08:05:21 pm »
needs to do everything in about a second; and im not sure how big the lcd is, i may use the VGA "wing"

A second is slow in processor-land.  If you were running the ADC/DAC in the tens/hundreds of kHz or up in to the MHz range, then I could see the benefit of throwing in an FPGA, but any microcontroller can handle 1 ADC read, 1 DAC push, and an LCD update in a second.

obviously the faster the better but im being realistic because there will be maths to do between the adc read and the screen update

Unless you're trying to solve for pi, that's still very little work for anything but the slowest of the slow microcontrollers.

To give you a point of reference, I have a system using a lowly 16 MHz MSP430.  It's reading from 4 ADCs (2 10 bit, 2 16 bit), doing a full PID control calculation, and writing to a 16 bit DAC every millisecond, on top of driving a 128x64 graphic LCD at 10 FPS, providing the user with a full menu-driven front end, and doing system checks (temperature, voltage, etc.) in the background, and it still has plenty of cycles left over to sit around and twiddle its thumbs.
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #14 on: April 17, 2014, 08:10:15 pm »
i might just go for a fast arduino like the the arduino due
follow me on twitter @get_your_byte
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #15 on: April 17, 2014, 08:15:51 pm »
Quote
i might just go for a fast arduino like the the arduino due

Sure.

For what you are trying to do, even the slowest of the slow mcus can do it.

Unless, of course, you deliberately slow down the mcu.

It is far more helpful to you, I think, if you just pick an arduino and play with it before anything. It is a lot easier and faster to take baby-steps first.
================================
https://dannyelectronics.wordpress.com/
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #16 on: April 17, 2014, 08:18:16 pm »
Quote
i might just go for a fast arduino like the the arduino due

Sure.

For what you are trying to do, even the slowest of the slow mcus can do it.

Unless, of course, you deliberately slow down the mcu.

It is far more helpful to you, I think, if you just pick an arduino and play with it before anything. It is a lot easier and faster to take baby-steps first.

even if a slow one can do it i wont have enough IO on something like the uno
follow me on twitter @get_your_byte
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #17 on: April 17, 2014, 08:22:04 pm »
Quote
even if a slow one can do it i wont have enough IO on something like the uno

Then run the soft arduino on a fpga.

It doesn't sound like you ever wanted to give yourself a choice.
================================
https://dannyelectronics.wordpress.com/
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #18 on: April 17, 2014, 08:24:36 pm »
i will do it on a due its cheaper
follow me on twitter @get_your_byte
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #19 on: April 17, 2014, 08:35:32 pm »
Quote
i will do it on a due

Doesn't that fail to do what you wanted to do? Use arduino language on fpga?
================================
https://dannyelectronics.wordpress.com/
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 7995
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #20 on: April 17, 2014, 08:37:44 pm »
Quote
i will do it on a due

Doesn't that fail to do what you wanted to do? Use arduino language on fpga?

He thought he needed an FPGA because he has such a complicated task to perform.

I daren't ask what he's trying to do.
 

Offline granz

  • Regular Contributor
  • *
  • Posts: 136
  • Country: us
  • 6.62606957
Re: is it worth running a soft arduino on spartan FPGA
« Reply #21 on: April 17, 2014, 08:40:26 pm »
If you just want to get something done, you won't have fun trying to do it with a soft-core on an FPGA, considering you don't have past experience with FPGAs.  If you want to try it for educational reasons, that could make sense.  As others have pointed out, running a soft-core on an FPGA is a very inefficient use of resources.  By just taking an FPGA and throwing a soft-core on it you don't gain much, because you aren't taking advantage of the parallel processing ability of custom logic.  A soft-core can be useful as an overseer to manage tasks at a higher level, but many commercial designs don't even do that, they just use an external dedicated processor.

I guess you've decided on using a Due then, which I think is a good choice.  It sounds like that should be more than up to the task you will ask of it.
 

Offline electronics manTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: is it worth running a soft arduino on spartan FPGA
« Reply #22 on: April 17, 2014, 08:44:13 pm »
Quote
i will do it on a due

Doesn't that fail to do what you wanted to do? Use arduino language on fpga?

He thought he needed an FPGA because he has such a complicated task to perform.

I daren't ask what he's trying to do.

im an analog guy trying to build a low frequancy (100MHz) spectrum analyser and i need to display the output it doesnt need a fast ADC as the signal has pased into an envelope detector, there is a lot of system stuff that needs to be done, i have the spectrum analyser working i just need a way to display the output.
follow me on twitter @get_your_byte
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: is it worth running a soft arduino on spartan FPGA
« Reply #23 on: April 17, 2014, 09:01:22 pm »
Doesn't that fail to do what you wanted to do? Use arduino language on fpga?

Bad Danny. time out.  Put down the soldering iron and go sit in the corner :) lol
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
Re: is it worth running a soft arduino on spartan FPGA
« Reply #24 on: April 17, 2014, 09:37:57 pm »
Reading through this thread the question going through my mind is if your programming ecosystem has a perceived performance lag, instead of jumping into the complex world of FPGA's (as flexible and useful as they are), ditch the arduino training wheel's and pick an MCU that CAN handle the job
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf