From: Tomek C. <tom...@gm...> - 2011-08-26 10:35:37
|
Hello! Thank you Uwe for xc3sprog and thank you Wojciech for making it possible on FreeBSD! This is great alternative for while iMPACT and messy Xilinx USB drivers, although I have FT2232 and Xilinx USB cables, I am using Xilinx XPC cable to flash my device with some automation script added :-) I am able to upload bitstream into FPGA, but I cannot program SPI memory with success :-( There are errors during the flash process in random intervals, maybe some buffer is not fast enough, is it possible to slow down the JTAG clock? I am usin replaced Flash chip that is supported by iMPACT - ST 25P64. Please advise. XC3SPROG (c) 2004-2010 xc3sprog project $Rev: 449 $ OS: FreeBSD Free software: If you contribute nothing, expect nothing! Feedback on success/failure/enhancement requests: http://sourceforge.net/mail/?group_id=170565 Check Sourceforge for updates: http://sourceforge.net/projects/xc3sprog/develop firmware version = 0x0404 (1028) CPLD version = 0x0012 (18) DNA is 0xd14100d525220801 XC3SPROG (c) 2004-2010 xc3sprog project $Rev: 449 $ OS: FreeBSD Free software: If you contribute nothing, expect nothing! Feedback on success/failure/enhancement requests: http://sourceforge.net/mail/?group_id=170565 Check Sourceforge for updates: http://sourceforge.net/projects/xc3sprog/develop firmware version = 0x0404 (1028) CPLD version = 0x0012 (18) JEDEC: 20 20 0x17 0x10 Found Numonyx Device, Device ID 0x2017 CFI: 0e1268c0004400e44860e0af7fc00c00 256 bytes/page, 32768 pages = 8388608 bytes total ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................usb_control_msg(0x40.0xa6 0x06) (shift) Unknown error ^C The verbose version is following: XC3SPROG (c) 2004-2010 xc3sprog project $Rev: 449 $ OS: FreeBSD Free software: If you contribute nothing, expect nothing! Feedback on success/failure/enhancement requests: http://sourceforge.net/mail/?group_id=170565 Check Sourceforge for updates: http://sourceforge.net/projects/xc3sprog/develop firmware version = 0x0404 (1028) CPLD version = 0x0012 (18) Using built-in device list JTAG chainpos: 0 Device IDCODE = 0x03840093 Desc: XC3SD1800 Created from NCD file: top.ncd Target device: 3sd1800afg676 Created: 2009/ 5/13 17:10: 5 Bitstream length: 8197280 bits DNA is 0xd14100d525220801 done. Programming time 4274.6 ms USB Read Transactions: 7 Write Transactions: 310 Control Transaction 318 XC3SPROG (c) 2004-2010 xc3sprog project $Rev: 449 $ OS: FreeBSD Free software: If you contribute nothing, expect nothing! Feedback on success/failure/enhancement requests: http://sourceforge.net/mail/?group_id=170565 Check Sourceforge for updates: http://sourceforge.net/projects/xc3sprog/develop firmware version = 0x0404 (1028) CPLD version = 0x0012 (18) Using built-in device list JTAG chainpos: 0 Device IDCODE = 0x03840093 Desc: XC3SD1800 Created from NCD file: pong_top.ncd;UserID=0xFFFFFFFF Target device: 3sd1800afg676 Created: 2011/08/25 17:10:44 Bitstream length: 8197280 bits JEDEC: 20 20 0x17 0x10 Found Numonyx Device, Device ID 0x2017 CFI: 0e1268c0004400e44860e0af7fc00c00 256 bytes/page, 32768 pages = 8388608 bytes total Sector 1, Writing page 29/ 4002usb_control_msg(0x40.0xa6 0x06) (shift) Unknown error ^C Maybe someone will like the automation script that flashes the Xilinx cable and then uploads bitfile directly into FPGA or into SPI based on commandline parameter, so I put initial version below: #!/bin/sh # Xilinx FPGA bitfile upload automation script using fxload and xc3sprog. # (C) 20110826 Tomasz Boleslaw CEDRO (http://www.tomek.cedro.info) CABLEFW=xusb_emb.hex VID=0x03fd PID=0x0007 ALTVID=0x03fd ALTPID=0x0008 DELAY=10 FXLOAD=`whereis -bq fxload` XC3SPROG=`whereis -bq xc3sprog` if [ ! $FXLOAD ]; then echo "You need to install 'fxload' port first..."; exit 1; fi if [ ! $XC3SPROG ]; then echo "You need to install 'xc3sprog' port first..."; exit 1; fi if [ ! $1 ]; then echo "Usage: script <bitfile> [spi]"; exit 1; fi echo "Flashing Xilinx Cable Firmware (you may need to set it up first)..." # First try the cable VID/PID with no firmware. echo "Flashing blank cable..." fxload -D vid=$VID,pid=$PID -t fx2 -s xusbdfwu.hex -I $CABLEFW # Then if necessary try reprogramming existing xilinx cable firmware. if [ $? -ne 0 ]; then echo "Trying to reflash existing xilinx cable firmware..." fxload -D vid=$ALTVID,pid=$ALTPID -t fx2 -s xusbdfwu.hex -I $CABLEFW fi if [ $? -eq 0 ]; then echo "Waiting for jtag interface firmware to settle..." sleep $DELAY if [ "$2" = "spi" ]; then echo "Uploading bitfile into SPI Flash (using provided bscan_spi.bit)..." xc3sprog -v -c xpc bscan_spi.bit xc3sprog -v -c xpc -I $1 else xc3sprog -c xpc $1 fi else echo "Flashing Xilinx JTAG Cable failed, exiting..." exit 0 fi Best regards, Tomek Cedro -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info |