Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 1 | .. raw:: html |
| 2 | |
| 3 | <!--- |
| 4 | # SPDX-FileCopyrightText: 2020 Efabless Corporation |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | --> |
| 20 | |
| 21 | Caravel User Project |
| 22 | ==================== |
| 23 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 24 | |License| |User CI| |Caravel Build| |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 25 | |
| 26 | Table of contents |
| 27 | ================= |
| 28 | |
| 29 | - `Overview <#overview>`__ |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 30 | - `Install Caravel <#install-caravel>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 31 | - `Caravel Integration <#caravel-integration>`__ |
| 32 | |
| 33 | - `Repo Integration <#repo-integration>`__ |
| 34 | - `Verilog Integration <#verilog-integration>`__ |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 35 | - `Layout Integration <#layout-integration>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 36 | |
| 37 | - `Running Full Chip Simulation <#running-full-chip-simulation>`__ |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 38 | - `User Project Wrapper Requirements <#user-project-wrapper-requirements>`__ |
| 39 | - `Hardening the User Project using |
| 40 | Openlane <#hardening-the-user-project-using-openlane>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 41 | - `Checklist for Open-MPW |
| 42 | Submission <#checklist-for-open-mpw-submission>`__ |
| 43 | |
| 44 | Overview |
| 45 | ======== |
| 46 | |
| 47 | This repo contains a sample user project that utilizes the |
| 48 | `caravel <https://github.com/efabless/caravel.git>`__ chip user space. |
| 49 | The user project is a simple counter that showcases how to make use of |
| 50 | `caravel's <https://github.com/efabless/caravel.git>`__ user space |
| 51 | utilities like IO pads, logic analyzer probes, and wishbone port. The |
| 52 | repo also demonstrates the recommended structure for the open-mpw |
| 53 | shuttle projects. |
| 54 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 55 | Prerequisites |
| 56 | ============= |
| 57 | |
Marwan Abbas | 0914d04 | 2022-04-06 19:06:34 +0200 | [diff] [blame] | 58 | - 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>`_ |
| 59 | |
| 60 | - Python 3.6+ with PIP |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 61 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 62 | Install Caravel |
| 63 | =============== |
| 64 | |
| 65 | To setup caravel, run the following: |
| 66 | |
| 67 | .. code:: bash |
Mohamed Kassem | 9ae1f07 | 2021-04-23 12:19:31 -0700 | [diff] [blame] | 68 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 69 | git clone https://github.com/efabless/caravel_user_project.git |
Mohamed Kassem | 9ae1f07 | 2021-04-23 12:19:31 -0700 | [diff] [blame] | 70 | cd caravel_user_project |
Marwan Abbas | ca9b692 | 2022-01-26 20:27:03 +0200 | [diff] [blame] | 71 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 72 | make install |
| 73 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 74 | To remove caravel, run |
| 75 | |
| 76 | .. code:: bash |
| 77 | |
| 78 | make uninstall |
| 79 | |
| 80 | By default |
| 81 | `caravel-lite <https://github.com/efabless/caravel-lite.git>`__ is |
| 82 | installed. To install the full version of caravel, run this prior to |
| 83 | calling make install. |
| 84 | |
| 85 | .. code:: bash |
| 86 | |
| 87 | export CARAVEL_LITE=0 |
| 88 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 89 | Caravel Integration |
| 90 | =================== |
| 91 | |
| 92 | Repo Integration |
| 93 | ---------------- |
| 94 | |
| 95 | Caravel files are kept separate from the user project by having caravel |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 96 | as submodule. The submodule commit should point to the latest of |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 97 | caravel/caravel-lite master/main branch. The following files should have a symbolic |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 98 | link to `caravel's <https://github.com/efabless/caravel.git>`__ |
| 99 | corresponding files: |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 100 | |
manarabdelaty | 0c03d60 | 2021-09-20 11:42:16 +0200 | [diff] [blame] | 101 | - `Openlane Makefile <../../openlane/Makefile>`__: This provides an easier |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 102 | way for running openlane to harden your macros. Refer to `Hardening |
| 103 | the User Project Macro using |
Marwan Abbas | ca9b692 | 2022-01-26 20:27:03 +0200 | [diff] [blame] | 104 | Openlane <#hardening-the-user-project-using-openlane>`__. Also, |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 105 | the makefile retains the openlane summary reports under the signoff |
| 106 | directory. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 107 | |
manarabdelaty | 0c03d60 | 2021-09-20 11:42:16 +0200 | [diff] [blame] | 108 | - `Pin order <../../openlane/user_project_wrapper/pin_order.cfg>`__ file for |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 109 | the user wrapper: The hardened user project wrapper macro must have |
| 110 | the same pin order specified in caravel's repo. Failing to adhere to |
| 111 | the same order will fail the gds integration of the macro with |
| 112 | caravel's back-end. |
| 113 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 114 | The symbolic links are automatically set when you run ``make install``. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 115 | |
| 116 | Verilog Integration |
| 117 | ------------------- |
| 118 | |
| 119 | You need to create a wrapper around your macro that adheres to the |
| 120 | template at |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 121 | `user\_project\_wrapper <https://github.com/efabless/caravel/blob/master/verilog/rtl/__user_project_wrapper.v>`__. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 122 | The wrapper top module must be named ``user_project_wrapper`` and must |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 123 | have the same input and output ports as the golden wrapper `template <https://github.com/efabless/caravel/blob/master/verilog/rtl/__user_project_wrapper.v>`__. The wrapper gives access to the |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 124 | user space utilities provided by caravel like IO ports, logic analyzer |
| 125 | probes, and wishbone bus connection to the management SoC. |
| 126 | |
| 127 | For this sample project, the user macro makes use of: |
| 128 | |
| 129 | - The IO ports for displaying the count register values on the IO pads. |
| 130 | |
| 131 | - The LA probes for supplying an optional reset and clock signals and |
| 132 | for setting an initial value for the count register. |
| 133 | |
matt venn | 4acd8b7 | 2021-04-27 11:34:42 +0200 | [diff] [blame] | 134 | - The wishbone port for reading/writing the count value through the |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 135 | management SoC. |
| 136 | |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 137 | Refer to `user\_project\_wrapper <../../verilog/rtl/user_project_wrapper.v>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 138 | for more information. |
| 139 | |
| 140 | .. raw:: html |
| 141 | |
| 142 | <p align="center"> |
| 143 | <img src="./_static/counter_32.png" width="50%" height="50%"> |
| 144 | </p> |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 145 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 146 | .. raw:: html |
| 147 | |
| 148 | </p> |
| 149 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 150 | |
| 151 | Layout Integration |
| 152 | ------------------- |
| 153 | |
| 154 | The caravel layout is pre-designed with an empty golden wrapper in the user space. You only need to provide us with a valid ``user_project_wrapper`` GDS file. And, as part of the tapeout process, your hardened ``user_project_wrapper`` will be inserted into a vanilla caravel layout to get the final layout shipped for fabrication. |
| 155 | |
| 156 | .. raw:: html |
| 157 | |
| 158 | <p align="center"> |
| 159 | <img src="./_static/layout.png" width="80%" height="80%"> |
| 160 | </p> |
| 161 | |
| 162 | To make sure that this integration process goes smoothly without having any DRC or LVS issues, your hardened ``user_project_wrapper`` must adhere to a number of requirements listed at `User Project Wrapper Requirements <#user-project-wrapper-requirements>`__ . |
| 163 | |
| 164 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 165 | Building the PDK |
| 166 | ================ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 167 | |
Marwan Abbas | 073ecab | 2022-04-03 14:52:46 +0200 | [diff] [blame] | 168 | For more information about volare click `here <https://github.com/efabless/volare>`__ |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 169 | |
| 170 | .. code:: bash |
| 171 | |
| 172 | # set PDK_ROOT to the path you wish to use for the pdk |
| 173 | export PDK_ROOT=<pdk-installation-path> |
Marwan Abbas | e55106c | 2022-07-01 11:06:37 +0200 | [diff] [blame] | 174 | |
| 175 | # set the PDK variant depending on your shuttle, if you don't know leave it as default |
| 176 | export PDK=sky130B |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 177 | |
Marwan Abbas | 073ecab | 2022-04-03 14:52:46 +0200 | [diff] [blame] | 178 | # use volare to download the pdk |
Marwan Abbas | 70e891d | 2022-04-07 17:19:12 +0200 | [diff] [blame] | 179 | # To change the default pdk version you can export OPEN_PDKS_COMMIT=<pdk_commit> |
Marwan Abbas | fab39d9 | 2022-04-06 22:39:21 +0200 | [diff] [blame] | 180 | make pdk-with-volare |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 181 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 182 | Running Full Chip Simulation |
| 183 | ============================ |
| 184 | |
| 185 | First, you will need to install the simulation environment, by |
| 186 | |
| 187 | .. code:: bash |
| 188 | |
| 189 | make simenv |
| 190 | |
| 191 | This will pull a docker image with the needed tools installed. |
| 192 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 193 | Then, run the RTL simulation by |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 194 | |
| 195 | .. code:: bash |
| 196 | |
| 197 | export PDK_ROOT=<pdk-installation-path> |
Marwan Abbas | 0914d04 | 2022-04-06 19:06:34 +0200 | [diff] [blame] | 198 | make verify-<testbench-name>-rtl |
Marwan Abbas | e631e37 | 2022-07-01 02:34:39 -0700 | [diff] [blame] | 199 | |
| 200 | # For example |
| 201 | make verify-io_ports-rtl |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 202 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 203 | Once you have the physical implementation done and you have the gate-level netlists ready, it is crucial to run full gate-level simulations to make sure that your design works as intended after running the physical implementation. |
| 204 | |
| 205 | Run the gate-level simulation by: |
| 206 | |
| 207 | .. code:: bash |
| 208 | |
| 209 | export PDK_ROOT=<pdk-installation-path> |
Marwan Abbas | 0914d04 | 2022-04-06 19:06:34 +0200 | [diff] [blame] | 210 | make verify-<testbench-name>-gl |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 211 | |
Marwan Abbas | e631e37 | 2022-07-01 02:34:39 -0700 | [diff] [blame] | 212 | # For example |
| 213 | make verify-io_ports-gl |
| 214 | |
| 215 | To make sure that your design is timing clean, one way is running sdf annotated gate-level simulation |
| 216 | Run the sdf annotated gate-level simulation by: |
| 217 | |
| 218 | .. code:: bash |
| 219 | |
| 220 | export PDK_ROOT=<pdk-installation-path> |
| 221 | make verify-<testbench-name>-gl-sdf |
| 222 | |
| 223 | # For example |
| 224 | make verify-io_ports-gl-sdf |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 225 | |
| 226 | This sample project comes with four example testbenches to test the IO port connection, wishbone interface, and logic analyzer. The test-benches are under the |
| 227 | `verilog/dv <https://github.com/efabless/caravel_user_project/tree/main/verilog/dv>`__ directory. For more information on setting up the |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 228 | simulation environment and the available testbenches for this sample |
Manar | ffaf984 | 2021-04-30 22:55:37 +0200 | [diff] [blame] | 229 | project, refer to `README <https://github.com/efabless/caravel_user_project/blob/main/verilog/dv/README.md>`__. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 230 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 231 | |
| 232 | User Project Wrapper Requirements |
| 233 | ================================= |
| 234 | |
| 235 | Your hardened ``user_project_wrapper`` must match the `golden user_project_wrapper <https://github.com/efabless/caravel/blob/master/gds/user_project_wrapper_empty.gds.gz>`__ in the following: |
| 236 | |
| 237 | - Area ``(2.920um x 3.520um)`` |
| 238 | - Top module name ``"user_project_wrapper"`` |
| 239 | - Pin Placement |
| 240 | - Pin Sizes |
| 241 | - Core Rings Width and Offset |
| 242 | - PDN Vertical and Horizontal Straps Width |
| 243 | |
| 244 | |
| 245 | .. raw:: html |
| 246 | |
| 247 | <p align="center"> |
| 248 | <img src="./_static/empty.png" width="40%" height="40%"> |
| 249 | </p> |
| 250 | |
Marwan Abbas | ca9b692 | 2022-01-26 20:27:03 +0200 | [diff] [blame] | 251 | You are allowed to change the following if you need to: |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 252 | |
| 253 | - PDN Vertical and Horizontal Pitch & Offset |
| 254 | |
| 255 | .. raw:: html |
| 256 | |
| 257 | <p align="center"> |
| 258 | <img src="./_static/pitch.png" width="30%" height="30%"> |
| 259 | </p> |
| 260 | |
| 261 | To make sure that you adhere to these requirements, we run an exclusive-or (XOR) check between your hardened ``user_project_wrapper`` GDS and the golden wrapper GDS after processing both layouts to include only the boundary (pins and core rings). This check is done as part of the `mpw-precheck <https://github.com/efabless/mpw_precheck>`__ tool. |
| 262 | |
| 263 | |
| 264 | Hardening the User Project using OpenLane |
| 265 | ========================================== |
| 266 | |
| 267 | OpenLane Installation |
| 268 | --------------------- |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 269 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 270 | You will need to install openlane by running the following |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 271 | |
| 272 | .. code:: bash |
| 273 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 274 | export OPENLANE_ROOT=<openlane-installation-path> |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 275 | |
| 276 | # you can optionally specify the openlane tag to use |
| 277 | # by running: export OPENLANE_TAG=<openlane-tag> |
| 278 | # if you do not set the tag, it defaults to the last verfied tag tested for this project |
| 279 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 280 | make openlane |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 281 | |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 282 | For detailed instructions on the openlane and the pdk installation refer |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 283 | to |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 284 | `README <https://github.com/The-OpenROAD-Project/OpenLane#setting-up-openlane>`__. |
| 285 | |
| 286 | Hardening Options |
| 287 | ----------------- |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 288 | |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 289 | There are three options for hardening the user project macro using |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 290 | openlane: |
| 291 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 292 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
| 293 | | Option 1 | Option 2 | Option 3 | |
| 294 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
| 295 | | Hardening the user macro(s) first, then inserting it in the | Flattening the user macro(s) with the | Placing multiple macros in the wrapper | |
| 296 | | user project wrapper with no standard cells on the top level | user_project_wrapper | along with standard cells on the top level | |
| 297 | +==============================================================+============================================+============================================+ |
| 298 | | |pic1| | |pic2| | |pic3| | |
| 299 | | | | | |
| 300 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
| 301 | | ex: |link1| | | ex: |link2| | |
| 302 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 303 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 304 | .. |link1| replace:: `caravel_user_project <https://github.com/efabless/caravel_user_project>`__ |
| 305 | |
| 306 | .. |link2| replace:: `caravel_ibex <https://github.com/efabless/caravel_ibex>`__ |
| 307 | |
| 308 | |
| 309 | .. |pic1| image:: ./_static/option1.png |
| 310 | :width: 48% |
| 311 | |
| 312 | .. |pic2| image:: ./_static/option2.png |
| 313 | :width: 140% |
| 314 | |
| 315 | .. |pic3| image:: ./_static/option3.png |
| 316 | :width: 72% |
| 317 | |
| 318 | For more details on hardening macros using openlane, refer to `README <https://github.com/The-OpenROAD-Project/OpenLane/blob/master/docs/source/hardening_macros.md>`__. |
| 319 | |
| 320 | |
| 321 | Running OpenLane |
| 322 | ----------------- |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 323 | |
| 324 | For this sample project, we went for the first option where the user |
| 325 | macro is hardened first, then it is inserted in the user project |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 326 | wrapper without having any standard cells on the top level. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 327 | |
| 328 | .. raw:: html |
| 329 | |
| 330 | <p align="center"> |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 331 | <img src="./_static/wrapper.png" width="30%" height="30%"> |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 332 | </p> |
| 333 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 334 | .. raw:: html |
| 335 | |
| 336 | </p> |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 337 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 338 | To reproduce hardening this project, run the following: |
| 339 | |
| 340 | .. code:: bash |
| 341 | |
Marwan Abbas | fa8d7ec | 2022-02-03 09:50:05 -0800 | [diff] [blame] | 342 | # DO NOT cd into openlane |
| 343 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 344 | # Run openlane to harden user_proj_example |
| 345 | make user_proj_example |
| 346 | # Run openlane to harden user_project_wrapper |
| 347 | make user_project_wrapper |
| 348 | |
| 349 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 350 | For more information on the openlane flow, check `README <https://github.com/The-OpenROAD-Project/OpenLane#readme>`__. |
| 351 | |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 352 | Running MPW Precheck Locally |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 353 | ================================= |
| 354 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 355 | You can install the `mpw-precheck <https://github.com/efabless/mpw_precheck>`__ by running |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 356 | |
| 357 | .. code:: bash |
| 358 | |
| 359 | # By default, this install the precheck in your home directory |
| 360 | # To change the installtion path, run "export PRECHECK_ROOT=<precheck installation path>" |
| 361 | make precheck |
| 362 | |
| 363 | This will clone the precheck repo and pull the latest precheck docker image. |
| 364 | |
| 365 | |
| 366 | Then, you can run the precheck by running |
| 367 | |
| 368 | .. code:: bash |
| 369 | |
| 370 | make run-precheck |
| 371 | |
| 372 | This will run all the precheck checks on your project and will produce the logs under the ``checks`` directory. |
| 373 | |
| 374 | |
| 375 | Other Miscellaneous Targets |
| 376 | ============================ |
| 377 | |
| 378 | The makefile provides a number of useful that targets that can run LVS, DRC, and XOR checks on your hardened design outside of openlane's flow. |
| 379 | |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 380 | Run ``make help`` to display available targets. |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 381 | |
manarabdelaty | 0c03d60 | 2021-09-20 11:42:16 +0200 | [diff] [blame] | 382 | Run lvs on the mag view, |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 383 | |
| 384 | .. code:: bash |
| 385 | |
| 386 | make lvs-<macro_name> |
| 387 | |
| 388 | Run lvs on the gds, |
| 389 | |
| 390 | .. code:: bash |
| 391 | |
| 392 | make lvs-gds-<macro_name> |
| 393 | |
| 394 | Run lvs on the maglef, |
| 395 | |
| 396 | .. code:: bash |
| 397 | |
| 398 | make lvs-maglef-<macro_name> |
| 399 | |
| 400 | Run drc using magic, |
| 401 | |
| 402 | .. code:: bash |
| 403 | |
| 404 | make drc-<macro_name> |
| 405 | |
| 406 | Run antenna check using magic, |
| 407 | |
| 408 | .. code:: bash |
| 409 | |
| 410 | make antenna-<macro_name> |
| 411 | |
| 412 | Run XOR check, |
| 413 | |
| 414 | .. code:: bash |
| 415 | |
| 416 | make xor-wrapper |
Marwan Abbas | fa8d7ec | 2022-02-03 09:50:05 -0800 | [diff] [blame] | 417 | |
| 418 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 419 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 420 | |
| 421 | Checklist for Open-MPW Submission |
| 422 | ================================= |
| 423 | |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 424 | - ✔️ The project repo adheres to the same directory structure in this |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 425 | repo. |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 426 | - ✔️ The project repo contain info.yaml at the project root. |
| 427 | - ✔️ Top level macro is named ``user_project_wrapper``. |
| 428 | - ✔️ Full Chip Simulation passes for RTL and GL (gate-level) |
| 429 | - ✔️ The hardened Macros are LVS and DRC clean |
Jeff DiCorpo | 9e95043 | 2021-10-24 10:09:39 -0700 | [diff] [blame] | 430 | - ✔️ The project contains a gate-level netlist for ``user_project_wrapper`` at verilog/gl/user_project_wrapper.v |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 431 | - ✔️ The hardened ``user_project_wrapper`` adheres to the same pin |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 432 | order specified at |
| 433 | `pin\_order <https://github.com/efabless/caravel/blob/master/openlane/user_project_wrapper_empty/pin_order.cfg>`__ |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 434 | - ✔️ The hardened ``user_project_wrapper`` adheres to the fixed wrapper configuration specified at `fixed_wrapper_cfgs <https://github.com/efabless/caravel/blob/master/openlane/user_project_wrapper_empty/fixed_wrapper_cfgs.tcl>`__ |
| 435 | - ✔️ XOR check passes with zero total difference. |
| 436 | - ✔️ Openlane summary reports are retained under ./signoff/ |
| 437 | - ✔️ The design passes the `mpw-precheck <https://github.com/efabless/mpw_precheck>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 438 | |
| 439 | .. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg |
| 440 | :target: https://opensource.org/licenses/Apache-2.0 |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 441 | .. |User CI| image:: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml/badge.svg |
| 442 | :target: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml |
| 443 | .. |Caravel Build| image:: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml/badge.svg |
Mohamed Kassem | 9ae1f07 | 2021-04-23 12:19:31 -0700 | [diff] [blame] | 444 | :target: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml |