Editor's Note: In his last column, the enterprising Duane used the IDE (integrated development environment) supplied with his FPGA development board -- the Avnet Spartan-6 LX9 MicroBoard -- to walk us through the process of creating the .BIT configuration file. (See: Discovering FPGAs: Creating the .BIT File.)
In this installment of his mini-series, still using the IDE, our adventuresome hero guides us through the process of loading the .BIT configuration file into the FPGA. So now, let's hand things back over to Duane...
OK, the state-of-play following my previous blog is that I now have the "ledflash.bit" file in the "ledflash_ISE_ver" folder on my computer. The Spartan-6 development board is sitting on my desk. There's a cable connecting my computer to the development board. I say "Let's go!" Basically, what we're going to do is to perform the following tasks:
- Open up a new piece of software called Impact
- Tell this application how to find the Spartan-6 board
- Locate the configuration "ledflash.bit" file
- Load the "ledflash.bit" file into the FPGA
- Watch the LEDs on the development board count in binary
As I say, we will be using a new piece of software called Impact, but we will still access this through the ISE, which means we need to start up the ISE. If your "ledflash_ISE_ver" project from my previous column isn't loaded automatically, load it up now. Next, click the little "+" (plus sign) next to the "Configure Target Device" item, as seen in the image below.
Loading the FPGA -- Selecting the "Configure Target Device" option.
Double-click the "Manage Configuration Project (Impact)" item. Doing so opens another piece of software called -- perhaps not too surprisingly -- "Impact." This is the application that will actually be loading the "ledflash.bit" file into the FPGA. Note that you will most likely have to manually tell the software where to find your cable. I had assumed the software would find this automatically, or at least would only need to be told once, but it seems to need me to tell it every time.
Loading the FPGA -- Launching the iMPACT wizard.
Launch the wizard, as shown in the image above. The first window will have a dropdown menu under the text "Configure devices using Boundary-Scan (JTAG)." Set the drop-down to "Enter a Boundary-Scan chain manually" and click "OK."
Loading the FPGA -- Selecting the "Chain Manually" option.
We're almost done, I promise. Observe a window titled "Boundary Scan" with blue text saying: "Right-click to Add Device or Initialize JTAG chain." Follow the blue instruction text and right-click in the big open "Boundary Scan" window. This will access a small pop-open menu, from which you need to select the "Cable Setup..." item.
Loading the FPGA -- Selecting the "Digilent" option.
As shown in the above image, check the box "Open Cable Plug-in...," leave the drop-down box as "digilent_plugin," and click the "OK" button. Don't be surprised if nothing happens after this step because there doesn't appear to be any feedback at this point.
Again, right-click on the blue text that says: "Right click to Add Device or Initialize JTAG chain." This time, select "Add Xilinx Device..." from the pop-up menu. You'll have to hunt down the "ledflash.bit" configuration file that we created as part of my last blog. Hopefully, you will find this in the tutorial directory we created a while back: "My Documents\Xilinx\ledflash_ISE_ver\ledflash.bit." Once you've tracked down the "ledflash.bit" file, click the "Open" button to access its contents.
Loading the FPGA -- Selecting the "ledflash.bit" file.
Finally, right-click on the chip icon and select "Program" from the ensuing pop-up menu. Do not click the blue text. If you do, you'll get a different menu that doesn't do what we need.
Loading the FPGA -- Loading the configuration.
After selecting the "Program" option, you will be presented with one more dialog box titled: "Device Programming Properties -- Device 1 Programming Properties." Just click "OK" and you're done.
The Impact software will display a rather unsightly blue box with the words "Program Succeeded" in it. At the same time, the LEDs on your Spatran-6 board will start to display a binary count sequence. Congratulations! We are now exactly where we were several weeks ago when we were using the command-line interface.
The difference is that we now know how to use the IDE. This means that when we start creating our own code from scratch, we'll be more confident that any problems are in our code rather than in the process. And I call that a very good thing. So, the million-dollar questions is: What did I miss?