blob: b6714dbd2e3f3be52bfe922d11dd9c5aa33fb167 [file] [log] [blame]
;; Copyright 2019-2021 SkyWater PDK Authors
;;
;; 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
;;
;; https://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.
;;
;; This code is *alternatively* available under a BSD-3-Clause license, see
;; details in the README.md at the top level and the license text at
;; https://github.com/google/skywater-pdk-libs-sky130_bag3_pr/blob/master/LICENSE.alternative
;;
;; SPDX-License-Identifier: BSD-3-Clause OR Apache 2.0
;; This skill file compiles schematic PCells for BAG primitives
lib_obj = ddGetObj("BAG_prim")
; nmos4_standard/nshort
pcDefinePCell(
list( lib_obj "nmos4_standard" "schematic" "schematic")
((w string "0.42")
(l string "0.15")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "nfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "nshort")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; nmos4_svt/nshort
pcDefinePCell(
list( lib_obj "nmos4_svt" "schematic" "schematic")
((w string "0.42")
(l string "0.15")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "nfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "nshort")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; nmos4_hv/nhv
pcDefinePCell(
list( lib_obj "nmos4_hv" "schematic" "schematic")
((w string "0.75")
(l string "0.50")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "nfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "nhv")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; nmos4_hvesd/nhvesd
pcDefinePCell(
list( lib_obj "nmos4_hvesd" "schematic" "schematic")
((w string "17.50")
(l string "0.55")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "nfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "nhvesd")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; nmos4_lvt/nlowvt
pcDefinePCell(
list( lib_obj "nmos4_lvt" "schematic" "schematic")
((w string "0.42")
(l string "0.15")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "nfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "nlowvt")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; pmos4_standard/pshort
pcDefinePCell(
list( lib_obj "pmos4_standard" "schematic" "schematic")
((w string "0.55")
(l string "0.15")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "pfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "pshort")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; pmos4_svt/pshort
pcDefinePCell(
list( lib_obj "pmos4_svt" "schematic" "schematic")
((w string "0.55")
(l string "0.15")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "pfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "pshort")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; pmos4_hvt/phighvt
pcDefinePCell(
list( lib_obj "pmos4_hvt" "schematic" "schematic")
((w string "0.54")
(l string "0.15")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "pfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "phighvt")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; pmos4_hv/phv
pcDefinePCell(
list( lib_obj "pmos4_hv" "schematic" "schematic")
((w string "0.42")
(l string "0.50")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "pfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "phv")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; pmos4_hvesd/phvesd
pcDefinePCell(
list( lib_obj "pmos4_hvesd" "schematic" "schematic")
((w string "14.50")
(l string "0.55")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "pfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "phvesd")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)
; pmos4_lvt/plowvt
pcDefinePCell(
list( lib_obj "pmos4_lvt" "schematic" "schematic")
((w string "0.55")
(l string "0.35")
(nf string "1")
)
let((inst iopin_master io_net io_pin)
wval = atoi(w)
nval = atoi(nf)
inst = dbCreateParamInstByMasterName( pcCellView "s8phirs_10r" "pfet" "symbol"
"N0" -0.375:0 "R0" 1
list(list("hspiceModelMenu" "string" "plowvt")
list("w" "string" w)
list("l" "string" l)
list("m" "string" nf)
list("totalW" "string" sprintf(nil "%dn" wval * nval)))
)
iopin_master = dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
io_net = dbCreateNet(pcCellView "D")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "D" -0.5:0.5625 "R0")
"D" dbCreateTerm(io_net "D" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "d"))
io_net = dbCreateNet(pcCellView "G")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "G" -0.875:0 "R0")
"G" dbCreateTerm(io_net "G" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "g"))
io_net = dbCreateNet(pcCellView "S")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "S" -0.5:-0.5 "R0")
"S" dbCreateTerm(io_net "S" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "s"))
io_net = dbCreateNet(pcCellView "B")
io_pin = dbCreatePin(io_net dbCreateInst(pcCellView iopin_master "B" 0.125:0 "R0")
"B" dbCreateTerm(io_net "B" "inputOutput"))
dbCreateInstTerm(io_net inst dbFindTermByName(inst~>master "b"))
)
)