blob: 42f2fb2a253d36afac435344a4d445a30f6c9bf1 [file] [log] [blame]
# SPDX-FileCopyrightText: 2020 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
puts stdout "Sourcing design .magicrc for technology sky130A ..."
# Put grid on 0.005 pitch. This is important, as some commands don't
# rescale the grid automatically (such as lef read?).
set scalefac [tech lambda]
if {[lindex $scalefac 1] < 2} {
scalegrid 1 2
}
# drc off
drc euclidean on
# default pdk
# set SW_PDK_ROOT "/ef/tech/SW.2"
set PDK "sky130A"
set SCL_VARIANT "sky130_fd_sc_hd"
set IO_VARIANT "sky130_fd_io"
set PDKPATH "$::env(SW_PDK_ROOT)/$PDK"
# loading technology
tech load "$PDKPATH/libs.tech/magic/current/$PDK.tech"
# load device generator
source "$PDKPATH/libs.tech/magic/current/$PDK.tcl"
# load bind keys (optional)
source "$PDKPATH/libs.tech/magic/current/$PDK-BindKeys"
# set units to lambda grid
snap lambda
# add path to reference cells
set MAGPATH "$PDKPATH/libs.ref/$SCL_VARIANT/mag/*.mag"
addpath "$PDKPATH/libs.ref/sky130_fd_pr_base/mag"
addpath "$PDKPATH/libs.ref/$IO_VARIANT/mag"
addpath "$PDKPATH/libs.ref/$SCL_VARIANT/mag"
# addpath ${MAGPATH}/s8fmlt
# add path to GDS cells
# add path to IP from catalog. This procedure defined in the PDK script.
catch {magic::query_mylib_ip}
# add path to local IP from user design space. Defined in the PDK script.
catch {magic::query_my_projects}