The Zynq® Book
Tutorials
for Zybo and ZedBoard
The Zynq® Book
Tutorials
for Zybo and ZedBoard
Louise H. Crockett
Ross A. Elliot
Martin A. Enderwitz
David Northcote
Series Editors: Louise H. Crockett and Robert W. Stewart
Department of Electronic and Electrical Engineering
University of Strathclyde
Glasgow, Scotland, UK
August 2015
This edition first published August 2015 by Strathclyde Academic Media.
© Louise H. Crockett, Ross A. Elliot, Martin A. Enderwitz and David Northcote.
Open Source Licence to Use and Reproduce
This book is available in print and as an electronic book (PDF format).
Text and diagrams from this book may be reproduced in their entirety and used for non-profit academic purposes, provided that a clear reference to the original
source is made in all derivative documents. This reference should be of the following form:
L. H. Crockett, R. A. Elliot, M. A. Enderwitz and D. Stewart, The Zynq Book Tutorials for Zybo and ZedBoard, First Edition, Strathclyde Academic Media, 2015.
Requests to use content from this book for other than non-profit academic purposes should be made to info@zynqbook.com.
This book may not be reproduced in its original form and sold by any unauthorised third party.
Tutorial Files
Tutorial files are distributed via the book’s companion website: www.zynqbook.com.
Warning and Disclaimer
The best efforts of the authors and publisher have been used to ensure that accurate and current information is presented in this book. This includes researching
the topics covered and developing examples. The material included is provided on an “as is” basis in the best of faith, and neither the authors and publishers make
any warranty of any kind, expressed or implied, with regard to the documentation contained in this book. The authors and publisher shall not be held liable for
any loss or damage resulting directly or indirectly from any information contained herein.
Trademarks
ARM is a registered trademark of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved.
This publication is independent and it is not affiliated with, or endorsed, sponsored or authorised by ARM Limited.
Xilinx, the Xilinx logo, ISE, Vivado, and Zynq are registered trademarks of Xilinx. All rights reserved.
MATLAB and Simulink are registered trademarks of MathWorks, Inc.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
All other trademarks used in this book are acknowledged as belonging to their respective companies. The use of trademarks in this book does not imply any affil-
iation with, or endorsement of, this book by trademark owners.
Acknowledgements
This is a new version of the tutorials accompanying The Zynq Book. It is based in Vivado 2015.1, and now
supports both the ZedBoard and the Zybo development boards.
A number of people contributed valuable of feedback on the original set of tutorials, on which these are
based. Austin Lesea and Y. C. Wang at Xilinx tested the tutorials at an early stage in their creation, and gave
us several useful suggestions. At the University of Strathclyde, Iain Chalmers, Sarunas Kalade, Damien Muir
and Craig Ramsay have also been greatly helpful in working through various versions of the tutorials and
telling us about their user experiences.
Once again, our sincerest thanks must go to Cathal McCabe of Xilinx University Program, who has not only
provided vital feedback and support in the creation of the tutorial material, but has also coordinated the
distribution of those materials to others.
Louise Crockett, Ross Elliot, Martin Enderwitz, and David Northcote.
August 2015.
i
How to Use This Book
Example Files and Ebook Version
In order to follow The Zynq Book Tutorials, you should download a set of prepared files from the book’s
website:
www.zynqbook.com
An electronic book (non-printable PDF) version of this set of tutorials can also be downloaded from the
above link.
Instructions for Zybo and ZedBoard Development Boards
As you read through the tutorials, you will notice that certain procedures have different variations
depending on the development board being used. Where a sequence of instructions is board-specific (i.e.
relating either to the ZedBoard or the Zybo), the start of the sequence is indicated by a coloured block icon
in the left hand margin:
Zed
Zybo
for ZedBoard
for Zybo
The resumption of instructions common to both boards is marked with another icon:
Resume
Simply pick out the instructions relevant to your board, by identifying either the
then look forward to find where to
the main flow.
Resume
Zed
Zybo
or
icon, and
Operating System
The Zynq Book Tutorials have been tested using the Microsoft Windows operating system. It is expected
that they will also function on the Linux Kernel OS, although this has not been tested.
ii
Contents
1. First Designs on Zynq
2. Next Steps in Zynq SoC Design
5. Adventures with IP Integrator
1
Creating a First IP Integrator Design ........................................................................................... 4
Creating a Zynq System in Vivado .............................................................................................12
Creating a Software Application in the SDK ..........................................................................24
35
Expanding the Basic IP Integrator Design ..............................................................................38
Creating a Zynq System with Interrupts in Vivado ..............................................................42
Creating a Software Application in the SDK ..........................................................................55
Adding a Further Interrupt Source ............................................................................................61
67
Creating Projects in Vivado HLS .................................................................................................70
Design Optimisation in Vivado HLS ..........................................................................................77
Interface Synthesis ..........................................................................................................................88
91
Creating IP in HDL ............................................................................................................................94
Creating IP in MathWorks HDL Coder ................................................................................... 118
Creating IP in Vivado HLS ........................................................................................................... 128
137
Importing IP to the Vivado IP Catalog ................................................................................... 140
Audio in Vivado IP Integrator ................................................................................................... 150
Creating an Audio Software Application in SDK ............................................................... 166
3. Designing With Vivado HLS
4. IP Creation
iii