konosubakonoakua / blog

https://konosubakonoakua.github.io/blog/
MIT License
0 stars 0 forks source link

[hw][fpga][xilinx] ise 14.7 & vivado setup #76

Open konosubakonoakua opened 1 month ago

konosubakonoakua commented 1 month ago

troubleshooting

Xilinx JTAG Programmer (USB) cable not found

[!IMPORTANT] Only Platform Cable USB II Platform Cable USB Model: DLC9G is supported!!!!!!!!!!!! do not use digilent ft232 jtag cables

First of all, this guide assumes you have installed Xilinx ISE (version 14.7 is used here) into the default path of /opt/Xilinx/ISE/

Next, you will need to have GIT installed to get the required libraries. This approach does not use the official Xilinx libraries but a replica of them. You will also need libusb-dev which is required in the compiling of the drivers. You will also need build-essential metapackage for the compiler. On a 64-bit host, you will need to get the 32-bit version of libc6-dev-i386.

On 32-bit

sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev fxload

On 64-bit

sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev-i386 fxload

Philipp HÃrauf reports there is a need to install ia32-libs-dev on some 64-bit systems, though I didn’t require this.

Clone usb-driver:

sudo git clone git://git.zerfleddert.de/usb-driver /opt/Xilinx/ISE/usb-driver

Compiling the Driver This step is once simple command, but the most important. It compiles the cable driver required. There are two versions depending on the version (32-/64-bit) of Xilinx ISE you have. Firstly change into the source directory created in the previous step. Then you need to issue the make command.

cd usb-driver/
sudo make
sudo cp libusb-driver.so libusb-driver-DEBUG.so /usr/local/lib
### To solve windrvr6 not found
sudo sh -c 'echo "export LD_PRELOAD=/usr/local/lib/libusb-driver.so" >> /etc/bash.bashrc'

chmod +x ./setup_pcusb
./setup_pcusb /opt/Xilinx/ISE/14.7/ISE_DS/ISE/

sudo cp /opt/Xilinx/ISE/14.7/ISE_DS/ISE/bin/lin64/xusbdfwu.rules /etc/udev/rules.d/50-xusbdfwu.rules
sudo sed -i -e 's/TEMPNODE/tempnode/' -e 's/SYSFS/ATTRS/g' -e 's/BUS/SUBSYSTEMS/' /etc/udev/rules.d/50-xusbdfwu.rules
sed /opt/Xilinx/ISE/14.7/ISE_DS/ISE/bin/lin64/xusbdfwu.rules -e 's:TEMPNODE:tempnode:g' | sed 's:BUS=="usb", ::g' | sed 's:SYSFS:ATTR:g' | sudo tee /etc/udev/rules.d/50-xusbdfwu.rules 1>/dev/null

sudo cp -f /opt/Xilinx/ISE/14.7/ISE_DS/ISE/bin/lin64/xusb*.hex /usr/share/
sudo chmod 644 /usr/share/xusb*.hex
sudo sed -i -e 's/#!\/bin\/sh/#!\/bin\/bash/' /opt/Xilinx/ISE/14.7/ISE_DS/PlanAhead/bin/planAhead
sudo sed -i -e 's/#!\/bin\/sh/#!\/bin\/bash/' /opt/Xilinx/ISE/14.7/ISE_DS/PlanAhead/bin/loader
sudo sed -i -e 's/#!\/bin\/sh/#!\/bin\/bash/' /opt/Xilinx/ISE/14.7/ISE_DS/ISE/bin/lin64/unwrapped/analyzer
sudo /bin/udevadm control --reload-rules

then we can use xmd to verify the connections

source /opt/Xilinx/ISE/14.7/ISE_DS/settings64.sh
xmd

XMD% connect mdm

JTAG chain configuration
--------------------------------------------------
Device   ID Code        IR Length    Part Name
 1       13631093           6        XC7A100T
ERROR: Could not detect MDM peripheral on hardware. Please check:
    1. If FPGA is configured correctly
    2. MDM Core is instantiated in the design
    3. If the correct FPGA is referred, in case of multiple FPGAs
    4. If the correct MDM is referred, in case of a multiple MDM system

with id code & part name, we can say that the connection between jtag cable & fpga chip is good.

Then we open iMPACT-->double click Boundary Scan-->Right click on blank area: initialize chain--->see the jtag daisy link.

links

konosubakonoakua commented 1 month ago

Digilent JtagSMT2 with iMPACT

[!IMPORTANT] If you just want to use digilent jtag, just do this step. libusb-driver.so is only needed, when DLC9G CABLE is used.

cd /opt/Xilinx/ISE/14.7/ISE_DS/common/bin/lin64/digilent
sudo ./install_digilent.sh
# selected libcsddigilent install to /home/rf/.cse
# or try /opt/Xilinx/ISE/14.7/ISE_DS/ISE

create desktop file like this:

[Desktop Entry]
Version=1.0
Name=Xilinx ISE Impact
Comment=Xilinx ISE 14.7 Impact
Exec=bash -c "export XIL_CSE_PLUGIN_DIR='/home/rf/.cse' && source /opt/Xilinx/ISE/14.7/ISE_DS/settings64.sh && /opt/Xilinx/ISE/14.7/ISE_DS/ISE/bin/lin64/impact"
Icon=/opt/Xilinx/ISE/14.7/ISE_DS/ISE/data/images/impact.png
StartupNotify=true
Type=Application
Categories=Application;

if busy, then sudo rm -f /tmp/digilent-adept2-*

digilent utilities

Device: JtagSmt2 Device Transport Type: 00020001 (USB) Product Name: Digilent JTAG-SMT2 User Name: JtagSmt2 Serial Number: 210251190311

rf@:~$ sudo djtgcfg init -d JtagSmt2 Initializing scan chain... Found Device ID: 13631093

Found 1 device(s): Device 0: XC7A100T

konosubakonoakua commented 1 month ago

downloads

for ise impact (jtag scan)

[Desktop Entry]
Version=1.0
Name=Xilinx ISE Impact
Comment=Xilinx ISE 14.7 Impact
Exec=bash -c "export LD_PRELOAD=/opt/Xilinx/ISE/usb-driver/libusb-driver.so && source /opt/Xilinx/ISE/14.7/ISE_DS/settings64.sh && /opt/Xilinx/ISE/14.7/ISE_DS/ISE/bin/lin64/impact"
Icon=/opt/Xilinx/ISE/14.7/ISE_DS/ISE/data/images/impact.png
StartupNotify=true
Type=Application
Categories=Application;

for vivado 2024

[Desktop Entry]
Type=Application
Name=Vivado 2024.1
Exec=bash -c "source /tools/Xilinx/Model_Composer/2024.1/settings64.sh && source /tools/Xilinx/Vitis/2024.1/settings64.sh && source /tools/Xilinx/Vitis_HLS/2024.1/settings64.sh && source /tools/Xilinx/Vivado/2024.1/settings64.sh && /tools/Xilinx/Vivado/2024.1/bin/vivado"
Icon=/tools/Xilinx/Vivado/2024.1/doc/images/vivado_logo.png
StartupNotify=true
Categories=Application;

for vitis 2024

[Desktop Entry]
Type=Application
Name=Vitis 2024.1
Exec=bash -c "source /tools/Xilinx/Model_Composer/2024.1/settings64.sh && source /tools/Xilinx/Vitis/2024.1/settings64.sh && source /tools/Xilinx/Vitis_HLS/2024.1/settings64.sh && source /tools/Xilinx/Vivado/2024.1/settings64.sh && /tools/Xilinx/Vitis/2024.1/bin/vitis"
Icon=/tools/Xilinx/Vitis/2024.1/doc/images/ide_icon.ico
StartupNotify=true
Cat
egories=Application;

for DocNav

[Desktop Entry]
Type=Application
Name=DocNav 2024.1
Exec=bash -c "source /tools/Xilinx/Model_Composer/2024.1/settings64.sh && source /tools/Xilinx/Vitis/2024.1/settings64.sh && source /tools/Xilinx/Vitis_HLS/2024.1/settings64.sh && source /tools/Xilinx/Vivado/2024.1/settings64.sh && /tools/Xilinx/Vitis/2024.1/bin/vitis"
Icon=/tools/Xilinx/DocNav/resources/doc_nav_application_48.png
StartupNotify=true
Categories=Application;

for PDM

[Desktop Entry]
Type=Application
Name=PDM 2024.1
Exec=bash -c "source /tools/Xilinx/Model_Composer/2024.1/settings64.sh && source /tools/Xilinx/Vitis/2024.1/settings64.sh && source /tools/Xilinx/Vitis_HLS/2024.1/settings64.sh && source /tools/Xilinx/Vivado/2024.1/settings64.sh && /tools/Xilinx/Vitis/2024.1/bin/vitis"
Icon=/tools/Xilinx/PDM/2024.1/doc/images/pdm_logo64.png
StartupNotify=true
Categories=Application;
konosubakonoakua commented 1 month ago

docs

konosubakonoakua commented 1 month ago

vivado 2019

can both use Platfrom cable usb (DLC9G) & Digilent JtagSMT2.

konosubakonoakua commented 1 month ago

cannot find jtag device (in virtualbox)

konosubakonoakua commented 1 month ago

vivado 2019 hw_server error (in virtualbox linux mint22)

connect_hw_server
INFO: [Labtools 27-2285] Connecting to hw_server url TCP:localhost:3121
INFO: [Labtools 27-2222] Launching hw_server...
INFO: [Labtools 27-2221] Launch Output:

****** Xilinx hw_server v2019.1
  **** Build date : May 24 2019 at 15:06:40
    ** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

ERROR: [Labtoolstcl 44-494] There is no active target available for server at localhost.
 Targets(s) ", jsn-JTAG-SMT2-210251190311" may be locked by another hw_server.
disconnect_hw_server localhost:3121

Solution:

Finally: image

konosubakonoakua commented 2 weeks ago