top of page

Zynq-7000 + AXI Slave Hello World

  • Writer: Zach Pfeffer
    Zach Pfeffer
  • May 3, 2019
  • 5 min read

Updated: May 14, 2023


ree

This post shows how to create a Xilinx Zynq-7000 + AXI slave in Vivado 2018.2 and read/write the AXI slave from the ARM9 of the Zynq-7000 using bare-metal code built with the SDK on the ZC702.



Versions Used


Xilinx Vivado 2018.2 & SDK 2018.2

ZC702 Rev 1.1

Windows 7 SP1



Before you Start


Review ZC702 JTAG and serial port set up instructions @ [link]. These instructions are also reviewed below.



Contents


Part 1: Create the Vivado Project

Part 2: Create the AXI Slave IP and Add it to the Repo

Part 3: Create the Zynq-7000 in IP Integrator

Part 4: Connect the AXI Slave

Part 5: Build the Bitstream (to Program the FPGA)

Part 6: Export the Design and Open the SDK

Part 7: Install the USB-to-UART Driver and Get the COM Assignment

Part 8: Configure the Board to Boot from JTAG, Connect it to the PC and Power it On

Part 9: Create the Test App and BSP

Part 10: Test Debug Run + Further Config

Part 11: Test the AXI module



Part 1: Create the Vivado Project


Step 1: Start Vivado

ree

Step 2: Click Create Project

ree

Step 3: Click Next

ree

Step 4:

A. Set Project name to axislave

B: Set Project location to C:/vivadoprjs (create C:/vivadoprjs if it doesn't exist)

C. Click the Create project subdirectory checkbox

D. Click Next

ree

Step 5:

A. Select RTL Project

B. Check the Do not specify sources at this time check box

C. Click Next

ree

Step 6:

A. Click Boards

B. Type ZC702

C. Click on the ZYNQ-7 ZC702 Evaluation Board box

D. Click Next

ree

Step 7: Click Finish

ree

Part 2: Create the AXI Slave IP and Add it to the Repo


Step 1:

A. Click Tools

B. Click Create and Package New IP...

ree

Step 2: Click Next

ree

Step 3:

A. Select Create a new AXI4 peripheral

B. Click Next

ree

Step 4:

A. Use defaults except, set IP location to: C:/vivadoprjs/axislave/ip_repo

B. Click Next

ree

Step 5: Use defaults, click Next

ree

Step 6: Use defaults, click Finish

ree

Part 3: Create the Zynq-7000 in IP Integrator


Step 1: Click Create Block Design

ree

Step 2: Use defaults, click OK

ree

Step 3: Click +

ree

Step 4:

A. Type Zynq

B. Double-click on ZYNQ7 Processing System

ree

Step 5: Click Run Block Automation

ree

Step 6: Use defaults, click OK

ree

You should see:

ree

Part 4: Connect the AXI Slave


Step 1: Click +

ree

Step 2:

A. Type myIP

B. Double-click myip_v1.0

ree

Step 3: Click Run Connection Automation

ree

Step 4: Use defaults, click OK

ree

You should see:

ree

Step 5: Click Sources

ree

Step 6:

A. Right-click design_1 (design_1.bd)

B. Click Create HDL Wrapper...

ree

Step 7: Use default, click OK

ree

You should see:

ree

Step 8:

A. Click to expand design_1_wrapper (design_1_wrapper.v)(1)

B. Right-click on design_1_i: design_1 (design_1.bd)(1)

C. Click Generate Output Products...

ree

Step 7:

A. Leave selected or select Out of context per IP

B. Leave Number of jobs at 2

C. Click Generate

ree

Step 8: Click OK and let the operation complete

ree

Part 5: Build the Bitstream (to Program the FPGA)


Step 1: Click Run Synthesis

ree

Step 2: Use defaults, click OK

ree

You'll see the status in the upper right corner:

ree

Step 3:

Wait approximately 1 to 5 min until you see Synthesis Complete in the upper right corner...

ree

...and click OK to Run Implementation:

ree

Step 4: Use defaults, click OK

ree

Again, you'll see status in the upper right:

ree

Step 5:

Wait approximately 1 to 5 min until you see Implementation Complete in the upper right corner...

ree

A. Select Generate Bitstream

B. Click OK

ree

Step 6: Use defaults, click OK

ree

Again, you should see the status in the upper right:

ree

Step 7: Click Cancel

ree

You may see this window pop-up:

ree

Feel free to send feedback, set a reminder or click No. If you click No you may see:

ree

...click OK to dismiss.



Part 6: Export the Design and Open the SDK


Step 1:

A. Click File

B. Click Export

C. Click Export Hardware...

ree

Step 2:

A. Click the Include bitstream checkbox

B. Click OK

ree

Step 3:

A. Click File

B. Click Launch SDK

ree

Note: you can open up the workspace from the SDK by launching the SDK and selecting C:\vivadoprjs\axislave\axislave.sdk as the workspace.


Step 4: Use defaults, click OK

ree

Step 5: After the SDK launches, note the Base Addr of myip_0:

ree


Part 7: Install the USB-to-UART Driver and Get the COM Assignment


Steps:

A. Goto [link] for the Silicon Labs CP210x USB to UART Bridge VCP Drivers

B. Download and unzip the correct installer for your OS

C. Install the driver (I did not need to restart on Windows 7 SP1)

D. Click Windows

E. Click Devices and Printers

ree

F. You should see Silicon Labs CP210x USB to UART BridgeG. Note the COM port (you'll need this later)

ree



Part 8: Configure the Board to Boot from JTAG, Connect it to the PC and Power it On


Step 1: Set SW16 to JTAG mode [mode documentation see p.16]

ree

For the rest of the jumpers see the high-resolution photo of the board in the correct state at [link]. Step 2: Connect a Micro-B to Type-A (host connection) USB cable from U23 (Diglent USB JTAG interface) to the host PC

U23:

Micro-B connector:

Type-A connector:


Step 3: Connect a Mini-B to Type-A (host connection) USB cable from J17 (CP2103GM USB-to_UART Bridge) to the host PC.

J17:

Mini-B connector:

Type-A connector:

Step 4: Turn on the board


Part 9: Create the Test App and BSP


Step 1:

A. Click File

B. Click New

C. Click Application Project

ree

Step 2:

A. Type testaxislave

B. Ensure the Board Support Package: Create New radio button is clicked and the name given is testaxislave_bsp

C. Click Next

ree

Step 3:

A. Click Hello World

B. Click Finish

ree

Part 10: Test Debug Run + Further Config


These instructions allow debug to be set up more easily than entering in the details manually. After running a debug session, the Debug Configuration is fixed up to reset the FPGA and program the bitstream. The debugger COM port is also configured so that output can be read and the steps to test it and see Hello World are listed.


Step 1:

A. Right-click testaxislave

B. Click Debug As

C. Click Launch on Hardware (System Debugger)

ree

Step 2: Click OK

ree

If you see this message click Yes. We'll handle this in the next part.

ree

You should see the Debug Perspective display the code broken on init_platform():

A. Debug context on main()

B. helloworld.c on init_platform()

ree

Step 3:

A. Click Run

B. Click Debug Configurations...

ree


Step 4:

A. Ensure System Debugger using Debug_testaxislave is selected (it should be)

B. Click the Reset entire system checkbox

C. Click the Program FPGA checkbox

D. Click Apply

E. Click Close

ree

Step 5: Configure Debug View COM

A. Click SDK Terminal

B. Click the '+' (Connect to serial port.)

ree

Step 6: Set Debug View COM settings

A. Enter the COM# from above

B. Click OK

ree

Step 7: Make sure you see Hello World on the console

Click on the bug

ree

Step 8: Click OK

ree

Step 9: Wait for the system to hit the breakpoint on main()

ree

Step 10: Click Resume

ree

...and wait until you see exit():

ree

Step 11: Click on SDK Terminal...

ree

...to see Hello World:

ree

Part 11: Test the AXI module


Step 1: Click on the C/C++ view

ree

Step 2: Show myip tests

A. Right-click on design_1_wrapper_hw_platform

B. Click Refresh

ree

Step 3:

A. Expand design_1_wrapper_hw_platform, drivers, myip_v1_0, src

B. Double click on myip_selftest.c

ree

Step 4: Select XStatus MYIP_Reg_SelfTest(void * baseaddr_p)

ree

Step 5:

A. Click Edit

B. Click Copy

ree

Step 6:

A. Expand testaxislave

B. Expand src

C. Double-click helloworld.c

ree

Step 7:

A. Press ENTER to make room

B. Click Edit

C. Click Paste

ree

Step 8: Get the base address of myip_0

A. Double-click the system.hdf file

B. Note the address (it won't let you copy-paste it)

ree

Step 9:

A. Double-click on helloworld.c

B. Fix up the code so it reads: MYIP_Reg_SelfTest(0x43c00000);

ree

Step 10: Click the bug to restart debugging

ree

Step 11: Click OK

ree

Step 12: Click OK

ree

Step 13: Click Yes

ree

You should see the code stopped at the breakpoint on main()

ree

Step 14: Click Resume

ree

You should see:

ree


References

 
 

© 2025 by Centennial Software Solutions LLC.

bottom of page