• 0
billium

HS1 HS3 to Spartan 6 in Linux

Question

I do not do a great deal of FPGA stuff, this time last year I finished a project and have not touched the tools since.  I now have a requirement to modify it for a different project.  So I try to connect to my FPGA board with Impact and it is so sloooooooow and then fails.

So I do this:

billy@aurora:~/FPGA$ djtgcfg init -d JtagHs1

Initializing scan chain...
Found Device ID: 24001093

Found 1 device(s):
    Device 0: XC6SLX ?

billy@aurora:~/FPGA$

The programming will not work (I assume because of the ?).  The board is a Mojo with a XC6SLX9 on it.  I have several of these and they all give the same result, same with a ValentF[x] LOGI-Bone (same FPGA).  these all worked before, but at least a year ago.  (All the boards work with their original content, the Mojos can be programmed using a Python program ) The Debian Linux will have been updated several times since!

I have a Nexys2 but that still works, no problems with Impact or Digilent command line.

I got an HS3 because I thought the HS1 may be defective, but same result.

Unrelated, but may use Adept runtime,  I have a Digilent Analog Discovery and Digital Discovery and they both work fine.

My version of Debian is Buster, though this was also tried on Stretch.

libusb is 1.0.22-2

digilent.adept.runtime_2.19.2-amd64.deb

If anybody has had a similar problem and knows how to cure it I would be grateful if you could help.

I suspect the FTDI driver!  This comes with adept runtime I think.

Thanks

Billy

Share this post


Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0

I am having similar issues.  I have programmed SPartan 6 with HS3 in Win 7 with some success, but for various reasons (mostly the fact that it is gettng harder to stay with Win7) I decided to set up a Linux dev environement.

After some fighting, I have ISE14.7 running OK.

 

But cable drivers is another issue. The HS3 is seen by JTAG Loader but no driver is found:

 

<code>

daniel@daniel-dev-laptop:~/work/dlaserhead$ source /opt/Xilinx/14.7/ISE_DS/settings64.sh
. /opt/Xilinx/14.7/ISE_DS/common/.settings64.sh /opt/Xilinx/14.7/ISE_DS/common
. /opt/Xilinx/14.7/ISE_DS/EDK/.settings64.sh /opt/Xilinx/14.7/ISE_DS/EDK
. /opt/Xilinx/14.7/ISE_DS/PlanAhead/.settings64.sh /opt/Xilinx/14.7/ISE_DS/PlanAhead
. /opt/Xilinx/14.7/ISE_DS/ISE/.settings64.sh /opt/Xilinx/14.7/ISE_DS/ISE
daniel@daniel-dev-laptop:~/work/dlaserhead$
daniel@daniel-dev-laptop:~/work/dlaserhead$
daniel@daniel-dev-laptop:~/work/dlaserhead$ ./JTAG_Loader_Debian_64 - dlh_firmware.hex
   __  _                 __                  _                  
   \ \| |_  __ _  __ _  / /   ___   __ _  __| | ___ _ __      
    \ \ __|/ _` |/ _` |/ /   / _ \ / _` |/ _` |/ _ \ '__|   
 /\_/ / |_| (_| | (_| / /___| (_) | (_| | (_| |  __/ |         
 \___/ \__|\__,_|\__, \____/ \___/ \__,_|\__,_|\___|_|
                 |___/                                          
 JTAG Loader by Kris Chaplin, Xilinx UK  
 Build : Date: Mar 16 2015, Time: 17:01:07              
 Target: Linux 4.19.0-4-amd64 x86_64 #1 SMP Debian 4.19.28-2 (2019-03-15)        
 Use the -h option if you need help      

Info:============================================
Info:CABLE name used in scanChain: auto, cableArgCount=0
Info:============================================
Info:Connecting to hw_server...
Info:Attempting to launch hw_server...
Info:
****** Xilinx hw_server v2013.3
  **** Build date : Sep 24 2013-19:37:55
    ** Copyright 1986-1999, 2001-2013 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

INFO: Set the HW_SERVER_ALLOW_PL_ACCESS environment variable to 1 to access any PL address memory in the TCF debugger memory window.

Info:Connection failed.
Info:AutoDetecting cable. Please wait.
Info:*** WARNING ***: When port is set to auto detect mode, cable speed is set to default 6 MHz regardless of explicit arguments supplied for setting the baud rates
Info:If you are using the Platform Cable USB, please refer to the USB Cable Installation Guide (UG344) to install the libusb package.
Info:Connecting to cable (Usb Port - USB21).
Info:Checking cable driver.
Info: Linux release = 4.19.0-4-amd64.
Warning:WARNING:Cse -  Module windrvr6 is not loaded. Please reinstall the cable drivers. See Answer Record 22648.
Info:Cable connection failed.

</code>

The cable is found, but there is an issue finding the driver. But in fact, something that looks like one does exist ... :

daniel@daniel-dev-laptop:~$ ls .cse/lin64/14.1/plugins/Digilent/libCseDigilent/
libCseDigilent.so  libCseDigilent.xml

 

but the question is - how do I get JTAG loader t actually see it and use it ... ?

 

Daniel

 

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Hello Daniel

What do you get with:

djtgcfg enum

and after that

djtgcfg init <device name>

 

Which flavour of Linux are you using?

Have you installed digilent adept and utilities?

 

Billy

 

Share this post


Link to post
Share on other sites
  • 0

hi Billy - I have it working. Indeed, Adept runtime and utilities were the issue. I not have JTAG Loader (debian) and Impact working fine. (This is on Debian buster - testing )

process is explained here for anyone that needs it (this is about Zynq, but seems to be fine with my Spartan6 / ISE 14.7 setup).

One thing to watch out for is that your build script loads the necessary paths - this is mine, for reference:

#!/bin/bash

# simple build script for the picoblaze assembler
# compiles the code, and loads it onto target RAM
# note that to make changes permanent you must then rebuild the .bin file
# using ISE and burn it onto the target using the MIMAS2 config tool
# (which is unfortunately windows only)

# make sure we see opbasm and friends
export PATH="$HOME/.local/bin:$PATH"

# make sure we see shared libs 
source /opt/Xilinx/14.7/ISE_DS/settings64.sh

# compile the ASM file
opbasm -i dlh_firmware.psm -6 -s 64 -x -m4 -m 2048
if [ $? -ne 0 ]; then
	echo "ASSEMBLY FAILED - aborting."
else
	echo "ASSEMBLY OK - copying formatted source to .psm"
	/bin/mv dlh_firmware.fmt dlh_firmware.psm
	./JTAG_Loader_Debian_64 -l dlh_firmware.hex
fi

(I am using JTAG-HS3 witha  Numato MIMAS2 board, hence comments - should adapt ok for other targets).

 

 

many thanks!

Daniel

 

 

Share this post


Link to post
Share on other sites
  • 0

Hello Daniel

Glad you got it working

I am the same as you but mine is not working!

Could you please do me a favour  and show what this returns when connected to your Spartan 6 via the HS3

djtgcfg enum

djtgcfg init -d JtagHs3

I assume you downloaded the latest Adept2

Have you tried programming with adept like this:

djtgcfg prog -d JtagHs3 -i 0 -f core_top.bit

 

Thanks

Billy

 

Share this post


Link to post
Share on other sites
  • 0
daniel@daniel-dev-laptop:~/work/dlaserhead$ djtgcfg enum
Found 1 device(s)

Device: JtagHs3
    Product Name:   Digilent JTAG-HS3
    User Name:      JtagHs3
    Serial Number:  210299A56205
daniel@daniel-dev-laptop:~/work/dlaserhead$ 
daniel@daniel-dev-laptop:~/work/dlaserhead$ 
daniel@daniel-dev-laptop:~/work/dlaserhead$ djtgcfg init -d JtagHs3
Initializing scan chain...
Found Device ID: 24001093

Found 1 device(s):
    Device 0: XC6SLX ? 
daniel@daniel-dev-laptop:~/work/dlaserhead$ 

 

Share this post


Link to post
Share on other sites
  • 0

no, I have only programmed with JTAG loader or the windows app provided by Numato.

 

Do you have the latest cse drivers? I noticed that the ones in the Xilinx distro were older - this is what I now have:

 

daniel@daniel-dev-laptop:~$ cat .cse/lin64/14.1/plugins/Digilent/libCseDigilent/libCseDigilent.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2007 Xilinx, Inc.  All rights reserved. -->
<CsePlugin>
    <fullname>Digilent Plug-in</fullname>
    <libname>libCseDigilent</libname>
    <vendor>Digilent</vendor>
    <version>2.5.2</version>
.
  .
  .
  (etc)

I don't know if that helped but I did update them.

 

Share this post


Link to post
Share on other sites
  • 0

and do you see the HS3 on the bus?

daniel@daniel-dev-laptop:~$ lsusb
.
.
.
Bus 002 Device 005: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC

 

Share this post


Link to post
Share on other sites
  • 0

I get the same as you for the enum and init commands, and the lsusb.  I thought the '?' was an error.  But I cannot program the Spartan either with Impact or Digilent's command line.  The command line (as in the first post) returns:

Quote

djtgcfg prog --verbose -d JtagHs3 --index 0 --file mojotestled/testled.bit

ERROR: failed to set programming file
Received error: unrecognized error code

My  Xilinx cse is libCseDigilent_2.4.4-x86 so I will check that out, but it should not stop the command line working.  I'll  will be back :) .

Share this post


Link to post
Share on other sites
  • 0

well, I haven't programmed using command line. Only withe the MIMAS2 util. Can you see the device with impact? that should work (there is a pdf about using impact with HS3 somewhere on digilent site)

also you could try running JTAG Loader debian version just to see if it finds your HS3

that all might tell you if it is a driver/version issue or something with your programming file?

 

Share this post


Link to post
Share on other sites
  • 0

Hello Jon

I am running Debian Buster direct, Adept2 is installed globally (/usr) using root. I've tried a Stretch PC again using root and just now I have tried a Sid PC.  They all show the cable is detected and the device found as XC6SLX ? . They all fail to program it with an unrecognized error code.

A year ago I was running Stretch when it was 'testing' and I had no problems with impact (can't remember trying djtgcfg).

I have now just tried a Windows Ten laptop and after waiting for the updates (not switched on for a long time :) ) I loaded Windows Adept2 and that works and programs o.k.

Have you see 'unrecognized error code' before?

I am assuming the latest linux djtgcfg prog works o.k.

Also I have a CMOD A7-15 that is seen as the correct FPGA, but I don't have any bit files to try as a I have not downloaded or installed Vivado.

Thanks for your help.

Share this post


Link to post
Share on other sites
  • 0

Hi @billium,

To clarify, ruffly a year ago you were able to configure you XC6SLX FPGA through iMPACT and Adept 2 using Debian 9. You have upgraded to Debian 10 and now iMPACT and Adept 2 are not able to configure the XC6SLX FPGA and get an unrecognized error code. 

Using the command "djtgcfg enum"  for Adept 2 what is the terminal text response?

I would like to add error logging in adept 2:

1. Add the ability to enable error logging by setting the

       "ADEPT_RT_LOGDETAIL" environment variable to a value greater than

       or equal to '1'. Presently all values greater than '0' result in the

       same output to the log file. Future revision may include the ability

       to output additional debug information by setting different error

       levels.

    2. Added the ability to specify the path to the error log file by

       setting the "ADEPT_RT_LOGFILE" environment variable. If error

       logging is enabled and the path has been specified then any errors

       that occur will be logged to the specified file. If error logging is

       enabled and the "ADEPT_RT_LOGFILE" environment variable has not been

       set then any errors that occur will be logged to a file named

       "DebugErc.log", which will be created under the application's

       current working directory.

Please attach the DebugErc.log when attempting to connect to the FPGA.

best regards,

Jon

 

Share this post


Link to post
Share on other sites
  • 0

Hello Jon

Not exactly, take the Debian change as continual, I use testing. So it is a continual change from the start at Stretch (Debian 9) through to Buster's (Debian 10) current state.  I do not use Impact much so would have never noticed at which point it failed.

I have just tested on a new Stretch install on a different PC and still get the same errors with djtgcfg.  I cannot install Impact as it would violate Xilinx's license.  I have set the environment variables as you have requested, but do not get a log file (There are eleven digilent files in /tmp after djtgcfg enum).  Here is some cli stuff:

Quote

billy@linuxcnc:~/FPGA$ env

SSH_CONNECTION=192.168.3.5 48048 192.168.3.17 22
LANG=en_GB.UTF-8
ADEPT_RT_LOGFILE=/tmp/debugerc.log
XDG_SESSION_ID=4
USER=billy
PWD=/home/billy/FPGA
HOME=/home/billy
SSH_CLIENT=192.168.3.5 48048 22
SSH_TTY=/dev/pts/0
MAIL=/var/mail/billy
ADEPT_RT_LOGDETAIL=3
TERM=xterm-256color
SHELL=/bin/bash
SHLVL=1
LANGUAGE=en_GB:en
LOGNAME=billy
XDG_RUNTIME_DIR=/run/user/1000
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
_=/usr/bin/env
OLDPWD=/home/billy
billy@linuxcnc:~/FPGA$ djtgcfg enum
Found 1 device(s)

Device: JtagHs3
    Product Name:   Digilent JTAG-HS3
    User Name:      JtagHs3
    Serial Number:  210299A8E05B
billy@linuxcnc:~/FPGA$ djtgcfg init -d JtagHs3
Initializing scan chain...
Found Device ID: 24001093

Found 1 device(s):
    Device 0: XC6SLX ?
billy@linuxcnc:~/FPGA$ djtgcfg prog -d JtagHs3 --verbose --index 0 --file testled.bit
ERROR: failed to set programming file
Received error: unrecognized error code
billy@linuxcnc:~/FPGA$

This is from the stretch box, the Buster is the same.

Share this post


Link to post
Share on other sites
  • 0

Hi @billium,

I would say to check for the log file  here:  /tmp/debugerc.log

If there is no log file create a file there and re-run adept 2 and see if it writes the to the log file. 

Also I was under the impression that ISE 14.7  webpack edition is available at not cost  which should allow you to configure the FPGA through iMPACT.

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 0

No there was not any change  to /tmp/debugerc.log (sorry about the missing g :) )

These are the adept2 install files I tried an older runtime but no older utilities are available for linux.

Apr 26 11:06 digilent.adept.runtime_2.19.2-amd64.deb
Apr 26 11:07 digilent.adept.utilities_2.2.1-amd64.deb

By violate, I mean installing the free version on more than one PC.  I don't want to uninstall / install ISE for each operating system check.

I use Impact on the Debian Buster PC. 

Share this post


Link to post
Share on other sites
  • 0

Hi @billium,

I looked more for the error you are getting and found a forum thread here that had the same issue.  I believe that the spartan 6 fpga on your non-digilent board is not one of the supported spartan 6's.  iMPACT would be your only option in this case.

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 0

Thanks for your help.

 

To me that is a bug in the Digilent software.  If they reported the error properly it would have not wasted so much of my time, and that of other users (the thread you quoted).

Instead of "unrecognized error code" try "Device 0: XC6SLX ? not supported"

The reason I was trying adept2 was to prove my hardware as iMPACT does not work for the XC6SLX9.  It takes a long time (up to 30s ) after each click to respond.  It finds the FPGA but because of the time delays, it won't program it.  iMPACT works o.k. when I plug in a Nexys2 (Spartan3).  It now may be something to do with libCseDigilent.so.

 

Share this post


Link to post
Share on other sites
  • 0

Hi @billium,

We have passed on your suggestion for a more clear error code for unsupported FPGA's.  I know that it might be a hassle but i believe you can used different email addresses to set up different accounts to be able to use ISE 14.7 webpack on different PC's. 

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 0

Not exactly in the spirit of the license!!!

Would love to see a Xilinx response  bearing in mind it is for fault finding purposes only.

 

If I do find a reason for this I will state it here.  If anybody else has experienced Impact  being very slow to respond then failing using Digilent hardware please say how you fixed it.

 

Fustrated Digilent user.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now