Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Quick Question: If anyone wants to learn programming an FPGA is learning C only way to go ? how hard is to learn and program in verilog/VHDL without electrical background ?

If anyone suggests links or books, please do

Thank You



I have a physics background but not an EE background. I found verilog pretty easy to grasp. VHDL took me a lot longer.

To get some basic ideas I always recommend the book code by charles petzold: https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

It walks you through everything from the transistor to the operating system.

(Apparently I need to add that I work for AWS on every message so yes I work for AWS)


Thank you


I would suggest Digital Design by Morris Mano[1]. It'll start off with basic intro from digital gates to FPGAs itself! And you really don't need any EE background for this book. This book starts from absolute basics and it'll also teach you Verilog along the way. And verilog is used more in the industry than VHDL(which more popular in Europe and in the US army for some reason).

I'm surprised where you got the idea of using C to program FPGAs, are you thinking of SystemC or OpenCL (they're both vastly different from each other)

I'm really surprised a sibling comment recommended the code book. It really meant to be a layman's reading about tech. It's a great book but it won't teach you programming FPGAs.

[1]: https://www.amazon.com/Digital-Design-Introduction-Verilog-H...


I thought FPGA are programmed using low level languages like C


Not really. C is considered high level in digital design. There are some tools for high level synthesis, from languages like C but they aren't used much.

Most Fpga "programming" is a textual description of a directed graph of logic elements in a language like vhdl or Verizon (and now systemverilog).

Synthesis engines have gotten better over the years to allow things like +,* to decribe addition and multiplication instead of describing the logic graph of multiplication.

And most Fpgas now have larger built in primitives like 18x18 multipliers now.

You can judiciously use for-loops for repeated structures.


verizon was meant to be verilog. didn't catch that autocorrect.


220 new.

I am so glad I don't have to buy textbooks anymore.


Maybe I should've included this but older versions are not much different from the new one and the more older ones go for dirt cheap compared to the new one.

Here's a 4th edition used book for $13.95

http://www.ebay.com/itm/Digital-Design-4th-Edition-Ciletti-M...

But yeah, the publishing industry is in a pretty bad shape (for students/consumers)


C won't help you here; the Verilog/VHDL model is very different from normal languages due to intrinsic parallelism and the different techniques you need to use - you can't allocate anything at runtime, for example. As well as language quirks like '=' vs '=>' which trip up beginners.


No, you can also go the Ada way with VHDL.

One key difference to keep in mind for digital programming is that everything happens in parallel, unless explicitly serialized, which is the opposite of the usual software development most people know about.


Here's a collection of get-started resources: http://tinyurl.com/fpga-resources

You can start with the EDA Playground tutorial, practice with HDLBits, while going through a book alongside (e.g., Harris & Harris) for examples, exercises, and best practices.

Similarly to a sibling thread, I'd also go with a free and open source flow, IceStorm (for the cheaply available iCE40 FPGAs): http://www.clifford.at/icestorm/

You can follow-up from the aforementioned tutorial and continue testing the designs on an iCE40 board -- starting here: http://hackaday.com/2015/08/19/learning-verilog-on-a-25-fpga...

Here are some really great presentations about it (slides & videos) by the creator (which can also serve in part as a general introduction):

- http://www.clifford.at/papers/2015/icestorm-flow/

- http://www.clifford.at/papers/2015/yosys-icestorm-etc/

Have fun!


Honestly, when it comes to learning logic design, if you're not already a programmer you're probably better off.

A C programmer will just spend a lot of time learning why the things they already know how to do are not useful.


I actually recommend Haskell. The division between computation and I/O is strikingly similar (and equally difficult to avoid), and they're both declarative systems.



I found VHDL much easier than C or verilog, I think it has to do with how your brain is wired.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: