element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Forum Where to start for an easy intro to FPGAs?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 27 replies
  • Answers 18 answers
  • Subscribers 554 subscribers
  • Views 5907 views
  • Users 0 members are here
Related

Where to start for an easy intro to FPGAs?

Fred27
Fred27 over 6 years ago

I'm sure this is one of those questions that is going to have more opinion that definitive answer, but I'm going to ask it anyway. I've not done anything with FPGAs. I know what they are and what they can do. I know that they're a bit of a shift in mindset for someone who's used to coding for a microcontroller. I'm at the same stage that I'm sure many people are. I want to find out if FPGAs are the sort of thing that I want to get into or not. To dip my toe in the water so to speak.

 

The trouble is there are a lot of manufacturers who seem to have their own tool chains and programming approaches. It's tricky picking one to start with. There are road tests of a few on here but to be honest they all sound hard and are difficult to compare. Has anyone got advice on where to start? I suppose my priorities are:

 

  • Once I pick a manufacturer I want to stick with it. Jumping from one to another will just make it harder.
  • It would be hopefully easy to get the basics. I don't need raw power right now. Being able to create a microcontroller core is great, but will only confuse me at this stage.
  • The option of a SoC alongside a microcontroller would be a nice option for later, but once again I don't need it right now.
  • Reasonably cheap. It doesn't have to be the cheapest, but this may be a dead end experience so I'd prefer 10s rather than 100s of £/$.

 

Right now I was thinking of waiting see how the pans out for those selected, and to learn from their experience. However, any opinions are welcome

  • Sign in to reply
  • Cancel

Top Replies

  • genebren
    genebren over 6 years ago +8 suggested
    David, You might want to look at CPLD's first. They are very much the same as FPGA, but smaller (#gates and #pins). They are typically programmed with the same tools and languages as FPGAs. I started with…
  • michaelkellett
    michaelkellett over 6 years ago +8 suggested
    If you want to learn about FPGAs then don't mess with CPLDs. The CoolRunners are ancient (15 year old designs). There are 4 major players in the FPGA business, Xilinx, Intel (was Altera), Lattice and Microsemi…
  • michaelkellett
    michaelkellett over 6 years ago in reply to neuromodulator +8 suggested
    Lots of interesting points - I'm off on a long weekend hol so not enough time to cover them all but I'll have a go. There are two primary HDL (Hardware Definition Languages), Verilog and VHDL. They both…
  • michaelkellett
    0 michaelkellett over 6 years ago in reply to neuromodulator

    Lots of interesting points - I'm off on a long weekend hol so not enough time to cover them all but I'll have a go.

     

    There are two primary HDL (Hardware Definition Languages), Verilog and VHDL. They both come in different versions, there are fewer versions of VHDL than of Verilog. The latest versions of Verilog and VHDL both contain many features that synthesizers are unable to deal with. This is one reason why HDL "code" may be non-portable.

    Once you start using an HDL to target an FPGA you may want to use the special features of the FPGA like on chip RAM blocks, PLLs, DDRAM interface hardware etc etc. These are all different for different FPGAs and once your project uses them it becomes specific to that FPGA type.

    Many people use the FPGA vendors toolset including HDL editor, compiler, simulator,  synthesizer, timing checking, fitter, programmer and debugger.

    As you move up the food chain you'll find more use of separate tools, I use Aldec HDL for design and simulation, this makes it a bit easier to port designs from one part to another but you still gut stuck with targeting features which are specific to different chips.

    The tools have to do a great many things - the Aldec tool gives me a bunch of files in HDL that I know work OK in simulation, the vendor tool still has synthesize that into FPGA blocks, fit it into the FPGA, route it, check timing, and maybe re-route/fit many times.  The vendor tools also include stuff for helping you use the on chip features and joining together loads of different bits of IP (other peoples' HDL)  and managing the whole thing. A serious FPGA project will include hundreds of files.

     

    In terms of what FPGAs can do:

    AN FPGA is probably at least 10x less efficient in use of silicon than an ASIC. If you want an ASIC that can out compute a $2000 Xilinx FPGA expect to spend at least $100M getting it to production - if you only want less than 50,000 of them this doesn't work out fo you - even though the ASIC might only cost $100 each.  (These are very rough figures but you get the idea).

    For big projects big FPGAs can massively out compute pretty much anything, they have thousands of DSP blocks that can all work at once.

    For smaller projects - I'll give you some real  examples:

     

    Glue together 4 different audio chips to talk to a piece of pro audio gear with a rather odd digital interface. A Lattice ICE40 chip costing £5, using a few mA of current was used to do this. It was also able to replace the tiny processor previously used for configuring the chips and can easily be tweaked if any of the audio chips is upgraded. No processor could handle 4 different protocols and talk to 5 chips using two different voltages.

     

    Pre-process data from an 8 channel ADC generating 24 bit samples at an aggregate data rate of 1.92Ms/s. There are some DSPs that can just about talk to the ADC but none of them could handle the 128 bit wide data paths involved in the pre-processing. The DSP was a Cyclone 10.

     

    Control 32 channels of 10 bit resolution PWM - this was a 1000 LUT ICE40 in a 100 pin TQFP package - very low power and cheap.

     

    Debugging:

    Simulation is the key - make sure everything works before it hits the hardware. Of course some things get missed and still don't work.

     

    There are tools that try to embed some logic analysis in the FPGA but I've found them to be pretty much useless - the last project I tried to use them (Xilinx Vivado, Artix FPGA) whenever the debugging stuff was added the design wouldn't meet timing any more. I try to make sure that on a big project the FPGA has at least 16 pins on connectors exclusively for debugging. Then you can connect signals of interest to them and look with a logic analyzer. It's also a really good idea to add test connectors, series resistors or test pads (in descending order of preference) to on chip buses, so you can get access. On really fast stuff you can't do this - else it will stop working.

     

    MK

    • Cancel
    • Vote Up +8 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • johnbeetem
    0 johnbeetem over 6 years ago in reply to neuromodulator

    Good questions.  I'd like to add my own comments to Michael Kellett's excellent points.

     

    VHDL and Verilog do pretty much the same thing, so it's mostly a matter of how much you like typing.  VHDL is based on Ada and is wordy.  Verilog is based on C and is more concise.  I personally prefer Verilog since I like to fit a lot of logic onto a printed page.  Also, I don't have room to store VHDL source code listings.  Chacun a son goût.

     

    I once heard a manager say he prefers his FPGA designers to use VHDL because it's so different from C.  He found that with Verilog some of his designers would write C-like code that did not synthesize well into FPGA logic.  By making them use VHDL, they realized they were designing hardware and not software.  I think this is rather silly, but then I've never been a successful manager.

     

    Michael is correct about portability.  If you write generic VHDL/Verilog it's very portable, but as soon as you use special features of the FPGA it becomes non-portable.  Those special features are very useful for reducing the size of your design so it can fit into a cheaper part.  Companies typically choose one FPGA family and stick with it, so portability is not an issue.  As they say in Vermont during Mud Season: "Choose your ruts carefully."

     

    FPGAs are particularly good at two things: very high performance computing and low-latency I/O.  A general-purpose CPU has to share one or a few cores for all computations whereas FPGAs can perform a huge number of computations in parallel and pass results directly between computing element instead of constantly transferring them to and from shared memory (or cache or registers).  On the other hand, a parallel GPU can often compete with or outperform and FPGA on many applications.

     

    A general-purpose computer is typically bad at low-latency I/O, especially if it's running an operating system.  FPGAs can do bit-level I/O with precision timing.

     

    FPGA debug is more difficult than software because you don't have "printf".  Most people recommend simulation, since it provides access to as many internal signals as you want.  Personally, I avoid simulation since most of my designs are either trivial or else require writing a complex "test bench" to generate stimuli and expected results.  My FPGAs often work in a complex software environment so it's much easier to have the actual hardware or a development board that can act as surrogate for the actual hardware.

     

    As Michael said, include lots of extra test points.  Those are your "printfs": you can route internal signals to the test points and see what's going on inside the FPGA.

     

    When I design FPGAs I do lots and lots of synthesis.  This is to make sure my design continues to fit inside a smaller, cheaper FPGA and that it meets timing.  Most of my designs have been Xilinx Spartan chips.  I annoy sales reps because I'm able to fit my designs in smaller Spartan chips instead of requiring large chips from more expensive families.

     

    I'll often synthesize just part of the chip.  One of the annoyances of most FPGA synthesis tools is that you make a small change to your source code and it produces an unexpectedly large increase in logic.  Trying to track down why is difficult or impossible.  Sure, the tool may generate schematics for you, but they're pretty much useless for a large design.  By synthesizing frequently I can find which source code change caused the unexpected behavior and try to find a way around it.

     

    Debugging timing issues isn't hard as long as you plan ahead and don't try to do more than the FPGA family can easily support.  If at all possible, only use one clock.  Signals crossing clock domains are a total pain and should be avoided at all costs.  Synthesize early to see if you're going to run into trouble.  You may need to pipeline the design, which is really hard to do later on but reasonable early in the design.  Most FPGA families have lots of extra flip-flops so pipelining is cheap.

    • Cancel
    • Vote Up +7 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Fred27
    0 Fred27 over 6 years ago

    There's so much helpful information for all of you. Thanks.

     

    Weighing a few things up, I think I'm going to go down the Cypress PSoC route. There are a number of things that pushed me in this direction, but I understand that everyone's priorities are different so it may well not be the best route for someone else. The positives for me were:

    • The smaller devices are in packages that are hand-solder friendly. I like SSOP and QFP, can tolerate QFN if I have to, but I'm scared of BGA.
    • Raw FPGA power isn't important to me right now. I'm just getting my feet wet. There's PSoC6 if I need power later.
    • It looks like PSoC Creator allows use of schematics or Verilog. (No VHDL - so that decision's made for me!)
    • It's a cheap way to get started. I can get a PSoC4 board with an easy to solder IC and a PSoC5 board with a built-in debugger for less than £20.
    • The SoC concept appeals. I can imagine anything I make will need a microcontroller too.

     

    The Lattice iCE40 also sounded good but they have only one device that QFN32. Every other manufacturer seems mostly BGA.

     

    I might wait until the Path to Programmable blogs start coming through, so I reserve the right to completely change my mind later and go Xilinx! image

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 6 years ago in reply to Fred27

    I'm not trying to change your mind, the entry costs on the PSOC are certainly very low and I think the tools are more friendly than some of the traditional FPGAs. Good luck - I'll be interested to hear how you get on.

     

    However, for when you need to step up a notch or two:

     

    Lattice have hand solderable TQFP packages for XP2 (up to the 17k LUT version) and some older ice40 parts in TQFP 100 and 144, as well as the latest ones in 48 pin QFN.

     

    Intel (Altera) Cyclone 10 are available across the full range up to 50k LUT in 144 pin TQFP.

     

    Xilinx (IMO) are currently the worst choice for beginners or small scale because they have nothing modern other than in BGA. Once you've got the need for it they are almost certainly the market leader in raw performance and capability.

     

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Fred27
    0 Fred27 over 6 years ago

    Well johnbeetem and michaelkellett were advising me against PSoC (mostly over on this thread) so I decided to dig a bit deeper with PSoC Creator. I was OK with the fact they are 95% CPU and only 5% programmable logic around the outside, as I'm only a hobbyist wanting to get my feet wet. However, I was under the impression that you could use Verilog "properly" to do this 5% and I'm now not sure this is the case. I cheap PSoC kit is already on the way to me to I might take more of a look when it arrives.

     

    Lattice do seem to be a good way for beginners to start. I may pop and iCEstick into my basket next time I have a Farnell order that needs bumping up to the free shipping threshold.

     

    I think I may take kk99 up on his offer of an Arty S7 board. I appreciate that it's not as beginner friendly, but I'm looking at these as positives:

    • I'll be able to follow along with some of the Path to Programmable blogs
    • I'll be able to try VHDL and Verilog before chosing one.
    • The ARM DesignStart soft core looks interesting and is apparently supported by the Spartan line.
    • If the IDE and development process is similar then the Coolrunner 2 CPLDs can cover the low end with something simple and easily solderable.
    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 6 years ago in reply to Fred27

    The ARTY S7 is about the simplest route into the Spartan 7, which in turn is the cheapest and simplest FPGA supported by Vivado.

     

    Vivado is an awesome tool but not that difficult to do simple things with - it allows you to do very very high end stuff but it's OK for a beginner. It is very different from the Coolrunner toolset.

     

    I do wish Xlinx would put a Spartan7 in a hand solderable package. They do offer it in 196 pin 1mm pitch BGA which would be feasible for small runs by hand assembly.

     

    A free S7 board doesn't seem a bad offer image

     

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • neuromodulator
    0 neuromodulator over 6 years ago in reply to michaelkellett

    From what I've read, Vivado appears to be the currently the best FPGA programming tool. So for the same reason I also would think that the Xilinx 7 gen tech is the way to go if one wants to get serious about PL. Besides the difficulty of soldering BGA, I would think that power and signal integrity requirements are probably hard to meet for FPGAs.

     

    Just like David, I also ordered a PSoC, (in my case the 5), to play with it, and learn a bit about it's programmable logic. I'm aware it's far simpler than a real FPGA, but for me being able to experiment with HDL is more important than high LUT count to write complex stuff. As a short term objective, I need to grasp how HDLs work and how to use them to perform different tasks. Besides the PL side of the PSoC I'm also interested in other aspects of their tech, such as their programmable analog, full speed USB, capsense and their IDE. So even if I quickly outgrow the PSoC PL aspect, I may still use it for other projects. Whenever I need a real FPGA I'll probably go for a Xilinx as I've played a bit with their Vivado running simulations (which became a bit boring without any hardware to test).

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube