synthesizing and simulating verilog code - iit...

17
Synthesizing and Simulating Verilog code Using Xilinx Software Neeraj Kulkarni

Upload: duonghanh

Post on 14-Jul-2018

249 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Synthesizing and Simulating Verilog code

Using Xilinx Software Neeraj Kulkarni

[email protected]

Page 2: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Xilinx ISE 14.6 • Download link- http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html • Choose the Full Installer for Windows • You need to register on their website.

• Install the software. When it prompts for licence choose

WebPack Licence which is available for free.

• Note: Preferable install it in Windows 7 environment. Xilinx 14.4 has some annoying bugs when run with Windows 8. I think they still do not support windows 8.

Page 3: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Open the Xilinx ISE Software

Open New Project

Page 4: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Choose the location to create New Project

Page 5: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Choose settings as shown as FPGA chosen is available .

Click Next and then click Finish.

Page 6: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Create New Source as shown

Page 7: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Select Verilog module.

Click Next twice and then Finish.

Page 8: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

You can now write your module.

Page 9: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Code for mux written.

Double click on synthesize, on the left hand side.

Page 10: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

To see the circuit click on view RTL schematic option and then press ok.

Page 11: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Go on clicking in the black area to zoom in the circuit elements.

Page 12: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

To run simulation click on Simulation option at the top of left column

Page 13: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

To create a Test bench, create New Source.

Select Verilog Test Fixture

Page 14: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Template of Test bench will be created instantiating the mux module.

Page 15: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Add the testing code in the initial block below Add Stimulus here comment.

Page 16: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

Double click on Simulate Behavioral Model option.

Page 17: Synthesizing and Simulating Verilog code - IIT Kanpurstudents.iitk.ac.in/eclub/assets/tutorials/Verilog-xilinx.pdf · Synthesizing and Simulating Verilog code Using Xilinx Software

This is the simulation window. You can verify the working using waveforms or using printed statements at the bottom.