Programmable logic learning - Page 1
Forum section: electronics / beginners

author: Neuromodulator
author_rank: Regular Contributor
timestamp: December 26, 2016, 07:14:26 pm
content: Hello,I would like to learn how to program FPGAs, but I'm a bit lost on how to get started. From what I've researched, it appears Xilinx licenses are better for a hobbyst with a small budget and no interest in mass production than Altera. Also from what I've read it appears Vivado is better than Quartus. It also appears that Verilog is a better plan than VHDL because of Systemverilog. So far I don't have any FPGA board, and since they are quite expensive I thought it would be a good idea to learn with simulation software instead, not sure how viable it is go that way.Could someone recommend me an unexpensive path to follow to get me started into FPGAs?Thanks

author: ataradov
author_rank: Super Contributor
timestamp: December 26, 2016, 09:49:05 pm
content: Quote from: Neuromodulator on December 26, 2016, 07:14:26 pmI'm not sure if this is still the case. Both companies opened quite a bit in recent years. If I'm not mistaken Altera does not even make you request a free license key and then update it every 6 months. Tools just work out of the box.Quote from: Neuromodulator on December 26, 2016, 07:14:26 pmI personally like Quartus more. I'm pretty sure there is no objective way to tell which is better.Quote from: Neuromodulator on December 26, 2016, 07:14:26 pmYep.Quote from: Neuromodulator on December 26, 2016, 07:14:26 pmFPGAs are the only area where simulation is basically 100% accurate. So if you don't get discouraged by constantly looking at waveforms and debug prints, then just go for simulation. That's what you will do after you get a board anywayDebugging FPGA stuff by trial and error is not really a viable option, simulation is a necessary step.

author: 97hilfel
author_rank: Regular Contributor
timestamp: December 26, 2016, 09:50:17 pm
content: Currently I'm at the same point where you are with the exepcion that you didn't meansion Xilinx ISE (yea I know its outdated) which is free available and has a powerful simulator.

author: rstofer
author_rank: Super Contributor
timestamp: December 26, 2016, 10:29:31 pm
content: I'm not sure the simulator was always free with ISE. I spent a good long time coding FPGAs without simulation and I still don't use it very often. The problem is, the FPGA doesn't stand in isolation, it is usually hooked up to something like a UART or a Compact Flash or an SPI gadget or two. It really matters more how the data is read from the CF than it does with some ginned up test bench doing a poor simulation of an CF.The other problem with simulation is the desire to watch things happen after tens of thousands of cycles.I llke the Integrated Logic Analyzer that comes with Vivado. I can hook up some virtual probes to exactly the points I need without having to extend signals from deep in the hierarchy up to the top level to get to a pin.There isn't an issue with ISE versus Vivado. If you want to work with modern chips like the Artix-7, you will be using Vivado. If you want to work with the older Spartan 3s, as I often do because I have a bunch of boards, you will use ISE 14.7.I wandered away from Altera as soon as I read the licensing terms. This was several years ago and things have probably changed, but at the tim, they could just up and cancel my license for no reason whatsoever. I went through that with UCSD Pascal and I'm not doing it again.There are many development boards and the Digilent offerings are getting quite expensive. Even the entry level Artix-7 is right at $100:http://store.digilentinc.com/arty-board-artix-7-fpga-development-board-for-makers-and-hobbyists/You can look one of two ways for boards: You want down and dirty with no peripherals at a low cost OR you want boards that have some peripherals. The now-obsolete Spartan 3 Starter boards from Digilent were excellent. I like development boards that bring out a LOT of pins. There's a reason that CF devices have 50 pin sockets. While it doesn't take 50 IO lines, it does take a bunch. A heck of a lot more that the 8 signals you can get in one dual-PMOD socket.For just logic, with no particular memory requirement, CPLD boards are a whole lot cheaper, use the same toolchain and can implement logic very well. They might be a good place to start.I haven't tried SystemVerilog but I can't seem to get up to speed with Verilog. I have been using VHDL from the beginning and it serves me well. Others will argue that it is verbose and strongly typed, which means it is harder to make a mistake, and I will agree. Enthusiastically!Have fun with your adventure!

author: rstofer
author_rank: Super Contributor
timestamp: December 26, 2016, 11:49:29 pm
content: Particularly in the Linux world, there is Icarus and GTKwave for simulation. This is a brief intro and not all of the research that is required:http://iverilog.wikia.com/wiki/GTKWAVESome university professors like Linux (or, more likely, hate Windows) so these tools are distributed to students on a CD or DVD. They can keep their Windows laptops and just boot Linux and the tools from a Live CD or thumb drive.https://sclive.wordpress.com/user-guide/Actually, this isn't a bad way to go. Play with things a bit before jumping into a particular family and toolchain.

author: Neuromodulator
author_rank: Regular Contributor
timestamp: December 28, 2016, 05:16:23 am
content: Thank you all for the indepth responses. My initial thought was that IDEs were probably to complex to attempt to learn more than one at the same time. Of course if they are not that complex there is no reason to not try them all.Since all can be simulated, I was wondering how important is a logic analyzer when working with a real board?

author: ataradov
author_rank: Super Contributor
timestamp: December 28, 2016, 05:19:54 am
content: Quote from: Neuromodulator on December 28, 2016, 05:16:23 amSame as any other digital electronics. It can be a huge help if you have one, but you can survive without one if you have a scope already. But you really want to have a way to look at signals.

author: KE5FX
author_rank: Super Contributor
timestamp: December 28, 2016, 05:42:36 am
content: Quote from: Neuromodulator on December 28, 2016, 05:16:23 amThey are. That was bad advice, IMHO. Pick one of them -- any of them -- and learn it as well as you can.QuoteSpoiler: They all suck. No software engineer would put up with any of the available FPGA packages without submitting their resignation by lunchtime.Which again is an argument in favor of not worrying too much about making the wrong choice up front.QuoteNot very. You'll eventually want a digital oscilloscope, but start with something cheap.Remember that the main reason you use FPGAs is to tie other devices together. Good luck simulating a Cypress FX3 or an HMC833LP6GE or an LPC1837 or an AD9253.

author: julian1
author_rank: Frequent Contributor
timestamp: December 28, 2016, 07:17:40 am
content: If you're on linux, I would recommend a Lattice ICE40 ICEstickhttps://www.google.com.au/search?newwindow=1&tbm=isch&sa=1&q=lattice+icestick&oq=lattice+icestickVerilog compiler, p&r, bitstream loader are just an apt-get install away on Debian,apt-get install yosysapt-get install arachne-pnrapt-get install fpga-icestormI managed to get up and running in - and editing some basic Verilog examples in an evening using this combination.Initially I intended to start with Xilinix and even purchased a couple of cheap boards and jtag programmer but ISE and Vivado are ridiculously bloated compared with lightweight CLI tools and simple shell scripts.

author: Neilm
author_rank: Super Contributor
timestamp: January 01, 2017, 05:50:59 pm
content: Quote from: Neuromodulator on December 26, 2016, 07:14:26 pmThat is a can of worms - everyone has their preferance. I was taught VHDL in university so I use that by preferance. However, I have had to learn Verilog when (trying) to reverse engineer poorly documented logic. Not something I recommend. There are things that are easier in Verilog, but some people prefer having to explicitly put everything in as it prevents silly errors.If you are just learning for hobby then just pick one - it doesn't matter. If learning for work, then see if there is a preferance in the industry. I have worked in the defence industry and the contract specified all programmable logic had to be written in VHDL.