Fix Version/s: None
Create a simple code in cRIO FPGA, use C API Generator to create header files, and create a simple C/C++ code to understand and document this procedure. This will help John understand better how this works.
Today John and I were doing some test reading and writing DMA FIFOs on the FPGA. I created FIFO_A (Host to Target) and FIFO_B (Target to Host) and put them in a separate while loop than reading switches. This is the FPGA code:
Jonh modified the c++ code to read UserSwitch0, UserSwitch1, UserSwitch2, put values into FIFO_A, and read them from FIFO_B. The result is shown in the following image:
We thought these tests were successful. He knows how to handle controls and DMA FIFOs on the FPGA with C++, and we are ready to move on to modify M2Cell code. We need to think about how to do that, and we want to discuss this in the next Weekly M2 Progress Meeting.
I only have to document how to use the C API Generator.
I think you may need to document the example (labview code + CPP example) in additional to the C API generator for all the process. This should be helpful for the future's developer/maintainer.
Please check this document I created after the demo I worked with John:
Looks good. I have some suggestion that we could discuss first before putting the ticket into done. Thanks!
Today John and I worked on a LabVIEW and C++ code to understand how to compile cRIO FPGA and access I/Os from C++ code. The code is stored in this repo: https://github.com/pcortes80/crio_cpp with LabVIEW 2021 SP1 and C++ code (still work-in-progress). I used this LabVIEW version because the cRIO I'm using for this test has this version installed and because I wanted to change some physical input in one of the modules I had installed on this cRIO. That´s why I did not use the cRIO simulator.
In this test, we use digital inputs and one FIFO to read them from C++ code. This was a successful test and allowed us to understand how the C API Generator works and how to use generated files.
Next week we will continue working together to write and read a FIFO.