FPGA開発日記

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

オープンソースのチップ設計ツール群OpenLaneを試す

OpenLaneはRTLからGDSIIを生成するためのツール群だ。 OpenROADとかOpenLaneとかあるけど、厳密な用語の定義は分からない。OpenLaneとOpenROAD、どっちがどっちを包含しているんだ?

github.com

まずはリポジトリをダウンロードする。WSL2のUbuntu-20.04をベースに作業を行った。

git clone https://github.com/The-OpenROAD-Project/OpenLane.git

調子に乗って最新のタグに合わせてしまったが、実際にはこのコマンドを実行すると後続のコマンドでエラーになる。これは実行してはいけない。

git checkout 2022.02.14_01.57.38 # 実はこのコマンドは実行してはいけない!!!

次に、OpenLaneのツール群をダウンロードする。

make pull-openlane
Pulling most recent OpenLane image relative to your commit...
docker pull efabless/openlane:-dev
invalid reference format

エラーが出た。これは上記のgit checkoutによるものだ。従ってmasterブランチに乗り換える。

git checkout master
make pull-openlane

あれ?また失敗した。sudoが必要かな。

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=efabless%2Fopenlane&tag=2022.02.15_02.01.39": dial unix /var/run/docker.sock: connect: permission denied
sudo make pull-openlane
Digest: sha256:55ee1adcbc31fec586610190288bc219e161f4a9a53347dcad89d992354360c2
Status: Downloaded newer image for efabless/openlane:2022.02.15_02.01.39
docker.io/efabless/openlane:2022.02.15_02.01.39

次にPDKを作る。PDKはProcess Design Kitで、私もあまり詳しくないのだが、基本的なStandard Cellや配置配線情報などのライブラリが含まれている。

make pdk

これは上手く行った。最後にmake testで確認する。

sudo make test
[SUCCESS]: Flow complete.
[INFO]: Note that the following warnings have been generated:
[WARNING]: Current core area is too small for a power grid. The power grid will be minimized.

Basic test passed

次に実際にOpenLaneを使用する。まずはDockerにログインする必要があるらしい。

sudo make mount

Docker内のOpenLaneがインストールされているコンテナにログインした。

OpenLane Container (74b9e10):/openlane$ ls -lt
total 144
-rw-r--r--  1 root root   989 Feb 15 04:44 default.cvcrc
drwxr-xr-x  5 1000 1000  4096 Feb 15 04:33 pdks
drwxr-xr-x  8 1000 1000  4096 Feb 15 04:05 dependencies
drwxr-xr-x 18 1000 1000  4096 Feb 15 03:56 docker
drwxr-xr-x 13 1000 1000  4096 Feb 15 03:44 scripts
drwxr-xr-x  5 1000 1000  4096 Feb 15 03:44 docs
-rwxr-xr-x  1 1000 1000  7079 Feb 15 03:44 env.py
-rwxr-xr-x  1 1000 1000 11941 Feb 15 03:44 flow.tcl
drwxr-xr-x  3 1000 1000  4096 Feb 15 03:44 regression_results
-rw-r--r--  1 1000 1000   138 Feb 15 03:44 requirements_dev.txt
...

デザインの合成を実行する。

./flow.tcl -design spm
[INFO]: check full report here: /openlane/designs/spm/runs/RUN_2022.02.15_04.46.36/reports/final_summary_report.csv
[INFO]: There are no max slew violations in the design at the typical corner.
[INFO]: There are no hold violations in the design at the typical corner.
[INFO]: There are no setup violations in the design at the typical corner.
[SUCCESS]: Flow complete.
[INFO]: Note that the following warnings have been generated:
[WARNING]: Current core area is too small for a power grid. The power grid will be minimized.
f:id:msyksphinz:20220215221842p:plain
OpenLaneの実行画面