13,230
回編集
| (同じ利用者による、間の25版が非表示) | |||
| 8行目: | 8行目: | ||
== 依存関係のライブラリのインストール == | == 依存関係のライブラリのインストール == | ||
==== パッケージ管理システムからインストール ==== | |||
sudo zypper install | sudo zypper install libncurses5 libftdi1-devel | ||
<br> | |||
==== ソースコードからインストール ==== | |||
NCurses 5ライブラリ (64ビット向け) のインストールするには、[[インストール - Code Composer Studio#libncurses5のインストール]]を参照すること。<br> | |||
<br> | |||
libftdi1ライブラリをインストールする前に、libusb 1.0ライブラリおよびlibconfuseライブラリをインストールする必要がある。<br> | |||
* libusb 1.0 | |||
*: ユーザ空間からUSBデバイスと通信するためのライブラリである。 | |||
*: libftdiライブラリにより必要とされる。 | |||
* libconfuse | |||
*: 設定ファイル解析用ライブラリである。 | |||
*: ftdi_eepromライブラリにより必要とされる。 | |||
<br> | |||
libftdi1ライブラリのインストールに必要なライブラリをインストールする。<br> | |||
sudo zypper install swig libboost_headers1_66_0-devel libusb-1_0-devel python3-devel | |||
<br> | |||
まず、[https://github.com/libconfuse/libconfuse libconfuseの公式Webサイト]にアクセスして、ソースコードをダウンロードする。<br> | |||
ダウンロードしたファイルを解凍する。<br> | |||
tar xf confuse-<バージョン>.tar.xz | |||
cd confuse-<バージョン> | |||
<br> | |||
libconfuseをビルドおよびインストールする。<br> | |||
mkdir build && cd build | |||
../configure --prefix=<libconfuseのインストールディレクトリ> | |||
make -j $(nproc) | |||
make install | |||
<br> | |||
~/.profileファイル等に、以下の環境変数を追記する。<br> | |||
<syntaxhighlight lang="sh"> | |||
# ~/.profileファイル | |||
export PATH="/<libconfuseのインストールディレクトリ>/bin:$PATH" | |||
export LD_LIBRARY_PATH="/<libconfuseのインストールディレクトリ>/lib64:/<libconfuseのインストールディレクトリ>/lib:$LD_LIBRARY_PATH" | |||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pkg-config --variable pc_path pkg-config)" | |||
export PKG_CONFIG_PATH="/<libconfuseのインストールディレクトリ>/lib64/pkgconfig:/<libconfuseのインストールディレクトリ>/lib/pkgconfig:$PKG_CONFIG_PATH" | |||
</syntaxhighlight> | |||
<br> | |||
次に、libftdi1ライブラリをインストールする。<br> | |||
[https://www.intra2net.com/en/developer/libftdi/download.php libftdi1ライブラリの公式Webサイト]にアクセスして、ソースコードをダウンロードする。<br> | |||
ダウンロードしたファイルを解凍する。<br> | |||
tar xf libftdi1-<バージョン>.tar.bz2 | |||
cd libftdi1-<バージョン> | |||
<br> | |||
mkdir build && cd build | |||
cmake -DCMAKE_BUILD_TYPE=Release \ | |||
-DCMAKE_INSTALL_PREFIX=<libftdi1ライブラリのインストールディレクトリ> \ | |||
.. | |||
make -j $(nproc) | |||
make install | |||
<br> | |||
~/.profileファイル等に、以下の環境変数を追記する。<br> | |||
<syntaxhighlight lang="sh"> | |||
# ~/.profileファイル | |||
export PATH="/<libftdi1のインストールディレクトリ>/bin:$PATH" | |||
export LD_LIBRARY_PATH="/<libftdi1のインストールディレクトリ>/lib64:/<libftdi1のインストールディレクトリ>/lib:$LD_LIBRARY_PATH" | |||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pkg-config --variable pc_path pkg-config)" | |||
export PKG_CONFIG_PATH="/<libftdi1のインストールディレクトリ>/lib64/pkgconfig:/<libftdi1のインストールディレクトリ>/lib/pkgconfig:$PKG_CONFIG_PATH" | |||
</syntaxhighlight> | |||
<br><br> | |||
== Xilinx ISEのダウンロード == | |||
[https://japan.xilinx.com/support/download/index.html/content/xilinx/ja/downloadNav/vivado-design-tools/archive-ise.html Xilinxの公式Webサイト]にアクセスして、Xilinx ISEをダウンロードする。<br> | |||
<br><br> | <br><br> | ||
| 16行目: | 80行目: | ||
su | su | ||
./xsetup | ./xsetup | ||
# または | |||
su -p -c "./xsetup" | |||
<br> | <br> | ||
インストール画面が起動するので、画面の指示に従ってインストールを行う。<br> | インストール画面が起動するので、画面の指示に従ってインストールを行う。<br> | ||
| 27行目: | 95行目: | ||
Driver installation failed. | Driver installation failed. | ||
Please check the /.xinstall/install.log file for more information on the cause of the installation failure. | Please check the /.xinstall/install.log file for more information on the cause of the installation failure. | ||
# 訳 : | |||
ドライバーのインストールに失敗しました。 | |||
インストールに失敗した原因については、/.xinstall/install.logファイルを確認してください。 | |||
<br> | <br> | ||
Xilinx ISEのインストール完了後、以下のディレクトリにアクセスする。<br> | Xilinx ISEのインストール完了後、以下のディレクトリにアクセスする。<br> | ||
| 63行目: | 136行目: | ||
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0013", RUN\+="/sbin/fxload -v -t fx2 -I /<Xilinx ISEのインストールディレクトリ>/<バージョン>/ISE_DS/ISE/bin/lin/xusb_xp2.hex -D $tempnode" | SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0013", RUN\+="/sbin/fxload -v -t fx2 -I /<Xilinx ISEのインストールディレクトリ>/<バージョン>/ISE_DS/ISE/bin/lin/xusb_xp2.hex -D $tempnode" | ||
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0015", RUN\+="/sbin/fxload -v -t fx2 -I /<Xilinx ISEのインストールディレクトリ>/<バージョン>/ISE_DS/ISE/bin/lin/xusb_xse.hex -D $tempnode" | SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0015", RUN\+="/sbin/fxload -v -t fx2 -I /<Xilinx ISEのインストールディレクトリ>/<バージョン>/ISE_DS/ISE/bin/lin/xusb_xse.hex -D $tempnode" | ||
<br> | |||
sudo udevadm control --reload-rules | |||
<br> | <br> | ||
恐らく、次の設定は不要であるが、念の為に記載しておく。<br> | 恐らく、次の設定は不要であるが、念の為に記載しておく。<br> | ||
cd /<Xilinx ISEのインストールディレクトリ>/14.7/ISE_DS/ISE/lib/lin64 | |||
sudo mv libstdc++.so libstdc++_org.so | |||
sudo ln -s /usr/ | sudo mv libstdc++.so.6 libstdc++_org.so.6 | ||
sudo mv libstdc++.so.6.0.8 libstdc++_org.so.6.0.8 | |||
sudo ln -s /usr/lib64/libstdc++.so.6 libstdc++.so | |||
sudo ln -s libstdc++.so libstdc++.so.6 | |||
sudo ln -s libstdc++.so libstdc++.so.6.0.8 | |||
cd /<Xilinx ISEのインストールディレクトリ>/14.7/ISE_DS/common/lib/lin64/ | |||
sudo mv libstdc++.so libstdc++_org.so | |||
sudo mv libstdc++.so.6 libstdc++_org.so.6 | |||
sudo mv libstdc++.so.6.0.8 libstdc++_org.so.6.0.8 | |||
sudo ln -s /usr/lib64/libstdc++.so.6 libstdc++.so | |||
sudo ln -s libstdc++.so libstdc++.so.6 | |||
sudo ln -s libstdc++.so libstdc++.so.6.0.8 | |||
<br><br> | <br><br> | ||
| 113行目: | 201行目: | ||
#: <u>※注意</u> | #: <u>※注意</u> | ||
#: <u>usb-driver-HEAD-<スナップショット名>.tar.gzファイルをダウンロードできない場合は、Xilinxへメールで連絡してファイルを送信してもらうことができる。</u> | #: <u>usb-driver-HEAD-<スナップショット名>.tar.gzファイルをダウンロードできない場合は、Xilinxへメールで連絡してファイルを送信してもらうことができる。</u> | ||
#: <br> | |||
#: <code>git clone</code>コマンドを実行して、ソースコードをダウンロードすることもできる。 | |||
#: <code>git clone git://git.zerfleddert.de/usb-driver</code> | |||
#: <code>cd usb-driver</code> | |||
#: <br> | #: <br> | ||
# ダウンロードしたファイルを解凍する。 | # ダウンロードしたファイルを解凍する。 | ||
| 163行目: | 255行目: | ||
<u>※注意 2</u><br> | <u>※注意 2</u><br> | ||
<u>Impactを直接実行する場合は、iseで始まる行をコメントアウトして、Impactで始まる行をコメント解除する。</u><br> | <u>Impactを直接実行する場合は、iseで始まる行をコメントアウトして、Impactで始まる行をコメント解除する。</u><br> | ||
<br><br> | |||
== Xilinx ISEのアンインストール == | |||
以下に示すディレクトリおよびファイルを削除する。<br> | |||
# Xilinx ISEのアンインストール | |||
sudo rm -rf /opt/Xilinx | |||
# Xilinx ISEのドライバおよびファームウェアのアンインストール | |||
sudo rm -rf \ | |||
/usr/local/sbin/dftdrvdtch /usr/local/lib64/digilent /usr/local/share/digilent \ | |||
/etc/digilent-adept.conf /etc/hotplug/usb /etc/hotplug/usb.usermap \ | |||
/etc/udev/rules.d/xusbdfwu.rules \ | |||
/usr/share/xusb_emb.hex /usr/share/xusb_xlp.hex /usr/share/xusb_xp2.hex /usr/share/xusb_xpr.hex \ | |||
/usr/share/xusb_xse.hex /usr/share/xusb_xup.hex /usr/share/xusbdfwu.hex \ | |||
/lib/modules/$(uname -r)/kernel/drivers/misc/install_windrvr6 | |||
<br><br> | |||
== Xilinx ISE 14.7 for Windows 10のインストール == | |||
<u>※注意</u><br> | |||
<u>この方法は、Xilinxの公式手順とは異なり、VirtualBoxを使用せずにWindows 10上で直接Xilinx ISE 14.7を起動および実行する手順である。</u><br> | |||
<br> | |||
まず、[https://japan.xilinx.com/downloadNav/vivado-design-tools/archive-ise.html Xilinxの公式Webサイト]にアクセスして、<br> | |||
ISE Design Suite - 14.7 Full Product Installationの項目から、以下に示す2つのうちいずれかをダウンロードする。(ダウンロードには、Xilinxへのサインインが必要となる)<br> | |||
* フルDVD シングルファイルのダウンロードイメージ | |||
* Windows 7/XP/Server用フルインストーラ― | |||
<br> | |||
Xilinx ISE 14.7 (ISE Design Suite System EditionまたはISE WebPack)をインストールする。<br> | |||
<br> | |||
インストール完了後、Xilinx ISE 14.7のインストールディレクトリに移動する。<br> | |||
さらに、14.7\ISE_DS\ISE\lib\nt64ディレクトリに移動する。<br> | |||
このディレクトリ内にあるlibPortability.dllファイルの名前を、libPortability_org.dllファイルへ変更する。<br> | |||
また、このディレクトリ内にあるlibPortabilityNOSH.dllファイルをコピーして、libPortability.dllファイルへ名前を変更する。<br> | |||
<br> | |||
次に、Xilinx ISE 14.7のインストールディレクトリに移動して、14.7\ISE_DS\common\lib\nt64ディレクトリに移動する。<br> | |||
上記と同様、このディレクトリ内にあるlibPortability.dllファイルの名前を、libPortability_org.dllファイルへ変更する。<br> | |||
また、\<Xilinx ISE 14.7のインストールディレクトリ>\14.7\ISE_DS\ISE\lib\nt64\libPortabilityNOSH.dllファイルをコピーして、<br> | |||
\<Xilinx ISE 14.7のインストールディレクトリ>\ISE_DS\common\lib\nt64ディレクトリにコピーする。<br> | |||
libPortabilityNOSH.dllファイルの名前を、libPortability.dllファイルへ変更する。<br> | |||
<br> | |||
Xilinx ISE 14.7が正常に起動するかどうかを確認する。<br> | |||
最後に、ライセンス認証を行う。<br> | |||
<br><br> | <br><br> | ||
| 172行目: | 305行目: | ||
<br> | <br> | ||
Digilentプラグインのインストール手順を、以下に記載する。<br> | Digilentプラグインのインストール手順を、以下に記載する。<br> | ||
# Digilentの公式Webサイトから、Digilentプラグインをダウンロードする。 | # Digilentの公式Webサイトから、Digilentプラグインをダウンロードする。<br><u>Windows 7を使用する場合、digilent.adept.system_v2.19.2.exe以前のバージョンを使用する必要がある。</u> | ||
#: https://digilent.com/reference/software/adept/start | |||
#: または | |||
#: https://reference.digilentinc.com/software/digilent-plugin-xilinx-tools/start | #: https://reference.digilentinc.com/software/digilent-plugin-xilinx-tools/start | ||
#: または | #: または | ||
| 188行目: | 323行目: | ||
#: <code>cd libCseDigilent_<バージョン名>-x86_64/ISE14x/plugin</code> | #: <code>cd libCseDigilent_<バージョン名>-x86_64/ISE14x/plugin</code> | ||
#: <code>sudo cp libCseDigilent.so libCseDigilent.xml /<Xilinx ISEのインストールディレクトリ>/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent</code> | #: <code>sudo cp libCseDigilent.so libCseDigilent.xml /<Xilinx ISEのインストールディレクトリ>/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent</code> | ||
<br> | |||
プラグインファイルであるlibCseDigilent.soおよびlibCseDigilent.xmlは、Xilinx ISE 13.1以降において、以下に示す場所にコピーする必要がある。<br> | |||
# ホームディレクトリにある.cseディレクトリ。 | |||
#: Windowsでは、ホームディレクトリのパスは%USERPROFILE%環境変数で指定される。 | |||
#: Linuxでは、ホームディレクトリのパスは$HOMEで指定される。 | |||
#: <br> | |||
# 全てのユーザディレクトリにある.cseディレクトリ。 | |||
#: "all users"ディレクトリへのパスは、%ALLUSERSPROFILE%環境変数で指定される。 | |||
#: Linuxでは、環境変数$XIL_CSE_PLUGIN_DIRで指定したパスが使用される。 | |||
#: <br> | |||
# Xilinx ISEのインストールディレクトリ。 | |||
<br> | |||
Xilinx ISEが.cseディレクトリ内にあるプラグインを検索する場合、以下に示す場所にある互換性のあるプラグインを検索する。<br> | |||
プラットフォーム、ISEのバージョン、ベンダー、プラグイン名が一致するディレクトリにプラグインが見つかれば、それがロードされて検索は終了する。<br> | |||
* Windowsでは、.cse\nt\14.7\plugins\Digilent\libCseDigilentディレクトリが検索される。 | |||
* Linuxでは、.cse/lin/14.7/plugins/Digilent/libCseDigilentディレクトリが検索される。 | |||
<br> | |||
以下の例では、ホームディレクトリに.cseディレクトリを作成して、libCseDigilent.soおよびlibCseDigilent.xmlを規定の場所にコピーしている。<br> | |||
cp libCseDigilent_<バージョン>-x86_64/ISE14x/plugin/libCseDigilent.so \ | |||
libCseDigilent_<バージョン>-x86_64/ISE14x/plugin/libCseDigilent.xml \ | |||
$HOME/.cse/lin/14.7/plugins/Digilent/libCseDigilent | |||
<br> | |||
vi ~/.profile | |||
<br> | |||
# ~/.profileファイル | |||
export XIL_CSE_PLUGIN_DIR="$HOME/.cse" | |||
<br><br> | <br><br> | ||
| 213行目: | 375行目: | ||
# ~/.profileファイル等に、環境変数<code>LD_LIBRARY_PATH</code>と<code>PKG_CONFIG_PATH</code>の設定を追記する。 | # ~/.profileファイル等に、環境変数<code>LD_LIBRARY_PATH</code>と<code>PKG_CONFIG_PATH</code>の設定を追記する。 | ||
#: <code>export LD_LIBRARY_PATH="/<libusbライブラリのインストールディレクトリ>/lib64:$LD_LIBRARY_PATH"</code> | #: <code>export LD_LIBRARY_PATH="/<libusbライブラリのインストールディレクトリ>/lib64:$LD_LIBRARY_PATH"</code> | ||
#: <code>export PKG_CONFIG_PATH=" | #: <code>export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pkg-config --variable pc_path pkg-config)"</code> | ||
#: <code>export PKG_CONFIG_PATH="/<libusbライブラリのインストールディレクトリ>/lib64/pkgconfig:$PKG_CONFIG_PATH"</code> | |||
<br> | <br> | ||
==== 自動インストール ==== | ==== 自動インストール ==== | ||
| 220行目: | 383行目: | ||
<br> | <br> | ||
手動でAdeptラインタイムを削除する場合、以下に示すディレクトリおよびファイルを削除する。<br> | 手動でAdeptラインタイムを削除する場合、以下に示すディレクトリおよびファイルを削除する。<br> | ||
sudo rm -rf /usr/lib64/digilent/adept | sudo rm -rf /usr/lib64/digilent/adept \ | ||
/usr/local/share/digilent \ | |||
/usr/sbin/dftdrvdtch \ | |||
/etc/ld.so.conf.d/digilent-adept-libraries.conf \ | |||
/etc/digilent-adept.conf \ | |||
/etc/udev/rules.d/52-digilent-usb.rules | |||
<br> | <br> | ||
基本的なインストールでは、install.shファイルを実行する。<br> | 基本的なインストールでは、install.shファイルを実行する。<br> | ||
| 361行目: | 525行目: | ||
sudo rm -rf /usr/share/digilent/dsumecfg/bitstreams | sudo rm -rf /usr/share/digilent/dsumecfg/bitstreams | ||
sudo rm -rf /usr/local/man/man1/dadutil.1 | sudo rm -rf /usr/local/man/man1/dadutil.1 | ||
<br> | |||
==== Adeptユーティリティの使用方法 ==== | |||
Adeptユーティリティを使用して、XilinxのFPGAに書き込む場合、生成したbitファイル、書き込むデバイス名、デバイス内のインデックス番号を入力する必要がある。<br> | |||
<u>デバイス内のインデックス番号は、コンフィギュレーションROMの番号を選択すること。</u><br> | |||
<br> | |||
以下の例では、Basys2にbitファイルを書き込んでいる。<br> | |||
まず、デバイス名(User Name)を確認する。<br> | |||
djtgcfg enum | |||
# 出力例 | |||
Found 1 device(s) | |||
Device: Basys2 | |||
Device Transport Type: 00010001 (USB) | |||
Product Name: Digilent Basys2-100 | |||
User Name: Basys2 | |||
Serial Number: 210155473605 | |||
<br> | |||
次に、デバイス内にあるコンフィギュレーションROMのインデックス番号を確認する。<br> | |||
djtgcfg init -d Basys2 | |||
# 出力例 | |||
Initializing scan chain... | |||
Found Device ID: d5045093 | |||
Found Device ID: 11c10093 | |||
Found 2 device(s): | |||
Device 0: XC3S100E | |||
Device 1: XCF02S | |||
<br> | |||
デバイス内にあるコンフィギュレーションROMにbitファイルを書き込む。<br> | |||
djtgcfg prog -f <bitファイルのパス> -d <デバイス名> -i <インデックス番号> | |||
例. Basys2に書き込む場合 | |||
djtgcfg prog -f $HOME/Program/FPGA/Clock/Clock24.bit -d Basys2 -i 1 | |||
<br><br> | <br><br> | ||
__FORCETOC__ | __FORCETOC__ | ||
[[カテゴリ:Verilog-HDL]][[カテゴリ:SUSE]] | [[カテゴリ:Verilog-HDL]][[カテゴリ:SUSE]] | ||