解決方法來自這里:http://rmdir.de/~michael/xilinx/
問題緣由及解決辦法:
When using XILINX JTAG software like Impact, Chipscope and XMD on Linux, the proprietary kernel module windrvr from Jungo is needed to access the parallel- or usb-cable. As this module does not work with current linux kernel versions (> 2.6.18) a library was developed, which emulates the module in userspace and allows the tools to access the JTAG cable without the need for a proprietary kernel module.
是的,就是需要編譯這個庫,來模仿module的行為,其他問題在上面的主頁都好找,我是從git下的最新edition來用的,也不管穩定版還是開發版了:
1.新建個文件夾
2.git init
3.git clone git://git.zerfleddert.de/usb-driver
4.make
A:編譯前需要先安裝libusb-dev的包,否則報錯找不到usb.h:sudo apt-get install libusb-dev
B:Built library is 64 bit. Run `make lib32' to build a 32 bit version,只是提醒,不影響結果
5.找個地方把庫給copy過去,然后,在你source settings64.sh之后,打開ise之前,執行如下語句:
export LD_PRELOAD=/yourpath/libusb-driver.so
6.使用包里的腳本把usbcable的配置文件拷過去:sudo ./setup_pcusb /yourpath/12.4/ISE_DS/ISE
7.最后,安裝一個不知道干嘛的程序:sudo apt-get install fxload
如果在git上找不到,可以看這里:/Files/pied/usb-driver.zip
我做完上面的動作之后,impact打開不再有找不到module的提示,但是仍然沒有發現device,重新啟動計算機。重啟的時候提示usb加載有問題,是否跳過,按s跳過。。。
重啟后啟動impact,一切正常。
關於Chipscope analyzer
1.analyzer這個可執行文件在目錄$ise_install_dir/ISE/bin/lin64/,所以需要把這個路徑添加到PATH里:
sudo vi ~/.bashrc
export PATH=$PAHT:$ise_install_dir/ISE/bin/lin64/:
2.沒法執行analyzer
原因:ubuntu里面使用bash,他腳本里面用的sh,需要改變它調用的程序:
解決:修改下面兩個文件
$ise_install_dir/ISE/bin/lin64/unwrapped/analyzer
$ise_install_dir/ISE/bin/lin64/unwrapped/cs_common.sh
把第一行的#!/bin/sh替換成#!/bin/bash/
此時,沒其他問題的話,在terminal中輸入analyzer就可以運行chipscope pro analyzer。
經測試,此方法添加usb blaster之后,analyzer也可以正確識別usb blaster。
操作方法:JTAG Chain->Xilinx USB Cable...
如果已有給Cable上電,此時,analyzer軟件會自動鏈接cable。你可以嘗試在彈出的窗口中點擊blink the LED,usb blaster旁邊的LED就會閃爍。
選擇合適參數,OK,然后你就可以使用chipscope了。
另外,這里的3Mhz,12Mhz什么的,和ILA沒什么關系的,它由usb blaster的硬件決定,是ICON和電腦間的通信速率,數據都是存在ICON內后被電腦通過JTAG工具讀出來。
使用問題記錄:
1)The idcode read from the device does not match the idcode in the bsdl File
Xilinx官方的記錄是供電或者是電磁兼容問題。最后通過降低了impact使用JTAG的速率(從6Mhz降為3Mhz),解決了問題。具體參考了文檔AR#13529.