07-11-2012 12:58 PM
FPGA Target FIFO is configured for 8197 elements
NiFpga_MergeStatus(&iFpgaStatus, NiFpga_Open(FPGABitFileName,
NiFpga_RseriesRIO_Signature,
Address,
0,
&hSession));
NiFpga_MergeStatus(&iFpgaStatus,NiFpga_ConfigureFifo(hSession,
NiFpga_RseriesRIO_HostToTargetFifoU8_DMAFIFO,
3000000));
NiFpga_WriteFifoU8(hSession,NiFpga_RseriesRIO_HostToTargetFifoU8_DMAFIFO,
uArray,
20000,NiFpga_InfiniteTimeout,
&uEmptyElementsRemaining);
uEmptyElementsRemaining is 2980000 <----------After above call
NiFpga_WriteFifoU8(hSession,
NiFpga_RseriesRIO_HostToTargetFifoU8_DMAFIFO,
uArray,
20000,NiFpga_InfiniteTimeout,
&uEmptyElementsRemaining);
uEmptyElementsRemaining is 2968197 <----------After above call
[Was expecting 2960000 elements remaining in DMA FIFO after second call]
When the same steps are executed on LABVIEW [with labview equivalents of above functions], it produced different result. i.e. When executed with Labview [with same FPGA FIFO size and DMA fifo size] ,
uEmptyElementsRemaining was 2980000 and 2960080 after first and second write method.
Also when Labview VI was run continuously, uEmptyElementsRemaining was changing after the second write method but was correct [2980000] after first write method.
07-12-2012 12:38 PM
Hi SchamWow,
Are you calling the NiFpga_StartFifo in the same order in your LabVIEW and CVI code?
NiFpga_Status NiFpga_StartFifo(NiFpga_Session session, uint32_t fifo)
Starts a FIFO.
Name | Type | Description |
---|---|---|
session | NiFpga_Session | handle to a currently open session |
fifo | uint32_t | the FIFO to start |