Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPGA APIs initial setup #1073

Merged
merged 7 commits into from
Jul 29, 2024
Merged

FPGA APIs initial setup #1073

merged 7 commits into from
Jul 29, 2024

Conversation

amehra-ni
Copy link
Contributor

@amehra-ni amehra-ni commented Jul 17, 2024

What does this Pull Request accomplish?

Add nifpga service to grpc-device server. This PR contains metadata for a few functions that are not marked as 'codegen_method': 'no'. The functions are Abort, Close, Download, Open, Reset, CommitFifoConfiguration, StartFifo, StopFifo, UnreserveFifo, ReleaseFifoElements,and Run.

Why should this Pull Request be merged?

  • Registers nifpga service with grpc-device server with NextRelease code readiness.
  • Adds an initial set of FPGA APIs to the repo to get started with parallel development.
  • The .h file and NiFpga.dll have different function names( NiFpga_Open vs NiFpgaDll_Open). To call it correctly, I've added a new parameter(c_dll_function_prefix) in config.py and updated the library codegen code to correctly load NiFpgadll function names.
  • ConvertApiErrorStatusForNiFpga_Session: In other services, here we usually call a function that returns a description of the error code, but in FPGA I didn't see any function that will do that. We would probably need to check the status value we got and return the description by some parsing logic(there are status codes in the FPGA header and it has some summary), but that would be in a follow-up, hence a hard-coded string for now.

What testing has been done?

  • No compile or codegen issues.
  • Manually verified server handlers for all APIs and compared them with documentation for the APIs mentioned.
  • Manually tested a few APIs with client code which calls the functions correctly.

@amehra-ni amehra-ni requested review from doshirohan and asumit July 17, 2024 09:19
@amehra-ni amehra-ni self-assigned this Jul 17, 2024
@amehra-ni amehra-ni marked this pull request as ready for review July 24, 2024 12:46
CMakeLists.txt Outdated Show resolved Hide resolved
source/codegen/metadata/nifpga/config.py Show resolved Hide resolved
@amehra-ni amehra-ni merged commit 1ec9df9 into main Jul 29, 2024
9 of 11 checks passed
@amehra-ni amehra-ni deleted the users/amehra/initial-fpga-apis branch July 29, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants