分享
The_Zynq_Book_Tutorials_Aug_15.pdf
下载文档

ID:3048833

大小:11.65MB

页数:186页

格式:PDF

时间:2024-01-18

收藏 分享赚钱
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,汇文网负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
网站客服:3074922707
The_Zynq_Book_Tutorials_Aug_15
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,UKAugust 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 be 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 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 .This book may not be reproduced in its original form and sold by any unauthorised third party.Tutorial FilesTutorial files are distributed via the 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”basis 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 contained 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 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.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 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 onlyprovided vital feedback and support in the creation 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 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 variationsdepending 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 both 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 expectedthat 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 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 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 Zynqv1.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 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 ZIntroductionThis 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 Software 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 exercise 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 graphical 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 assists 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 exported 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 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 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 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 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 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 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.1installation 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 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 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 2015.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 will 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 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(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 Existing 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 added 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 appropriate 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 theBoard 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 can 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 the 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 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:Creating 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 tooltips10First 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 design 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 Windows 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-

此文档下载收益归作者所有

下载文档
你可能关注的文档
收起
展开