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 | |
| 58 | - Docker |
| 59 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 60 | Install Caravel |
| 61 | =============== |
| 62 | |
| 63 | To setup caravel, run the following: |
| 64 | |
| 65 | .. code:: bash |
Mohamed Kassem | 9ae1f07 | 2021-04-23 12:19:31 -0700 | [diff] [blame] | 66 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 67 | git clone https://github.com/efabless/caravel_user_project.git |
Mohamed Kassem | 9ae1f07 | 2021-04-23 12:19:31 -0700 | [diff] [blame] | 68 | cd caravel_user_project |
Marwan Abbas | ca9b692 | 2022-01-26 20:27:03 +0200 | [diff] [blame] | 69 | |
| 70 | # If unset, CARAVEL_ROOT will be set to $(pwd)/caravel |
| 71 | # If you want to install caravel at a different location, run "export CARAVEL_ROOT=<caravel-path>" |
| 72 | export CARAVEL_ROOT=$(pwd)/caravel |
| 73 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 74 | make install |
| 75 | |
| 76 | To update the installed caravel to the latest, run: |
| 77 | |
| 78 | .. code:: bash |
| 79 | |
| 80 | make update_caravel |
| 81 | |
| 82 | To remove caravel, run |
| 83 | |
| 84 | .. code:: bash |
| 85 | |
| 86 | make uninstall |
| 87 | |
| 88 | By default |
| 89 | `caravel-lite <https://github.com/efabless/caravel-lite.git>`__ is |
| 90 | installed. To install the full version of caravel, run this prior to |
| 91 | calling make install. |
| 92 | |
| 93 | .. code:: bash |
| 94 | |
| 95 | export CARAVEL_LITE=0 |
| 96 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 97 | Caravel Integration |
| 98 | =================== |
| 99 | |
| 100 | Repo Integration |
| 101 | ---------------- |
| 102 | |
| 103 | Caravel files are kept separate from the user project by having caravel |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 104 | as submodule. The submodule commit should point to the latest of |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 105 | caravel/caravel-lite master/main branch. The following files should have a symbolic |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 106 | link to `caravel's <https://github.com/efabless/caravel.git>`__ |
| 107 | corresponding files: |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 108 | |
manarabdelaty | 0c03d60 | 2021-09-20 11:42:16 +0200 | [diff] [blame] | 109 | - `Openlane Makefile <../../openlane/Makefile>`__: This provides an easier |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 110 | way for running openlane to harden your macros. Refer to `Hardening |
| 111 | the User Project Macro using |
Marwan Abbas | ca9b692 | 2022-01-26 20:27:03 +0200 | [diff] [blame] | 112 | Openlane <#hardening-the-user-project-using-openlane>`__. Also, |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 113 | the makefile retains the openlane summary reports under the signoff |
| 114 | directory. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 115 | |
manarabdelaty | 0c03d60 | 2021-09-20 11:42:16 +0200 | [diff] [blame] | 116 | - `Pin order <../../openlane/user_project_wrapper/pin_order.cfg>`__ file for |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 117 | the user wrapper: The hardened user project wrapper macro must have |
| 118 | the same pin order specified in caravel's repo. Failing to adhere to |
| 119 | the same order will fail the gds integration of the macro with |
| 120 | caravel's back-end. |
| 121 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 122 | The symbolic links are automatically set when you run ``make install``. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 123 | |
| 124 | Verilog Integration |
| 125 | ------------------- |
| 126 | |
| 127 | You need to create a wrapper around your macro that adheres to the |
| 128 | template at |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 129 | `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] | 130 | The wrapper top module must be named ``user_project_wrapper`` and must |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 131 | 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] | 132 | user space utilities provided by caravel like IO ports, logic analyzer |
| 133 | probes, and wishbone bus connection to the management SoC. |
| 134 | |
| 135 | For this sample project, the user macro makes use of: |
| 136 | |
| 137 | - The IO ports for displaying the count register values on the IO pads. |
| 138 | |
| 139 | - The LA probes for supplying an optional reset and clock signals and |
| 140 | for setting an initial value for the count register. |
| 141 | |
matt venn | 4acd8b7 | 2021-04-27 11:34:42 +0200 | [diff] [blame] | 142 | - The wishbone port for reading/writing the count value through the |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 143 | management SoC. |
| 144 | |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 145 | Refer to `user\_project\_wrapper <../../verilog/rtl/user_project_wrapper.v>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 146 | for more information. |
| 147 | |
| 148 | .. raw:: html |
| 149 | |
| 150 | <p align="center"> |
| 151 | <img src="./_static/counter_32.png" width="50%" height="50%"> |
| 152 | </p> |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 153 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 154 | .. raw:: html |
| 155 | |
| 156 | </p> |
| 157 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 158 | |
| 159 | Layout Integration |
| 160 | ------------------- |
| 161 | |
| 162 | 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. |
| 163 | |
| 164 | .. raw:: html |
| 165 | |
| 166 | <p align="center"> |
| 167 | <img src="./_static/layout.png" width="80%" height="80%"> |
| 168 | </p> |
| 169 | |
| 170 | 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>`__ . |
| 171 | |
| 172 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 173 | Building the PDK |
| 174 | ================ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 175 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 176 | You have two options for building the pdk: |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 177 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 178 | - Build the pdk natively. |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 179 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 180 | Make sure you have `Magic VLSI Layout Tool <http://opencircuitdesign.com/magic/index.html>`__ installed on your machine before building the pdk. |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 181 | The pdk build is tested with magic version ``8.3.209``. |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 182 | |
| 183 | .. code:: bash |
| 184 | |
| 185 | # set PDK_ROOT to the path you wish to use for the pdk |
| 186 | export PDK_ROOT=<pdk-installation-path> |
| 187 | |
| 188 | # you can optionally specify skywater-pdk and open-pdks commit used |
| 189 | # by setting and exporting SKYWATER_COMMIT and OPEN_PDKS_COMMIT |
| 190 | # if you do not set them, they default to the last verfied commits tested for this project |
| 191 | |
| 192 | make pdk |
| 193 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 194 | - Build the pdk using openlane's docker image which has magic installed. |
| 195 | |
| 196 | .. code:: bash |
| 197 | |
| 198 | # set PDK_ROOT to the path you wish to use for the pdk |
| 199 | export PDK_ROOT=<pdk-installation-path> |
| 200 | |
| 201 | # you can optionally specify skywater-pdk and open-pdks commit used |
| 202 | # by setting and exporting SKYWATER_COMMIT and OPEN_PDKS_COMMIT |
| 203 | # if you do not set them, they default to the last verfied commits tested for this project |
| 204 | |
| 205 | make pdk-nonnative |
| 206 | |
| 207 | Running Full Chip Simulation |
| 208 | ============================ |
| 209 | |
| 210 | First, you will need to install the simulation environment, by |
| 211 | |
| 212 | .. code:: bash |
| 213 | |
| 214 | make simenv |
| 215 | |
| 216 | This will pull a docker image with the needed tools installed. |
| 217 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 218 | Then, run the RTL simulation by |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 219 | |
| 220 | .. code:: bash |
| 221 | |
| 222 | export PDK_ROOT=<pdk-installation-path> |
| 223 | export CARAVEL_ROOT=$(pwd)/caravel |
| 224 | # specify simulation mode: RTL/GL |
| 225 | export SIM=RTL |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 226 | # Run RTL simulation on IO ports testbench, make verify-io_ports |
| 227 | make verify-<testbench-name> |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 228 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 229 | 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. |
| 230 | |
| 231 | Run the gate-level simulation by: |
| 232 | |
| 233 | .. code:: bash |
| 234 | |
| 235 | export PDK_ROOT=<pdk-installation-path> |
| 236 | export CARAVEL_ROOT=$(pwd)/caravel |
| 237 | # specify simulation mode: RTL/GL |
| 238 | export SIM=GL |
| 239 | # Run RTL simulation on IO ports testbench, make verify-io_ports |
| 240 | make verify-<testbench-name> |
| 241 | |
| 242 | |
| 243 | 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 |
| 244 | `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] | 245 | simulation environment and the available testbenches for this sample |
Manar | ffaf984 | 2021-04-30 22:55:37 +0200 | [diff] [blame] | 246 | 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] | 247 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 248 | |
| 249 | User Project Wrapper Requirements |
| 250 | ================================= |
| 251 | |
| 252 | 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: |
| 253 | |
| 254 | - Area ``(2.920um x 3.520um)`` |
| 255 | - Top module name ``"user_project_wrapper"`` |
| 256 | - Pin Placement |
| 257 | - Pin Sizes |
| 258 | - Core Rings Width and Offset |
| 259 | - PDN Vertical and Horizontal Straps Width |
| 260 | |
| 261 | |
| 262 | .. raw:: html |
| 263 | |
| 264 | <p align="center"> |
| 265 | <img src="./_static/empty.png" width="40%" height="40%"> |
| 266 | </p> |
| 267 | |
Marwan Abbas | ca9b692 | 2022-01-26 20:27:03 +0200 | [diff] [blame] | 268 | You are allowed to change the following if you need to: |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 269 | |
| 270 | - PDN Vertical and Horizontal Pitch & Offset |
| 271 | |
| 272 | .. raw:: html |
| 273 | |
| 274 | <p align="center"> |
| 275 | <img src="./_static/pitch.png" width="30%" height="30%"> |
| 276 | </p> |
| 277 | |
| 278 | 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. |
| 279 | |
| 280 | |
| 281 | Hardening the User Project using OpenLane |
| 282 | ========================================== |
| 283 | |
| 284 | OpenLane Installation |
| 285 | --------------------- |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 286 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 287 | You will need to install openlane by running the following |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 288 | |
| 289 | .. code:: bash |
| 290 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 291 | export OPENLANE_ROOT=<openlane-installation-path> |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 292 | |
| 293 | # you can optionally specify the openlane tag to use |
| 294 | # by running: export OPENLANE_TAG=<openlane-tag> |
| 295 | # if you do not set the tag, it defaults to the last verfied tag tested for this project |
| 296 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 297 | make openlane |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 298 | |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 299 | For detailed instructions on the openlane and the pdk installation refer |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 300 | to |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 301 | `README <https://github.com/The-OpenROAD-Project/OpenLane#setting-up-openlane>`__. |
| 302 | |
| 303 | Hardening Options |
| 304 | ----------------- |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 305 | |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 306 | There are three options for hardening the user project macro using |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 307 | openlane: |
| 308 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 309 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
| 310 | | Option 1 | Option 2 | Option 3 | |
| 311 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
| 312 | | Hardening the user macro(s) first, then inserting it in the | Flattening the user macro(s) with the | Placing multiple macros in the wrapper | |
| 313 | | user project wrapper with no standard cells on the top level | user_project_wrapper | along with standard cells on the top level | |
| 314 | +==============================================================+============================================+============================================+ |
| 315 | | |pic1| | |pic2| | |pic3| | |
| 316 | | | | | |
| 317 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
| 318 | | ex: |link1| | | ex: |link2| | |
| 319 | +--------------------------------------------------------------+--------------------------------------------+--------------------------------------------+ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 320 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 321 | .. |link1| replace:: `caravel_user_project <https://github.com/efabless/caravel_user_project>`__ |
| 322 | |
| 323 | .. |link2| replace:: `caravel_ibex <https://github.com/efabless/caravel_ibex>`__ |
| 324 | |
| 325 | |
| 326 | .. |pic1| image:: ./_static/option1.png |
| 327 | :width: 48% |
| 328 | |
| 329 | .. |pic2| image:: ./_static/option2.png |
| 330 | :width: 140% |
| 331 | |
| 332 | .. |pic3| image:: ./_static/option3.png |
| 333 | :width: 72% |
| 334 | |
| 335 | 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>`__. |
| 336 | |
| 337 | |
| 338 | Running OpenLane |
| 339 | ----------------- |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 340 | |
| 341 | For this sample project, we went for the first option where the user |
| 342 | macro is hardened first, then it is inserted in the user project |
manarabdelaty | fbd955f | 2021-09-20 11:59:53 +0200 | [diff] [blame] | 343 | wrapper without having any standard cells on the top level. |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 344 | |
| 345 | .. raw:: html |
| 346 | |
| 347 | <p align="center"> |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 348 | <img src="./_static/wrapper.png" width="30%" height="30%"> |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 349 | </p> |
| 350 | |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 351 | .. raw:: html |
| 352 | |
| 353 | </p> |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 354 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 355 | To reproduce hardening this project, run the following: |
| 356 | |
| 357 | .. code:: bash |
| 358 | |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 359 | # Run openlane to harden user_proj_example |
| 360 | make user_proj_example |
| 361 | # Run openlane to harden user_project_wrapper |
| 362 | make user_project_wrapper |
| 363 | |
| 364 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 365 | For more information on the openlane flow, check `README <https://github.com/The-OpenROAD-Project/OpenLane#readme>`__. |
| 366 | |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 367 | Running MPW Precheck Locally |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 368 | ================================= |
| 369 | |
Manar | 4ec8cba | 2021-10-04 10:26:10 -0500 | [diff] [blame] | 370 | 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] | 371 | |
| 372 | .. code:: bash |
| 373 | |
| 374 | # By default, this install the precheck in your home directory |
| 375 | # To change the installtion path, run "export PRECHECK_ROOT=<precheck installation path>" |
| 376 | make precheck |
| 377 | |
| 378 | This will clone the precheck repo and pull the latest precheck docker image. |
| 379 | |
| 380 | |
| 381 | Then, you can run the precheck by running |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 382 | Specify CARAVEL_ROOT before running any of the following, |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 383 | |
| 384 | .. code:: bash |
| 385 | |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 386 | # export CARAVEL_ROOT=$(pwd)/caravel |
| 387 | export CARAVEL_ROOT=<path-to-caravel> |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 388 | make run-precheck |
| 389 | |
| 390 | This will run all the precheck checks on your project and will produce the logs under the ``checks`` directory. |
| 391 | |
| 392 | |
| 393 | Other Miscellaneous Targets |
| 394 | ============================ |
| 395 | |
| 396 | 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. |
| 397 | |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 398 | Run ``make help`` to display available targets. |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 399 | |
| 400 | Specify CARAVEL_ROOT before running any of the following, |
| 401 | |
| 402 | .. code:: bash |
manarabdelaty | d8dd010 | 2021-04-30 08:40:52 +0200 | [diff] [blame] | 403 | |
| 404 | # export CARAVEL_ROOT=$(pwd)/caravel |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 405 | export CARAVEL_ROOT=<path-to-caravel> |
| 406 | |
manarabdelaty | 0c03d60 | 2021-09-20 11:42:16 +0200 | [diff] [blame] | 407 | Run lvs on the mag view, |
manarabdelaty | 0218c0f | 2021-04-29 18:31:49 +0200 | [diff] [blame] | 408 | |
| 409 | .. code:: bash |
| 410 | |
| 411 | make lvs-<macro_name> |
| 412 | |
| 413 | Run lvs on the gds, |
| 414 | |
| 415 | .. code:: bash |
| 416 | |
| 417 | make lvs-gds-<macro_name> |
| 418 | |
| 419 | Run lvs on the maglef, |
| 420 | |
| 421 | .. code:: bash |
| 422 | |
| 423 | make lvs-maglef-<macro_name> |
| 424 | |
| 425 | Run drc using magic, |
| 426 | |
| 427 | .. code:: bash |
| 428 | |
| 429 | make drc-<macro_name> |
| 430 | |
| 431 | Run antenna check using magic, |
| 432 | |
| 433 | .. code:: bash |
| 434 | |
| 435 | make antenna-<macro_name> |
| 436 | |
| 437 | Run XOR check, |
| 438 | |
| 439 | .. code:: bash |
| 440 | |
| 441 | make xor-wrapper |
| 442 | |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 443 | |
| 444 | Checklist for Open-MPW Submission |
| 445 | ================================= |
| 446 | |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 447 | - ✔️ The project repo adheres to the same directory structure in this |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 448 | repo. |
Manar | f088db1 | 2021-09-20 12:13:04 +0200 | [diff] [blame] | 449 | - ✔️ The project repo contain info.yaml at the project root. |
| 450 | - ✔️ Top level macro is named ``user_project_wrapper``. |
| 451 | - ✔️ Full Chip Simulation passes for RTL and GL (gate-level) |
| 452 | - ✔️ The hardened Macros are LVS and DRC clean |
Jeff DiCorpo | 9e95043 | 2021-10-24 10:09:39 -0700 | [diff] [blame] | 453 | - ✔️ 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] | 454 | - ✔️ The hardened ``user_project_wrapper`` adheres to the same pin |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 455 | order specified at |
| 456 | `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] | 457 | - ✔️ 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>`__ |
| 458 | - ✔️ XOR check passes with zero total difference. |
| 459 | - ✔️ Openlane summary reports are retained under ./signoff/ |
| 460 | - ✔️ The design passes the `mpw-precheck <https://github.com/efabless/mpw_precheck>`__ |
Mohamed Kassem | 6f2fcd2 | 2021-04-19 10:14:19 -0700 | [diff] [blame] | 461 | |
| 462 | .. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg |
| 463 | :target: https://opensource.org/licenses/Apache-2.0 |
manarabdelaty | d0e7afb | 2021-04-22 00:21:13 +0200 | [diff] [blame] | 464 | .. |User CI| image:: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml/badge.svg |
| 465 | :target: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml |
| 466 | .. |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] | 467 | :target: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml |