PC application.

Applications, development tools, FPGA, C, WEB
Post Reply
Carlos
Posts: 26
Joined: Tue Nov 17, 2015 9:58 am

PC application.

Post by Carlos » Wed Nov 18, 2015 9:25 am

Hi, I want to program a PC application that uses the Red Pitaya board for data acquisition.
The application will work on Linux.
Are there libraries (for Linux PC) to accessing the board and read the information (enable triggers, select channel, etc)? or I have to do "C" slave programs for the Red Pitaya board and that they communicate with the PC application.

I do not want to use SCPI comands, I need it as quickly as possible.

Thank you.
Carlos.

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: PC application.

Post by pavel » Wed Nov 18, 2015 9:56 am

Carlos wrote:Are there libraries (for Linux PC) to accessing the board and read the information (enable triggers, select channel, etc)? or I have to do "C" slave programs for the Red Pitaya board and that they communicate with the PC application.

... I need it as quickly as possible.
Hi Carlos,

I'm afraid that the "C" slave program is currently the only option if you need fast communication.

For example, the following program can continuously transfer the ADC samples via TCP at 63-65 MB/s (500-520 Mb/s):
https://github.com/pavel-demin/red-pita ... t-server.c

If you need faster than 500 Mb/s transfer rates, then I'd suggest to have a look at the NETMAP and mTCP frameworks:
https://github.com/luigirizzo/netmap
https://github.com/eunyoung14/mtcp

Best regards,

Pavel

Carlos
Posts: 26
Joined: Tue Nov 17, 2015 9:58 am

Re: PC application.

Post by Carlos » Thu Nov 19, 2015 8:39 am

Thanks Pavel, a few more questions ...

Why do you use two threads in the program? It is to use the power of the two cores of the microcontroller?

Why you not use the API rp.lib?

How to read the ADC? How you initiate the ADC?

Greetings and thank you very much
Carlos

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: PC application.

Post by pavel » Thu Nov 19, 2015 9:34 am

Carlos wrote: Why do you use two threads in the program? It is to use the power of the two cores of the microcontroller?
Exactly. Since you asked for "as quickly as possible", I sent you an example of a TCP server that runs on Red Pitaya and uses both of its cores to transfer the ADC samples via TCP at 63-65 MB/s. When using one core, the transfer rate is ~15% lower.
Carlos wrote: Why you not use the API rp.lib?
How to read the ADC? How you initiate the ADC?
It's just an example of a relatively simple and fast TCP server, you can change it to use Red Pitaya API.

This code is working with the following FPGA configuration:
https://github.com/pavel-demin/red-pita ... design.tcl

The ADC samples are directly transferred to RAM. The ADC data processing chain consists of the following elements:
  • ADC interface
  • FIFO (transports samples from ADC clock domain to FPGA clock domain)
  • CIC filter (applies a moving average filter and accepts 1 sample every M samples)
  • RAM writer (gets samples from AXI-Stream bus and writes them to RAM via AXI bus)

AstroJimX
Posts: 58
Joined: Wed Jan 13, 2016 12:57 am

Re: PC application.

Post by AstroJimX » Tue Feb 09, 2016 1:44 am

Hello Pavel,

I'd like to use the adc-test-client to send data to a labview TCP server VI (rather than receive data from its adc-test-client).

I want to know if using the read/send functions would be enough. In other words, what do I need to worry about in order to achieve this?

Thanks in advance.

AstroJimX
Posts: 58
Joined: Wed Jan 13, 2016 12:57 am

Re: PC application.

Post by AstroJimX » Tue Feb 09, 2016 5:01 pm

Should I post a new topic about this please let me know.

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: PC application.

Post by pavel » Tue Feb 09, 2016 5:09 pm

Unfortunately, I don't have any idea of what "LabView TCP server VI" is and how it communicates. Can't it communicate directly with a TCP client or server running on Red Pitaya?

AstroJimX
Posts: 58
Joined: Wed Jan 13, 2016 12:57 am

Re: PC application.

Post by AstroJimX » Tue Feb 09, 2016 6:53 pm

I apologize for not explaining.

In essence, I have a Labview program that communicates with your TCP client code (adc-test-client). Upon connection, the labview program plots the data coming in from the Red Pitaya.

However, the adc-test-client code only receives data from the socket (Labview is not intended to send data). I just wanted to verify if implementing the read and send functions along pipeline and DMA (in your adc-test-client code) to adc-test-server code would work such that it sends sends data to the Labview server.

Thanks again for your attention.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 101 guests