Beginner questions..... - Page 1
Forum section: electronics / general

author: Stupid Bear
author_rank: Contributor
timestamp: January 19, 2023, 01:27:09 am
content: I'm looking to get started in FPGA and I'm looking for 3 things.- reasonably priced Dev board- Software- TutorialsDo I need to use the dev software provided by the manufacturer? What are the pros/cons of using 3rd party software?Do I need to use the same software/hardware as the tutorials? Is this going to make it difficult for me to follow along? Like is there a big difference in coding/language/syntax between using a different board or software? Recommendations?I've read about the many websites that offer tutorials both free and paid for but most use specific software of build it around certain chips.Is there a downside to using an older board with older software since you can sometimes find them for cheaper?Do I need all the extras (buttons, switches, LCD, etc) to get started? If I build or purchase accessory boards will that make my learning curve more difficult? (I have EE experience I can cook my own hardware). ex: There are $50 board that are just barebone with a single header strip - is it worth spending more as a beginner?I realize this topic has been asked before and I read many of the suggestions but I don't know which combinations of things I need to to get started with least amount of butt hurt. Naturally I want to spend the least with the best possible learning curve and then spend more $ later on after I know more about what I'm doing.Any advice or examples of how you got started would be appreciated.

author: Foxxz
author_rank: Regular Contributor
timestamp: January 19, 2023, 02:38:40 am
content: I would suggest using the manufacturer software as most FPGAs aren't fully supported by 3rd party tools like yosys. the Lattice ICE40 line seems to have the best 3rd party support as well as some of the older Xilinx chips.I found that getting started with FPGAs has a fairly large learning curve. Software version changes from older tutorials and various dev boards do things differently than present day. I recommend a manufacturer dev board starting off because you can guarantee it will work with their software. It can be a struggle getting things to work depending on your experience with computers and hardware. Not knowing where you sit I'm recommending the easy route.Starting off I would recommend a Lattice ICE40UP dev board or another ICE40 dev board produced by Lattice. Their ICECUBE 2 software has alot of existing tutorials and examples out there. They also make a software package called Radiant which is newer but they've changed some of the syntax for inferring and instantiating various IP on the FPGA which has not permeated on the net as much as the ICECUBE examples have.With a Lattice ICE40 board you can also try using the 3rd party tools as well. See how you like 3rd party workflow compared to the Lattice tools.Switches, buttons, and LEDs are nice to start out with but you can add your own and they may get in the way once you progress.The language between toolsets is fairly standard. Where you run into problems is how various modules are instantiated for using the hard IP in the FPGA. As noted above code written in ICECUBE won't necessarily work in Radiant which won't necessarily work in yosys. The general language syntax is the same between toolsets, whether you choose Verilog, VHDL, SystemVerilog, etc but you will find between tools and manufacturers their are vendor specific ways of doing certain things.You can also download the tools and do alot of learning writing code and simulating it. I know, to a beginner, simulation sounds lame but, as someone who also thought simulation is lame, you kind of have to get used to the idea because FPGAs are usually more difficult to debug.This brings me to my next n00b mistake that I am all too guilty of - buying the hardware before writing the code. How big of an FPGA and what features do you need for a given project? Much of that can be hard to know ahead of time until you've written code and allowed the tools to help determine how many LUTs, memory, DSPs, etc are going to be consumed by your code.

author: james_s
author_rank: Super Contributor
timestamp: January 19, 2023, 03:24:43 am
content: There are two paths I'd suggest for boards, one is the various Chinese FPGA dev boards which are (or were when I last looked) shockingly cheap. Usually these use older parts but so what? Unless you have a cutting edge project in mind older parts have advantages such as faster compiling. The other option is dev boards made primarily for the university market, Digilent makes a lot of these.For all practical purposes you are locked into the vendor provide software, Quartus for Altera (Intel now) and ISE or Vivado for Xilinx. Lattice is the other major player but I've never played with their parts so I'll let someone else comment on it. Xilinx and Altera are broadly similar, I'd expect Lattice to be similar to those.For programming them there are two main languages that are used, Verilog and VHDL. If you ask which one is best you'll get a religious war but suffice to say anything you can do with one you can also do with the other. Verilog resembles C which can be more a hindrance than help, a "false friend" as they'd say in reference to human languages where something looks familiar but is actually entirely different. Personally I prefer VHDL and found the free downloadable book "Free Range VHDL" to be one of the better resources. You can also check Udemy as there are several FPGA courses on there. My suggestion is try both languages and decide which one makes more sense to you, again the capabilities are identical, but they have a very different feel. Verilog looks like abbreviated gibberish to me while VHDL is strongly typed and verbose so I find it a lot easier to follow.You can do some cool stuff on very primitive FPGA hardware. One of my favorite boards has been the EP2C5T144C8 boards that used to be widely available for only about $13. I recreated a handful of early arcade games using those boards, only a few resistors and some kind of buttons or switches are required to have a functional game.https://github.com/james10952001The code should be reasonably portable to other boards.

author: hamster_nz
author_rank: Super Contributor
timestamp: January 19, 2023, 06:34:28 am
content: If you value your time, get a dev board from either Terrasic or Digilent. They are well documented and well tested, and have a lot of material on the internet.The software equivilent of using supercheap or oddball dev board would be the equivalent of saying "I want to learn C programming on an IBM AIX Workstation rather than installing Linux" - yep, you can, but you will be very much on your own...With a common dev board other people with the same board are then able to recreate your issues and/or offer accurate advice which can be invaluable.The buttons, switches and 7-seg displays are helpful for getting started - e.g. build a stopwatch would be a good 'stretch' project for a beginner.If you do get a board and need a hand with the first few hurdles then DM me.

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 19, 2023, 08:07:47 am
content: Like others wrote the basic languages to configure FPGA's are verilog and vhdl. I myself choose verilog because it resembles C, but the pitfall is sequential thinking used when programming in C, will give you problems when working with FPGA's. The logic here is far more parallel then sequential.There are many boards with chips from different vendors to be found, and for most of them it indeed boils down to using the vendor tools. If it is cheap you prefer to start your learning, I can recommend Anlogic. For instancehttps://nl.aliexpress.com/item/1005001774923333.htmlis not expensive. You do need a programmer, but based on a STM32F103 bluepill with some additional hardware it comes cheap.https://github.com/pecostm32/Lichee_Nano/tree/main/Hardware/Anlogic_JTAG_ProgrammerFor information about the software check this thread.https://www.eevblog.com/forum/fpga/latest-version-of-anlogic-ide/Unfortunately, at the moment the cheap boards with Altera/Intel or Xilinx/AMD FPGA's have gone up in price with a factor 2 or more, but are still good for lots of hours of learning and playing.There are also a lot of boards with Gowin parts that can be interesting.

author: rstofer
author_rank: Super Contributor
timestamp: January 19, 2023, 03:13:03 pm
content: I would recommend starting here:https://nandland.com/the-go-board/There are tutorials at the site and also at vhdlwhiz.com, The board doesn't have a lot of IO so you probably can't work on some kinds of projects but you can run SPI or I2C on the PMOD connector and expand IO as needed with IO expandershttps://www.sparkfun.com/products/13601Personally, I want a lot of gadgets on my dev board so I choose the Digilent boards but they are a lot more costly. OTOH, they are keeping up with the Xilinx Artix 7 and vivado.Just like with C, there are "Hello World" projects for FPGAs and the first is the blinking LED. To get that simple demo running implies a lot of things have gone right. Software installation, project setup (board selection, etc), logic design, pin assignment and device programming. Once this step is complete, it's off to the races. It's useful to have known-workable tutorials.

author: james_s
author_rank: Super Contributor
timestamp: January 19, 2023, 06:17:04 pm
content: Quote from: hamster_nz on January 19, 2023, 06:34:28 amI think that's a bit extreme. Yes a common well supported dev board does make things easier, but the inexpensive random dev boards are not that hard to work with, all you need is the pin mapping and even with the cheapest ones that's usually documented, often printed right on the board. Really it depends on what you're trying to build. If you need a lot of user IO then a board with a bunch of buttons and LEDs is nice. For a lot of my projects a few LEDs and a bunch of pins is ideal.

author: james_s
author_rank: Super Contributor
timestamp: January 19, 2023, 06:19:48 pm
content: Quote from: pcprogrammer on January 19, 2023, 08:07:47 amIt's more than just parallel vs sequential. HDL is not a programming language in a conventional sense, it only looks like one. When you write a program you are writing a series of instructions that run in series. When you write HDL, you are describing a digital logic circuit in a language that superficially resembles a program, but in reality it is closer to describing a schematic.

author: rstofer
author_rank: Super Contributor
timestamp: January 19, 2023, 07:01:31 pm
content: You wind up writing the same code over and over. You basically build up components and wire them together. There are only a few constructs to master and everything else is a variation on a theme.Straight logic expressionsRegistersMultiplexorsMemory blocks (using internal BlockRAM)ALUsFinite State Machines (the big piece of the project)Each of these topics can be studied in isolation and then lumped into a project. LC3 is interesting, look at page 7 for the hardware block diagram. Nothing but MUXen, adders and a bunch of registers. Look at page 5 for the Finite State Machine - just code up the signals as given to drive the stuff on page 7.http://users.ece.utexas.edu/~patt/05f.360N/handouts/360n.appC.pdfThere are expansions on this project including pipelining. In the book, it is built using microprogramming, I used a VHDL state machine that matches the diagram.For example, here is the PCMux:Code:process(PCplusOne, PCadderOutput, mBus, PCSelect)begincase PCSelect iswhen PCplus1 => PCmuxOutput <= PCplusOne;when PCadder => PCmuxOutput <= PCadderOutput;when PCmBus => PCmuxOutput <= mBus;when others => PCmuxOutput <= (others => '0');end case;end process;I have created constants for PCplus1, PCadder, PCmBus and they're manipulated in the state machine.Code:-- PC Mux Select Signaltype PCmux_t is (PCplus1, PCmBus, PCadder);signal PCSelect : PCmux_t;Pretty simple stuff done over and over.

author: Stupid Bear
author_rank: Contributor
timestamp: January 19, 2023, 08:17:05 pm
content: So as far as the chinese stuff is concerned is it based around name brand chips like xilinx or altera (either the actual chip or clone) or do they just make their own FPGA and you're not sure what it does? I wouldn't mind using a knockoff to start as long as I know it's basically something that functions like an actual chip I would find in industry and can use dev tools by the big companies.Should I be looking to certain brands/model lines ... for example are artix chips better than spartan? ICE40 keeps coming up?

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 19, 2023, 08:24:33 pm
content: Quote from: james_s on January 19, 2023, 06:19:48 pmMy first experience with FPGA's was based on drawing schematics. Old Xilinx XC3000 series with XACT for translating, placing and routing and Orcad for drawing the schematics. Used Xilinx libraries with all kinds of logic parts. Much like what now is called vendor IP. Being used to schematics I found it very easy to do. Writing it up in a language like verilog or vhdl makes it harder to see the intent, at least for me, having little experience with it. That is what you get when you leave the hardware game for software. Only returned to playing with MCU's and FPGA's a couple of years back, and done one actual project with a FPGA creating my own AWG and reverse engineered the configuration of anotherIt takes its time to learn, but, in my opinion, having basic digital hardware knowledge is useful, both for doing software and (FPGA) hardware. The OP wrote that he has some experience cooking up his own hardware so guess that part is fulfilled.Coming from a software background means having to loose the sequential and programming way of thinking. That is why I wrote "configure" instead of programming. I know it is describing hardware, but the languages do bring constructs of both worlds.The OP asks for how others got started, well as I wrote above, a long time ago just dove in with the need for making smaller hardware with more functionality, the foundation I worked for sent me on a short course about the Xilinx parts and software, and I designed my first systems with it. Did some work with them for another company and then got lost in the software world where there was more work to be found. Now retired I returned to the game and bought a couple of boards to play with.Did the AWG project after reading up on verilog on the different websites and had some help from forum member BrianHG who gave excellent advice. The result of that project is here.https://github.com/pecostm32/Lichee_Nano/tree/main/FPGA/signal_generatorStill have to finish the software for it, but with to many hobbies, these thing can get shelved for a while

author: james_s
author_rank: Super Contributor
timestamp: January 19, 2023, 08:26:20 pm
content: It's pretty much all based around the big three FPGA companies parts. There may be some random no-name FPGAs but stick with the big names for that. I've used both Xilinx and Altera and they are broadly similar. In a lot of ways I like Quartus better than ISE, but ISE does some things better. I haven't really played with Vivado, I've stuck with older parts because even older FPGAs are massive overkill for most of my projects.

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 19, 2023, 08:41:36 pm
content: Quote from: Stupid Bear on January 19, 2023, 08:17:05 pmThere are two major Chinese FPGA vendors that provide their own devices. Gowin and Anlogic, where Gowin seems to be leading. There are plenty of small dev boards that use Gowin and there are lots of examples to play with. The Anlogic one I pointed out is pin compatible with an Altera one and has similar capabilities. Suitable for all sorts of projects and their software is simple enough.It all depends on what you want to make which device suits best. Artix series have additional capabilities that the older spartan series may lack, but what counts is the number of look up tables, flip flops, dsp tiles, embedded memory, etc. a FPGA has, if it will suit you.So if it is just simple learning for now it does not matter much which one you start with.Also about the software there is a learning curve, which involves things like optimization, writing up constraints for timing and pin assignment. These are different from vendor to vendor and probably also for the third party software, which I would stay clear from as a beginner. The open source stuff is not very mature yet and only supports a few devices from a few vendors. This is due to the fact that the vendors keep information about the configuration bit's secret and only with reverse engineering people have been able to make the open source software for them.My advice is to pick a dev board for now, get the vendors tools and play with them. Gain experience on all parts involved including simulation and then move on to another one.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 19, 2023, 08:55:41 pm
content: I personally recommend Lattice for beginners, but it's of course largely down to personal preference and experience.

author: asmi
author_rank: Super Contributor
timestamp: January 19, 2023, 09:59:59 pm
content: Here is my advice - don't bother with chinese boards, but either get a GO-board (it's a bit on the basic side, but has an excellent series of video tutorials) if you are short on cash, or (preferably) a Digilent board - say something like Arty-A7-35. This board is quite popular, there is a lot of information about it online, and Digilent is one of theveryfew devboard vendors which stand behind their products and provide support via their forums (of which I am a member of as well, and sometimes help out others when I have spare time and will to do so) even to (and perhaps especially to) beginners and hobbyists - in other words - someone like you.Those obscure chinese FPGA boards are good for those who have some experience under their belt, can read schematics, and can debug/resolve problems which occur along the way without any external help - of which there will be pretty much none, at least from the vendor's side.

author: rstofer
author_rank: Super Contributor
timestamp: January 20, 2023, 01:36:02 am
content: I have been using Digilent boards for the last 15 years or so. The Spartan 3 Starter Board was a favorite..Today I like the Nexys A7https://digilent.com/shop/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum/I know it is expensive, partly for the 100T variant which contains a dumpster full of logic and BlockRAM. Mostly, I like it for the gadgets, I'm really into having switches, LEDs, buttons, 7 segment displays along with everything else. I'm only going to buy one, maybe two, so the cost isn't a really big deal. It only hurts for a little while.It's not really about the chip or the dev board for me, it's about the software. Does it help me or hinder me in my efforts. I'm not interested in 3rd party or open source, nobody can do it as well as the factory.Xilinx has terrific documentation. Expect to do a fair bit of reading and, remember, Google is your friend.There's nothing wrong with starting with the GO Board with the understanding that it is an entry level chip on a dev board with limited IO and few gadgets. You can still learn all the fundamentals and then decide where to go next.

author: james_s
author_rank: Super Contributor
timestamp: January 20, 2023, 02:35:30 am
content: It really does come down to the software.Before buying any board, I would suggest getting your hands on the software. It's a *big* download, at least by historical standards, several gigs. Get it installed and running and play around with it, then purchase a board with an FPGA that is supported by the software you like the best. Technically you can do almost all of the development with no board at all and just simulate it but personally I find having real hardware to be a lot more fun.

author: Stupid Bear
author_rank: Contributor
timestamp: January 20, 2023, 03:54:25 am
content: What is the difference between the product lines like for example spartan 3 vs 6 vs 7 and so on. Does this mean that some are older versions and may not be supported or is this just how powerful they are?As far as software I have no idea what are the different packages and should I look for 3rd party stuff or stay with the mfg dev software until I know more? Another option may be to use whatever software some tutorial uses. How much of a difference does this make?

author: rstofer
author_rank: Super Contributor
timestamp: January 20, 2023, 05:21:33 am
content: Quote from: Stupid Bear on January 20, 2023, 03:54:25 amThese are different generations and, yes, later versions have more capability. On the low end for Xilinx, we are using Artix 7.Vivado only starts with 7 series devices and the no longer supported ISE is required for Spartan 3 and 6. For that reason, I have ISE installed on an older Windows 7 machine. It seems that ISE isn't supported on Win 10 and later (although it works with some file name changes).QuoteThere's no reason not to follow a tutorial but, in the end, you want to use factory software. None of the 3rd party vendors or open source package designers can know more than the factory about how to optimally use a chip.Xilinx Vivado has everything in one package. It's a HUGE package but it is complete. That way there is only one learning curve instead of 2 or 3.For Lattice, you use Modelsim for simulation, iceCube2 for sythesis and Diamond for device programming (I think I have that right, it's been a while). Nandland has some tutorials (and the GO Board) and VHDLwhiz.com has a bunch of great tutorials.

author: Stupid Bear
author_rank: Contributor
timestamp: January 22, 2023, 03:12:40 pm
content: Been looking at these 3 boards... any opinions on them? They are a bit more than what I wanted to spend but might be worth it if it makes learning things easier. Interested to hear opinions and any other boards you think may be better.https://digilent.com/reference/programmable-logic/arty-a7/starthttps://digilent.com/shop/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/https://digilent.com/shop/arty-s7-spartan-7-fpga-development-board/?setCurrencyId=1&sku=410-352-25&utm_source=google&utm_medium=cpc&utm_campaign=18946393660&utm_content=&utm_term=&gclid=CjwKCAiA2rOeBhAsEiwA2Pl7Q6Rc8oePzpFygriSU4RvChZBu5fT9ZDTdeRs1dMLZnK8LMrsuq1JtRoC4G8QAvD_BwEThe basys has more things to get me going with less soldering... 7seg, more switches, vga. But the arty are somewhat cheaper and arduino hat compatible. Also what is your stance on artix vs spartan?

author: rstofer
author_rank: Super Contributor
timestamp: January 22, 2023, 06:31:24 pm
content: Quote from: Stupid Bear on January 22, 2023, 03:12:40 pmI have a couple of these and they work fine. Maybe the 'hat' connections are workable but I haven't used them. I don't prefer this board and I would still want the larger FPGA just because...QuoteYes, I have a couple of these and they are really nice. Having gadgets is always helpful. Unfortunately, they are out of stock.QuoteThere's nothing wrong with the Spartan A7 but Artix is the new shiny thing. Either way, Vivado supports them. Once you know which chip variant you will be using (I always aim for 100T with the Artix 7, just because...) you can compare the capabilities with this:https://www.xilinx.com/content/dam/xilinx/support/documents/selection-guides/7-series-product-selection-guide.pdfIt's clear that logic cells are the game but sometimes you really want a bunch of BlockRAM - particularly if you are building a small CPU with 64k bytes of RAM. More BlockRAM is always better.QuoteI have used the Spartan 3 family for a lot of projects over the years (all hobby grade, no commercial work) and when the shift to Artix came along with Vivado, I just went with the flow. I'm not too sure what to think about the future of Spartan 7 when all the emphasis seems to be on Artix.Clearly, Digilent considers the Arty boards to be for beginners and the Nexys 7 to be for college students and beyond. I guess they figure that compared to tuition, the cost of the board is meaningless. And, in my wild guessing, I suspect that is what happened to the supply and price of the Analog Discovery 2. College labs were shut down for Covid and the students migrated to personal AD2s. Again, even at the new and improved (much higher) price, it is still cheap compared to tuition.

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 22, 2023, 08:52:40 pm
content: Boy oh boy, prices went up like crazy, but to be fair the FPGA's are bigger.I bought one of these (bundel 2) boards for euro 29,28 and now it is euro 86,80 (https://nl.aliexpress.com/item/32828884647.html) It is a spartan 6 board and nice for all kinds of projects. Based on this the Arty S7 seems a good deal, but you need all kinds of modules to make VGA, PS/2 or other interfaces.The Arty A7 (35T) is more capable then the spartan, but indeed more expensive. I bought a board with the 35T 2 years ago for euro 56,96 from QMTECH, but they don't have it any more. Prices are now higher, but still cheaper then the digilent ones. Can't comment on quality though. The board I have is good, but have not done much with it yet.You can check for yourself if it feels like a better deal. These are the 100T ones without and with peripherals.https://nl.aliexpress.com/item/4000170003461.htmlhttps://nl.aliexpress.com/item/4000170042795.html

author: djsb
author_rank: Super Contributor
timestamp: February 04, 2023, 01:36:10 pm
content: I've been TRYING to start learning FPGA's for years. Still no luck. I thought Altiums NB3K (Nanoboard 3000) board would be useful as an added bonus to their PCB design software. Used it once or twice, but it confused me more than anything, and now it's abandonware due to the fact that Altium no longer has FPGA capability in Altium designer (a good thing as it turns out nobody used it, and it was a distraction from the core PCB design tool). I now have 2 NB3K paper weights. Then Xilinx ISE 14.1 was unable to be used under Windows 10 natively (there is a virtual machine version-Does this version work OK on Windows 10 or 11?). Then I thought I would use the Papilio Platform, but this also uses theXilinx ISE software and that seems also to be abandonware. I have a book by Simon Monk called "Programming FPGA's-Getting started with Verilog" which uses Papilio and a couple of other board which are ALL ISE based. I'd like to try again with the Open source Lattice toolchain but I'm still looking for a book/youtube video's that start at a rock bottom basic level and can work on affordable hardware that has some longevity. I'm still looking.P.S I have the Digilent ICEstick Video's bookmarked and there are a few other tutorials on YouTube for the ICE40, so there is hope. Also, there is Project xray for the reverse engineering of the larger Xilinx chips. The MyStorm project which combines a STM MCU with a ICE40 FPGA has gone quiet recently, but it's worth following (search for Folknology-May be discussions are active on discord). Also, today ICESTUDIO 0.10 has just been releasedhttps://github.com/FPGAwars/icestudio/releasesP.P.S I've just ordered one of thesehttps://alhambrabits.com/alhambra/It fits nicely with my love of open source hardware and software.

author: rstofer
author_rank: Super Contributor
timestamp: February 04, 2023, 06:40:33 pm
content: ISE does run on Win 10 (I don't know about Win 11 but it probably works) AFTER you do the well documented process of renaming a couple of files. It is NOT supported by Xilinx but it works.Try this procedure, it seems identical to the one I used some years back:https://www.micro-nova.com/xilinx-ise-win10Or, keep a Win 7 machine around.ISE is a dead issue, in the Xilinx world you should be using Artix 7 and Vivado.

author: james_s
author_rank: Super Contributor
timestamp: February 04, 2023, 06:55:15 pm
content: I like ISE and have no plans to move to Vivado, when you're doing this as a hobby you have the freedom to use whatever works for you and not care what the industry is doing. I tried Vivado at one point and found it felt very bloated and slow and the vast majority of the hobbyist resources out there are centered around ISE and Quartus so those are what I use.A simple solution is what I did and just use a Windows 7 machine for FPGA work. ISE also runs on Linux so you could try that.

author: glenenglish
author_rank: Frequent Contributor
timestamp: March 01, 2023, 10:59:02 pm
content: The Digilent stuff is good. recommended.