VHDL and Digital Design Tools

Installing the software on your computer:

1. Go to the Xilinx WebPack software download page.

    a. Register.

    b. Download and Install the Complete ISE WebPACK Software.

    c. Download and Install the Complete MXE Simulator.

2. You will need a license for the MXE simulator. (It should have created a link in your start menu called "Submit License Request". They will send you a file called license.dat that will let you use the simulator.

Using the Design Software

Starting the ISE5 Project Navigator

   Look for the Xilinx Icon and double click on it.

Using the Xilinx ISE5 Project Navigator.

The Xilinx Design System is the tool we will use to write our VHDL code and/or to draw our schematics and simulate them electronically. If we draw a schematic, the schematic program will generate a VHDL program that includes all the information in our schematic.
 
In order to use our Xilinx software and Xilinx FPGA chip, all of our designs must be made with parts that Xilinx Design Manager recognizes. These parts are the parts which are included in the Xilinx library. This library is included with the Xilinx WebPACK tool. A screen shot of the project manager is shown below in Figure 1.
 
Figure 1: The Xilinx Design System


 

Building a Circuit

To build a schematic in Xilinx:
 


Figure 3: New Project
 

 

 

 


Figure 5: Symbol Browser and Sche

 


Some notes about wiring:

Figure 6: Wire Tool

    a) You may connect a wire to a port with out connecting it to another port. Place the cursor where you want the wire to end, and double click, thus stopping the wiring process.
    b) If you make a mistake and want to delete a wire click on it. The wire, and all of its branches, will be selected (there will be boxes on the ends of each segment of wire). Then press Delete.
    c) You may delete only a portion of a wire instead of the wire and all of its branches. To do so first make sure the pointer icon is selected. Then under the option to Select Branches or Select Wires choose Select Wires. Then click the section of wire you want to delete. You will know that it is selected when there are boxes at either end of the wire. Now press Delete.
    d) Xilinx will not allow you to draw diagonal wires. It will automatically make them square.


Figure 7: Highlighted Port

Figure 8: Wire Connection


Labeling Wires

You also have the ability to assign wires to pin numbers on the FPGA chip. The actual assignment will be done later. For simulation purposes you will want to label each wire you want to see in the simulation.

 
  1. Select the labeling tool ,which will make the Add Net Name Option appear on the left of your screen. 
     
  2. Type in the name you want in the Name field as shown.
     
  3. Click the wire you want to label and the name will appear in small blue letters above the wire.
   Some notes on labeling:
 

   a) You may label multiple wires with the same name. Wires with the same name are essentially wired together.
   b) You may change the name of all wires labelled the same by selecting Name the branch's net instead of Name the branch, changing the name    under the Name field and then clicking any wire you want changed. Now all wires that had the previous name will be changed to the new label name.
   c) You may label bus wires by selecting Increment the name instead of Keep the name. For example, if you have 4 data lines and we give the first one the name D0, the other lines will be labeled D1, D2, and D3, in the order that you click on them.

 

 

Simulation

To use the simulator I decided to create a small circuit that consists of only two gates:

ModelSim is used to simulate the schematics made in Xilinx. This makes it possible to simulate your design in Xilinx to verify its operation. You may do so once your circuit is constructed by the following steps:
 

  1. In Project Navigator highlight the schematic you want to simulate (example fan alarm circuit).

     
  2. Double click on Launch ModelSim Simulator from the Xilinx Project Navigator Window as seen in Figure 9.

     

Figure 9: Where to launch ModelSim

First make a do file.

 

Right click under source projects and create a new source in Project Navigator. Make a new user document and name it, let's say dofile.txt.  This will bring up a notepad window for you to make a dofile.  Then type up a program for the modelsim to execute using your schematic. This is the program I typed:

# Filename: dofile.txt. Author: Luis E. Cabrera Comments: Will simulate two gates...

#Kill old simulation if running
quit -sim
#Start a new one
vsim schem1
#Bring up the waves window
view wave
#Put signals of interest in waves window
add wave InputA
add wave InputB
add wave InputC
add wave InputD
add wave OutC
add wave OutE
#set the data input signals
#force is to make sure that what you put over-rides anything else
#0, 1 10ns -r 20ns means force to 0 for 10ns then force to 1, repeat every 20ns
force InputA 0, 1 10ns -r 20ns
force InputB 0, 1 20ns -r 40ns
force InputC 0, 1 10ns -r 20ns
force InputD 0, 1 20ns -r 40ns
run 160ns

* Do not leave blank lines in the file, the parser in the simulator does not like them.

 


 


b) There are various options on running a simulation. The Run toolbar is shown below.

 

    Restart-This resets the simulation and reassigns all of the inputs and outputs to U.
    Run-Run will cause the simulation to run for the designated about of picoseconds as shown above.
    Continue Run-This is used to restart simulation after breaking or stopping a simulation.
    Run All-This will cause the simulation to go on forever. You must click the break button to stop it at some point.
    Break-Used to stop a simulation from running.

c) Here are some keyboard shortcuts that may be useful while in the Wave window:

    Zoom In- i I or +
    Zoom Out- o O or -
    Zoom Full- f or F
    Zoom Last- l or L
    Zoom Range- r or R
    Next Transition- tab

Xilinx Manual

More information about Xilinx's use can be found in the Xilinx user's manual, Using the Xilinx VLSI Design System. Most of the information here I got from the current 224 website and modified it. I would advise you to visit it. Here is a link to their References page.