FIGURE 15.
program available that can be used to take the bit file
compiled in the ISE Design Suite and program it into either
the Basys2 FPGA or its PROM. Go to www.digilentinc.com
and search for “digilent adept,” then download and install
the appropriate program for your computer. With both of
these programs installed, you are now ready to build your
first FPGA digital design.
Let’s start out very simple and make a basic two-input
AND gate using two of the Basys2 slide switches as inputs,
and use one of their on-board LEDs as an indicator of the
AND gate’s output. This will be done in VHDL or very high
speed integrated circuit hardware description language.
Open the Design Suite and start a new project as shown in
Figure 7. From the Create New Project window, type in a
name and location for your project (see Figure 8). From the
Project Settings window, select a Spartan3E, XC3S100E,
CP132, - 4 as shown in Figure 9. Figure 10 shows the
Project Summary window; click Finish to continue. Select
Project and New Source as shown in Figure 11.
In the next window, click on VHDL Module and type in
a file name and location for your source file (see Figure
12). Figure 13 allows you to enter port names and
FIGURE 16.
FIGURE 17.
directions; this can be done later but since this is a very
simple circuit, it’s easy to do it now. Figure 14 is another
Summary window; select Finish to continue on. Figure 15
shows you the VHDL template that the ISE program created
for you with your inputs (A and B) and your output (Y).
Most of the template is made up of comments; the
green text preceded by two dashes (—) can be ignored or
deleted. All we need to do is enter how we want these
inputs and outputs to operate logically. Line 42 in Figure
16 shows how to enter a two-input AND gate with A and B
FIGURE 18.
FIGURE 19.
SERVO 09.2011 59