Review the information the in the New Project : Create a New Vivado Project window and then click Next.
In the New Project : Project Name window set Project Name to project, Project location to /zedboard_leds_switches/fw/vivado & untick Create project subdirectory. Click Next to proceed.
No additional source files are required for this project so in the New Project : Project Type window tick the Do not specify sources at this time check box and then click Next.
In the Parts tab enter xc7z020clg484 inside the Search element, select the xc7z020clg484-1 part from the parts list and click Next to continue.
Look over the project details in the New Project : New Project Summary window and then click Finish.
The Vivado project window now appears.
The Create Block Design dialog now appears. Change the Design name to system, set the Directory to /zedboard_leds_switches/fw/src/diagram and then click OK.
The Vivado project window now changes to reflect the addition of the Diagram pane. Expand the Diagram pane outside of the Vivado window by clicking on its Float icon
.
button.
Scroll down to the ZYNQ7 Processing System in the pop-up dialog and add this to the block design by double clicking on it.
The ZYNQ7 Processing System IP is now added to the block design.
Let Vivado automate some of the connections by clicking on Run Block Automation.
Review the connections proposed in the Run Block Automation dialog (note the missing Apply Board Preset checkbox) and then click OK.
Some of the connections are now made in the block design.
After execution of the script the ZYNQ7 Processing System should reflect the applied changes.
Remove the Timer connection from the ZYNQ7 Processing System as it is not required for this design. Click on MIO Configuration, expand Application Processor Unit and untick Timer 0.
Click OK to commit the changes.
icon and select AXI GPIO from the menu. The diagram now shows two unconnected IP modules.
Under GPIO tick All Outputs, set the GPIO Width to 8 and set the Default Output Value to 0x00000018. Tick Enable Dual Channel, then under GPIO 2 tick All Inputs and set the GPIO Width to 8.
Click OK to commit the changes.
Review each connection by selected GPIO, GPIO2 & S_AXI respectively. Once reviewed tick All Automation to enable all the suggested connections and then click OK to commit the changes.
The extra modules of Processor System Reset & AXI Interconnect are now added to the block design to make connecting up the ZYNQ7 Processing System & AXI GPIO possible. Resize the canvas to obtain a better view of the design and click on the Regenerate Layout
icon to obtain a better layout.
Using the same process rename gpio_rtl_1 to switches.
The block design should now reflect the changes.
icon. All being well the Validation successful dialogue should now appear.
Once validated return the floating Diagram pane back to Vivado by clicking on the Dock
icon. Save the Diagram.
The Create HDL Wrapper dialog now appears. Select Let Vivado manage wrapper and auto-update and then click OK.
In the Add Sources dialogue select Add or create constraints and then click Next.
In the Add Sources - Add or Create Constraints dialogue click on Create File.
In the Create Constraints File dialogue set the File name to zedboard, set the File location to /zedboard_leds_switches/fw/src/constraint and then click Next.
In the Add Sources - Add or Create Constraints dialogue click on Finish.
Double click on the newly created constraints zedboard.xdc within Sources » Constraints » constrs_1 to edit.
Add the following to zedboard.xdc and save the file.
The New Application : Project Create a New Project window will now appear. Review the information provided and then click Next.
The New Application Project : Platform window will now appear. Select the exported hardware platform from Vivado by entering the Create a new platform form hardware (XSA) tab and setting the XSA File
to /zedboard_leds_switches/fw/system_wrapper.xsa. Click Next to continue.
The New Application Project : Application Project Details window will now appear. Set the Application project name to zedboard_leds_switches and then click Next.
The New Application Project : Domain window will now appear. The default settings as shown are fine for this project. Click Next to contune.
The New Application Project : Templates window will now appear. Create an empty application by selecting Empty Application(C) from the Available Templates section. Click Finish to contune.
The Vitis IDE cockpit window will now appear. This is the window where all the action happens.
In the Create New File dialog click Advanced, tick Link to a file in the file system, use Browse... to select /zedboard_leds_switches/sw/src/c/zedboard_leds_switches.c and then click Finish.
The new source file is automatically opened in the Vitis IDE for editing.
Copy the code below into the newly created zedboard_leds_switches.c and save it by selecting File » Save from the main menu.
Set the boot mode jumpers on the Zedboard for JTAG.
Power on the Zedboard.
Quit Vitis.