blob: 6138b58717c7ec72e1e48c84f383d0488e060428 [file] [log] [blame]
###
### Source file sky130.magicrc
### Process this file with the m4 processor
###
puts stdout "Sourcing design .magicrc for technology TECHNAME ..."
# 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
# Change this to a fixed number for repeatable behavior with GDS writes
# e.g., "random seed 12345"
catch {random seed}
# Turn off the scale option on ext2spice or else it conflicts with the
# scale in the model files.
ext2spice scale off
# Allow override of PDK path from environment variable PDK_ROOT
# "file nativename" guards against a local PDK_ROOT with "~" in the name
if {[catch {set PDK_ROOT [file nativename $env(PDK_ROOT)]}]} {
set PDK_ROOT STAGING_PATH
}
# loading technology
#ifdef FULLTECH
tech load $PDK_ROOT/TECHNAME/MAGIC_CURRENT/TECHNAME-F.tech
#else
tech load $PDK_ROOT/TECHNAME/MAGIC_CURRENT/TECHNAME.tech
#endif
# load device generator
source $PDK_ROOT/TECHNAME/MAGIC_CURRENT/TECHNAME.tcl
# load bind keys (optional)
# source $PDK_ROOT/TECHNAME/MAGIC_CURRENT/TECHNAME-BindKeys
# set units to lambda grid
snap lambda
# set sky130 standard power, ground, and substrate names
set VDD VPWR
set GND VGND
set SUB VSUBS
# Allow override of type of magic library views used, "mag" or "maglef",
# from environment variable MAGTYPE
if {[catch {set MAGTYPE $env(MAGTYPE)}]} {
set MAGTYPE mag
}
# add path to reference cells
if {[file isdir ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}]} {
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_pr
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_io
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_hd
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_hdll
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_hs
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_hvl
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_lp
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_ls
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_sc_ms
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_osu_sc
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_osu_sc_t18
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_ml_xx_hd
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_fd_bd_sram
addpath ${PDK_ROOT}/TECHNAME/libs.ref/${MAGTYPE}/sky130_sram_macros
} else {
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_pr/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_io/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hd/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hdll/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hs/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hvl/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_lp/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_ls/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_ms/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_osu_sc/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_osu_sc_t18/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_ml_xx_hd/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_bd_sram/${MAGTYPE}
addpath ${PDK_ROOT}/TECHNAME/libs.ref/sky130_sram_macros/${MAGTYPE}
}
# add path to GDS cells
#ifdef FULLTECH
if {[file isdir ${PDK_ROOT}/TECHNAME/libs.ref/gds]} {
path cell ${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_pr
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_io
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_hd
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_hdll
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_hs
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_hvl
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_lp
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_ls
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_fd_sc_ms
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_osu130
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_osu130_t18
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_ml_xx_hd
path cell +${PDK_ROOT}/TECHNAME/libs.ref/gds/sky130_sram_macros
} else {
path cell ${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_pr/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_io/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hd/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hdll/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hs/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_hvl/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_lp/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_ls/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_fd_sc_ms/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_osu130/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_osu130_t18/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_ml_xx_hd/gds
path cell +${PDK_ROOT}/TECHNAME/libs.ref/sky130_sram_macros/gds
}
#endif (FULLTECH)
# 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}