LoginSignup
0
1

More than 5 years have passed since last update.

xc3sprogをつかってFPGAをプログラムする

Posted at

xc3sprogはJTAG経由でXilinxのFPGAを(SRAM)プログラムする便利なツールです。Sourceforgeの本家のSVNがアクセスできなくなったようなので、Githubにあるコピーを使いますが、レポジトリによってはうまく行かないものがあるようです。以下はUbuntu16.04上でARTYをプログラムできるxc3sprogのビルドとインストールのメモです。

ビルド

sudo apt-get install libftdi-dev
git clone https://github.com/xtrx-sdr/xc3sprog.git
mkdir build
cd build
cmake ../
make
sudo make install

ARTYで動作確認

USB接続の確認

$ lsusb
Bus 001 Device 023: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC

xc3sprogで検出できるか確認(ARTYの場合はnexys4でOK)

$ xc3sprog -c nexys4 -v -j
XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 774 $ OS: Linux
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

Using built-in device list
Using built-in cable list
Cable nexys4 type ftdi VID 0x0403 PID 0x6010 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 60
Using Libftdi, Using JTAG frequency   6.000 MHz from undivided clock
JTAG chainpos: 0 Device IDCODE = 0x0362d093 Desc: XC7A35T
JTAG loc.:   0  IDCODE: 0x0362d093  Desc:                        XC7A35T Rev: A  IR length:  6

xc3sprogでFPGAをプログラム

$ xc3sprog -c nexys4 -v  sample.bit
XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 774 $ OS: Linux
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

Using built-in device list
Using built-in cable list
Cable nexys4 type ftdi VID 0x0403 PID 0x6010 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 60
Using Libftdi, Using JTAG frequency   6.000 MHz from undivided clock
JTAG chainpos: 0 Device IDCODE = 0x0362d093 Desc: XC7A35T
Created from NCD file: testbed;UserID=0XFFFFFFFF;Version=2016.4
Target device: 7a35ticsg324
Created: 2018/07/10 17:29:13
Bitstream length: 17536096 bits
done. Programming time 2987.4 ms
USB transactions: Write 1087 read 14 retries 8
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1