So you’re ready to start learning VHDL but you don’t know where to start. Just getting files to compile for the first time is a good step. After that, writing code that compiles and performs as expected is a good check to ensure you can change code meaning you development environment is setup correctly.
Start learning VHDL by working on this list of projects. The simplest projects are first and continue to get more complex. If you start for the beginning and continue through the list you will see the functionality used in one exercise can be used in the next exercise if the problems are broken down into small building blocks.
The first project for any coding language is always hello world. For learning VHDL we can simulate (see getting started with VHDL for your favorite simulator) a VHDL entity that prints hello world to the console. This is a simple easy to compile example to make sure you simulator is installed correctly and that you know the basics for compiling and running a simulation.
Reference GHDL setup guide and hello world example.
Learning VHDL with test-benching a counter. For the counter you will need to write two VHDL files. First the test-bench, which provides stimulus to the counter. The stimulus signals will be a clock, reset, and enable. The counter increments on the rising edge of the clock if the counter is enabled and the counter resets on the rising edge of the clock if reset is asserted.
The second file is the counter itself. The counter entity takes in the signals clock, reset, and enable then generates the counter as an output. You then need to instantiate the counter in the test-bench and check the output of the counter in the test-bench.
Blink led with 1 second intervals
Further learning VHDL we can blink an LED. Once again you will write two VHDL files. The test-bench and the entity that blinks an LED. The entity that blinks an LED will have an output that is high for a second and low for a second. The input signals needed are a clock and a reset. You will use the clock to time one second and flip the output. If the reset is applied the one second timer is reset. The LED is turned on a second after reset is released.
Make Universal Asynchronous Receiver-Transmitter (UART)
A Universal Asynchronous Receiver-Transmitter (UART) is a common communication protocol for sending commands to an FPGA and receiving status message back on a computer. A UART is beneficial in debugging as well. In this project we will write a transmitter and the receiver part of the UART protocol. You can choose the speed for your modem the default is usually 9600 baud. The fastest speed is 115200 baud.
Reference Wiki UART, Hackaday UART Tutorial
TI universal Parallel Port (uPP)
A UART is good for FPGA status and commands but if higher throughput is needed then Texas Instruments’ (TI) universal Parallel Port is perfect. uPP is used to interface an FPGA to a TI Digital Signal Processor (DSP). A system with an FPGA and a DSP interfaced together provides a tremendous amount computing power. You do need to consider each device’s strengths (see post on FPGAs vs microprocessors) for this system. Applications would include signal or image processing where the data is acquired on the FPGA and processed in real-time. After the FPGA has completed it’s processing the results are sent to the DSP. The DSP then can make decisions on the data.
The uPP protocol uses a 16 bit bus for data and a maximum clockrate of 70 MHz resulting in a datarate of 140 MBps which is twice the speed of USB 2.0. The uPP protocol is here for implementation details.
If you have completed these introductory projects you are ready to explore complex designs. You can use an ARM processor. You can investigate communications where you generate signals on the FPGA. You can do image processing. Possibilities are endless.