PYNQ: PYTHON PRODUCTIVITY

PYNQ-Z2 board: Cannot program the target device!

Hi @cathalmccabe,

I am currently running Vivado 2019.2 with the new Vitis.

What I did :
I created successfully a simple up-down Johnson counter module in verilog and connected this in a block diagram together with a clock divider module in VHDL + linked this to a Zynq7 Processing System block. Created a wrapper & then synthesized / implemented & created a .bit file. I used as a target board the PYNQ-Z2.

I then exported Hardware (included the bitstream) creating an XSA file, launched Vitis, created a platform project for the zynq from the hardware specification (XSA). I also created an application project (app) (selected ‘Hello World’ that controls the hardware and generated a Boot Image (Boot.bin) & fsbl.elf

I then selected JTAG boot mode by putting the jumper link (JP1) to the furthest right (JTAG) and turn ON the PYNQ-Z2 board via the USB.power cable (had also Ethernet cable connected to the board)

Issue I have :
Then I went to the Vivado project, ‘PROGRAM AND DEBUG’ section, ‘Open Hardware Manager’ and tried to ‘open Target’ BUT I get “No Hardware Target is open!” message.
ie No Hardware targets exist on the server [localhost:3121]

‘Localhost status’ shown to be ‘connected’ but I cannot see the Zynq FPGA target device loaded (ie listed) to be able program the device.

There is something fundamental I am missing here!

Will appreciate your review comments to what I am doing wrong…

Your prompt reply to this matter will be appreciated.

Regards,

Kevin

Looking on the internet for a similar error message, I’ve seen the following suggested :

"Please be sure you check “Install Cable Drivers” on the Installation Options group of Vivado installer. I’ve been able to obtain the same error when installing Vivado without this option, and avoided it when installing with “Install Cable Drivers” checked. My suggestion is to uninstall Vivado and re-install or you can install drivers manually as explained here http://www.xilinx.com/support/answers/54381.html " <- This link is for ISE not Vivado

Could this be my issue? ie need to install cable drivers ?

To save me time, how can I check if cable drivers are installed or not ? They may be installed & I could be waisting my time re-installing them.

Also, If I uninstall Vivado 2019.2 would I loose all the designs I created so far? All my code is saved under my C drive so I think I should be ok here.

Best option for me is to install the cable drivers for Vivado 2019.2 manually. Above link states ISE not Vivado.

Any updated link information to update drivers for Vivado 2019.2, I will appreciate. Currently also looking on the internet wrt this matter…

On Vivado 2019.2, I went to help menu and selected ‘Add Design Tools or Devices’ option

Noticed then the Installation options box “Install Cable Drivers” unticked. Ticked that option, pressed next and then selected the ‘install’ option.

Installation didn’t take long to complete. Got the message that installation completed successfully.

However, I have my doubts if installation was performed ok because I could not see the drivers been installed and when I repeated the same as above ie

In the help menu and selected again ‘Add Design Tools or Devices’ option

Noticed then the Installation options box “Install Cable Drivers” was still unticked !

Doesn’t this method supposed to install the Cable drivers successfully ?

Any response to this ticket will be appreciated.

My last attempt stated above, that should have installed the Cable Drivers ok following that method. Wondering why it hasn’t done that & what is the best way to check whether the Cable Drivers are installed or not? Perhaps I have a corrupted version of the Cable Drivers but I have seen nothing listed on the Device Manager window as suggested in few other posts I’ve seen.

I guess my question for this process is why would you do this instead of the PYNQ flow? PYNQ supports Vitis designs as well.

Hi @rock,

PYNQ supports Vitis designs as well.

Wrt your above statement, has anyone tried getting Vitis to work on the PYNQ board first running a simple “Hello World” application code to print 'Hello World" on the terminal? I cannot even get that going.

My real issue is that I cannot see/get the Zynq FPGA target device loaded (ie listed) to be able program the device and I was wondering whether it was a cable drivers issue (more likely) or something else in my setup.

PYNQ Z2 board is the only board I have at home. Whilst looking for work, trying familiarise myself & get Vitis to work and see my hardware design working on the board without using the jupyter notebook/Python programming flow.

I also installed 2019.1 which supports SDK (not Vitis) and during the installation process “install Cable Drivers” option was ticked. I still see the same issue even with vivado 2019.1 SDK ! Again here the Cable Drivers may not have been installed ok …

There are many Vitis examples running on PYNQ. e.g. https://github.com/Xilinx/PYNQ-HelloWorld

If you want to manually load bitstream (not during boot), you should not replace the boot.bin in the boot partition. Just use the original boot partition. pynq only needs the bitstream and hwh files.

Hi,
Just to be really clear, do you have the Micro USB cable connected properly to the board? I’m checking that you don’t expect to connect over Ethernet.
Do you see the red power LED when you turn on the board?
Can you try another USB cable in case the one you have is faulty?

I think the drivers will have been installed.
If you are using windows can you open the device manager and see if there is a COM port for the board? (disconnect/reconnect the board and check if a COM port disappears/reappears.)

Cathal

Hi @rock,

Aren’t all those examples using mainly the jupyter notebook with Python code?

I used the Dupyter notebook with python code already weeks ago loading a bitstream,
.hwh & .tcl overlay (.vhd code was a simple adder/multiplier with AXI lite) used
the write/read function checking the adder/multiplier functionality. That was not using Vitis.

What I want now is to forget about Jupyter notebook and load the generated bitfile and any other associated files I generated by Vivado to the board and check if it functions
ok.

First I wanted to run a simple ‘Hello World’ application using Vitis or SDK to see whether that gets displayed ok to an output terminal.

Then wrt the Johnson up/down 4bit counter .bit code I created will like to just use the PYNQ-Z2 board 2 switches sw0/sw1 (to control goLeft/goRight) , one of the push buttons BTN0 (stopping the counter) and 4 LEDs (displaying the current 4bit output). I do not require any application code to run this example here. I’ve generated pin constraints to do this.

For the above 2 tests I set the boot mode to JTAG but I could not program the FPGA as reported in my previous post comments

There is also another boot mode available QSPI. The PYNQ Z2 board has an on board 16MB QSPI flash that the ZYNQ can boot from.

Looking into this method at the moment found on youtube :
https://www.youtube.com/watch?v=hMEdxzVU5Hk

Hi @cathalmccabe,

MicroUSB cable is connected properly to the board. With SD boot mode I can see the board booting up ok as expected

ie red led comes ON first right after powering the board then after a while green LED (Done) turns ON and then 2 blue LEDS flashing (next to the SW0/SW1) together with the 4 Green LEDs (next to the BTN0 -> BTN3 push buttons). Then the 2 Blue LEDs switch off and the 4 Green LEDs remain ON as expected. So booting via SD MicroSD card works fine

Can you access the JTAG chain when in SD boot mode? (When PYNQ has loaded?) You should be able to do this in either boot mode.

For the cable drivers, you should be able to find a “digilent” exe in your installation. (I’m assuming you are on Windows.)
{vivado install directory}\data\xicom\cable_drivers
You can try rerunning this if you think the drivers haven’t been installed. If you are on Windows, I’d check for an unrecognized device in device manager first.

Cathal

Hi @cathalmccabe,

Wrt your other comment :

If you are using windows can you open the device manager and see if there is a COM port for the
board? (disconnect/reconnect the board and check if a COM port disappears/reappears.)

I am using windows 10.
I opened the device manager and under Ports (COM & LPT) I see :

Warning :
Communications Port (COM3) and there is a warning
“Windows cannot determine the settings for this device. Consult the documentation that came with this device and use the Resource tab to set the configuration. (Code 34)”

Don’t know whether this COMs port is the one connected to the board. I disconnected/reconnected the board but I could see no changes to that COMs port on the Device Manager ie that COMs port does not disappear/reappear. It remains there with the yellow triangle warning listed above

Hi @cathalmccabe ,

I am on windows 10.

See the following directory on my 2019.1 vivado :

C:\Xilinx\Vivado\2019.1\data\xicom\cable_drivers\nt64\digilent

When I tried to execute install_digilent.exe

I had the following message :

“Your system is up-to-date with the components of this installer. Do you want to continue the installation?”

My system looks up-to-date. But shall I say yes to continue re-installation ?

If the faulty port doesn’t disappear when you disconnect, then it isn’t the one connected to the board. I guess it may be possible your USB controller is faulty. It would be good to try resolve that error.

Do you see any other unrecognized (USB) device(s)?

Cathal

Thanks very much for your help Cathal :slight_smile:

I have good news :slight_smile: All working now !

The main issue I had was with the USB to microUSB cable. I was getting power but it was not recognizing it as a USB serial port. Now after replacing the faulty cable, it came up as USB Serial Port (COM5). I could connect/disconnect ok.

I then tested one of my simple codes a switch illuminating an LED and it works fine :slight_smile:

Followed the steps of

  https://www.youtube.com/watch?v=hMEdxzVU5Hk

& all works now.

I could even see on Vivado Program & Debug / Open Hardware Manager / open Target the Zynq device which I could not see before

Great, thanks for posting back to let us know. I’ve seen a few damaged cables, and I’ve also had some USB cables that only had power wires, and no data wires.

Good luck with your project!

Cathal

Hi guys,

I am facing issues with programming the device just like @kanugent said. In my case I am using linux, but the rest seem the same. I am probably missing something here but I expected things to be quite straightforward. To summarize what I have tried:

  1. Setting boot option in JP1 to JTAG
  2. Powering the device from USB (using the cable provided by TUL with Pynq-Z2)
  3. In Vivado (and in SDK also), hardware manager connects to localhost (there is no other option to that). Is there a way really to tell the programmer which USB port to use?
  4. If I boot in SD Card mode, I can verify that the port is working correctly since I can connect to the OS running via ‘screen’ program.

Is there any clear guide that shows how to connect?? If there is an additional setup for the board, shouldn’t it be mentioned in Pynq-Z2 documentation? Or the board is supposed to function only under PYNQ framework?

Thank you in advance!

Regards,
Stamatis

Seems the solution was simpler than I thought. All I needed to do was installing the drivers… I assumed that the drivers are automatically installed during Vivado installation. Running the installer fixed the problem!

  1. Go to folder: /PathToXilinx/Vivado/2019.1/data/xicom/cable_drivers/lin64/install_script/install_drivers
  2. Execute ./install_drivers