Vivado Verilog Tutorial
Vivado Verilog Tutorial
This tutorial will give a step-by-step walk through of the Vivado design environment.
This tutorial demonstrates how to create a Verilog project, add Verilog source files and
test the design via simulation.
Step 1: Creating a new project
In the ‘Define Module’ Window specify A, B, and C as inputs, and D and E as outputs
and click OK.
Double click on the newly created file under the Design Sources folder:
This will open the file for editing. Now edit the file to contain the following:
2. Add a testbench.
Under Project Manager in the Flow Navigator, click on Add Sources.
Select ‘Add or create simulation sources’.
Select ‘Create Files’:
File type: Verilog
File name: tutorial_testbench (or any name you choose)
File location: <Local to Project>
Click OK, then Finish.
Click OK in the ‘Define Module’ Window.
4. Double click on the newly created file under the Simulation Sources folder in the
Sources tab:
This will open the file for editing. Now edit the file to contain the following:
Step 3: Behavioral Simulation
1. Select ‘Settings’ under the ‘Project Manager’ tasks of the ‘Flow Navigator’ pane. A
Project Settings form will appear showing the Simulation properties form.
2. Select the Simulation tab, and set the Simulation Run Time value to 200 ns and click
OK.
3. Click on Run Simulation > Run Behavioral Simulation under the Flow Navigator pane.
The testbench and source files will be compiled and the XSim simulator will be run
(assuming no errors). You will see a simulator output similar to the one shown below.
Note that you may need to scroll and/or zoom out in order to see the full simulation.
Make sure that you understand how the waveform reflects the testbench, and that it
clearly shows that the provided design functions correctly. It is a good practice to test
the output for all the possible combinations of input (whenever possible).