Having the PicoBlaze is not much use on its own. Like any other microcontroller, the PicoBlaze is of no value unless it has external connections and can "talk" to something outside of itself. Thus, using the notes supplied with the PicoBlaze, I looked up how to add a digital latch that can act like a port on a microcontroller.
As illustrated in the diagram below, I created an 8-bit latch called "Port_A." The combination of the correct 8-bit "Port_ID" with a "Write_Strobe" signal is used to generate an enable signal. In combination with the system clock, this loads whatever is on the 8-bit "Out_Port" bus into the "Port_A" latch.
High-level block diagram view of the system (excluding the ROM).
The next step is to connect one of the output bits from the "Port_A" latch to a pin on the side of the FPGA, and use this pin to drive an LED in the outside world. The PicoBlaze then requires only a small program to toggle this LED on and off again. So how did I do all of this?
Well, first I created a top-level design that would define all of the interconnects I need and include the port design. Within this design, I also included the PicoBlaze core along with the ROM image (program) required to drive it.
I've bundled all the files I used to generate this design for you to peruse and ponder (click here to download a compressed ZIP file). Please feel free to look them over and then ask me any questions. You will note that I have called the top level GOL, which stands for "Game of Life." As you know from my previous column, I’m going to design an FPGA-based implementation of the Game of Life, and this is just the first step in the process.