Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_main_telescope
-
Labels:
-
Story Points:2
-
Epic Link:
-
Team:Telescope and Site
-
Urgent?:No
Description
Continue the experiment with LabVIEW FPGA code and C programming using the FPGA C API Interface. Work on the comments/questions in the previous ticket DM-36940:
- check the mistakes in the code snippet comments.
- help to clarify the returned memory region in "acquire" function is in stack or heap. And the OS can reallocate the memory after the "releasing" or not. There is the problem of memory leakage or not. This demonstration can be done in another ticket.
and try to answer these questions:
- question1: what will happen if there are no elements or less than the requested elements?
- question2: what will happen if I want to release 5 elements and there are only 2 or 0 elements in the FIFO?
- question3: what will happen if I want to add more elements in the FIFO but there is no available space?
Question 1: what will happen if there are no elements or less than the requested elements?
(github branch: noElementsInFifo)
To answer this question I considered two designs:
Design 1: Using the NiFpga_ReadFifoU16() one time only, and numberOfElements = 9.
Design2: Using the NiFpga_ReadFifoU16() with numberOfElements = 0 first and if elementsRemaining >= 9, then numberOfElements = 9, and start reading FIFO elements.
With Design1:
No elements yet in the RT side of FIFO:
With timeout = 0
With Design2:
No elements yet in the RT side of FIFO:
Less elements than required: