FC2カウンター FPGAの部屋 Zynq の PCAP を使用して DFX する2(.bin ファイルの生成)
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

Zynq の PCAP を使用して DFX する2(.bin ファイルの生成)

Zynq の PCAP を使用して DFX する1(情報収集)”の続き。

前回は、ソフトウェアから DFX を制御したいということで、Zynq 系で使用できるプロセッサ コンフィギュレーション アクセス ポート (PCAP)について情報収集を行った。今回は、その内の”Partial Reconfiguration by PCAP: bitstream size not an integer of words?”を参考にして、パーシャル・ビット・ファイルから bin ファイルを生成する。

XDcfg_TransferBitfile() を使用して DFX するためには bit ファイルから bin ファイルを生成する必要あるそうだ。(”How to use PCAP to config the PL in zynq”参照)

bin ファイルの生成方法は Vivado の TCL コンソールで write_cfgmem コマンドを使うことだそうだ。(”Partial Reconfiguration by PCAP: bitstream size not an integer of words?”参照)

最初に child_0_impl_1 の DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit を lap_filter_axis_partial.bin に変換する。
PCAP_7_210824.png

Vivado の TCL コンソールで cd コマンドを使用した。
cd /media/masaaki/Ubuntu_Disk/HDL/ZYBO_Z7-20/DFX_filter_test_211/DFX_filter_test_211.runs/child_0_impl_1

write_cfgmem コマンドを使用して bin ファイルを生成した。
write_cfgmem -format BIN -interface SMAPx32 -disablebitswap -loadbit "up 0x0 DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit" lap_filter_axis_partial.bin
PCAP_8_210824.png

write_cfgmem -format BIN -interface SMAPx32 -disablebitswap -loadbit "up 0x0 DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit" lap_filter_axis_partial.bin
Command: write_cfgmem -format BIN -interface SMAPx32 -disablebitswap -loadbit {up 0x0 DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit} lap_filter_axis_partial.bin
Creating config memory files...
INFO: [Writecfgmem 68-23] Start address provided has been multiplied by a factor of 4 due to the use of interface SMAPX32.
Creating bitstream load up from address 0x00000000
Loading bitfile DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit
WARNING: [Writecfgmem 68-32] Bitfile DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit is a Dynamic Function eXchange bitfile. It is not possible to validate that this bitfile is compatible with the SMAPX32 interface.
Memory size is calculated to be 512 KB
Writing file ./lap_filter_axis_partial.bin
Writing log file ./lap_filter_axis_partial.prm
===================================
Configuration Memory information
===================================
File Format        BIN
Interface          SMAPX32
Size               512K
Start Address      0x00000000
End Address        0x0007FFFF

Addr1         Addr2         Date                    File(s)
0x00000000    0x00072863    Aug 21 07:14:31 2021    DFX_filter_test_i_filter_lap_filter_axis_inst_0_partial.bit
1 Infos, 1 Warnings, 0 Critical Warnings and 0 Errors encountered.
write_cfgmem completed successfully


lap_filter_axis_partial.bin が生成された。
PCAP_9_210824.png


child1_impl_1 の DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit を sobel_filter_axis_partial.bin に変換する。
PCAP_10_210824.png

Vivado の TCL コンソールで cd コマンドを使用した。
cd /media/masaaki/Ubuntu_Disk/HDL/ZYBO_Z7-20/DFX_filter_test_211/DFX_filter_test_211.runs/child_1_impl_1

write_cfgmem コマンドを使用して bin ファイルを生成した。
write_cfgmem -format BIN -interface SMAPx32 -disablebitswap -loadbit "up 0x0 DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit" sobel_filter_axis_partial.bin
PCAP_11_210824.png

write_cfgmem -format BIN -interface SMAPx32 -disablebitswap -loadbit "up 0x0 DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit" sobel_filter_axis_partial.bin
Command: write_cfgmem -format BIN -interface SMAPx32 -disablebitswap -loadbit {up 0x0 DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit} sobel_filter_axis_partial.bin
Creating config memory files...
INFO: [Writecfgmem 68-23] Start address provided has been multiplied by a factor of 4 due to the use of interface SMAPX32.
Creating bitstream load up from address 0x00000000
Loading bitfile DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit
WARNING: [Writecfgmem 68-32] Bitfile DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit is a Dynamic Function eXchange bitfile. It is not possible to validate that this bitfile is compatible with the SMAPX32 interface.
Memory size is calculated to be 512 KB
Writing file ./sobel_filter_axis_partial.bin
Writing log file ./sobel_filter_axis_partial.prm
===================================
Configuration Memory information
===================================
File Format        BIN
Interface          SMAPX32
Size               512K
Start Address      0x00000000
End Address        0x0007FFFF

Addr1         Addr2         Date                    File(s)
0x00000000    0x00072863    Aug 21 07:14:37 2021    DFX_filter_test_i_filter_sobel_filter_axis_inst_0_partial.bit
1 Infos, 1 Warnings, 0 Critical Warnings and 0 Errors encountered.
write_cfgmem completed successfully


sobel_filter_axis_partial.bin が生成された。
PCAP_12_210824.png
  1. 2021年08月24日 05:24 |
  2. Dynamic Function eXchange
  3. | トラックバック:0
  4. | コメント:0

コメント

コメントの投稿


管理者にだけ表示を許可する

トラックバック URL
https://marsee101.blog.fc2.com/tb.php/5332-27305709
この記事にトラックバックする(FC2ブログユーザー)