42
Quick Start Tutorial for VHDL Homework/Projects One can check the full Xilinx ISE 9 Tutorial at the following link: http://www.xilinx.com/support/techsup/tutorials/tutorials9.htm Reading the documentation may save your time. Before starting the homework/Project, you will need to create a folder first. Let’s assume that you are taking CMPEN297 class this semester. From the Start menu, click 'My Computer' and create C:\cmpen297 folder and collect all your homework projects in this folder. (I created C:\cur\class\cmpen297 folder.)

Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Quick Start Tutorial for VHDL Homework/Projects One can check the full Xilinx ISE 9 Tutorial at the following link: http://www.xilinx.com/support/techsup/tutorials/tutorials9.htm Reading the documentation may save your time.

Before starting the homework/Project, you will need to create a folder first. Let’s assume that you are taking CMPEN297 class this semester. From the Start menu, click 'My Computer' and create C:\cmpen297 folder and collect all your homework projects in this folder. (I created C:\cur\class\cmpen297 folder.)

Page 2: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Start the ISE Project Navigator.

Under the File pull down menu, select the New Project…

Before typing the Project Name, you MUST specify Project Location. Specify C:\cmpen297 folder that was just created.

Page 3: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now type the project name. In this case, you will be creating the Homework 5 project and you will be turning in your project as your homework, so you must name the project with your last name. Make the project name as your last name after "hw5_". For example, my project name will be 'hw5_choi'. Keeping this project/folder name convention is important, for you to get full credit of your work. When I name my project hw5_choi, the ISE program will create a sub-folder C:\cmpen297\ hw5_choi and collects all the project files in it. If your last name is longer than 8 characters, use only the first 8 character of your last name.

Page 4: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Select the following properties in the homework 5 project wizard window. These same properties will be used for all of the homework. Family => Spartan3E Top-Level Source Type => HDL Device => XC3S500E Synthesis Tool => XST (VHDL/Verilog) Package => FG320 Simulator => ISE Simulator (VHDL/Verilog) Speed => -4 Preferred Language => VHDL

Page 5: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Click Next on the subsequent window.

Again click Next on the subsequent window.

Page 6: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Check the properties and click Finish on the subsequent window.

You will see the similar ISE project navigator window shown below. Right click the device xc3s500e-4fg320 and select the New Source… option.

Page 7: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now select the 'VHDL Module' on the left and type the file name. In this case, you will be creating a file with an AND gate. Also, ALL file names must contain your initials in the beginning. For example, my file name with 2-input AND gate circuit will be 'kcAND2' for my first name initial "k" and my last name initial "c" is added to the beginning of the file name. Keeping this file name convention is important, for you to get full credit of your work.

Page 8: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Creating a 2 input AND gate, the inputs are labeled 'a' and 'b'. The output of the AND gate is labeled 'z'. Follow the entries for the New Source Wizard shown below.

Page 9: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Once you see the ISE project navigator window similar to the one below, click on the kcAND2.vhd tab on lower middle left (below the FPGA Design Summary tab).

Page 10: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Scroll down the VHDL editor window using the right side scroll bar.

Page 11: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Type in the VHDL statement for the 2 input AND gate function.

Page 12: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for
Page 13: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now scroll back to the top of the VHDL editor window, add necessary comments for the kcAND2.vhd file.

After all the comments are entered, be sure to save the VHDL file. One can save the file by clicking the file save button on the top line of the ISE project navigator window, shown above.

Page 14: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now click the Sources tab and process Processes tab on the left side of the ISE window. Also click the kcAND2 - Behavioral module in the Sources tab.

Page 15: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now synthesize the kcAND2.vhd file by double clicking the 'Synthesize - XST' in the Process tab.

Page 16: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Wait for the synthesis to complete. If no error, it will complete and show green check mark, as shown below.

If WARNING occurred, it can be ignored. If any Error occurred, it must be fixed and re-synthesized.

Page 17: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now the kcAND2 gate can be simulated. Right click the 'kcAND2 - Behavioral' in the Sources tab. And select New Source… option. Select the Test Bench WaveForm and type the file name to test your design with the simulation.

Page 18: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for
Page 19: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for
Page 20: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for
Page 21: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for
Page 22: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Edit the input signal 'a' and 'b' by clicking on the light blue area.

Page 23: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

The AND input signal 'a' and 'b' are shown below.

Page 24: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now click the 'Sources for:' tab shown below. Select the 'Behavioral Simulation' option.

Page 25: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Select the test bench waveform file 'kcAND2tbw' in the Sources tab with single left click.

Page 26: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Expand the 'Xilinx ISE Simulator' in the Processes tab.

Page 27: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Double click the 'Simulate Behavioral Model'

Page 28: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now you will see the simulation window pop up, showing only the first 1000ns simulation.

Page 29: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Add more simulation time and simulate more. First, type 10000 for the simulation time. Then click the 'Run for Specified Time' button next to the simulation time.

Page 30: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Then click the 'Zoom to Full View' button.

Page 31: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Check the output signal wave for Z, be sure that the output is correct - proper AND gate function.

Make an observation and check to see if the output signal ‘z’ is correct. Try left click, right click, and other button click to explore the simulation window features and be familiar with the tool. You may print the ISE Simulator output wave. Or capture the Simulator window with Alt-Print Screen key and paste it on a MS Word file.

Page 32: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

One can zoom-in to the signal wave to see the AND2 gate delay time. You may use the vertical cursors (blue) and the horizontal scroll bar in the ISE simulation window to navigate to the signal transition points. Be brave and explore many features of the ISE tool.

Page 33: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Zoom - in for view.

Page 34: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

The AND2 gate delay is in Pico Second [ps] range, much zooming steps are necessary to see from the Nano Second [ns] simulation time.

Page 35: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

One can also measure the AND2 gate input to output delay time.

Page 36: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Using the vertical line cursors, one can measure precise delay time.

Page 37: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

One can quit the active simulation as shown below, click X.

Then confirm 'Yes' to quit.

Page 38: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Back to the ISE window, you can now prepare for the homework file for the submission. You need to clean up the files and ZIP them. Click the Project menu.

Select the Cleanup Project File option.

Page 39: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Hw5 is now finished and you may quick ISE.

Page 40: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

Now the cmpen297 folder contains cleaned-up hw5_choi sub-folder. One may inspect the content.

Page 41: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

All of the files are created through the ISE Project Navigator.

Page 42: Quick Start Tutorial for VHDL Homework/Projectskxc104/class/cmpen471/12f/hw/pj1/QuickPJ2vhdl.pdf · Now scroll back to the top of the VHDL editor window, add necessary comments for

For the homework turn-in, please zip-up the folder.

Turn-in your project, the hw5_choi.zip file through ANGEL.