Re: First impressions

The big issue in the sample code for the Voice Recorder is that it uses Register I/O for communication between the FPGA and RT instead of DMA. Streaming analog data in this type of application should be done using DMA to reduce the load on the RT processor.

In addition you would want to minimize any data handling or processing in RT that is not absolutely necessary. The sample code converts the analog audio data to the waveform data type before passing it to the network stream which could also be eliminated and the audio data should be passed directly to network stream. Lastly if you switch to using DMA for the FPGA to RT streaming, you could eliminate the RT FIFO to pass data between the two loops as the DMA transfer includes its own buffer. In this case you would only have one loop in RT which reads data from the DMA buffer and passes it to the network stream.

authored by
Christian L, CLA
Principal Development Manager - Partner Program
Applications Engineering Senior Manager - Data Acquisition, Control, and Real-Time Test
National Instruments - Austin, TX

0 Kudos