agorararmard | 146f013 | 2020-12-10 18:46:20 +0200 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020 Efabless Corporation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # |
| 15 | # SPDX-License-Identifier: Apache-2.0 |
| 16 | |
Mohamed Kassem | 7a3f478 | 2020-10-27 12:31:18 -0700 | [diff] [blame] | 17 | puts stdout "Sourcing design .magicrc for technology sky130A ..." |
| 18 | |
| 19 | # Put grid on 0.005 pitch. This is important, as some commands don't |
| 20 | # rescale the grid automatically (such as lef read?). |
| 21 | |
| 22 | set scalefac [tech lambda] |
| 23 | if {[lindex $scalefac 1] < 2} { |
| 24 | scalegrid 1 2 |
| 25 | } |
| 26 | |
| 27 | # drc off |
| 28 | drc euclidean on |
| 29 | |
| 30 | # default pdk |
| 31 | # set SW_PDK_ROOT "/ef/tech/SW.2" |
| 32 | set PDK "sky130A" |
| 33 | set SCL_VARIANT "sky130_fd_sc_hd" |
| 34 | set IO_VARIANT "sky130_fd_io" |
| 35 | set PDKPATH "$::env(SW_PDK_ROOT)/$PDK" |
| 36 | |
| 37 | # loading technology |
| 38 | tech load "$PDKPATH/libs.tech/magic/current/$PDK.tech" |
| 39 | |
| 40 | # load device generator |
| 41 | source "$PDKPATH/libs.tech/magic/current/$PDK.tcl" |
| 42 | |
| 43 | |
| 44 | # load bind keys (optional) |
| 45 | source "$PDKPATH/libs.tech/magic/current/$PDK-BindKeys" |
| 46 | |
| 47 | # set units to lambda grid |
| 48 | snap lambda |
| 49 | |
| 50 | # add path to reference cells |
| 51 | set MAGPATH "$PDKPATH/libs.ref/$SCL_VARIANT/mag/*.mag" |
| 52 | |
| 53 | |
| 54 | addpath "$PDKPATH/libs.ref/sky130_fd_pr_base/mag" |
| 55 | addpath "$PDKPATH/libs.ref/$IO_VARIANT/mag" |
| 56 | addpath "$PDKPATH/libs.ref/$SCL_VARIANT/mag" |
| 57 | |
| 58 | # addpath ${MAGPATH}/s8fmlt |
| 59 | |
| 60 | # add path to GDS cells |
| 61 | |
| 62 | # add path to IP from catalog. This procedure defined in the PDK script. |
| 63 | catch {magic::query_mylib_ip} |
| 64 | # add path to local IP from user design space. Defined in the PDK script. |
| 65 | catch {magic::query_my_projects} |