Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vivado:getting_started_with_zynq:start [2017/09/25 18:02] – Arthur Brown | vivado:getting_started_with_zynq:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| <WRAP round important 660px> | <WRAP round important 660px> | ||
| - | === Warning | + | === Important! |
| - | This page is a work in progress. | + | This guide is obsolete, the updated guide can be found [[: |
| </ | </ | ||
| + | |||
| + | {{: | ||
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| - | * Vivado | + | * A Vivado |
| - | * Familiarity | + | * Basic familiarity |
| - | * Digilent Board Files | + | * Digilent Board Files installed to make selection of a target board and configuration of the Zynq IP block easier. See [[software: |
| + | * A Digilent Zynq Development Board to run the project on. | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| Line 18: | Line 21: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 1.1 === | === 1.1 === | ||
| - | Click //Create Project//. | + | With Vivado freshly opened, click // |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 30: | Line 34: | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 36: | Line 41: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 1.3 === | === 1.3 === | ||
| - | Here we will select | + | The first step is to set the name of the project. Vivado |
| + | <WRAP center round important> | ||
| + | === Important === | ||
| + | Do NOT use spaces in the project name or location path. This will cause problems with Vivado. Instead use an underscore, a dash, or [[wp> | ||
| + | </ | ||
| + | Click // | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 45: | Line 56: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 1.4 === | === 1.4 === | ||
| - | This screen | + | At the Select Project Type screen, choose //RTL Project// and check the //Do not specify sources at this time// box. Advanced users may want to use the other options on this screen, but they will not be covered in this guide. |
| + | |||
| + | Click // | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 54: | Line 68: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 1.5 === | === 1.5 === | ||
| + | This screen selects the part targeted by the project. If you haven' | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 1.6 === | ||
| This screen summarizes selections chosen in the previous screens. Click //Next// to finish opening the new project. | This screen summarizes selections chosen in the previous screens. Click //Next// to finish opening the new project. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 2. The IP Integrator ==== | + | ==== 2. Open the IP Integrator ==== |
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| === 2.1 === | === 2.1 === | ||
| - | A more complete run-down of the default | + | A more complete run-down of the standard |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 73: | Line 99: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 2.2 === | === 2.2 === | ||
| - | FIXME //Bullet-Point Overview of IPI// | + | In the dialog box, give the block design a name. The directory location is where the block design will be stored, this can be changed, but it is recommended to leave it as //<Local to Project>//. Make sure that //Specify source set// is set to //Design Sources// |
| + | <WRAP center round important> | ||
| + | === Important === | ||
| + | Do NOT use spaces in the block design name or directory path. This will cause problems with Vivado. Instead use an underscore, a dash, or [[wp> | ||
| + | </ | ||
| + | Click //OK// to create the block design and open IPI. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== 3. IP Integrator Tools ==== | ||
| + | |||
| + | As a general overview, Zynq designs consist of two areas, the processor, and the FPGA. The processor has some additional hardware surrounding it, and connects to other peripherals on the board that are not part of the Zynq chip. The FPGA also connects to other on board hardware. The communications protocol used to move data between the FPGA and processor, as well as between pieces of the FPGA, is called AXI. | ||
| + | |||
| + | Each AXI peripheral programmed onto the FPGA will be assigned an area of the Zynq's memory space that will be used to address each of its control registers. Adding a simple AXI interface to a design will require the addition of two new blocks, the AXI Interconnect, | ||
| + | |||
| + | Much of basic Zynq design consists of connecting different AXI peripherals to the processor, clocking them appropriately, | ||
| + | |||
| + | With this context out of the way, many of the tools that can be used to create a design in Zynq will be described. | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 2.3 === | + | === 3.1 === |
| - | FIXME //Bullet-Point Overview | + | The //Sources// tab, highlighted in orange in the image to the right, contains several sub-tabs, of these, // |
| + | |||
| + | The // | ||
| + | |||
| + | The //IP Sources// sub-tab shows the files generated when a new IP core has been added to the block design. Some annoying errors can be solved by right clicking on the block design in this screen and selecting //Reset Output Products// followed by //Generate Output Products//. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 90: | Line 137: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 2.4 === | + | === 3.2 === |
| - | With a general understanding | + | When the //Design// tab is selected, |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 3. Add the Zynq Block ==== | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 3.3 === | ||
| + | The //Signals// tab allows the user to view lists of all clock and reset signals in the block design. As before, selecting an entry in either of these lists will highlight that signal in the block design diagram. This tool can be useful for figuring out where data crosses clock domains in a more complicated design. | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 3.1 === | + | === 3.4 === |
| - | The core of most IPI designs for a Zynq board is the Zynq block. Select | + | The //Board// tab displays all of the external connections that Digilent has provided as part of the board file selected as part of creating the project. This tool makes connecting these ports to a design extremely straightforward. The process of connecting one of these ports will be gone through later in this guide. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 110: | Line 167: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 3.2 === | + | === 3.5 === |
| - | Before doing anything else, select | + | The //Properties// pane, found below the tabbed pane described above, shows the properties |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 119: | Line 177: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 3.3 === | + | === 3.6 === |
| - | Make sure that the FIXED_IO and DDR connections will be created | + | Most of the upper right of the Vivado window is taken up by the //Diagram// pane. This pane displays a graphical rendition |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 128: | Line 187: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 3.4 === | + | === 3.7 === |
| - | Make sure that the //Board Preset// will be applied by checking | + | The //Address Editor// tab, contained in the same pane as the Diagram, describes |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 137: | Line 197: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 3.5 === | + | === 3.8 === |
| - | Click //Finish// to have Vivado add these connections and apply the preset. When this process | + | The first tab of the pane at the bottom of the window is the //TCL Console//. This tool displays the scripted commands that Vivado |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 4. Configure the Zynq Block ==== | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 3.9 === | ||
| + | The // | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 4.1 === | + | === 3.10 === |
| - | Additional changes can be made to the Zynq block' | + | The //Reports// tab contains a list of different reports that Vivado generates as part of the process |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 157: | Line 227: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 4.2 === | + | === 3.11 === |
| - | FIXME //Overview Tabs// | + | By selecting |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | === 3.12 === | ||
| + | The toolbar at the left of the //Diagram// pane has a large number of buttons that all do different things. | ||
| + | * //Block Design Options// ({{: | ||
| + | * //Zoom In// ({{: | ||
| + | * //Zoom Out// ({{: | ||
| + | * //Zoom Fit// ({{: | ||
| + | * //Select Area// ({{: | ||
| + | * //Fit Selection// ({{: | ||
| + | * //Search// ({{: | ||
| + | * //Add IP// ({{: | ||
| + | * //Make External// ({{: | ||
| + | * //Customize Block// ({{: | ||
| + | * //Validate Design// ({{: | ||
| + | * //IP Settings// ({{: | ||
| + | * // | ||
| + | * //Optimize Routing// ({{: | ||
| + | * //Show Interface Connections Only// ({{: | ||
| + | |||
| + | Additionally, | ||
| + | |||
| + | With a general understanding of the actions that can be taken in the IPI, a design can now be created. | ||
| + | |||
| + | ==== 4. Add the Zynq Block ==== | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 4.3 === | + | === 4.1 === |
| - | FIXME //Expanded Overviews for tabs that require more than one image (interrupt, clocks, enable HP0/GP0, etc.)// | + | The core of most IPI designs for a Zynq board is the Zynq block. Click the //Add IP// ({{: |
| + | |||
| + | The block that is added represents the Zynq ARM processor and its available connections to other hardware on the Zynq chip, including the FPGA. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 175: | Line 273: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 4.4 === | + | === 4.2 === |
| - | Since the target design for this guide requires no major changes to the Zynq block' | + | Before doing anything else, select //Run Block Automation// in the green tab at the top of the block design |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 5. Add Peripherals ==== | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 4.3 === | ||
| + | The //Options// box shows what will be done when OK is clicked. FIXED_IO and DDR connections will be made external automatically. FIXED_IO represents all of the on-chip peripherals that can be enabled when configuring the Zynq block (more on this later), while the DDR connection represents the processor' | ||
| + | |||
| + | Make sure that //Apply Board Preset// is checked, so that various important settings like DDR timings will be imported from the selected target board file. Applying these settings manually is extremely tedious and easy to get wrong. | ||
| + | |||
| + | Cross Trigger In/Out are outside of the scope of this guide, so leave them // | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 5.1 === | + | === 4.4 === |
| - | In order to connect | + | Click // |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== 5. Configure the Zynq Block ==== | ||
| + | |||
| + | === 5.1 === | ||
| + | Additional changes can be made to the Zynq block' | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| === 5.2 === | === 5.2 === | ||
| - | The first way to connect a peripheral to the processor | + | The page that is open when the Re-Customize dialog is launched for the Zynq block is called |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 205: | Line 323: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 5.3 === | === 5.3 === | ||
| - | This launches a dialog that provides | + | The //PS-PL Configuration// |
| + | * The UART baud rate settings found in the //General// drop-down are used to change | ||
| + | * //GP/HP Slave AXI Interfaces// (General Purpose / High Performance) are used when an AXI peripheral requires control over a memory interface, this can be seen in Digilent' | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 214: | Line 336: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 5.4 === | === 5.4 === | ||
| - | This will place a general purpose input/output controller into the block design. Required configuration settings for the size of the GPIO channel will already | + | The //Peripheral I/O Pins// page allows |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 223: | Line 346: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 5.5 === | === 5.5 === | ||
| - | Since an AXI GPIO controller with a free channel - each block can control up to two different peripherals - already exists, when making a connection with the //User Buttons// port, the option of connecting the port to the second channel of axi_gpio_0 will be available. Select | + | The //MIO Configuration// page shares much of its information with Peripheral I/O Pins, and allows |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | < | + | < |
| - | === Tip === | + | <WRAP column half> |
| - | A Xilinx Design Constraints file can be used to constrain | + | === 5.6 === |
| + | The //Clock Configuration// | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| </ | </ | ||
| - | ==== 6. Connect | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 5.7 === | ||
| + | The //DDR Configuration// | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 5.8 === | ||
| + | The // | ||
| + | |||
| + | Additionally, | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Since the target design for this guide requires no major changes to the Zynq block' | ||
| + | |||
| + | ==== 6. Add Peripherals ==== | ||
| + | |||
| + | In order to use the Zynq processor to control the board' | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| === 6.1 === | === 6.1 === | ||
| - | At this point, | + | In the //Board// tab to the left of the diagram pane, right click on //RGB LEDs// and select //Connect Board Component//. If the board does not have RGB LEDs, use the normal LEDs instead. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 248: | Line 404: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 6.2 === | === 6.2 === | ||
| - | Make sure that the axi_gpio_0 block is checked in the menu to the left. Several options are present here, including the clock that the AXI Interface will run off of. Click //Finish// to generate the AXI connection and its related blocks. | + | This launches a dialog |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 257: | Line 414: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 6.3 === | === 6.3 === | ||
| - | AXI is the communications protocol that is used by the Zynq processor to communicate with each of the peripheral controllers in the design. | + | This will place a general purpose input/ |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 7. Generate | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 6.4 === | ||
| + | Since an AXI GPIO controller with a free channel - each block can control up to two different peripherals - already exists, when making a connection with the //User Buttons// port, the option of connecting the port to the second channel of axi_gpio_0 will be available. Select this option from the menu, then continue. | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP round center tip> | ||
| + | === Tip === | ||
| + | A Xilinx Design Constraints file can be used to constrain additional inputs and outputs, or in ways that were not anticipated by the creators of Digilent' | ||
| + | </ | ||
| + | |||
| + | ==== 7. Connect the AXI Blocks to the Zynq Block ==== | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| === 7.1 === | === 7.1 === | ||
| - | At this point, | + | At this point, the green bar at the top of the screen will have reappeared, this time saying |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 277: | Line 451: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 7.2 === | === 7.2 === | ||
| - | With a validated design, a bitstream can now be generated. The Getting Started with Vivado guide explains this process | + | Make sure that the axi_gpio_0 block is checked |
| + | |||
| + | Click //Finish// to generate the AXI connection and its related blocks. | ||
| + | |||
| + | At this point the block diagram may have become very messy, | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== 8. Generate the Bitstream ==== | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 7.3 === | + | === 8.1 === |
| - | Vivado will ask whether | + | At this point, a complete design has been created. Click the //Validate Design// button ({{: |
| + | |||
| + | Click //OK// to continue. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 294: | Line 478: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 7.4 === | + | === 8.2 === |
| - | Vivado will ask how many jobs should | + | The last thing that needs to be done before generating a bitstream is to create a top module file. This file will take the block design and interpret it into a hardware design language so that the synthesis and implementation tools can work properly. Right click on the block design in the //Sources// tab in the pane to the left of the //Block Design// pane - this pane likely has the //Board// tab currently selected. |
| + | |||
| + | In the right-click menu, select //Create HDL Wrapper//. In the confirmation dialog that pops up, make sure that //Let Vivado | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 303: | Line 490: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 7.5 === | + | === 8.3 === |
| - | With the bitstream generated, Vivado will ask what to do next. None of the options available are required for this guide, | + | With a validated design and a top module, a bitstream |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 8. Launch Vivado SDK ==== | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 8.4 === | ||
| + | The Launch Runs dialog that pops up has several options to choose between. Select //Launch runs on local host// to actually generate the bitstream now. The other option is to //Generate scripts only//, which will not generate a bitstream, but rather the scripts required to generate the bitstream on a different machine. The //Number of jobs// field allows the user to change how much of the resources of the computer Vivado is running on will be used. This process can take some time for complex designs, so it is recommended to devote as much of the resources as possible (typically by selecting ' | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.1 === | + | === 8.5 === |
| + | In the next dialog, No Implementation Results Available, Vivado will ask whether to run Synthesis and Implementation. These steps are required to generate a bitstream, so click //Yes//. | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 8.6 === | ||
| + | Once the bitstream is generated, which may take a little while, Vivado will ask what to do next. None of the available options are required for this guide, so click // | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== 9. Launch Vivado SDK ==== | ||
| Before Vivado SDK can be launched, it needs to be provided with a hardware handoff file, containing the bitstream and various other information about the peripherals installed in the design. | Before Vivado SDK can be launched, it needs to be provided with a hardware handoff file, containing the bitstream and various other information about the peripherals installed in the design. | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 9.1 === | ||
| + | In the //File// drop-down, select //Export// then //Export to SDK//. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 323: | Line 544: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.2 === | + | === 9.2 === |
| - | In the //File// dropdown, select | + | Make sure that the //Include Bitstream// box is checked, so that the FPGA can be programmed from Vivado SDK. The // |
| + | <WRAP center round important> | ||
| + | === Important === | ||
| + | Do NOT use spaces in the export location path. This will cause problems with Vivado. Instead use an underscore, a dash, or [[wp> | ||
| + | </ | ||
| + | Click //OK// to continue. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 332: | Line 559: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.3 === | + | === 9.3 === |
| - | Make sure that the //Include Bitstream// box is checked, and that the //Export Location// is //<Local To Project>//, then click //OK//. | + | Just below //Export// in the //File// drop-down, select |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 341: | Line 569: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.4 === | + | === 9.4 === |
| - | Just below //Export// in the //File// dropdown, select | + | The dialog that pops up will tell Vivado where to find the exported files, as well as where to create the SDK workspace. Make sure to set //Exported Location// to the location chosen earlier. The //Workspace// field is //<Local To Project>// |
| + | <WRAP center round important> | ||
| + | === Important === | ||
| + | Do NOT use spaces in the workspace path. This will cause problems with Vivado. Instead use an underscore, a dash, or [[wp> | ||
| + | </ | ||
| + | Click //OK// to continue. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== 10. Create a New C Project ==== | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.5 === | + | === 10.1 === |
| - | The dialog that pops up will tell Vivado | + | Vivado |
| + | * The // | ||
| + | * The //File View//, directly in the center of the window, displays currently opened files. Upon launch of SDK, an overview of the hardware platform exported from Vivado is displayed. Note the AXI GPIO cell contained in the Address Map, and the corresponding entry in the list of IP blocks. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| Line 359: | Line 598: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.6 === | + | === 10.2 === |
| - | SDK will now launch, and will import | + | In order to create a project to store C source code, click //File// in the top toolbar, followed by //New > Application Project//. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | ==== 9. Create a New Project ==== | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | === 8.1 === | + | === 10.3 === |
| - | With Vivado SDK open, a new Application Project needs to be created... | + | In the New Project dialog, give the project |
| + | <WRAP center round important> | ||
| + | === Important === | ||
| + | Do NOT use spaces in the project name. This will cause problems with Vivado. Instead use an underscore, a dash, or [[wp> | ||
| + | </ | ||
| + | Click //Next// to continue. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| + | {{ : | ||
| </ | </ | ||
| </ | </ | ||
| - | FIXME //Finish Copy-Paste | + | <WRAP group> |
| + | <WRAP column half> | ||
| + | === 10.4 === | ||
| + | From the list of Available Templates, select //Empty Application//, | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 10.5 === | ||
| + | Expand the newly created project - not its board support package - then expand the ' | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 10.6 === | ||
| + | Name the new source file ' | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 10.7 === | ||
| + | The new main file will now open in the file view pane. Copy-Paste | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | < | ||
| + | #include " | ||
| + | #include " | ||
| + | |||
| + | int main() { | ||
| + | XGpio gpio; | ||
| + | u32 button_data; | ||
| + | |||
| + | // look up the settings for the AXI GPIO IP core and initialize a driver for it | ||
| + | XGpio_Initialize(&gpio, XPAR_AXI_GPIO_0_DEVICE_ID); | ||
| + | |||
| + | // set LED channel (1) tristates to all output | ||
| + | XGpio_SetDataDirection(& | ||
| + | //set Button channel (2) tristates to all input | ||
| + | XGpio_SetDataDirection(& | ||
| + | |||
| + | while (1) { | ||
| + | //capture button data | ||
| + | button_data = XGpio_DiscreteRead(& | ||
| + | |||
| + | //if any button is pressed, set all LED pins high, else turn LEDs off | ||
| + | if (button_data != 0) { | ||
| + | XGpio_DiscreteWrite(& | ||
| + | } | ||
| + | else { | ||
| + | XGpio_DiscreteWrite(& | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== 11. Program and Run the Design ==== | ||
| + | |||
| + | The next step is to program the bit file onto the FPGA and run the C source on the processor. | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 11.1 === | ||
| + | From the top toolbar, select //Xilinx Tools//, then //Program FPGA//. | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 11.2 === | ||
| + | Leave all of the settings in the Program FPGA dialog as they are, then click // | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP column half> | ||
| + | === 11.3 === | ||
| + | Right click on the application project in the //Project Explorer//, then select //Run As > Launch on Hardware (System Debugger)// | ||
| + | </ | ||
| + | <WRAP column half> | ||
| + | {{ : | ||
| + | </WRAP> | ||
| + | </WRAP> | ||
| - | ==== 10. Program and Run the Design | + | ==== Congratulations! |
| + | The project will now be running on the Zynq board, press the buttons to see the LEDs flip on and off. | ||
| / | / | ||

