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: 
Observer derrickg
Observer
1,436 Views
Registered: ‎05-04-2016

Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

I have found resources that will let me:

  1. Turn a microzed into an expensive JTAG cable. (xapp1251)
  2. Use PCIe to debug a locally connected FPGA. (video)

What I haven't found is a driver/program that will let me run xvcserver on a Zynq to debug a design on the same chip.  Does such a thing exist?  Or do I have to modify one of the previously mentioned examples to implement this myself?  We actually did try to adapt xapp1251 to allow the ARM to drive JTAG for the FPGA, but it locks at some point so I think that is a deadend. 

This seems like an obvious application, so I am perplexed by the lack of an examples.

0 Kudos
1 Solution

Accepted Solutions
Observer derrickg
Observer
1,306 Views
Registered: ‎05-04-2016

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Okay. Sounds like the non-PCIe version is still using the UIO driver.  Are there plans to create a custom driver/device node for the non-PCIe version?

0 Kudos
10 Replies
Moderator
Moderator
1,390 Views
Registered: ‎02-09-2017

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Hi @derrickg,

 

That's a great question. We are actually working on a new XAPP (similar to the XAPP1251) that will use a MPSoC and have more use cases, such as the one you've mentioned.

You definitely can do that configuration, and you will need to know how to use the Petalinux to create a bootable image to place on a SD card and boot the PS side of the Zynq.

As an example, you'd create the configuration as below, using the Debug Bridge IP.

XVC_Zynq_image.png

In Block Design, that diagram would translate as something like this (there' some extra IP's such as a counter, just to emulate a logic and allow us to use the ILA).

XVC_Zynq_Block_Design.png

Observe the PS talks via AXI to an AXI Interconnect, which talks to the Debug Bridge (in AXI to BSCAN mode), which talks to the ILA/VIO via BSCAN.

From here, you'd need to generate bitstream and Export Hardware including bitstream.

Now, with the hdf file that has been generated by the export, you can use Petalinux to create a Linux Embedded image for the Zynq (Similar process as explained in the XAPP1251, pg. 11).

 

The following page has more resources on how to use the Petalinux and examples:

https://www.xilinx.com/support/documentation-navigation/design-hubs/dh0016-petalinux-tools-hub.html

 

Please let me know if you have any questions.

Thanks,

Andre Guerrero

Product Applications Engineer

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer derrickg
Observer
1,380 Views
Registered: ‎05-04-2016

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Thanks for those diagrams.  That gives me confidence that I have things hooked up right.

I actually haven't ever used peta linux, as we chose to go with Arch several years ago.  Does peta linux have a version of xvcserver that can talk to the debug bridge?  What kernel driver is it using?  I grep'ed the xilinx-2018.2 version of the kernel code and didn't see a 'compatible' string that matched the one in the generated device tree. The closest I have found to a kernel driver was the PCIe one.  I could probably hack it to strip out all of the PCIe stuff and make it a platform driver instead, but if there is already one available then I don't want to go down that rabbit hole.

 

 

0 Kudos
Moderator
Moderator
1,311 Views
Registered: ‎02-09-2017

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Hi @derrickg,

 

it does not include the XVC application by default. While creating the Petalinux image, you must include the XVC application file in it.

The file is already included in the example design package that you download from the XAPP1251. From the instructions on how to create the Petalinux Image, on step 3 you can see where a template.c file is replaced by the xvcServer.c file, in order to enable such feature.

petalinux_XVC_server.JPG

You can also download the xvcServer.c file from Xilinx Github: https://github.com/Xilinx/XilinxVirtualCable

 

 

Andre Guerrero

Product Applications Engineer

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer derrickg
Observer
1,307 Views
Registered: ‎05-04-2016

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Okay. Sounds like the non-PCIe version is still using the UIO driver.  Are there plans to create a custom driver/device node for the non-PCIe version?

0 Kudos
Observer derrickg
Observer
1,283 Views
Registered: ‎05-04-2016

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

I was able to get xvcServer working, which is awesome.  Now I am trying to debug an issue that causes the ARM to crash.  It appears that if I select Bypass-mode that I should be able to swap between the soft bscan and the hard JTAG so that I can run JTAG on a processor that doesn't crash.  How to I switch between internal and external JTAG?

0 Kudos
Visitor sqf09fd
Visitor
907 Views
Registered: ‎05-17-2018

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Hi Andre,

 

I'm recently working on making XVC server running on arm in MPSOC. I'm using the debug bridge 3.0 communicating with the arm over AXI LITE (exactly the same way with the figure you posted here). For the software side, I'm using the xapp1251 code. With the new updated AXI LITE register map in PG245, I thought it would be very easy to make it work.

However, now I'm stuck on making arm communicate with the debug bridge. I'm running Ubuntu on the arm, therefore I use "/dev/mem" to access the physical memory where debug bridge was mapped to. But every time when I tried to write something to the debug bridge AXI LITE registers, the arm core would hang immediately.

I wonder do you have any clue of what's happening? Or it would be even better if you can share with me some software reference design regarding running XVC server on arm.

 

Thanks,

Clark

 

0 Kudos
Visitor sqf09fd
Visitor
869 Views
Registered: ‎05-17-2018

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution
never mind, I made it work, thanks!
0 Kudos
Observer derrickg
Observer
854 Views
Registered: ‎05-04-2016

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

I was pulled off on another project, but was able to get back to this.  It appears that I can use the soft interface until I plug in the hardware JTAG, and then it permanently switches.  This seems to make sense as it defaults to the interface I can use remotely, and automatically (and permanently) switches to hardware interface if that is available.

0 Kudos
651 Views
Registered: ‎06-27-2018

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

Hello Andre,

how far are you with th XAPP?

Is it possible to use the debug bridge and as  fall back the classical JTAG connection in the Hardware Manager?

I just added the debug bridge with bridge type "AXI to bscan" and enabled the JTAG Fallback Mode. However, I couldnt connect to the ILA via JTAG anymore.

 

0 Kudos
Observer derrickg
Observer
637 Views
Registered: ‎05-04-2016

Re: Using XVC and Debug bridge to chipscope a local Zynq design

Jump to solution

For fallback, I had to create two cores. The AXI to BSCAN, then I changed the parameters to allow fallback, which created a m0_bscan output port, then I instatiated a debug bridge and connected to that port.

Inside the AXI to BSCAN there is a big mux that seems to do the switching between external JTAG and the soft bscan.

I tried to do this in 2017.4, but it doesn't work i that version of the IP, so I am waiting for 2019.1 to upgrade and add it to our main project.

0 Kudos