Zynq-7000 All Programmable
SoC: Concepts, Tools, and
Techniques (CTT)
A Hands-On Guide to Effective Embedded
System Design
UG873 (v14.4) December 18, 2012
Zynq AP SoC CTT www.xilinx.com 2
UG873 (v14.4) December 18, 2012
Notice of Disclaimer
The information disclosed to you hereunder (the “Materials”) is provided solely for the selection and use of Xilinx products. To the maximum
extent permitted by applicable law: (1) Materials are made available "AS IS" and with all faults, Xilinx hereby DISCLAIMS ALL WARRANTIES
AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether in contract or tort, including
negligence, or under any other theory of liability) for any loss or damage of any kind or nature related to, arising under, or in connection with,
the Materials (including your use of the Materials), including for any direct, indirect, special, incidental, or consequential loss or damage
(including loss of data, prof its, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such
damage or loss was reasonably foreseeable or Xilinx had been advised of the possibility of the same. Xilinx assumes no obligation to correct
any errors contained in the Materials or to notify you of updates to the Materials or to product specifications. You may not reproduce,
modify, distribute, or publicly display the Materials without prior written consent. Certain products are subject to the terms and conditions
of the Limited Warranties which can be viewed at http://www.xilinx.com/warranty.htm
; IP cores may be subject to warranty and support
terms contained in a license issued to you by Xilinx. Xilinx products are not designed or intended to be fail-safe or for use in any application
requiring fail-safe performance; you assume sole risk and liability for use of Xilinx products in Critical Applications:
http://www.xilinx.com/warranty.htm#critapps
.
© Copyright 2012 Xilinx, Inc. Xilinx, the Xilinx logo, Artix, ISE, Kintex, Spartan, Virtex, Vivado, Zynq, and other designated brands included
herein are trademarks of Xilinx in the United States and other countries. All other trademarks are the property of their respective owners.
Revision History
The following table shows the revision history for this document.
Date Version Revision
04/24/2012 14.1 14.1 Release of Zynq™-7000 EPP device support.
05/28/2012 14.1 Updated 14.1 version.
05/31/2012 14.1 Corrected LED “D23” to “DS23” on page 22 and page 47.
07/25/2012 14.2 Book update for ISE Design Suite 14.2.
07/27/2012 14.2 Removed information specific to Zynq Silicon 1.0.
10/16/2012 14.3 Book update for ISE Design Suite 14.3. Major updates include:
• Updated title to match new Zynq taxonomy.
•Updated figures.
• Updated procedures to match GUI changes.
• Added Chapter 9, Creating Your own Intellectual Property and Device Driver for Linux
OS.
12/18/2012 14.4 Book update for ISE Design Suite 14.4.
• Updated information about training labs in Chapter 2, Chapter 3, Chapter 4, and Chapter 5.
• Validated tutorials throughout guide.
• Updated figures for the 14.4 software release, where applicable.
• Updated design files for 14.4 software release.
Zynq AP SoC CTT www.xilinx.com 3
UG873 (v14.4) December 18, 2012
Table of Contents
Chapter 1: Introduction
1.1 About this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.1 Take a Test Drive! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
1.1.2 Additional Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
1.1.3 Training Labs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
1.2 How Zynq AP SoC and EDK Simplify Embedded Processor Design . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.1 The ISE Design Suite, Embedded Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
1.2.2 The Embedded Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
1.3 How the ISE Tools Expedite the Design Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4 What You Need to Set Up Before Starting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.1 Installation Requirements: What You Need to Run EDK Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.2 Hardware Requirements for this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Chapter 2: Embedded System Design Using the Zynq Processing System
2.1 Embedded System Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.1 Take a Test Drive! Creating a New Embedded Project With a Zynq Processing System . . . . . . . . . . .11
2.1.2 Take a Test Drive! Exporting to SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
2.1.3 Take a Test Drive! Running the “Hello World” Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
2.1.4 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Chapter 3: Embedded System Design Using the Zynq Processing System and
Programmable Logic
3.1 Adding IPs in Fabric to Zynq PS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.1.1 Take a Test Drive! Checking the Functionality of the IPs Instantiated in the Fabric . . . . . . . . . . . . . . .24
3.1.2 Take a Test Drive! Working with SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
3.2 Standalone Application Software for the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2.1 Application Software Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
3.2.2 Application Software Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
Chapter 4: Debugging with SDK and ChipScope
4.1 Take a Test Drive! Debugging with Software Using SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2 Take a Test Drive! Debugging Hardware Using ChipScope Software . . . . . . . . . . . . . . . . . . . . 35
Chapter 5: Linux Booting and Application Debugging Using SDK
5.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2 Booting Linux on a Zynq Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.1 Boot Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Zynq AP SoC CTT www.xilinx.com 4
UG873 (v14.4) December 18, 2012
5.2.2 Booting Linux from JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
5.2.3 Take a Test Drive! Linux Booting Using JTAG Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
5.2.4 Take a Test Drive! Debugging the Linux Application Using SDK Remote Debugging . . . . . . . . . . . . . .44
5.2.5 Take a Test Drive! Booting Linux from QSPI Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
5.2.6 Take a Test Drive! Booting Linux From the SD Card. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
Chapter 6: System Design Using Processing System High Performance Slave Port
6.1 Integrating AXI CDMA with Zynq PS HP Slave Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.1.1 Take a Test Drive! Integrating AXI CDMA with the PS HP Slave Port . . . . . . . . . . . . . . . . . . . . . . . . . . .54
6.2 Standalone Application Software for the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2.1 Application Software Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
6.2.2 Take a Test Drive! Running the Standalone CDMA Application Using SDK . . . . . . . . . . . . . . . . . . . . . .62
6.3 Linux OS based Application Software for the CDMA system. . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.3.1 Application Software Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
6.4 Take a Test Drive! Running Linux CDMA Application using SDK . . . . . . . . . . . . . . . . . . . . . . . . 65
6.4.1 Booting Linux on the Target Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
6.4.2 Building an Application and Running it on the Target Board Using SDK . . . . . . . . . . . . . . . . . . . . . . . .65
Chapter 7: Software Profiling using SDK
7.1 Profiling an Application using SDK. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7.1.1 Take a Test Drive! Application Software Profiling using SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
7.1.2 Take a Test Drive! Running the Application with the Profiling Option . . . . . . . . . . . . . . . . . . . . . . . . . .70
Chapter 8: Accelerator Coherency (ACP) Port
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.2 ACP Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.2.1 ACP Coherent Read Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74
8.2.2 ACP Non-Coherent Read Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74
8.2.3 ACP Coherent Write Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
8.2.4 ACP non-coherent write requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
8.3 ACP Limitations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Chapter 9: Creating Your own Intellectual Property and Device Driver for Linux
OS
9.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
9.2 Creating Peripheral IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.2.1 Take a Test Drive! Creating Peripheral IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
9.3 Integrating Peripheral IP with PS GP Master Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.3.1 Take a Test Drive! Integrating Peripheral IP with the PS GP Master Port . . . . . . . . . . . . . . . . . . . . . . .79
9.4 Linux Based Device Driver Development for the Peripheral IP . . . . . . . . . . . . . . . . . . . . . . . . . 82
9.4.1 Take a Test Drive! Device Driver development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83
9.5 Loading Module into Running Kernel and Application Execution. . . . . . . . . . . . . . . . . . . . . . . 83
9.5.1 Loading Module into Kernel Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
9.5.2 Application Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
9.5.3 Take a Test Drive! Loading a Module into Kernel and Executing the Application . . . . . . . . . . . . . . . .84
Zynq AP SoC CTT www.xilinx.com 5
UG873 (v14.4) December 18, 2012
Appendix A: Additional Resources
A.1 Resources for This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.2 Training Labs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.3 Xilinx Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.4 EDK Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.5 EDK Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
- 1
- 2
- 3
- 4
前往页