Author Topic: Programmable logic learning  (Read 2669 times)

0 Members and 1 Guest are viewing this topic.

Offline NeuromodulatorTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: cl
Programmable logic learning
« on: December 26, 2016, 07:14:26 pm »
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
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: Programmable logic learning
« Reply #1 on: December 26, 2016, 09:49:05 pm »
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.
I'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.

Also from what I've read it appears Vivado is better than Quartus.
I personally like Quartus more. I'm pretty sure there is no objective way to tell which is better.

It also appears that Verilog is a better plan than VHDL because of Systemverilog.
Yep.

I thought it would be a good idea to learn with simulation software instead, not sure how viable it is go that way.
FPGAs 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 anyway :) Debugging FPGA stuff by trial and error is not really a viable option, simulation is a necessary step.
Alex
 

Offline 97hilfel

  • Regular Contributor
  • *
  • Posts: 66
  • Country: it
Re: Programmable logic learning
« Reply #2 on: December 26, 2016, 09:50:17 pm »
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.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programmable logic learning
« Reply #3 on: December 26, 2016, 10:29:31 pm »
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!
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programmable logic learning
« Reply #4 on: December 26, 2016, 11:49:29 pm »
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/GTKWAVE

Some 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.
 

Offline NeuromodulatorTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: cl
Re: Programmable logic learning
« Reply #5 on: December 28, 2016, 05:16:23 am »
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?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: Programmable logic learning
« Reply #6 on: December 28, 2016, 05:19:54 am »
Since all can be simulated, I was wondering how important is a logic analyzer when working with a real board?
Same 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.
Alex
 

Offline KE5FX

  • Super Contributor
  • ***
  • Posts: 1894
  • Country: us
    • KE5FX.COM
Re: Programmable logic learning
« Reply #7 on: December 28, 2016, 05:42:36 am »
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.

They are.  That was bad advice, IMHO.  Pick one of them -- any of them -- and learn it as well as you can.

Quote
Of course if they are not that complex there is no reason to not try them all.

Spoiler: 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.

Quote
Since all can be simulated, I was wondering how important is a logic analyzer when working with a real board?

Not 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.
 

Offline julian1

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: au
Re: Programmable logic learning
« Reply #8 on: December 28, 2016, 07:17:40 am »
If you're on linux, I would recommend a Lattice ICE40 ICEstick https://www.google.com.au/search?newwindow=1&tbm=isch&sa=1&q=lattice+icestick&oq=lattice+icestick

Verilog compiler, p&r, bitstream loader are just an apt-get install away on Debian,

apt-get install yosys
apt-get install arachne-pnr
apt-get install fpga-icestorm 

I 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.
« Last Edit: December 28, 2016, 07:26:29 am by julian1 »
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Programmable logic learning
« Reply #9 on: January 01, 2017, 05:50:59 pm »
It also appears that Verilog is a better plan than VHDL because of Systemverilog.


That 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.
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf