I'm sure you've heard the old saying "Things come in threes." Well, this is one of those occasions. I'll be covering my progress with the PicoBlaze as usual, but I also want to cover three big step changes with you.
As the title of this column suggests, we will be looking at adding a UART (universal asynchronous receiver/transmitter) to our PicoBlaze. That will take up most of this post. But there's more. As you can see from the following photograph, I have a new development board.
There is no doubt the PicoBlaze in the Spartan 3A FPGA-based development board I have been using works very well. However, despite our love for this device, progress moves on, and the Spartan 6 FPGA is becoming more and more common as the entry-level Xilinx device in development boards.
This board, the Drigmorn3 from Enterpoint, comes from the UK and is worth checking out. Moving to this development board will let me take full advantage of the newer features available in both the PicoBlaze and the Spartan 6 FPGA.
Next, I want to cover how this project is structured. As engineers, we should be used to this, but you may not have thought about it as being applicable inside a FPGA. In reality, for any design, it's important to partition your project into functional blocks. The block diagram below illustrates how I have separated the PicoBlaze core from its ports and the UART.
Partitioning the design in this way means you can test each part separately. Also, it helps to make your code more reusable, because you can use these blocks in future projects. It's also going to help you, as the engineer, see what's going on. It can be hard to make sense of VHDL or Verilog files as they get very deep in code. Breaking things up like this makes everything much easier to handle.
When designing FPGAs, I like to think of each block as a small chip on a breadboard. The blocks/chips work on their own, and we need only to wire them together to make them function as a system. This is also why all I do at the top level of my FPGA design is wire the signals between each device or block.
Another thing I like to do is to organize my code into different folders, as illustrated below. As this project moves forward, you will see this structure grow, and you will understand why it's so important to keep track of your files.
Now that you have seen my changes, let's consider the UART, and I'll comment more on these changes as needed.
Next page >