In this
article:
Looking Back
Navigation:
HomeHardware
Software
Techniques
Controllers
Reviews
Index
Introduction
The world it is a-changin’ as many have said. No where is this more apparent than in the “hobby” electronics space. It used to be that one of those plastic multi-drawer cabinets full of 74xx series TTL logic, a few resistors, capacitors, and crystals was all you needed to create a whole slew of interesting projects. Guess what, not any more.
A friend of mine, Philip, who designs these things for a living, suggested that I needed to understand FPGAs if I was going to design any sort of hardware in the present day. Initially doing that involved a huge investment in software, then it became more affordable with the Xilinx Student Edition. Now its better still with the WebPACK ISE product.
So Xilinx is finally coming around to having a reasonable policy on their software tools and their WebPack tools let you experiment and learn about VHDL for less than $500/yr in license fees. I’ve been playing with the BurchEd SPARTAN2+ evaluation board thingy with a bunch of ‘plug-on’ boards as Tony calls them and its been quite an education.
I’ve put together a cheat sheet of some of the pin assignments on the BurchEd boards and if you decide to get one and follow along you will probably want to use a similar setup. To do the first few projects you will need the Spartan 2 board, and the switch plug-on board and the 7 segment display plug-on board.
Books that I’ve purchased so far (beware they are expensive!) are:
- “HDL Chip Design” by Douglas Smith (3 stars out of 5) because it does both Verilog and VHDL but it doesn’t talk about how things work the way they do.
- “Designers Guide to VHDL” by Peter Ashenden (5 stars out of 5) because it is a very good introduction to the VHDL language and well written.
- “VHDL Design: Representation and Synthesis” by Armstrong and Gray (4.5 stars out of 5) because it covers the complete design flow and has a good model for designing with VHDL.
- “Digital Systems Design with VHDL and Synthesis” by K.C. Chang (4 stars out of 5) which is really good for synthesis but wanders off tangent many times and takes several readings to absorb.
If you get these books check with a local university bookstore that may have them “used” and thus cheaper than list price. The order should probably be Ashenden, Armstrong, Chang, then Smith if you want to get something out of them. IF you can find someone familiar with VHDL nearby then that is a good resource as well. Don’t ask me! I am certainly no expert.
What I’ve found is that VHDL design is very similar to playing the card game Bridge. If you know Bridge you know that each hand starts with an auction, and in the auction there are a series of bids. The conventions for the bids are well established so during bidding pretty much everyone gets an idea of who has what cards. While this seems silly to non-Bridge players it in fact makes the game both more enjoyable and more challenging. VHDL design is similar in that you write “code” in the VHDL language and the compiler “guesses” what sort of hardware would actually do what you wrote. In order to make this even close to possible, a set of conventions on how to write that code has emerged. This point is driven home when you hear the comment, “That will probably compile but it won’t synthesize.” To a software engineer that makes no sense at all, if it compiles it can run, period. But VHDL wasn’t written by software engineers, no it was written by a group of people with a very sick sense of humor.
So lets get on with the journey …
Stepping Stones
On the premise that you must crawl before you can walk, this first project was really all about learning how to use the WebPack ISE tools rather than doing any serious learning about VHDL. However, I did manage to learn something VHDLish in the process.
In this next project I start turning on LEDs in a 7 segment display. The result, when combined with my 10hz clock, is lighting LEDs in sequence to create a spinning loop effect.
Sometimes the lessons you learn aren’t about the languages, rather it’s about the tools. This was certainly the case with the HEX display decoder. A simple project that took me down an interesting side road.
Now we combine previous projects to build something slightly more complex. In this case a two digit HEX counter. Not rocket science but it taught me about constants in VHDL code.
Design a 32 bit (8 decimal digits) counter that displays its count on an eight digit, multiplexed LED display. The counter should count at a rate of 10 counts/second and display a decimal point between digits 7 and 8. Use the CLOCK_10HZ and HEX_DISPLAY entities in this project. Include the ability to optionally blank leading zeros on the display.
Looking Back
So here in 2013 as I’ve converted this series of articles from the old version of the notebook to this enhanced version, I didn’t know then that the multi-digit counter would be the last FPGA stuff I did for a while.
As it turns out, these five projects hold up reasonably well as an introductory set on doing FPGA design. They cover tool setup and design flow, building a component (sort of like a subroutine for software folks), analyzing the build, wiring up various components, and then a more complex re-use of all the previous steps.
Now that I have a voice again (basically being unable to push new content to the web site was killing me :-) I hope to add additional FPGA projects to the site.