FpgaManager 2.9.4
Software API Documentation
Loading...
Searching...
No Matches
FPGA Manager Software API

Installation

To run FPGA Manager you have to perform the follwing installation steps.

Windows

Supported Windows Versions:

  • Windows 11
  • Windows 10
  • Windows 7

Installation procedure:

  • Get your Visual Studio 2022 (2019, 2017 or 2015) or Visual Studio Code ready.
  • Make sure you have a .NET 6 or later runtime installed
  • Add the appropriate NuGet Package to your project
    • Enclustra.FPGAManager.DotNet for .NET projects
    • Enclustra.FPGAManager.ApiDotNet for .NET projects with legacy API support
      • Any-CPU Platform is not supported since the native base API is processor architecture dependent.
    • Enclustra.FPGAManager.ApiCpp for C++ projects
      • The runtime linkage has to be configured in the FPGA Manager NuGet project settings and must match that of the project.
    • Enclustra.FPGAManager.AnsiC for pure C projects

Linux

Supported Linux Distributions:

  • Ubuntu 22.04 LTE
  • Ubuntu 20.04 LTE
  • Ubuntu 18.04 LTE
  • Ubuntu 16.04 LTE (AOT not supported)

Installation procedure on Ubuntu:

  • The following packages are required to build :
    • sudo apt install g++ g++-multilib

Overview

General

The FPGA manager allows communication with an FPGA over different interfaces including Ethernet, USB and others. The idea of this product is to supply all the functionality for data transfers between a host PC and an FPGA to be used in different applications.
Basically FPGA manager supports memory mapped accesses and streaming transfers. Transfer options include bursting/non-bursing access, access to continuous addresses or accessing the same DWORD address multiple times for memory mapped accesses. Both, streaming transfers and memory mapped accesses, can be exuted blocking or non-blocking. For the latter case a transfer object can be used to observe the progress of the transfer and call callback functions on completion.

Terminology

Term Description
Device / Target An FPGA connected to the host PC via a link.
Link Connectivity between FPGA and host PC (e.g. USB, Ethernet).
Slave The target endpoint of the FPGA Manager, usually the FPGA.
Stream FPGA Manager supports up to 16 independent streams between host PC and FPGA.
Each stream can be uni- or bi-directional.
Master The controlling endpoint of the FPGA Manager, this is the FPGA Manager Software Library running on the host PC.
Memory Mapped Access Memory mapped access is realized via a special protocol sent over a normal stream.

API

Classes

The API concept is the same for .NET and C++, there is a main API object that is instantiated for each link that the application wants to communicate with. The main API then can be used to create the required streams and memory mapping. With single Open() call the connection to all those streams is established. Connection is closed and resources free'd when the main API object is disposed / destructed.

Main API and interfaces in .NET

Main API and interfaces in C++

Deployment

Overview

FpgaManager.dll is the loader DLL wich is required for all non .NET languages. The loader DLL provides the native entry points for the base C API plus it contains the loader for the .NET runtime, required by the FPGA Manager core DLLs. In addition to the loader DLL, a runtime-config JSON is required to properly initialize the .NET runtime. The loader DLL is operating system and architecture dependent. The same Core DLLs can be deployed on all supported operating systems and architectures.

Windows

Windows ANSI-C C++ .NET
FpgaManager.dll Yes Yes No
FpgaManagerDotNet.dll Yes Yes Yes
FpgaManagerNextGen.dll Yes Yes Yes
FpgaManagerNextGen.runtimeconfig.json Yes Yes No

Linux

Linux ANSI-C C++ .NET
FpgaManager.so Yes Yes No
FpgaManagerCppApi.so No Yes No
FpgaManagerDotNet.dll Yes Yes Yes
FpgaManagerNextGen.dll Yes Yes Yes
FpgaManagerNextGen.runtimeconfig.json Yes Yes No

AOT

On both Windows and Linux, you can choose to utilize the AOT dynamic library. This brings the following features and restrictions:

  • It replaces all dotnet assemblies, runtimeconfig and loader dll.
  • A .NET runtime does not need to be installed
  • Quick cold start time (it is already compiled into native code)
  • It is the only way to use this library with older .NET applications (e.g. .NET Framework)
  • Only 64-bit applications are supported (x86 and ARM64 on Linux)
  • No OpenTelemetry meters are available
  • Reduced precision of the trace logs
  • .NET runtime baked in, no ad-hoc security fixes and improvements

C/C++ on Windows

The NuGet packages for C/C++ application development might require additional configuration.

For both C and C++ you can choose if the .NET based library (default) or AOT is used

For C++, it is required to configure the runtime linkage, it must match the project setting.