FPGA Education, Books, and Community

GETTING STARTED

I’m a self learner. If I want to know about something, I’ll generally start with a Google search and usually end in shopping trip to Amazon (with a wish list full of the books I can’t afford yet.) When I decided to start FPGA development, I purchased my devboard and found the 5-star book “Circuit Design with VHDL by Volnei A. Pedron“, and ordered that too. The devboard and book arrived, I poked at it a little, read the book some, and then it all went on a shelf for almost 3 years!

When I finally got around to actually trying to write some HDL, “Circuit Design with VHDL” was not helping me much. Although it is a good book, it is more of a reference with examples and not what I needed to get started, and certainly not what I needed to learn to make a video chip. So, off to Google again.

My Google searches did not provide a ton of useful information for someone getting started, so I ended up back at Amazon again. The problem I find with websites about FPGAs is that they are either too simple, i.e. here is how to blink an LED, or too vague. It seems that once a person gets past a certain point of FPGA knowledge, they quit sharing, become too “elite” for the rest of us, or both. Most of the forums I have found are this way too, either full of students asking for solutions to their assignments, or engineers posting answers as if they don’t have time to even be on the forum, let alone answer such trivial basic questions. It is very frustrating.

 

THE BOOK

So, back to Amazon. This time my searching landed me on the book “FPGA Prototyping by VHDL Examples by Pong P. Chu“. In my life, whenever I am learning something new, I have usually found a quintessential book that, or person who, opens the door to understanding. When I was learning Assembly language on my 99/4A it was the book “COMPUTE!’s Beginners Guide to Assembly Language on the TI-99/4A by Peter Lottrup“. I had struggled for months with trying to understand the technical reference manual published by Texas Instruments, but not until I read Lottrup’s book was I able to finally understand what was going on and write my own working programs.

While starting out with FPGAs, Chu’s book was that pivotal book. Chu covers some basics up front, but not much. He goes right in to making circuits that actually do something, like reading a PS2 keyboard, and he covers details as you go along. There is theory of course, but a ton of examples and usable HDL too. Less than half of the book covers the topics that other books go on and on about for chapter after chapter. He has two versions of the book, a VHDL version and Verilog version (I wanted to learn VHDL first), and the book is written specifically for use with Xilinx Spartan 3 FPGAs, which is also what I have on my devboard. Not that you can’t use the book with other FPGAs, but having a Xilinx based devboard will help make things easier if you are using this book.

While not perfect (no book is), using Chu’s book as a guide allowed me to get my video circuit up and running. He covers complete designs on UART circuits, PS2 keyboard and mouse, Asynchronous SRAM interfacing, and most importantly he covers VGA video generation. Not only that, he goes on to develop a complete game of Pong using VHDL! I also find it funny that Pong (P. Chu, i.e. the author) developed the game of Pong in his book. He probably chuckles about that… I would if my name was Pong. 🙂

The day I got the book I sat down at the Xilinx IDE and started typing in the basic VGA driver circuit. I never copy and paste code when I’m trying to learn. Going through the motions of typing things in gets you used to the language as well as forcing you to focus on things in detail. It was amazing to me to see the circuit develop in front of me, and also how SIMPLE it actually is to sync up a VGA monitor. The simplicity was beautiful, and I was hooked.

With Chu’s book I was able to implement the complete F18A design except for sprites. At that point I needed to expand my knowledge a little more, so I went back to Google and Amazon. I now have a stack of books on FPGA design, digital circuit fundamentals, digital computer design, etc., and while they are all pretty decent, none has given me the same level of learning that I got from Chu’s book.

 

BOOKS

Of all the FPGA and digital design books I now have (probably more then 20 now), these are my “goto books” whenever I need to look something up or refresh a concept:

FPGA Prototyping by VHDL Examples: Xilinx Spartan-3 Version
by Pong P Chu

* There are editions for both VHDL and Verilog.

Digital Design and Computer Architecture
by David Harris, Sarah Harris
* Either edition is fine, I might have to pick up the 2nd edition (I have the 1st).  One of the best features of this book is that all the examples have both VHDL and Verilog side-by-side along with the circuit diagram of what is being described.  This is invaluable for learning and understanding what your HDL is describing.

Computer System Architecture
by M. Morris Mano ISBN-13: 978-0131666115
* Older book with a lot of good design information if you want to do CPUs or SoCs.

RTL Hardware Design Using VHDL: Coding for Efficiency, Portability, and Scalability
by Pong P Chu
* For later learning. There are editions for both VHDL and Verilog.

I have found that digital systems design and/or architecture books published in the early 1980’s or before have a huge amount of great and useful information. Everything we have today came from the early computers, and some of the concepts that we think of as “modern”, like pipelines, SMP, cache memory, parallel processing, etc. all existed back in the mainframe and mini computers of the 1970’s and 1980’s. Since I am not trying to implement a 1GHz x86 core, I find the older information more useful and very applicable.

 

HARDWARE IS NOT SOFTWARE

Something else I have to stress is to keep a hardware-centric view of what you are doing. In my opinion, if you go at hardware design from a software perspective you will not get very far, or very fast (designs that run at a few megahertz at best), before things fall apart around you. I made my greatest advances FPGAs and HDL when I started thinking about how I would implement my circuit using discrete 74LS logic instead of how I would write it in C. Software != hardware and they are not even remotely the same. Anyone who says they are is a programmer who has never even touched a discrete logic IC.

Finally, read the schematics of your favorite classic computer or digital circuit. It is amazing how HDL directly relates to a digital design. However it should not be so surprising, after all “HDL” means “Hardware Description Language”.

 

FORUMS

As I mentioned before, I’m also looking for a good forum for FPGA development. Most of the forums I have found have been pretty much dead. The Xilinx forum has activity, but it is heavy with engineers who seem to be forced to participate; their answers at times can be rude, short, or useless for someone trying to learn. From time to time you can get a good answer, but threads rarely go for more than a few posts, and hell if anyone actually wants to have an actual “discussion”. I suppose that is probably due to self-defense from all the “gimme” posts that they have to deal with. When I was trying to solve the sprite collision circuit, I posted a question on the Xilinx forum and the response was:

“Read the XST user guide, it includes coding “styles” for functions such as MUXes, FSMs, latches, registers, etc.”

Nice. Basically he said: “Go read a fucking 400 page manual you twit. Your solution is a simple matter of style.”

Recently I found a forum on the Gadget Factory and Dangerous Prototypes web sites, and I hope it pans out. We’ll see.

4 comments to FPGA Education, Books, and Community

  • Hey Mathew! great post. Great because I guess I am like you, with the matter of finding THE RIGHT BOOK. Now that you have found the right reference, you have surely saved me some considerable-amount-of-time-about-to-get-wasted-searching-online!!

    Ok I don’t want to turn your blog to the FPGA forum that you were looking for, but as I am a newbie (actually dont know anything about it) with VHDL and FPGAs, could you please tell me what hardware would be the best (and reasonably priced) for a starter (especially to go along Pong’s book well)? I am a Telecom engineer, and will have to eventually use FPGAs for wireless communications, but, very shamefully, I do not have a clue where to start. I have your book recommendation, though about hardware shall I use that same devboard you had, or is there anything better/more up-to-date?

    best,
    Sporty

  • matthew

    Hey Sporty,

    If I were to buy another FPGA devboard today, I would probably get a terasic (http://www.terasic.com.tw/en) DE1 board. It has a Cyclone II FPGA and is a lot more developer friendly than the recent Digilent boards. It also have a lot more of the devices I’m personally interested in like SRAM (instead of DDR which is a pain to work with), and SD socket, developer friendly IDC connectors, audio codec, and a 4-bit per color VGA header.

    If you want to stick with Xilinx specifically (since Pong’s book is based on the Spartan-3 FPGA), then Digilent makes nice devboards, so get one you can afford. The only thing about Digilent is that they went with that pain in the ass “HiRose” connector, which requires a break-out board to really use for development. Also, Digilent boards seem more focused on features like DDR, DDR2, and communications (which may be more to your liking.)

    Hope this helps.
    Matthew

  • Martial

    Hello,

    First I want to thank you for your site and this post. Like you I want to lear about FPGA and making a VDP for MSX. V9938/58 are great but V9990 is to expensive for common MSX user.
    I’m going to AMAZON right now and get the book you are talking about!
    As far as I remember the VHDL code for Spartan shoud be able to work on ALTERA device too, or am I missing something?

    Thank you for your time and sharing.

    best regards,
    Martial.

    • matthew

      Most of the HDL should work on Altera FPGAs, but the Pong Chu books have Xilinx specific sections covering the Xilinx tools and MicorBlaze CPU core. Other than that they are pretty generic HDL. Once you start to get proficient with HDL I highly recommend Chu’s follow-up book:

      RTL Hardware Design Using VHDL: Coding for Efficiency, Portability, and Scalability

      This book answers a lot of questions I had, once I got to a point where I could make circuits do what I intended them to do.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">