UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor arrilag
Visitor
1,993 Views
Registered: ‎03-01-2018

Read/Write communication between Zedboard and Laptop

Jump to solution

Hi 

I am trying to figure out what the easiest communication between Laptop (PC) and Zedboard is. I am writing a simple Python GUI on my Laptop that is supposed to trigger i2c read/writes and GPIO settings between Zedboard and attached sensors, and read out feedbacks. 

 

My first approach was to try SSH communication between Laptop and the Zedboard Linux. Python has easy to use SSH libraries that would allow me to send and receive data. But unfortunately when I program the FPGA the SSH communication gets lost.

 

Thanks for any hints about what I am doing wrong here.

 

0 Kudos
1 Solution

Accepted Solutions
Visitor arrilag
Visitor
2,249 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

ok, now I have a good solution:

The ZYNQ processing system has actually all that I need.:

For my simple case I just need to activate UART0 or UART 1 (I took UART1), load in Xilinx SDK the xuartps_low_echo_example example and do on that some modifications. There is everything I need for reading and writing between Zedboard and PC. 

That is good for a bare-bone command-line solution and later I can add some GUI on PC.

 

Thanks for you support @jmcclusk and @stephenm

 

Best Regards

Arasch

0 Kudos
11 Replies
Scholar jmcclusk
Scholar
1,966 Views
Registered: ‎02-24-2014

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

When you say,  "program the fpga",  are you talking about a board reset and load from flash?   or is this an operation by the processor to load the bitstream into the PL?    (typically dumping a bitstream into /dev/fpga under linux on the arm)

 

The only way you should lose communication over ssh is if the ethernet connection were being handled via a PL connection and not the PS connection to the ethernet PHY.    I just checked the Zedboard schematics, and the ethernet PHY is connected to the PS, and not the PL,  so programming the PL shouldn't affect the ethernet connection..    Something is odd here.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Visitor arrilag
Visitor
1,956 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Hi @jmcclusk

Thanks for the quick reply.

With "programming the FPGA"  I mean in Xilinx SDK menu Xilinx->Program FPGA. At that point I loose the connection over SSH, with which I connected to the Linux PS using PuTTy. 

 

I am obviously doing something wrong. 

I was wondering if in the Zynq processor, having UART or USB specified is conflicting with the SSH connection, so I disables everything besides the I2C, which I need for the sensor communication. But unfortunately that did not change anything, so I was thinking this is how it's supposed to work. Your note is encouraging that this is probably a bug in my setup.

Best Regards

Arasch

 

SSHLoss.gif
0 Kudos
Scholar jmcclusk
Scholar
1,928 Views
Registered: ‎02-24-2014

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Ah!   The SDK download is being done over JTAG, and clearly it's either interrupting or crashing Linux on the Zynq processor system.  I would recommend that you use ssh to transfer the new bitstream to the zync, and then just "cat  new_bitstream.bit >/dev/fpga"    That should load the fpga fabric without crashing the CPU or interrupting SSH.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Visitor arrilag
Visitor
1,918 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Hi @jmcclusk

 

Thank you so much for the help. 

I looked into the /dev folder and unfortunately could not find an /fpga (please see attached screenshot). 

Do I have to add something to the kernel?

 

Best Regards

Arasch

dev_folder.gif
0 Kudos
Moderator
Moderator
1,905 Views
Registered: ‎09-12-2007

Re: Read/Write communication between Zedboard and Laptop

Jump to solution
Devcfg is replaced by fpga manager
http://www.wiki.xilinx.com/FPGA+Manager+ZCU102
0 Kudos
Scholar jmcclusk
Scholar
1,897 Views
Registered: ‎02-24-2014

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Ah..  it looks like xdevcfg is not in your device directory..   so check here to see if FPGA manager is present:

 

 

This says that to download a bitstream, it's dumped into 

/sys/class/fpga_manager/fpga0/firmware

Does this path exist on your Zynq Linux system? 

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Visitor arrilag
Visitor
1,889 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Hi @jmcclusk

 

Unfortunately not...

 

Thank you for your support.

Best Regards

Arasch

 

sys_folder.gif
0 Kudos
Visitor arrilag
Visitor
1,886 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Do I have maybe a jumper on the board not right, which causes Linux to crash when I program the PL?

(Note: below picture taken before I program FPGA. After programming FPGA the "DIGILENT" graphics in the OLED disappears)

 

Thanks

Arasch

failure.gif
0 Kudos
Scholar jmcclusk
Scholar
1,879 Views
Registered: ‎02-24-2014

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

It looks like your linux build doesn't have the drivers installed to handle FPGA configuration, except at boot time by the FSBL.  Do you actually need dynamic configuration of the FPGA logic?    The Linux OS is typically much happer with a static PL configuration, since the device tree needs to be rescanned if the PL gets reprogrammed.  

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Visitor arrilag
Visitor
1,016 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

Hi @jmcclusk

I don't need dynamic configuration of the FPGA. My goal is to have my simple Laptop Python GUI communicate somehow with the PS of the Zedboard, so I can set off i2c read/writes and set GPIOs.

Just ran a simple SDK code printing a text. Looks like the SDK is using the SSH terminal as output terminal which might be the reason that SSH no more works?

Maybe I should try memory read/writes, as the data I would like to send/receive is actually very small? I could write from Laptop to a memory location on the Zedboard (which I still need to figure out, how to do), then read the memory location with C-code on the PS and then do the required task...

 

Thank you for your support

Arasch

 

failureSSH.gif
0 Kudos
Visitor arrilag
Visitor
2,250 Views
Registered: ‎03-01-2018

Re: Read/Write communication between Zedboard and Laptop

Jump to solution

ok, now I have a good solution:

The ZYNQ processing system has actually all that I need.:

For my simple case I just need to activate UART0 or UART 1 (I took UART1), load in Xilinx SDK the xuartps_low_echo_example example and do on that some modifications. There is everything I need for reading and writing between Zedboard and PC. 

That is good for a bare-bone command-line solution and later I can add some GUI on PC.

 

Thanks for you support @jmcclusk and @stephenm

 

Best Regards

Arasch

0 Kudos