FpgaManager 2.15.0
Software API Documentation
|
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.
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. |
Master | The controlling endpoint of the FPGA Manager, this is the FPGA Manager Software Library running on the host PC. |
Stream | FPGA Manager supports up to 16 independent streams between host PC and FPGA. Each stream can be uni- or bi-directional. |
Memory Mapped Access | Memory mapped access is realized via a special protocol sent over a normal stream. |
Upstream | Data flow from FPGA to host PC, slave to master. |
Downstream | Data flow from host PC to FPGA, master to slave. |
To run FPGA Manager you have to perform the follwing installation steps.
Supported Windows Versions:
Supported Linux Distributions:
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.
For Windows or .NET cross-platform development, FPGA Manager API is shipped in NuGet packages for easy integration into software projects.
Nuget Package | Language | Purpose |
---|---|---|
Enclustra.FPGAManager.DotNet | .NET | Main FPGA Manager .NET assembly for all modern .NET projects. |
Enclustra.FPGAManager.ApiDotNet | .NET | .NET Wrapper to FPGA Manager base API For legacy .NET projects that cannot reference the main .NET assembly Contains common types that are used by the main assembly, |
Enclustra.FPGAManager.ApiCpp | C++ | C++ Wrapper to FPGA Manager base API The runtime linkage has to be configured in the FPGA Manager NuGet project settings and must match that of the project. Requires the addition of the native assets package. |
Enclustra.FPGAManager.AnsiC | C | Headers and linkage to the base API Requires the addition of the native assets package. |
Enclustra.FPGAManager.NativeAssets.Windows | All | Base API and referenced binaries
|
Enclustra.FPGAManager.SwTarget | .NET | Framework to build FPGA Manger device emulators in software. |
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 | 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 | 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 |
On both Windows and Linux, you can choose to utilize the AOT dynamic library. This brings the following features and restrictions:
The NuGet packages for C/C++ application development might require additional configuration. For both C and C++ you must choose if the .NET based library or AOT is used.
For C++, it is required to configure the runtime linkage, it must match the project setting.
.NET projects can utilize the NativeAssets NuGet package to include native binaries in the build. The binary artifact deployment can be controlled by project properties.
Property | Value | Purpose |
---|---|---|
ShouldIncludeFpgaManagerNativeFtdi | False | FTDI D2XX library is not included |
True | FTDI D2XX library is published | |
ShouldIncludeFpgaManagerNativeAot | False | FPGA Manager AOT base library is not included |
True | FPGA Manager AOT base library is published | |
FpgaManagerNativeFtdiArchitecture | Auto | Architecture is determined from the selected runtime |
x64 | Force x64 architecture | |
x84 | Force x86 architecture | |
All | Publish x64 and x86 libraries | |
FpgaManagerNativeAotArchitecture | Auto | Architecture is determined from the selected runtime |
x64 | Force x64 architecture | |
x84 | Force x86 architecture |