FPGAs and VHDL - an Odyssey

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:

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

Note that I used Firefox to test the look and feel of my web site, I much prefer it over Internet Explorer, for best results consider using it to browse the web....

Station #1 : 10Hz Clock Generator

Design a circuit that can convert a 24Mhz clock input into a 10 Hz clock output.

Station #2 : LED DIsplay Gizmo (looper)

Design a circuit that repeatedly illuminates six (6) LEDs in sequence. Use the CLOCK_10HZ circuit from Project 1 as a component in your new design.

Station #3 : HEX Decoder/Display Driver

Design a 4-to-7 decoder circuit that converts a 4 bit value into hexadecimal digits on a 7 segment LED display. You should do two designs, in the first design use a process block and a case statement. In the second design use a concurrent assignment statement.

Station #4: Two Digit Hex Counter

Design an 8 bit counter that displays its current count on two LED displays. The counter should count at a rate of 10 counts/second. Use the CLOCK_10HZ and HEX_DISPLAY entities in this project.

Station #5: Multi-digit counting display

Design a 32 bit (8 decimal  digit) 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.

Currently Stuck Waiting to build the Soft Console ...

Project #6: Mouse Port reader

Project #7: UART (asynchronous serial transmitter/receiver)

Project #8: A Video controller (monochrome)

Project #9: A PS/2 Keyboard reader

Project #10: A "dumb" terminal that sends and receives ASCII

Project #11: Keypad scanner

Project #12: Simple Processor (borrowed from some other examples)

Project #14: PDP-8 in an FPGA

Project #15: Complete PDP-8 system plus display terminal and serial I/O.

Back to the Robotics Notebook