Great linux command for testing loopback

Questions and discussions about the Xillybus IP core and drivers

Great linux command for testing loopback

Postby Guest » Fri Jun 15, 2018 3:41 pm

To all:

I have a new xilinx FPGA project using Xillybus. In my FPGA, I have a UART that connects external physical RX/TX to a bidirectional Xillybus stream, corresponding to a linux file /dev/xillybus_serial. For testing, I find a great linux command:

cat /dev/xillybus_serial | tee /dev/xillybus_serial

From my dumb terminal, when I type into the RX of the FPGA, the "cat /dev/xillybus_serial" portion of this commands reads out what I typed. That's piped (|) to the "tee" command. The "tee" command sends stuff to both the stdout (linux terminal) and the file. Therefore, when I type "Mr. Watson -- Come here -- I want to see yo." on my dump terminal, that goes to the RX of the FPGA and through Xillybus and out the cat | tee. I see "Mr. Watson -- Come here -- I want to see you" on my linux host terminal. The tee sends it right back to /dev/xillybus_serial, which goes through my FPGA and out the TX line to my dumb terminal. Therefore, with no local echo enabled, as I type I can see the echo coming back. I can see what I type, the echo (loopback) occurring through my FPGA fabric, through Xillybus, through the cat|tee, through Xillybus, through my FPGA fabric.

Eli, you might explain this better and add the command to your getting started doc.
Guest
 

Re: Great linux command for testing loopback

Postby support » Sat Jun 16, 2018 6:07 am

Hi,

Thanks for that tip. Using "tee" for looping back and dumping to console is indeed a clever idea.

Regards,
Eli
support
 
Posts: 627
Joined: Tue Apr 24, 2012 3:46 pm

Re: Great linux command for testing loopback

Postby kevin » Thu Dec 06, 2018 9:21 am

sorry for interfering in this post.

May I know for the loopback bandwidth computation, do we double (multiply by 2) the number of bytes transferred across the Tx and Rx channels ?

bandwidth = 2*number_of_bytes_sent / (total_time_until_the_last_byte_is_back_at_source)
kevin
 
Posts: 42
Joined: Tue Dec 12, 2017 10:41 am

Re: Great linux command for testing loopback

Postby support » Fri Dec 07, 2018 7:08 pm

Hello,

In Xillybus' specifications for bandwidth, it's given for each direction independently. It holds whether both directions carry traffic at the same time or not.

Loopback shouldn't be used at all when measuring bandwidth, as explained on this page:

http://xillybus.com/doc/bandwidth-guidelines

Regards,
Eli
support
 
Posts: 627
Joined: Tue Apr 24, 2012 3:46 pm


Return to Xillybus

cron