└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Open MPW programの概要 2 | 3 | - Googleのページ: https://developers.google.com/silicon 4 | - efablessのページ: https://efabless.com/open_shuttle_program 5 | 6 | # caravelを利用した設計の一連の流れについて 7 | 8 | より正確な記述については[デジタル向け公式リポジトリ](https://github.com/efabless/caravel_user_project)の説明 9 | 10 | - https://github.com/efabless/caravel_user_project/blob/main/docs/source/index.rst 11 | 12 | を参照のこと。 13 | 14 | また、[アナログ向け公式リポジトリ](https://github.com/efabless/caravel_user_project_analog)も存在する。詳細説明については、 15 | 16 | - https://github.com/efabless/caravel_user_project_analog/blob/main/docs/source/index.rst 17 | 18 | を参照のこと。 19 | 20 | 2022年12月現在は、MPW-8を募集中で、ReRAMを使わない場合、 ```export PDK=sky130A``` と設定する必要がある。 21 | 22 | ## 概要 23 | 24 | [公式リポジトリ](https://github.com/efabless/caravel_user_project)には、caravelに基づくチップのユーザースペースを利用するためのサンプルプロジェクトが含まれています。IOパッド、ロジックアナライザプローブ、wishboneポートといったcaravelのユーザースペースに存在する機能を利用する方法が示されています。また、このリポジトリは、Open MPW program提出の際推奨される構造になっています。 25 | 26 | ## 準備 27 | Docker: [Linux](https://hub.docker.com/search?q=&type=edition&offering=community&operating_system=linux&utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Windows](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Mac with Intel Chip](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Mac with M1 Chip](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) 28 | 29 | Python 3.6+ with PIP 30 | 31 | ## クイックスタート 32 | 33 | はじめに、新規リポジトリを caravel_user_project のテンプレートにしたがって作成します。このときリポジトリは public に設定し、 README を含むようにします。 34 | 35 | * https://github.com/efabless/caravel_user_project/generate から新規リポジトリを作成 36 | * 下記のコマンドでリポジトリをclone 37 | 38 | ``` 39 | git clone 40 | ``` 41 | 42 | また、環境設定のため下記のコマンドを実行します。 43 | 44 | ``` 45 | cd # project_name is the name of your repo 46 | 47 | mkdir dependencies 48 | 49 | export OPENLANE_ROOT=$(pwd)/dependencies/openlane_src # you need to export this whenever you start a new shell 50 | 51 | export PDK_ROOT=$(pwd)/dependencies/pdks # you need to export this whenever you start a new shell 52 | 53 | # export the PDK variant depending on your shuttle, if you don't know leave it to the default 54 | 55 | # for sky130 MPW shuttles.... 56 | export PDK=sky130A 57 | 58 | # for the gf180 GFMPW shuttles... 59 | export PDK=gf180mcuC 60 | 61 | make setup 62 | ``` 63 | 64 | このコマンドによって 65 | 66 | - caravel_lite (caravelの小型版) 67 | - シミュレーション用マネジメントコア 68 | - デザインを実装するための openlane 69 | - pdk 70 | 71 | がインストールされます。 72 | 73 | ### 1. 設計の開始 74 | 75 | * プロジェクトの実装を始めるにあたって、OpenLaneに入力するためのRTLのVerilog記述が必要になります。各マクロ向けのサブディレクトリは openlane/ 以下に作り、それぞれのディレクトリには各マクロに向けたOpenLaneの設定ファイルを配置します。 76 | 77 | ``` 78 | make 79 | ``` 80 | 81 | ### 2. user_project_wrapper へのモジュールの統合 82 | 83 | * openlane/user_project_wrapper/config.tcl にある環境変数 VERILOG_FILES_BLACKBOX, EXTRA_LEFS, EXTRA_GDS_FILES をそれぞれ作成したモジュールを指すよう変更します。 84 | * verilog/rtl/user_project_wrapper.v 内でモジュールを呼び出します。 85 | * 作成したモジュールを含む user_project_wrapper を実装するため、下記のコマンドを実行します。 86 | 87 | ``` 88 | make user_project_wrapper 89 | ``` 90 | 91 | ### 3. シミュレーションの実行 92 | 93 | RTL、ゲートレベル、ゲートレベル+sdf fileが verilog/includes/includes..caravel_user_project 以下にある状態で実行します。注意点として、Verilogコード中にファイルを含まないようにする必要があります。 94 | 95 | ``` 96 | # you can then run RTL simulations using 97 | make verify--rtl 98 | 99 | # OR GL simulation using 100 | make verify--gl 101 | 102 | # OR for GL+SDF simulation using 103 | # sdf annotated simulation is slow 104 | make verify--gl-sdf 105 | 106 | # for example 107 | make verify-io_ports-rtl 108 | ``` 109 | 110 | ### 4. opensta の実行 111 | 112 | user_project_wrapper や、その内部のマクロについて spef を抽出します。 113 | 114 | ``` 115 | make extract-parasitics 116 | ``` 117 | 118 | モジュールのインスタンス名とspefファイルを結びつけるためのspefマッピングファイルを生成します。 119 | 120 | ``` 121 | make create-spef-mapping 122 | ``` 123 | 124 | opensta を実行します。 125 | 126 | ``` 127 | make caravel-sta 128 | ``` 129 | 130 | 注意: タイミングスクリプトを更新するためには、 ```make setup-timing-scripts``` を実行します。 131 | 132 | ### 5. 事前チェックの実行 133 | 134 | ``` 135 | make precheck 136 | make run-precheck 137 | ``` 138 | 139 | これで設計フローは完了です。 https://efabless.com/open_shuttle_program/ からプロジェクトを提出できます。 140 | 141 | ## 提出時チェックリスト 142 | 143 | ✔️ プロジェクトの構造が[公式リポジトリ](https://github.com/efabless/caravel_user_project)と一致している 144 | 145 | ✔️ プロジェクトのルートに info.yaml が含まれている 146 | 147 | ✔️ トップレベルマクロの名前が user_project_wrapper になっている 148 | 149 | ✔️ RTL/ゲートレベルフルチップシミュレーションが通っている 150 | 151 | ✔️ 実装したマクロがLVS/DRCクリーンである 152 | 153 | ✔️ user_project_wrapper のゲートレベルネットリストが verilog/gl/user_project_wrapper.v というかたちで含まれている 154 | 155 | ✔️ 実装した user_project_wrapper が pin_order で定義されたピン配置にしたがっている 156 | 157 | ✔️ 実装した user_project_wrapper が fixed_wrapper_cfgs で定義された設定にしたがっている 158 | 159 | ✔️ XORチェックを通過している 160 | 161 | ✔️ Openlaneのサマリーレポートが ./signoff/ に格納されている 162 | 163 | ✔️ デザインが mpw-precheck を通過している 164 | 165 | 166 | --------------------------------------------------------------------------------