cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
10,257 Views
Registered: ‎08-25-2015

Trouble connecting to target

Jump to solution

Folks,

    I have a custom target that I want to use chipscope on but I am having trouble getting connected.  Not sure where the issue is.  I am on ubuntu 14.1, viv 14.4.  Platform cable usb II DLC10.  I read the posts that others have posted and got some things debugged:

 

When I plug the USB into the pod, the status light does not light up.  I do see the Xilinx device show up in lsusb.  In viv, I open the hardware manager.  It is connecting using localhost, port 3121.  I can connect and disconnect using the tcl commands.  I see the traffic in wireshark to and from port 3121 (more on that later).  I changed the usb device at /dev/bus/usb/003/007 to rw.  When the pod is connected to the target, which is powered on, and I issue a connect, the status light on the pod comes on green.  THis tells me that the pod is working (its brand new) and the usb interface can transfer data.

 

In the hardware manager I see under localhost (1) xilinx_tcf/Xilinx/usb3.7 (0) is closed.  WHen I try to open target I get a warning box that sez "Target localhost/xilinx_tcf/Xilinx/usb3.7 is no longer available".

 

Interestingly when I look at the traffic on localhost in wireshark I see this message in the packets payload:

"ServerID":"jss3","Manufacturer","Xilinx","Serial":"usb3.7","Description":"open device failed: LIBUSB_ERROR_ACCESS".

 

What is going on here?

Why is the pod responding with this message?

 

Thanks

CFG

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
15,771 Views
Registered: ‎08-25-2015

Re: Trouble connecting to target RESOLVED

Jump to solution

I finally found a solution to this problem and want to share what I found so I can save you a day of troubleshooting.

My environment:

  vivado 2014.4, ubuntu linux 14.4, platform cable USB 2 (DLC10)

 

The issue appears to be a bug (or another undocumented "feature") in vivado.  In the hardware manager, when you Open Target | Open New Target and select the defaults, the hw_server starts in the background and the USB device number of the DLC10 is incremented.  The hw_server seems to try to use the previous USB device number for the DLC10.  This results in the message "Labtools 27-2270 Target localhost/xilinx_tcf/Xilinx/usb3.6 is no longer available ...." when you try to connect to the DLC10.

 

I want somebody from Xilinx to reply to this post and detail how this system is supposed to work.  What are the components of a hardware connection to an FPGA?  What are these server endpoints for? 

 

So here is the procedure I use to connect for debugging:

 

start viv, open the hw manager

  there is no hardware configured

  the hw_server is not running

plug in the usb connection to the DLC10

    lsusb shows DLC10 at 3.6

    connect the JTAG to the target hardware, apply power to target

    status LED is out

Open Target | Open New Target | next | next

    type: xilinx_tcf

    name: xilinx/usb3.8

    hw_server is running

    lsusb shows DLC10 is at 3.8

sudo chmod a+rw /dev/bus/usb/003/008

tcl: connect_hw_server

    status LED comes on green

    device is 000018af8a5401

tcl: open_hw_target

    the device tree is enumerated properly

 

How does this debugging interface work?

 

Vivado relies on a connection to the hw_server.  The hw_server connects to the DLC10 using USB.  This allows the DLC10 to be remotely located or shared among users.  The hw_server is a linux utility that is kicked off as a daemon process.  Vivado and the hw_server communicate using TCP.  You can use wireshark to snoop the network interface.  You will see requests and responses in easy to read words.  The back end of the hw_server connects to the DLC10 using USB. 

 

How did I debug this?

 

I started by verifying that the usb drivers were installed.  Apparently this happened when I installed vivado.  When I ran the installer, it noted that no changes were made.  Even tho the DLC10 is xilinx branded, the guts still have digilent firmware in them.  There is some xicom stuff too.

 

Next, I took a look at the hw_server.  I discovered that it can be run at the command line and it has debugging options.  Wireshark is great for looking at the chatter between vivado the server.  Snooping these packets I discovered that the port number changes from 3121 to 1534.  In the guts of the packets there are requests and responses for information about the several server endpoints that exist.  These are named like jss1, jss2, jsn1.  Stepping down thru the packets I found one that clued me into what was going on:

Server ID: jss3

Manufacturer: Xilinx

Serial: usb3.6

Description: open device failed: LIBUSB_ERROR_ACCESS

 

vivado was trying to connect to usb3.8!

 

I also looked at the USB chatter in wireshark.  You have to modprobe usbmon and then you can see /dev/usbmonN where N is the USB bus you want to snoop.  When the hw_server is not connected to the DLC10, there is an occasional GET DESCRIPTOR issued from the root hub.  When the hw_server is connected to the DLC10, there is a flurry of URB_CONTROL packets.  It turns out thats all you need to see, the contents of the packets is not important.

 

Seeing the USB device number change made me look carefully at the hw_server.  After several iterations of selecting stuff in the hardware mgr and looking for things on the system I found that the USB device number was incrementing when the hw_server was kicked off.

 

Relevant posts:

 

https://forums.xilinx.com/t5/Design-Tools-Others/Impact-can-t-find-cable-linux-avnet-lx9-microboard/td-p/603501

 

 

 

 

View solution in original post

0 Kudos
3 Replies
Highlighted
Xilinx Employee
Xilinx Employee
10,236 Views
Registered: ‎08-01-2008

Re: Trouble connecting to target

Jump to solution

check these related post and it may help you

https://forums.xilinx.com/t5/Design-Tools-Others/Can-t-open-target-in-hardware-manager/td-p/639586

 

https://forums.xilinx.com/t5/Design-Tools-Others/ILA-core-not-recognized-by-hardware-manager/td-p/552554

https://forums.xilinx.com/t5/Design-Tools-Others/Vivado-2014-1-Hardware-Session-No-valid-target-connected-to/td-p/453364

Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
10,211 Views
Registered: ‎08-25-2015

Re: Trouble connecting to target

Jump to solution

Balkrishan,

    these references talk about windows problems, I am on linux.  I did some more debugging on this today.  I snooped the usb connection for the DLC10 pod.  When I tried to connect in viv, I see a bRequest: get descriptor, the pod responds with a descriptor response with idVendor: Xilinx, Inc.  This tells me the USB driver is working (it shows up in lsusb) and the usb transport can pass data.

 

   I got a zynq eval board from a colleague and hooked it up the DLC10.  I get the same problem, so its not the target.  I think this is related to the "LIBUSB_ERROR_ACCESS" the hw_server returns. 

 

    So how does all of this work?  There is vivado, which communicates with the hw_server on port 3121.  Does the server try to attach to libusb?  If it does, how do I debug this ERROR_ACCESS?

 

Thanks

CFG

0 Kudos
Highlighted
15,772 Views
Registered: ‎08-25-2015

Re: Trouble connecting to target RESOLVED

Jump to solution

I finally found a solution to this problem and want to share what I found so I can save you a day of troubleshooting.

My environment:

  vivado 2014.4, ubuntu linux 14.4, platform cable USB 2 (DLC10)

 

The issue appears to be a bug (or another undocumented "feature") in vivado.  In the hardware manager, when you Open Target | Open New Target and select the defaults, the hw_server starts in the background and the USB device number of the DLC10 is incremented.  The hw_server seems to try to use the previous USB device number for the DLC10.  This results in the message "Labtools 27-2270 Target localhost/xilinx_tcf/Xilinx/usb3.6 is no longer available ...." when you try to connect to the DLC10.

 

I want somebody from Xilinx to reply to this post and detail how this system is supposed to work.  What are the components of a hardware connection to an FPGA?  What are these server endpoints for? 

 

So here is the procedure I use to connect for debugging:

 

start viv, open the hw manager

  there is no hardware configured

  the hw_server is not running

plug in the usb connection to the DLC10

    lsusb shows DLC10 at 3.6

    connect the JTAG to the target hardware, apply power to target

    status LED is out

Open Target | Open New Target | next | next

    type: xilinx_tcf

    name: xilinx/usb3.8

    hw_server is running

    lsusb shows DLC10 is at 3.8

sudo chmod a+rw /dev/bus/usb/003/008

tcl: connect_hw_server

    status LED comes on green

    device is 000018af8a5401

tcl: open_hw_target

    the device tree is enumerated properly

 

How does this debugging interface work?

 

Vivado relies on a connection to the hw_server.  The hw_server connects to the DLC10 using USB.  This allows the DLC10 to be remotely located or shared among users.  The hw_server is a linux utility that is kicked off as a daemon process.  Vivado and the hw_server communicate using TCP.  You can use wireshark to snoop the network interface.  You will see requests and responses in easy to read words.  The back end of the hw_server connects to the DLC10 using USB. 

 

How did I debug this?

 

I started by verifying that the usb drivers were installed.  Apparently this happened when I installed vivado.  When I ran the installer, it noted that no changes were made.  Even tho the DLC10 is xilinx branded, the guts still have digilent firmware in them.  There is some xicom stuff too.

 

Next, I took a look at the hw_server.  I discovered that it can be run at the command line and it has debugging options.  Wireshark is great for looking at the chatter between vivado the server.  Snooping these packets I discovered that the port number changes from 3121 to 1534.  In the guts of the packets there are requests and responses for information about the several server endpoints that exist.  These are named like jss1, jss2, jsn1.  Stepping down thru the packets I found one that clued me into what was going on:

Server ID: jss3

Manufacturer: Xilinx

Serial: usb3.6

Description: open device failed: LIBUSB_ERROR_ACCESS

 

vivado was trying to connect to usb3.8!

 

I also looked at the USB chatter in wireshark.  You have to modprobe usbmon and then you can see /dev/usbmonN where N is the USB bus you want to snoop.  When the hw_server is not connected to the DLC10, there is an occasional GET DESCRIPTOR issued from the root hub.  When the hw_server is connected to the DLC10, there is a flurry of URB_CONTROL packets.  It turns out thats all you need to see, the contents of the packets is not important.

 

Seeing the USB device number change made me look carefully at the hw_server.  After several iterations of selecting stuff in the hardware mgr and looking for things on the system I found that the USB device number was incrementing when the hw_server was kicked off.

 

Relevant posts:

 

https://forums.xilinx.com/t5/Design-Tools-Others/Impact-can-t-find-cable-linux-avnet-lx9-microboard/td-p/603501

 

 

 

 

View solution in original post

0 Kudos