blob: 42f2fb2a253d36afac435344a4d445a30f6c9bf1 [file] [log] [blame]
agorararmard146f0132020-12-10 18:46:20 +02001# 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 Kassem7a3f4782020-10-27 12:31:18 -070017puts 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
22set scalefac [tech lambda]
23if {[lindex $scalefac 1] < 2} {
24 scalegrid 1 2
25}
26
27# drc off
28drc euclidean on
29
30# default pdk
31# set SW_PDK_ROOT "/ef/tech/SW.2"
32set PDK "sky130A"
33set SCL_VARIANT "sky130_fd_sc_hd"
34set IO_VARIANT "sky130_fd_io"
35set PDKPATH "$::env(SW_PDK_ROOT)/$PDK"
36
37# loading technology
38tech load "$PDKPATH/libs.tech/magic/current/$PDK.tech"
39
40# load device generator
41source "$PDKPATH/libs.tech/magic/current/$PDK.tcl"
42
43
44# load bind keys (optional)
45source "$PDKPATH/libs.tech/magic/current/$PDK-BindKeys"
46
47# set units to lambda grid
48snap lambda
49
50# add path to reference cells
51set MAGPATH "$PDKPATH/libs.ref/$SCL_VARIANT/mag/*.mag"
52
53
54addpath "$PDKPATH/libs.ref/sky130_fd_pr_base/mag"
55addpath "$PDKPATH/libs.ref/$IO_VARIANT/mag"
56addpath "$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.
63catch {magic::query_mylib_ip}
64# add path to local IP from user design space. Defined in the PDK script.
65catch {magic::query_my_projects}