FPGA Beginner’s Series, 7: Bringing Up the IDE

Thus far, I've been working in command-line mode. In this episode, I bring up the IDE (Integrated Development Environment) for the very first time.

When I originally powered up my Spartan-6 LX9 development board, I tried to jump in with the Xilinx IDE (integrated development environment), which they call the ISE (integrated software environment) Design Suite. This seemed to be the logical choice, but I quickly determined that there were just too many variables, and that I needed a little grounding in the actual code before attempting to decipher the inner workings of yet another IDE. Now I'm back to seek my fortune, far away from the trusty command-line.

My board came equipped with ISE version 12.4, so we're going down that path. If you want to work alongside me, click here to download the documentation needed for the next step from the Xilinx Website. We'll be working with the "ISE In-Depth Tutorial," which is second from the top on the page. I'm not using the tutorial's design files but rather will be replicating the command-line work we've done over the last few weeks.

"Your mission, Jim, should you choose to accept it," is to read Chapters 1 and 2 of the "ISE In-Depth Tutorial." There's a lot of good information in those chapters, with the added advantage that it won't self-destruct in five seconds. You should also keep the source files from my last few columns (ledflash.ucf and ledflash.v) close at hand, because we will be referring to them later.

Let's get started by opening the ISE Design Suite. Next, perform the following steps (found on page 19 of the tutorial):

Brining up the IDE - Project Navigator start
Brining up the IDE - Project Navigator start
  1. At the "File" menu, create a new project using "File > New Project." The tutorial covers this on page 19, although it's important to remember that we're going to use our own file names.
  2. In the Name field, enter "ledflash_ISE_ver."
  3. The "Top-level source type" field should be set to "HDL." Then click the "Next" button.
  4. The default settings on the "Project Settings" page should be fine, but verify that they
    match those in the image shown here. Note that I've selected Verilog as my  referred language.
New project wizard settings
New project wizard settings

Around this point (page 20, item 5), you may spot one of my frustrations with many tutorials. This one is written for the Spartan 3A family, not the Spartan 6, which is what we have. Undoubtedly, the tutorial will be almost the same. It's probably close enough to simply not justify rewriting for the Spartan 6. But, having said this, you know that there will be just enough differences that things won't quite work as written. That's not a problem if you know what you're doing, but I don't know what I'm doing...

New source icon
New source icon

Oh well, there's no point in moaning and groaning, because even if the folks at Xilinx decide to change things, it will be too late to help me here and now, so let's return to the task at hand. After confirming your settings by clicking the "Next" button, you'll be presented with a project summary. Click the "Finish" button to be done with this part. Thus far, all we've done is set up the project directory structure and select a few parameter values. The next step is to start to create the FPGA configuration. Unfortunately, the IDE is not equipped with a "Do what I'm thinking" button, so we still have some work to do by hand. The empty project framework is here, but there aren't any source code files yet. Click the "New Source" icon as shown in the image on the left.

This brings up the "New Source Wizard" dialog. There are all sorts of exciting options here, including an embedded processor I can't wait to try out. For today, however, we're selecting "Verilog Module." Enter the file name "ledflash_ISE_ver" (the wizard will attach the ".v" extension), select "Verilog Module," and click the "Next" button (the other settings can be left at their default values). Now we get to specify the ports as illustrated below:

New source wizard -- specifying the ports
New source wizard -- specifying the ports

This establishes some of the constraints that we set in the .UCF (user constraints file) when we were working with the command-line interface in my previous columns. Duplicate what I have in this image and then click "Next" to complete the source file creation.

Once complete, this should all look a little familiar. This doesn't have everything from the .UCF file; just the things that connect up to pins on the FPGA. When you compare this to the "ledflash.v" file from the past few weeks, you'll see that we've now started the module and created the inputs and outputs, but that's all. Things are not exactly the same as we've seen previously. In the original file, for example, the reserved word "wire" was also included ("input wire CLK_66MHZ"). And although we have inputs and outputs, as yet they don't do anything and don't connect anything. That will come in my next article when we figure out how to set up the user constraints from within the IDE.

Module "ledflash_ISE_ver"
Module "ledflash_ISE_ver"

One last thing for now before I return to battling with the IDE... My assumption is that the Wizard didn't insert the word "wire" because it doesn't yet know that our ports connect to anything. Once we have pins or other in-the-chip things to connect to, we'll need to add the "wire" in here. Does this sound right to you?