Creating example project with AXI4 Lite peripheral in Xilinx Vivado: Difference between revisions

From ift
No edit summary
No edit summary
Line 16: Line 16:




Now press the "+" button in the diagram window, and search for "ZYNQ7 Processing System". Double click to add. In the top of the window an option to "Run Block Automation" appears.. Click this, and complete with default settings. The window should now look like this: [[File:first_block.png|thumbnail|left]]
Now press the "+" button in the diagram window, and search for "ZYNQ7 Processing System". Double click to add. In the top of the window an option to "Run Block Automation" appears.. Click this, and complete with default settings. The window should now look like this: [[File:first_block.png|thumbnail|center]]


Goto: ''Tools -> Create and Package New IP''. Choose "Create a New AXI4 peripheral", and click next.
Goto: ''Tools -> Create and Package New IP''. Choose "Create a New AXI4 peripheral", and click next.
Line 22: Line 22:
In the next window, ensure the IP contains one slave interface named S00_AXI of type "Lite". Click next, and choose "Add IP to the repository". Finish.[[File:add_interfaces_axi4lite.png|thumbnail|center]]
In the next window, ensure the IP contains one slave interface named S00_AXI of type "Lite". Click next, and choose "Add IP to the repository". Finish.[[File:add_interfaces_axi4lite.png|thumbnail|center]]


In the diagram window it's now possible to add the IP we just created, using the "+" button. Search for "axi4_lite_led_IP_v1.0".
In the diagram window it's now possible to add the IP we just created, using the "+" button. Search for "axi4_lite_led_IP_v1.0" and add it. Run connection/block automation with default parameters.
 
[[File:diagram_axi4lite_periph_added.png|center]]<br />
 
 
Right click on "design_1" under "Block Designs" in the Sources design tree. Click "Create HDL Wrapper", and let Vivado manage wrapper and auto-update.
 
''Right click axi4_lite_led_IP_0 block -->  Edit in IP Packager''.
 
[[File:led_ip_1.png|400px]]
[[File:led_ip_2.png|400px]]
[[File:led_ip_3.png|400px]]
[[File:S00_1.png|400px]]
[[File:S00_2.png|400px]]
[[File:led_port_success.png|400px]]
 
 
 
 
 
Find the following files under Sources: ''Design Sources --> design_1_wrapper --> design_1_i: design_1 --> design_1 --> axi4_lite_led_IP_0 : design_1_axi4_lite_led_IP_0_1 --> design_1_axi4_lite_led_IP_0_1'', or if you want to do the editing in your favorite editor, find the files in ''axi4_lite_tutorial_project/axi4_lite_tutorial_project.srcs/sources_1/bd/design_1/ipshared/4b4e/hdl''<br />
 
axi4_lite_led_IP_v1_0_S00_AXI.vhd <br />
axi4_lite_led_IP_v1_0.vhd<br />
<br />
 
We will start by editing axi4_lite_led_IP_v1_0.vhd using the Visual Studio Code editor:<br />
 
 
<br />
Then editing axi4_lite_led_IP_v1_0_S00_AXI.vhd:<br />
 
 
 
 
 
 
 
 
 
 
Choose "Ports and interfaces" in the Package IP tab. Click "Merge changes from Ports and Interfaces Wizard". A new port should now be listed named "led_port". Click on "Review and Package", and click Re-Package IP. Click yes on prompt to close project.
 
Click on "IP Status" tab, and choose "Upgrade Selected".

Revision as of 16:49, 4 December 2017

Tested on Xilinx Vivado 2017.3, using the Xilinx Digilent Zybo SoC.

Start ./vivado from installed directory.

Goto: File -> New Project -> Next. For this project we will name it "axi4_lite_tutorial_project" and place it in a folder named tutorials. Click Next and choose RTL Project, then Next.

New project name.png

Do not add any sources, but make sure that both target and simulator language is set to the appropriate language you're using. In this project we will use VHDL. Click Next. Here you must provide a constraints file named "ZYBO_Master.xdc", available from GitHub. Make sure that the option to copy the constraints file(s) into the project is marked.


For the next step, the board files for the board we're using must have been installed. If this is not the case, follow this tutorial to do so.

New project default part.png

Choose the Zybo board, click next, and finish.


The project has now been created and ready for IP-block integration.

Click on "Create Block Design" in the left of the window. Give the design a name, for instance design_1, and click "OK".

Create block design.png


Now press the "+" button in the diagram window, and search for "ZYNQ7 Processing System". Double click to add. In the top of the window an option to "Run Block Automation" appears.. Click this, and complete with default settings. The window should now look like this:

First block.png

Goto: Tools -> Create and Package New IP. Choose "Create a New AXI4 peripheral", and click next. Name the IP "axi4_lite_led_IP" or any other suiting name. You can leave all other parameters default.

In the next window, ensure the IP contains one slave interface named S00_AXI of type "Lite". Click next, and choose "Add IP to the repository". Finish.

Add interfaces axi4lite.png

In the diagram window it's now possible to add the IP we just created, using the "+" button. Search for "axi4_lite_led_IP_v1.0" and add it. Run connection/block automation with default parameters.

Diagram axi4lite periph added.png



Right click on "design_1" under "Block Designs" in the Sources design tree. Click "Create HDL Wrapper", and let Vivado manage wrapper and auto-update.

Right click axi4_lite_led_IP_0 block --> Edit in IP Packager.

Led ip 1.png Led ip 2.png Led ip 3.png S00 1.png S00 2.png Led port success.png



Find the following files under Sources: Design Sources --> design_1_wrapper --> design_1_i: design_1 --> design_1 --> axi4_lite_led_IP_0 : design_1_axi4_lite_led_IP_0_1 --> design_1_axi4_lite_led_IP_0_1, or if you want to do the editing in your favorite editor, find the files in axi4_lite_tutorial_project/axi4_lite_tutorial_project.srcs/sources_1/bd/design_1/ipshared/4b4e/hdl

axi4_lite_led_IP_v1_0_S00_AXI.vhd
axi4_lite_led_IP_v1_0.vhd

We will start by editing axi4_lite_led_IP_v1_0.vhd using the Visual Studio Code editor:



Then editing axi4_lite_led_IP_v1_0_S00_AXI.vhd:






Choose "Ports and interfaces" in the Package IP tab. Click "Merge changes from Ports and Interfaces Wizard". A new port should now be listed named "led_port". Click on "Review and Package", and click Re-Package IP. Click yes on prompt to close project.

Click on "IP Status" tab, and choose "Upgrade Selected".