Pre- and Post-Synthesis Simulation Vivado

This is a supplementary document for HW2.

Create a project with a Verilog file as the top module (no need for top-level Schematic):

For Simulations with the GUI, create a new project as before starting with menu File-> Project New

On HW1, we used a schematic for the benefit of a visual depiction, but you will want to avoid this going forward and learn use Verilog files directly as your top level design file.

After adding/creating a Verilog file using menu File->Add Sources... (Control-A) as shown in HW1, you can make any file the top-level Design Source File. To do this perform the following:

Find the the file in your "Sources Window" , for example if you named it top.v

Right-click the file and select "Set as Top". It should become bold

Create a Simulation Testbench:

File->Add Sources... (Control-A)

Select "Add or create simulation sources" and click Next>

[Create File]

Click Finish

Define Module:

A testbench has no pins, just click OK and Yes to the pop-up dialog

Find the top_tb.v file in your "Sources Window," e.g.

Right Click top_tb.v and select "Set as Top" . It should become bold in the Simulation Sources tree, leaving top.v bold under the Design Source Tree.

you can now edit top_tb.v by first instantiating your top module and providing the necessary test-bench code

Finally, to run a simulation use menu Flow -> Run Simulation

-