Giter Club home page Giter Club logo

poc-fpga's Introduction

FPGA Development Suite

切换到中文版

Contents

1 FP1-based FPGA Development Suite

1.1 Overview

The FP1-based FPGA development suite is a cloud FPGA hardware/software development kit based on Huawei enterprise cloud services. This suite helps users to design, simulate, implement, and one-click compilation run on FPGA, and provides professional design and verification components to help users efficiently implement FPGA development. The suite provides tools for hardware and software development, respectively. The hardware development suite helps users to complete project compilation, simulation, generate the .dcp or .xclbin file, and register an FPGA image. The software development suite guides users to load an FPGA image, and compile and debug user applications.

1.2 Preparations

Before using the FPGA development suite, you must perform 1.2.1~1.2.3 steps to complete the development kit acquisition and tool installation and configuration. The hardware development tools are stored in the hardware directory, including Vivado and SDAccel development tools. The software development tools are stored in the software directory, including configure files, drivers, tools, and related applications which are needed when running instances.

1.2.1 Downloading Suite

  • For HTTPS connections, run the git clone https://github.com/fpga_accel/poc-fpga.git command to download the suite.

  • For SSH connections, run the git clone [email protected]:fpga_accel/poc-fpga.git command to download the suite.

Ensure that the ECS is bound with an EIP before using the ECS to download the development suite.
Ensure that the Git tool is installed before downloading the development suite.

1.2.2 Configuring Intranet DNS

After the intranet DNS is configured, the ECS can access relevant cloud services through the intranet of the virtual private cloud, providing users with a more stable and reliable network environment. For more information, see the "Configuring Intranet DNS" section in the FACS User's Guide.

1.2.3 configuring and Installing the FPGA Image Management Tool

The fisclient is a cross-platform command-line interface (CLI) tool used for FPGA image management, which is mandatory before FPGA image loading. By using fisclient, you can register, delete, and query FPGA images (AEIs), or manage the association between AEIs and elastic cloud server (ECS) images. You can associate an AEI with an ESC image, and release the AEI to the cloud market or share it with other users through the ESC image.

For details, please see the chapter of installation and configuration in fisclient README.

2 FPGA Development Guide for High-Performance Architecture

When a high-performance architecture is used, the FPGA development is divided to three scenarios: hardware development, software development, and example using. During hardware development, you can generate and register an FPGA image by using the Vivado tools. During software development, you can develop applications based on the existing FPGA image. By using examples, you can quickly master the FPGA development process under the current server architecture.

2.1 Hardware Development Process

When a high-performance architecture FACS is used, the FPGA hardware development is based on the Vivado tools. This development process guides users to create, compile, and simulate a project, generate a .dcp file, and register an FPGA image (AEI, Accelerated Engine Image). After the hardware development, if you need to develop your own applications based on the registered FPGA image, see section 2.2.

2.1.1 Generating a DCP File

For details about how to develop a .dcp file based on the Vivado, see Vivado-Based Hardware Development Process.

2.1.2 Registering an FPGA Image

Before registering an FPGA image, if you have not installed this tool yet, please install the image management tool fisclient by referring to section 1.2.2.

Step 1 Registering an FPGA Image

You can use AEI_Register.sh to register an FPGA image with the image management module. After the registration, an ID is assigned to the FPGA image. Please record this ID, because it can be used to query the registration status, and load, delete, and associate the image.

Registering an FPGA Image

Step 2 Querying the FPGA Image

Users can run the fis fpga-image-list command to query information about an FPGA image. If the image status is active, users can load the image using the image ID.

For details about how to use the fisclient to query the FPGA image, see fisclient README.

2.2 Software Development Process

After hardware development and FPGA image registration, you can develop FPGA user applications by referring to this section.

2.2.1 Loading the FPGA Image

After an FPGA image is registered, use the FPGA image loading tool FpgaCmdEntry to load the image to the FPGA before software development.

Step 1 Compiling and Installing the FPGA Image Loading Tool

The FPGA image loading tool FpgaCmdEntry is a command-line interface (CLI) tool, which supports FPGA information query, image loading and query, and virtual LED status query.

For details, please see the chapter of compiling and installing in fpga_tool README.

Step 2 Loading the FPGA Image

For details, see the following file.

load an fpga image

For more details of loading tool, see fpga_tool README.

2.2.2 Compiling and Debugging User Applications

The high-performance architecture development mode uses the DPDK architecture to exchange data between the FPGA and the processors. For details about how to compile and debug user applications, see DPDK-Based User Applications Development Description. If you need to modify the driver, refer to DPDK-Based Driver Development Description.

2.2.3 Running User Applications

After the FPGA image loading and application compilation, you can go to the huaweicloud-fpga/fp1/software/app/dpdk_app/bin directory to run user applications.

2.3 Vivado-Based Example

For high-performance server architectures, FAC services provide three examples. Example 1 implements user logic version reading, data inversion, and addition functions. Example 2 implements user logic DMA (Direct Memory Access) loopback channels and DDR (DDR SDRAM) read functions. Example 3 implements user logic FPGA memory manage unit (FMMU) function. The following figure shows the Vivado-based example operation process.

For details, see Using a Vivado-based Example.

3 FPGA Development Guide for General-Purpose Architecture

When a general-purpose architecture is used, the FPGA development is divided to three scenarios: hardware development, software development, and example using. During hardware development, you can generate and register an FPGA image by using the SDAccel tools. During software development, you can develop applications based on the existing FPGA image. By using examples, you can quickly master the FPGA development process under the current server architecture.

3.1 Hardware Development Process

When a general-purpose architecture is used, the hardware development is based on the SDAccel tools. This development process guides users to create, compile, and simulate a project, generate an .xclbin file, and register an FPGA image (AEI). After the hardware development, if you need to develop your own applications based on the registered FPGA image, see section 3.2.

3.1.1 Generating an .xclbin File

For details about how to develop an .xclbin file based on the SDAccel, see SDAccel-Based Hardware Development Process.

3.1.2 Registering an FPGA Image

Before registering an FPGA image, if you have not installed this tool yet, please install the image management tool fisclient by referring to section 1.2.2. After the installation, you can use AEI_Register.sh to register an FPGA image with the image management module. For details about how to register an FPGA image, see Registering an FPGA Image. After the registration, an ID is assigned to the FPGA image. Please record this ID, because it can be used to query the registration status, and load, delete, and associate the image.

You can run the Fisclient command to query the registration result. For details, see step 2 in section 2.1.2.

3.2 Software Development Process

After hardware development and FPGA image registration, you can develop FPGA user applications by referring to this section.

3.2.1 Compiling and Debugging User Applications

The general-purpose architecture development mode uses the Xilinx SDAccel architecture to exchange data between the FPGA and the processors. For details about how to compile and debug user applications, see SDAccel-Based User Applications Development Description. If you need to modify the HAL, see the SDAccel Mode HAL Development Description.

3.2.2 Running User Applications

After the FPGA image loading and application compilation, you can go to the huaweicloud-fpga/fp1/software/app/sdaccel_app directory to run user applications.

3.3 SDAccel-Based Example

When a general-purpose architecture is used, the Huawei FAC services provide three examples. Example 1 is an example of matrix multiplication using C to implement the logic algorithm. Example 2 is an example of vector addition using OpenCL C to implement the logic algorithm.Example 3 is an example of vector addition using RTL to implement the logic function. The following figure shows the SDAccel-based example operation process.

For details, see Using an SDAccel-Based Example.

----End

poc-fpga's People

Contributors

jelana avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.