FPGA開発日記

カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages , English Version https://fpgadevdiary.hatenadiary.com/

オープンソースRISC-VコアHummingBirdについて調査(7. FPGAでのビルドを試行する)

RISC-Vの実装であるHummingBirdを調査していくことにした。

https://camo.githubusercontent.com/f393ca23a6df9f640c1e4a43b78f2a503fdc47e8/68747470733a2f2f66647661643032316173666438712e6f73732d636e2d68616e677a686f752e616c6979756e63732e636f6d2f4c696368656554616e672f626f6f6b7069632e6a7067

HummingBirdがRTLシミュレーションで何となく動作するようになってきたので、FPGAでどれくらいの回路面積になるのか見てみたいと思う。HummingBirdの合成環境はXilinxFPGAボードをサポートしており、

  • artydevkit
  • hbirdkit
  • nucleikit

というコンフィグレーションがサポートされていた。それぞれ、使用するFPGA

  • artydevkit : xc7a35ticsg324-1L
  • hbirdkit : xc7a75tfgg484-2
  • nucleikit : xc7a100tfgg484-2

が指定されていた。ArtyKitを使う関係もあり、下記のDigilentのサイトからボードファイルをダウンロードして、Vivadoのインストールディレクトリに配置しておいた。

reference.digilentinc.com

まずは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.