Circuit Fever Author - Snow Leopard
Snow Leopard
Posted on - 19 Jan 2024
Last Updated - 16 Aug 2025

How to Simulate Verilog HDL on Vivado 2022

For this tutorial we are using Xilinx Vivado 2022for simulating Verilog HDL. But you can also simulate this is older or newer version of the AMD Vivado.

Create New Vivado Project

In this part we'll create a Vivado Project. Open Vivado 2022, The window of Vivado 2022 looks like as shown below. If you are using previous verison of Vivado it may look different.

How to simulate in AMD Vivado

Click on File → Project → New

How to simulate in AMD Vivado

New Project Window will apprer. Click on Next

How to simulate in AMD Vivado

In project Name, write a unique project name and Click Next. Do not forget to check Create project subdirectory

How to simulate in AMD Vivado

Choose RTL Project

How to simulate in AMD Vivado

You can add Source file from here. For this tutorial skip this part (Click Next). We'll Create source file later

How to simulate in AMD Vivado

We do not require any Constraints File so, skip this part by cliking on Next

How to simulate in AMD Vivado

Do not choose any part number since we are just simulating the Verilog HDL so leave it as default part. Click Next

How to simulate in AMD Vivado

In this window, project summary will show. Click on Finish

How to simulate in AMD Vivado

After creating the project, the will look like as shown below.

How to simulate in AMD Vivado

Till now, we've created the Vivado Project required for this tutorial.

Create Design Source

Now, we'll create source file for writing Verilog HDL.

Click on File → Add Sources

How to simulate in AMD Vivado

Click on Create Design Source and click on Next

How to simulate in AMD Vivado

Click on Create File

How to simulate in AMD Vivado

Write a unique file name and click OK

How to simulate in AMD Vivado

In this window you can define your module name and input output ports. Do not change the module name and click OK

How to simulate in AMD Vivado

Click Yes

How to simulate in AMD Vivado

In Project Manager, Under the Design Sources you can find your all design files. Double clik on this to write Verilog codes.

How to simulate in AMD Vivado

Write the Verilog Code. The code for half adder is given below. This module has two inputs and two outputs

module half_adder(
    input a , b,
    output sum , carry
    );
    
assign sum = a ^ b;     //a ex-or b
assign carry = a & b;   //a and b
    
endmodule
How to simulate in AMD Vivado

You can check the RTL Schematic. To do this, In Project manager (Left side of the window), Click on RTL Analysis →Schematic

How to simulate in AMD Vivado

Create Simulation Source

Now our module is ready. We'll now create Test Bench for testing this module.

Click on File → Add Sources and do no forget to click on Add or Create Simulation Sources

How to simulate in AMD Vivado

Write the verilog code for test bench

module half_adder_tb;

reg a , b;
wire sum, carry;

half_adder ha0(a,b,sum,carry);  //Module Instantiation

initial begin
    a = 0;
    b = 0;
    #10         //delay
    a = 0;
    b = 1;
    #10
    a = 1;
    b = 0;
    #10
    a = 1;
    b = 1;
    #10
    $finish();
    end
endmodule
How to simulate in AMD Vivado

Click on Simulations → Run Simulation. Now you can see the waveform

How to simulate in AMD Vivado

That's all.

👈 Like If You Found This Useful
0 Likes

Comments

Please log in to comment.