Vivado Tutorial
In this tutorial we are designing, simulating and implementing a 4-bit binary adder.
Four full adders are used to build the 4-bit parallel adder.
Cin
Full Adder
Cout
y3
y2
x3
C3
Cout
s3
y1
x2
C2
s2
y0
x1
x2
s1
x0
C1
Cin
s0
Start Vivado
Click on create new project
Click Next
Toma Sacco, Ph.D.
Enter the project name and location and click Next
Select RTL Project and click Next
Toma Sacco, Ph.D.
Click Create File
Enter File name and click OK
Click Create File again
Toma Sacco, Ph.D.
Enter the name of the file and click OK
Click Next
Click Next
Toma Sacco, Ph.D.
Click add Files
Browse to the Nexys4_Master.xdc file and select it and click OK
Click Next
Toma Sacco, Ph.D.
Enter the Family, Package, and speed grade and the select the device from the list
and click Next
Click Finish
Toma Sacco, Ph.D.
Enter the ports for the PA and select FA
Toma Sacco, Ph.D.
Enter the ports of the FA and click OK
Click on FA module and the code for it
Then save it. If you have any syntax error you will get a message alerting you to
that
Click on the PA module to enter its code
Toma Sacco, Ph.D.
After entering the code save it
Simulation:
Click on Add Sources in the Project Manager
Toma Sacco, Ph.D.
Select Add or Create Simulation Sources and click Next
Click Create File
Toma Sacco, Ph.D.
Enter the file name and click OK
Click Finish
Toma Sacco, Ph.D.
The simulation module does not take ports so just click OK
Click Yes
Click on Sim_PA module to open it. Then enter the simulation code.
Toma Sacco, Ph.D.
Save it
After selecting Sim_PA
Toma Sacco, Ph.D.
Click on Run Simulation and select Run Behavioral Simulation
To display the results in decimal select the signal and right click on it then from
radix select unsigned.
Clicking on Elaborated Design will give you the block diagram of your design
Toma Sacco, Ph.D.
Implementation:
Pin Assignment:
Nexys4_Master.xdc contain all the resources of Nexys4 board commented. Open this
file and uncomment the resources used in the project. Make sure to use the project
signals for each pin.
Toma Sacco, Ph.D.
Switch 3 dowto 0 are used for input x , switches 7 downto 4 are used for input y,
and swich 8 is used for input Cin
LEDs 3 downto 0 are used to display the output s and LED 4 is used to display
output Cout
Toma Sacco, Ph.D.
After making all the necessary pin connections save the file
Click on Run Synthesis
After selecting Run Implementation, click OK
Select Generate Bitstream and connect your board to the computer. Then Click OK
Toma Sacco, Ph.D.
Select Open Hardware Manager and click OK
Click on Open Target and select Auto Connect
Click on Program device and select xc7a100t_0
Toma Sacco, Ph.D.
After making sure the correct bit file is selected click program
Change the inputs and observe the results. For this example all the inputs are
1s(15+15+1) and the result is 31.
Toma Sacco, Ph.D.