RISC-Vの実装であるHummingBirdを調査していくことにした。
HummingBirdがRTLシミュレーションで何となく動作するようになってきたので、FPGAでどれくらいの回路面積になるのか見てみたいと思う。HummingBirdの合成環境はXilinxのFPGAボードをサポートしており、
artydevkit
hbirdkit
nucleikit
というコンフィグレーションがサポートされていた。それぞれ、使用するFPGAは
artydevkit
: xc7a35ticsg324-1Lhbirdkit
: xc7a75tfgg484-2nucleikit
: xc7a100tfgg484-2
が指定されていた。ArtyKitを使う関係もあり、下記のDigilentのサイトからボードファイルをダウンロードして、Vivadoのインストールディレクトリに配置しておいた。
まずはArtyDevKitで試してみた。fpga
ディレクトリで、以下のように入力してVivadoを起動する。
make install CORE=e203 FPGA_NAME=artydevkit make mcs CORE=e203 FPGA_NAME=artydevkit
しかし、合成の途中でRAMの数が足りないというエラーメッセージが出て落ちてしまった。えええ、そんなことある?
--------------------------------------------------------------------------------- Finished Cross Boundary and Area Optimization : Time (s): cpu = 00:05:01 ; elapsed = 00:05:46 . Memory (MB): peak = 0.000 ; gain = 0.000 ; free physical = 6608 ; free virtual = 55889 --------------------------------------------------------------------------------- ERROR: [Synth 8-5834] Design needs 1056 RAMB18 which is more than device capacity of 100
仕方がないのでhbirdkit
での合成を試行した。同様に以下のようにしてVivadoを立ち上げる。
make install CORE=e203 FPGA_NAME=hbirdkit make mcs CORE=e203 FPGA_NAME=hbirdkit
こんどはTIMING Optimizationの所でVivadoが固まってしまった。固まったというか、どうも猛烈に時間がかかっているらしい。2ステージパイプラインのHummingBirdでFPGAの合成が数時間もかかるだろうか...?何かがおかしい気が。design checkpointを見てみたかったが吐き出されていなかった。
--------------------------------------------------------------------------------- Finished Applying XDC Timing Constraints : Time (s): cpu = 00:07:25 ; elapsed = 00:08:09 . Memory (MB): peak = 0.000 ; gain = 0.000 ; free physical = 8745 ; free virtual = 56416 --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- Start Timing Optimization ---------------------------------------------------------------------------------
一晩流してみて、様子を見た方が良い気がしている。
2019/11/11追記。落ちたー。なんで?リソース足りない?
Phase 1.2 IO Placement/ Clock Placement/ Build Placer Device ERROR: [Place 30-640] Place Check : This design requires more F7 Muxes cells than are available in the target device. This design requires 288747 of such cell types but only 31700 compatible sites are available in the target device. Please analyze your synthesis results and constraints to ensure the design is mapped to Xilinx primitives as expected. If so, please consider targeting a larger device. ERROR: [Place 30-640] Place Check : This design requires more Slice LUTs cells than are available in the target device. This design requires 799988 of such cell types but only 47200 compatible sites are available in the target device. Please analyze your synthesis results and constraints to ensure the design is mapped to Xilinx primitives as expected. If so, please consider targeting a larger device. Please set tcl parameter "drc.disableLUTOverUtilError" to 1 to change this error to warning. ERROR: [Place 30-640] Place Check : This design requires more LUT as Logic cells than are available in the target device. This design requires 259236 of such cell types but only 47200 compatible sites are available in the target device. Please analyze your synthesis results and constraints to ensure the design is mapped to Xilinx primitives as expected. If so, please consider targeting a larger device. Please set tcl parameter "drc.disableLUTOverUtilError" to 1 to change this error to warning. ERROR: [Place 30-640] Place Check : This design requires more LUT as Memory cells than are available in the target device. This design requires 540752 of such cell types but only 19000 compatible sites are available in the target device. Please analyze your synthesis results and constraints to ensure the design is mapped to Xilinx primitives as expected. If so, please consider targeting a larger device. Please set tcl parameter "drc.disableLUTOverUtilError" to 1 to change this error to warning.