agorararmard | dc723a6 | 2020-11-26 20:00:29 +0200 | [diff] [blame] | 1 | # Using OpenLANE to Harden Your Design: |
| 2 | |
| 3 | You can utilize the Makefile existing here in this directory to do that. |
| 4 | |
| 5 | But, first you need to specify 3 things: |
| 6 | ```bash |
| 7 | export IMAGE_NAME=openlane:<the openlane tag/version you are using> |
| 8 | export PDK_ROOT=<The location where the pdk is installed> |
| 9 | export OPENLANE_ROOT=<the absolute path to the cloned openlane directory> |
| 10 | ``` |
| 11 | |
| 12 | Then, you have two options: |
| 13 | 1. Create a macro for your design and harden it, then insert it into user_project_wrapper. |
| 14 | |
| 15 | 2. Flatten your design with the user_project_wrapper and harden them as one. |
| 16 | |
| 17 | |
| 18 | **NOTE:** The OpenLANE documentation should cover everything you might need to create your design. You can find that [here](https://github.com/efabless/openlane/blob/master/README.md). |
| 19 | |
| 20 | ## Option 1: |
| 21 | |
| 22 | This could be done by creating a directory for your design here in this directory, and adding a configuration file for it under the same directory. You can follow the instructions given [here](https://github.com/efabless/openlane#adding-a-design) to generate an initial configuration file for your design, or you can start with the following: |
| 23 | |
| 24 | ```tcl |
| 25 | set script_dir [file dirname [file normalize [info script]]] |
| 26 | |
| 27 | set ::env(DESIGN_NAME) <Your Design Name> |
| 28 | |
| 29 | set ::env(VERILOG_FILES) "$script_dir/../../verilog/rtl/<Your RTL.v>" |
| 30 | |
| 31 | set ::env(CLOCK_PORT) <Clock port name if it exists> |
| 32 | set ::env(CLOCK_PERIOD) <Desired clock period> |
| 33 | ``` |
| 34 | |
| 35 | Then you can add them as you see fit to get the desired DRC/LVS clean outcome. |
| 36 | |
| 37 | After that, run the following command: |
| 38 | ```bash |
| 39 | make <your design directory name> |
| 40 | ``` |
| 41 | |
| 42 | Then, follow the instructions given in Option 2. |
| 43 | |
| 44 | ## Option 2: |
| 45 | |
| 46 | 1. Add your design to the RTL of the [user_project_wrapper](../verilog/rtl/user_project_wrapper.v). |
| 47 | |
| 48 | 2. Modify the configuration file [here](./user_project_wrapper/config.tcl) to include any extra files you may need. Make sure to change these accordingly: |
| 49 | ```tcl |
| 50 | set ::env(CLOCK_NET) "mprj.clk" |
| 51 | |
| 52 | |
| 53 | set ::env(VERILOG_FILES) "\ |
| 54 | $script_dir/../../verilog/rtl/defines.v \ |
| 55 | $script_dir/../../verilog/rtl/user_project_wrapper.v" |
| 56 | |
| 57 | set ::env(VERILOG_FILES_BLACKBOX) "\ |
| 58 | $script_dir/../../verilog/rtl/defines.v \ |
| 59 | $script_dir/../../verilog/rtl/user_proj_example.v" |
| 60 | |
| 61 | set ::env(EXTRA_LEFS) "\ |
| 62 | $script_dir/../../lef/user_proj_example.lef" |
| 63 | |
| 64 | set ::env(EXTRA_GDS_FILES) "\ |
| 65 | $script_dir/../../gds/user_proj_example.gds" |
| 66 | ``` |
| 67 | **NOTE:** Don't change the size or the pin order! |
| 68 | |
| 69 | 3. Remove this line `add_macro_placement mprj 1150 1700 N` from the interactive script [here](./user_project_wrapper/config.tcl) and replace it with the placement for your macro instances. Or, remove it entirely if you have no macros, along with this line `manual_macro_placement f`. |
| 70 | |
| 71 | 4. Run your design through the flow: `make user_project_wrapper` |
| 72 | |
| 73 | 5. Re-iterate until you have what you want. |
| 74 | |
| 75 | 6. Go back to the main [README.md](../README.md) and continue the process of boarding the chip. |
| 76 | |
| 77 | |
| 78 | ## Extra Pointers: |
| 79 | |
| 80 | |
| 81 | - The OpenLANE documentation should cover everything you might need to create your design. You can find that [here](https://github.com/efabless/openlane/blob/master/README.md). |
| 82 | - The OpenLANE [FAQs](https://github.com/efabless/openlane/wiki) can guide through your troubles. |
| 83 | - [Here](https://github.com/efabless/openlane/blob/master/configuration/README.md) you can find all the configurations and how to use them. |
| 84 | - [Here](https://github.com/efabless/openlane/blob/master/doc/advanced_readme.md) you can learn how to write an interactive script. |
| 85 | - [Here](https://github.com/efabless/openlane/blob/master/doc/OpenLANE_commands.md) you can find a full documentation for all OpenLANE commands. |
| 86 | - [This documentation](https://github.com/efabless/openlane/blob/master/regression_results/README.md) describes how to use the exploration script to achieve an LVS/DRC clean design. |