开始使用Arty的基本系统设计
概述
本指南将提供一个在Vivado打开Arty Base System Design项目并在Xilinx SDK中入门的步骤。
At the end of this tutorial you will have:
-
在Xilinx Vivado打开了预制的微型硬件(HW)设计。
-
Imported and implemented a custom DigiLEDs IP block into the design.
-
Created .C Project in Xilinx Vivado SDK ( Software Development Kit) to interface with the Arty.
Prerequisites
技能
-
Familiarity with Vivado
-
块设计经验
硬件
-
Digilent Arty FPGA板
-
微型USB电缆
-
用于UART通信和JTAG编程
-
-
可编程RGB LED(WS2812,NeoPixels)
-
数据输入信号al wire connected to ARTY's JB1
-
Software
-
Xilinx Vivado 2015.3 or 2015.4 with the SDK package.
-
遵循本Wiki指南(Installing Vivado) on how to install and activate Vivado
-
Board Support Files
-
Arty支持文件
-
These files will describeGPIO在板上的接口,使选择FPGA板并添加更容易GPIOIP块。
-
遵循本Wiki指南(Vivado Board Files for Digilent 7-Series FPGA Boards)如何为Vivado安装板支持文件。
-
项目文件
-
Arty BSD教程文件: ZIP
Introduction
The Arty Base System Design is a pre-made project that routes all of the necessary hardware on the Arty to the Microblaze processor to be used in Xilinx SDK. This allows the user to jump straight into software design in SDK.
在本教程中,我们将在基本系统设计中添加自己的自定义IP块,以与某些可编程RGB LED一起使用。
General Design Flow
I. Vivado
-
Open Vivado
-
Execute the BSD tcl script to import the project
-
将数字自定义IP添加到项目的IP存储库中
-
Add the DigiLEDs IP to the design and configure it.
-
验证并保存块设计
-
创建HDL系统包装器
-
Run design Synthesis and Implementation
-
Generate Bit File
-
导出硬件设计,包括生成的位流文件到SDK工具
-
Launch SDK
现在,硬件设计导出到SDK工具。Vivado到SDK交接是通过Vivado内部完成的。我们将使用SDK创建一个软件应用程序,该应用程序将通过从Vivado导入硬件设计信息来使用自定义的板接口数据和FPGA硬件配置。
ii。SDK
-
Create new application project and select Empty Application template
-
导入main.c
-
Program FPGA
教程
1.创建一个新项目
1.1) Download and extract the project files to a directory you will remember. We will used“ C:/工作”for this tutorial.
1.2)类型“cd C:/Work/BSD/proj”在TCL控制台中。This will move you to the folder that contains the tcl script that will generate the BSD project.
2.添加我们的自定义IP存储库
3. Adding Our Custom IP
4.配置IP
5. Adding the LED Signal Pin
5.5) Copy the line below, and paste it within pins.xdc. This is the pin connected to Connector JB1.
set_property -dict {package_pin e15 iostandard lvcmos33} [get_ports {led_pin}];#io_l11p_t1_srcc_15 sch = jb_p [1]
5.6)保存销钉。xdc并关闭它。
6.删除/创建HDL系统包装器
7. Generating Bit File
8. Exporting Hardware Design to SDK
8.1)在窗口的左上角,从工具栏中单击File并选择Export Hardware。
This will export the hardware design with system wrapper for the Software Development Tool - Vivado SDK.
9.启动SDK
10. Inside SDK for Vivado
10.1) A new window for SDK will open. The HW design specification and included IP blocks are displayed in thesystem.hdffile. SDK tool is independent of Vivado, i.e. from this point, you can create your SW project in C/C++ on top of the exported HW design. If necessary, you can also launch SDK directly from the SDK folder created in the main Vivado Project directory.
Now, if you need to go back to Vivado and make changes to the HW design, then it is recommended to close the SDK window and make the required HW design edits in Vivado. After this you must follow the sequence of creating a new HDL wrapper, save design and bit file generation. This new bit file and system wrapper must then be exported to SDK.
Since we do not have any HW design edits at this point, we will proceed with creating a software application.
10.2) On the left corner of the main SDK window, you will find theProject Explorer控制板。Notice that there is a main project folder under the namesystem_wrapper_hw_platform_0。
system是您在Vivado创建的块设计的名称。该硬件平台具有所有HW设计定义,已添加的IP接口,外部输出信号信息和本地内存地址信息。
假设您是否已关闭SDK,对现有硬件设计进行了编辑,并将设计导出到SDK,然后在启动SDK工具后,您会找到一个名为::system_wrapper_hw_platform_1除了旧的HW设计,即system_wrapper_hw_platform_0。
11.在SDK中创建新的应用程序项目
11.3)完成上一步后,您将在该步骤中看到两个新文件夹Project Explorer控制板。**DigiLEDs** which contains all the binaries, .C and .H (Header) files **DigiLEDs_bsp** which is the board support folderDigiLEDsis our main working source folder. This also contains an important file shown here which is the “lscript.ld”. This is a Xilinx auto generated linker script file.
12. Adding the Main Source File
12.1) Navigate to your project files folder within the Work directory and find the “main.c” file.