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