收藏 分享(赏)

The_Zynq_Book_Tutorials_Aug_15.pdf

上传人:a****2 文档编号:3048833 上传时间:2024-01-18 格式:PDF 页数:186 大小:11.65MB
下载 相关 举报
The_Zynq_Book_Tutorials_Aug_15.pdf_第1页
第1页 / 共186页
The_Zynq_Book_Tutorials_Aug_15.pdf_第2页
第2页 / 共186页
The_Zynq_Book_Tutorials_Aug_15.pdf_第3页
第3页 / 共186页
The_Zynq_Book_Tutorials_Aug_15.pdf_第4页
第4页 / 共186页
The_Zynq_Book_Tutorials_Aug_15.pdf_第5页
第5页 / 共186页
The_Zynq_Book_Tutorials_Aug_15.pdf_第6页
第6页 / 共186页
亲,该文档总共186页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、The Zynq BookTutorials for Zybo and ZedBoardThe Zynq BookTutorials for Zybo and ZedBoardLouise H.CrockettRoss A.ElliotMartin A.EnderwitzDavid NorthcoteSeries Editors:Louise H.Crockett and Robert W.StewartDepartment of Electronic and Electrical EngineeringUniversity of StrathclydeGlasgow,Scotland,UKA

2、ugust 2015This 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 ReproduceThis book is available in print and as an electronic book(PDF format).Text and diagrams from this book may b

3、e reproduced in their entirety and used for non-profit academic purposes,provided that a clear reference to the originalsource 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 Z

4、edBoard,First Edition,Strathclyde Academic Media,2015.Requests to use content from this book for other than non-profit academic purposes should be made to .This book may not be reproduced in its original form and sold by any unauthorised third party.Tutorial FilesTutorial files are distributed via t

5、he books companion website:.Warning and DisclaimerThe best efforts of the authors and publisher have been used to ensure that accurate and current information is presented in this book.This includes researchingthe topics covered and developing examples.The material included is provided on an“as is”b

6、asis in the best of faith,and neither the authors and publishers makeany 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 forany loss or damage resulting directly or indirectly from any information co

7、ntained herein.TrademarksARM 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 reg

8、istered 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 us

9、e of trademarks in this book does not imply any affil-iation with,or endorsement of,this book by trademark owners.iAcknowledgementsThis is a new version of the tutorials accompanying The Zynq Book.It is based in Vivado 2015.1,and nowsupports both the ZedBoard and the Zybo development boards.A number

10、 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,Dami

11、en 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 onlyprovided vital feedback and support in the cr

12、eation of the tutorial material,but has also coordinated thedistribution of those materials to others.Louise Crockett,Ross Elliot,Martin Enderwitz,and David Northcote.August 2015.iiHow to Use This BookExample Files and Ebook VersionIn order to follow The Zynq Book Tutorials,you should download a set

13、 of prepared files from the bookswebsite:An electronic book(non-printable PDF)version of this set of tutorials can also be downloaded from theabove link.Instructions for Zybo and ZedBoard Development BoardsAs you read through the tutorials,you will notice that certain procedures have different varia

14、tionsdepending 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 iconin the left hand margin:for ZedBoardfor ZyboThe resumption of instructions common to b

15、oth boards is marked with another icon:Simply pick out the instructions relevant to your board,by identifying either the or icon,andthen look forward to find where to the main flow.Operating SystemThe Zynq Book Tutorials have been tested using the Microsoft Windows operating system.It is expectedtha

16、t they will also function on the Linux Kernel OS,although this has not been tested.ZedZyboResumeZedZyboResumeiii1.First Designs on Zynq 1Creating a First IP Integrator Design.4Creating a Zynq System in Vivado.12Creating a Software Application in the SDK.242.Next Steps in Zynq SoC Design 35Expanding

17、the Basic IP Integrator Design.38Creating a Zynq System with Interrupts in Vivado.42Creating a Software Application in the SDK.55Adding a Further Interrupt Source.613.Designing With Vivado HLS 67Creating Projects in Vivado HLS.70Design Optimisation in Vivado HLS.77Interface Synthesis.884.IP Creation

18、 91Creating IP in HDL.94Creating IP in MathWorks HDL Coder.118Creating IP in Vivado HLS.1285.Adventures with IP Integrator 137Importing IP to the Vivado IP Catalog.140Audio in Vivado IP Integrator.150Creating an Audio Software Application in SDK.166ContentsThe Zynq Book Tutorials11First Designs on Z

19、ynqv1.5,June 20152First Designs on ZRevision HistoryDateVersionChanges14/06/20131.0First release for Vivado Design Suite version 2013.119/06/20131.1Updated for changes in Vivado Design Suite version 2013.227/01/20141.2Updated for changes in Vivado Design Suite version 2013.430/04/20141.3Updated for

20、changes in Vivado Design Suite version 2014.11/04/20151.4Updated for changes in Vivado Design Suite version 2014.413/04/20151.4.1Updated to include Zybo development board for Vivado Design Suite version 2014.418/06/20151.5Updated for changes in Vivado Design Suite Version 2015.13First Designs on ZIn

21、troductionThis tutorial will guide you through the process of creating a first Zynq design using the Vivado IntegratedDevelopment Environment(IDE),and introduce the IP Integrator environment for the generation of asimple Zynq processor design to be implemented on a Zynq development board.The Softwar

22、e DevelopmentKit(SDK)will then be used to create a simple software application which will run on the Zynqs ARMProcessing System(PS)to control the hardware that is implemented in the Programmable Logic(PL).The tutorial is split into three exercises,and is organised as follows:Exercise 1A-This exercis

23、e will guide you through the process of launching Vivado IDE and creating aproject for the first time.The various stages of the New Project Wizard will be introduced.Exercise 1B-In this exercise,we will use the project that was created in Exercise 1A to build a simple Zynqembedded system with the gr

24、aphical tool,IP Integrator,and incorporating existing IP from the Vivado IPCatalog.A number of design aids will be used throughout this exercise,such as the Board Automationfeature which automates the customisation of IP modules for a specified device or board.The DesignerAssistance feature,which as

25、sists with the connections between the Zynq PS and the IP modules in the PLwill also be demonstrated.Once the design is finished,a number of stages will be undertaken to complete the hardware system andgenerate a bitstream for implementation in the PL.The completed hardware design will then be expor

26、ted tothe Software Development Kit(SDK)for the development of a simple software application in Exercise 1C.Exercise 1C-In this short third exercise,the SDK will be introduced,and a simple software application willbe created to allow the Zynq processor to interact with the IP implemented in the PL.A

27、connection to thehardware server that allows the SDK to communicate with the Zynq processors will be established.Thesoftware drivers that are automatically created by the Vivado IDE for IP modules will be explored andintegrated into the software application,before finally building and executing the

28、software application onthe Zynq.NOTE:Throughout all of the practical tutorial exercise we will be using C:Zynq_Book as the workingdirectory.If this is not suitable,you can substitute it for a directory of your choice,but you should be awarethat you will be required to make alterations to some source

29、 files in order to complete exercises successfully.4First Designs on ZExercise 1A:Creating a First IP Integrator DesignCreating a First IP Integrator DesignIn this exercise we will create a new project in Vivado IDE by moving through the stages of theVivado IDE New Project Wizard.The Zybo requires a

30、 one time additional set-up procedure in order to set the Default Partcorrectly.This is necessary as Vivado 2015.1 does not contain a board part for the Zybodevelopment board.If you have already configured Vivado 2015.1 with the Zybo board part,youcan skip this procedure and start from Step(a).Open

31、windows explorer and navigate to the following location within the Zynq book sourcefiles:C:Zynq_Booksourceszybosetupboard_partIn this directory you will see a file named zybo.This contains the board part for the Rev.B.3Zybo development board.You may also check the revision of your Zybo by inspecting

32、 thebottom side of your board.Updated board parts can be retrieved from the Digilent Websiteusing the following link:https:/ the zybo file by right clicking on the file and selecting copy as shown below:Open a second windows explorer and navigate to the following location in the Vivado 2015.1install

33、ation directory:Vivado installation directory2015.1databoardsboard_partszynqThis directory is responsible for all the board parts of different Zynq boards that can be usedin the Vivado 2015.1 design suite.We will now be adding the Zybo development board to thedirectory.You may find that a file named

34、 zybo already exists,ignore this and carry on with theExercise1AZybo5First Designs on ZExercise 1A:Creating a First IP Integrator Designfollowing procedure.Right click on a blank space in the folder and select paste as shown below:A dialogue window may appear asking to merge the incoming folder if a

35、 zybo folder currentlyexists.Click Yes.You have now successfully added the Zybo board part to the Vivado 2015.1 Design Suite.We will start by launching the Vivado IDE.(a)Launch Vivado by double-clicking on the Vivado desktop icon:,or by navigating to Start All Programs Xilinx Design Tools Vivado 201

36、5.1 Vivado 2015.1(b)When Vivado loads,you will be presented with the Getting Started screen as in Figure 1.1.ResumeFigure 1.1:Vivado IDE Getting Started Screen6First Designs on ZExercise 1A:Creating a First IP Integrator Design(c)Select the option to Create New Project and the New Project Wizard wil

37、l open,as in Figure 1.2.Click Next.(d)At the Project Name dialogue,enter first_zynq_design as the Project name and C:/Zynq_Book as Project location.Make sure that you select the option to Create project subdirectory.All options should bethe same as shown below:Click Next.A directory named Zynq_Book

38、will be created on your C drive if it did not already exist.(e)At the Project Type dialogue,select RTL Project and ensure that the option Do not specifysources at this time is not selected:Click Next.Figure 1.2:New Project Dialogue7First Designs on ZExercise 1A:Creating a First IP Integrator Design(

39、f)Select VHDL as the Target language and Mixed as the Simulator Language in the AddSources dialogue:If existing sources,in the form of HDL or netlist files,were to be added to the project theycould be imported at this stage.As we do not have any sources to add to the project,click Next.(g)The Add Ex

40、isting IP(optional)dialogue will open.If existing IP sources were to be included in the project,they could be added here.As we do not have any existing IP to add,click Next.(h)The Add Constraints(optional)dialogue will open.This is the stage where any physical or timing constraints files could be ad

41、ded to the project.As we do not have any constraints files to add,click Next.(i)From the Default Part dialogue window,Select Boards from the Select dialogue,click ZedBoard Zynq Evaluation and DevelopmentKit from the Display Name list and All from the Board Rev list,as shown in Figure 1.3.Selectthe a

42、ppropriate revision for your board(in this case Rev.D has been selected).Click Next.ZedFigure 1.3:Zedboard Default Part Dialogue Options 8First Designs on ZExercise 1A:Creating a First IP Integrator DesignSelect Boards from the Select dialogue,click Zybo from the Display Name list and All from theBo

43、ard Rev list,as shown in Figure 1.4.Select the appropriate revision for your board(in thiscase Rev.B.3 has been selected).Click Next.(j)In the New Project Summary dialogue,review the specified options,and click Finish to createthe project.Now that we have created our first project in Vivado IDE,we c

44、an now move on to creating our first Zynqembedded system design.Before doing that,the Vivado IDE tool layout should be introduced.The default Vivado IDE environmentlayout is shown in Figure 1.5(other layouts can be chosen by selecting different perspectives).This layout isspecifically targeted for t

45、he Zedboard.If you are using the Zybo,you will see a slightly different layout.With reference to the numbered labels in Figure 1.5,the main components of the Vivado IDE environmentare:1.Menu Bar-The main access bar gives access to the Vivado IDE commands.2.Main Toolbar-The main toolbar provides easy

46、 access to the most commonly used Vivado IDEcommands.Tooltips provide information about each command on the toolbar and these can beviewed by hovering the mouse pointer over the buttons,as shown in Figure 1.6.ZyboFigure 1.4:Zybo Default Part Dialogue Options Resume9First Designs on ZExercise 1A:Crea

47、ting a First IP Integrator Design3.Workspace-The workspace provides a larger area for panels which require a greater screenspace and those with a graphical interface,such as:Schematic panelDevice panelPackage panelFigure 1.5:Vivado IDE Environment Layout(Zedboard)31245867Figure 1.6:Toolbar tooltips1

48、0First Designs on ZExercise 1A:Creating a First IP Integrator DesignText editor panel4.Project Status Bar-The project status bar displays the status of the currently active design.5.Flow Navigator-The Flow Navigator provides easy access to the tools and commands that arenecessary to guide your desig

49、n from start to finish,starting in the Project Manager section withdesign entry and ending with bitstream generation in the Program and Debug section.Runcommands are available in the Simulation,Synthesis and Implementation sections to simulate,synthesise and implement the active design.6.Data Window

50、s Pane-The Data Windows pane,by default,displays information that relates todesign data and sources,including:Properties window-Shows information about selected logic objects or device resources.Netlist window-Provides a hierarchical view of the synthesised or elaborated logic design.Sources window-

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 实用范文 > 工作总结

copyright@ 2008-2023 wnwk.com网站版权所有

经营许可证编号:浙ICP备2024059924号-2