Xyloni開発キットへの書き込み
作成者:mou-mou
先日、Xyloni®開発キット チュートリアルの実践を行い、チュートリアルの資料だけではデバイスへの書き込み部分がわかりにくかったのでまとめてみました。
デバイスドライバの切り替え
XyloniをPCにUSBケーブルで接続します。そしてデバイスマネージャでUSBデバイスの認識を確認します。そうすると、FT4232Hが搭載されている為、4つのCOMポートが見えます。
Interface 0 | SPI ( Flash Memory / FPGA) |
Interface 1 | JTAG |
Interface 2 | UART通信 |
Interface 3 | VCCIO選択 |
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-22-52-379.png)
デバイスドライバの切り替えのために、Zadigをダウンロードします。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-33-56-514.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-34-08-169.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-34-41-708.png)
Zadigを起動します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-36-45-600.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-41-17-643.png)
すべてのデバイスリストを取得します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-42-18-016.png)
Xyloni (interface 0), Xyloni (interface 1), Xyloni (interface 3)をFTDIBUSからlibusbkに変更していきます。
Xyloni (interface 2)は、UART通信に使用しするので、変更してはなりません。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-47-17-596.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-49-05-518.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-49-31-605.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-50-12-465.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-51-50-255.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-52-47-403.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-53-00-621.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-53-50-397.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-54-01-491.png)
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-55-28-028.png)
もう一度デバイスマネージャで確認すると、COMポートは1つになっています。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-55-59-213.png)
書き込み
書き込みには、4種類の方法があります。
SPI Active | オンボードのFLASHメモリにSPIで書き込み |
SPI Passive | FPGAにSPIで書き込み(RAMへ書き込み) |
JTAG | FPGAにJTAGで書き込み(RAMへ書き込み) |
SPI Active using JTAG | JTAGでFPGAを介してFLASHメモリに書き込み |
評価ボードでは、SPIとJTAG両方がFT4232Hに接続されている為、デバッグもFlash書き込みも出来ます。製品版のボードを開発する場合は、コスト面やスペースの問題で2種類のインタフェースを用意したくない場合に、SPI active using JTAGを使用して、JTAGからFPGAを介してFLASHメモリに書き込みを行います。専用のFPGAイメージを用意したり少し手間かかりますので、別の機会にご紹介できればと思っております。
JTAG 書き込み
プログラマを起動します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-55-59-213-1.png)
書き込むイメージファイルを選択します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-57-48-837.png)
JTAG書き込みでは、bitファイルを選択します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-17-59-54-145.png)
書き込みを実行します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-18-00-06-919.png)
SPI Active
SPI Active書き込みでは、hexファイルを選択します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-18-01-35-605.png)
書き込みモードをSPI Activeにします。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-18-07-36-597.png)
書き込みを実行します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-18-07-45-457.png)
SPI Passive
書き込みモードをSPI Passiveにします。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-18-17-06-592.png)
ファイルは既にhexを選択している為、そのまま書き込みを実行します。
![](https://rightxlight.co.jp/wp-content/uploads/2022/05/bandicam-2022-05-01-18-17-40-227.png)