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

0 Members and 1 Guest are viewing this topic.

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #25 on: April 17, 2014, 09:55:43 pm »
Quote
i have the spectrum analyser working i just need a way to display the output.

Unless you have some super-duper lcd with billions of pixels, a slow mcu works just fine.
================================
https://dannyelectronics.wordpress.com/
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: is it worth running a soft arduino on spartan FPGA
« Reply #26 on: April 17, 2014, 10:48:54 pm »
Why so much hate?


Anyway, the Papilio Pro are interrsting things, I have the Papilio one, pro, and some other fpga boards, not exactly gotten around to learn fpga stuff yet, but the ability to rund Zpuino on these are very nice.
With the wishbone interface, one can add on various "peripherals" in the fpga, for instance as is done with the Retrocade, where zpuino communicates with soft-Sid and other sound chips from the old days.
They also are making something called Papilio Schematic library, where they are giving you the option to create your own little SoC on the fpga

But of course, worth it?, depens on what it means to you, cost in money?, or cost of learning?
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: is it worth running a soft arduino on spartan FPGA
« Reply #27 on: April 18, 2014, 12:06:05 am »
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. 
I couldn't agree more. I'm currently working on an open source project/product where they 'forgot' to put a processor on the board. It uses the Lattice Mico 32 soft core instead but loading new firmware is a major PITA. It would have been so much easier if they put a Linux capable ARM processor on the board. It isn't a particular low cost solution so the extra parts would be less than peanuts.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: is it worth running a soft arduino on spartan FPGA
« Reply #28 on: April 18, 2014, 12:34:05 am »
If you decide to go with the FPGA, here is a dev board that will work for you:

https://www.eevblog.com/forum/microcontrollers/terasic-cyclone-v-gx-starter-kit-(c5g)-review/

But FPGA programming is not for the faint hearted, It will literally take you at least 3 months to get your head around it, and you will learn a lot. Just connecting eclipse or whatever IDE you want to use to hook into the soft core will take a lot of research. You can use the NIOSII soft core but Altera doesn't offer it for free.

There might already be work done to connect the Arduino dev environment to the soft core but I haven't look into that.

Altera has a good guided course curriculum that will help you along, but expect to spend a lot of hours and because iteration makes for better learning you will need to revisit the courses until you know exactly what's what or at least to the degree that you don't have to go through the training tutorials.

If the GPIOs in there are not enough, then you can get this card too for more GPIO's that you can handle.
http://www.altera.com/education/training/curriculum/fpga/trn-fpga.html

Note it does have HDMI out but you will have to learn I2C to communicate and setup the chip then drive it with a frame buffer programmed in the FPGA.

So it's doable but it's gonna require a lot of dedication and a lot of learning to get there.

Alternate to this is to grab a Pioneer board and an lcd shield, it's a 32bit Arm Cortex M0 with programmable analog and digital components. But this won't take sketches (I believe that's what programs are called on that world) It will however allow you to program in C. And tons of examples

http://www.element14.com/community/thread/23736/l/100-projects-in-100-days

All that said, if you want 100MHz, forget the pioneer, you might get 20KHz at best.
The other one, will take a lot of coding and you will need a better ADC and ACD that the one on board. But money talks:

http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=67&No=360&PartNo=2

Two 14-bit Analog to Digital (A/D) converter channel with 150MSPS
Two 14-bit Digital to Analog (D/A) converter channel with 250MSPS
One Audio CODEC with Line-In, Line-Out, MIC and Headphone

With that you might get 50MHz using 3 samples but that would be crappy, 20MHz might be more realistic.
But you can only use one HSMC card, so no extra GPIOs

By the time you are done, you could have bought a Spectrum Analyzer, but once you have this hardware, you could do say, SDR, or really anything you want.

Of course there are other ways around all this but it all will require learning a lot of things.

For example for Software Defined Radio, if you have a PC for $20 you can get this:
http://www.nooelec.com/store/computer-peripherals/tv28tv2-sdr-dvb-t-usb-stick-set.html#.U1BxEVVdVn8

Need an up converter for 125MHz, throw in another $45
http://www.nooelec.com/store/ham-it-up-v1-0-rf-upconverter-for-software-defined-radio.html#.U1BxQ1VdVn8

There is a lot of software out there for it too, that can do FFTs for example:
http://sdrsharp.com/
http://www.winrad.org/


I guess more details on what you want to achieve.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: is it worth running a soft arduino on spartan FPGA
« Reply #29 on: April 18, 2014, 01:45:23 pm »
Quote
i have the spectrum analyser working i just need a way to display the output.

Unless you have some super-duper lcd with billions of pixels, a slow mcu works just fine.
You may find this amusing...

http://ossmann.blogspot.ca/2010/03/16-pocket-spectrum-analyzer.html
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: is it worth running a soft arduino on spartan FPGA
« Reply #30 on: April 18, 2014, 02:01:48 pm »
Programming a FPGA soft core using Arduino is like buying a 16 core Xeon workstation and installing Windows 3.11 inside Dosbox for your OS.   >:D

ok, maybe im being a bit mean, but yeah. Arduino is designed to make programming as simple as possible.
FPGAs are at the other end of the spectrum. Putting them together is just wrong.
« Last Edit: April 18, 2014, 02:08:10 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: is it worth running a soft arduino on spartan FPGA
« Reply #31 on: April 18, 2014, 02:27:09 pm »
FPGA programming isn't more difficult / easier than any other kind of programming. It just takes time and effort to learn. The biggest difference is that FPGA programming languages are parallel (every statement of a program is executed simultaneously).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: is it worth running a soft arduino on spartan FPGA
« Reply #32 on: April 18, 2014, 03:00:19 pm »
One interesting application of hd44780 is to make it into a quasi graphics display.
================================
https://dannyelectronics.wordpress.com/
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: is it worth running a soft arduino on spartan FPGA
« Reply #33 on: April 18, 2014, 06:45:44 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. 
I couldn't agree more. I'm currently working on an open source project/product where they 'forgot' to put a processor on the board. It uses the Lattice Mico 32 soft core instead but loading new firmware is a major PITA. It would have been so much easier if they put a Linux capable ARM processor on the board. It isn't a particular low cost solution so the extra parts would be less than peanuts.

Sometimes, especially in the opensource / openhardware arena, they just don't know any better, or get sidetracked with the cool factor, or get pulled in by peers questioning "why should we include an external MCU.. we have an FPGA, brah.. !" :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf