Upload
emmanuel-bautista-dizon
View
51
Download
11
Tags:
Embed Size (px)
DESCRIPTION
from sacco's class.
Citation preview
Vivado TutorialIn 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.Full AdderSCoutCinxy
C1Cins0x0y0
C2s1x1y1
s2x2y2
C3x2y3x3s3Cout
Start VivadoClick on create new project
Click Next
Enter the project name and location and click Next
Select RTL Project and click Next
Click Create File
Enter File name and click OK
Click Create File again
Enter the name of the file and click OK
Click Next
Click Next
Click add Files
Browse to the Nexys4_Master.xdc file and select it and click OK
Click Next
Enter the Family, Package, and speed grade and the select the device from the list and click Next
Click Finish
Enter the ports for the PA and select FA
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 thatClick on the PA module to enter its code
After entering the code save it
Simulation:Click on Add Sources in the Project Manager
Select Add or Create Simulation Sources and click Next
Click Create File
Enter the file name and click OK
Click Finish
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.
Save it
After selecting Sim_PA
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
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.
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 CoutAfter 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
Select Open Hardware Manager and click OK
Click on Open Target and select Auto Connect
Click on Program device and select xc7a100t_0
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.