blob: 578077c31b7c322668da91d0dcf40d7c7a0cfe9b [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
subckt nmos4_hv B D G S
parameters l w nf
MM0 D G S B nhv l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends nmos4_hv
subckt nmos4_hvesd B D G S
parameters l w nf
MM0 D G S B nhvesd l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends nmos4_hvesd
subckt nmos4_svt B D G S
parameters l w nf
MM0 D G S B nshort l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends nmos4_svt
subckt nmos4_lvt B D G S
parameters l w nf
MM0 D G S B nlowvt l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends nmos4_lvt
subckt nmos4_standard B D G S
parameters l w nf
MM0 D G S B nshort l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends nmos4_standard
subckt pmos4_hv B D G S
parameters l w nf
MM0 D G S B phv l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends pmos4_hv
subckt pmos4_hvesd B D G S
parameters l w nf
MM0 D G S B phvesd l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends pmos4_hvesd
subckt pmos4_svt B D G S
parameters l w nf
MM0 D G S B pshort l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends pmos4_svt
subckt pmos4_lvt B D G S
parameters l w nf
MM0 D G S B plowvt l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends pmos4_lvt
subckt pmos4_hvt B D G S
parameters l w nf
MM0 D G S B phighvt l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends pmos4_hvt
subckt pmos4_standard B D G S
parameters l w nf
MM0 D G S B pshort l=l * 1.0e6 w=w * 1.0e6 m=nf mult=1
ends pmos4_standard
subckt res_metal_1 MINUS PLUS
parameters l w
RR0 PLUS MINUS mrm1 w=w * 1.0e6 l=l * 1.0e6 m=1
ends res_metal_1
subckt res_metal_2 MINUS PLUS
parameters l w
RR0 PLUS MINUS mrm2 w=w * 1.0e6 l=l * 1.0e6 m=1
ends res_metal_2
subckt res_metal_3 MINUS PLUS
parameters l w
RR0 PLUS MINUS mrm3 w=w * 1.0e6 l=l * 1.0e6 m=1
ends res_metal_3
subckt res_metal_4 MINUS PLUS
parameters l w
RR0 PLUS MINUS mrm4 w=w * 1.0e6 l=l * 1.0e6 m=1
ends res_metal_4
subckt res_metal_5 MINUS PLUS
parameters l w
RR0 PLUS MINUS mrm5 w=w * 1.0e6 l=l * 1.0e6 m=1
ends res_metal_5
subckt res_standard BULK MINUS PLUS
parameters l w
RR0 PLUS MINUS BULK xhrpoly w=w * 1.0e6 l=l * 1.0e6 m=1 mult=1
ends res_standard
subckt res_high_res BULK MINUS PLUS
parameters l w
RR0 PLUS MINUS BULK xuhrpoly w=w * 1.0e6 l=l * 1.0e6 m=1 mult=1
ends res_high_res
subckt mim_standard BOT TOP
parameters unit_width unit_height num_rows num_cols
CC0 TOP BOT xcmimc2 w=unit_width * 1.0e6 l=unit_height * 1.0e6 m=num_rows * num_cols
ends mim_standard
subckt mim_45 BOT TOP
parameters unit_width unit_height num_rows num_cols
CC0 TOP BOT xcmimc2 w=unit_width * 1.0e6 l=unit_height * 1.0e6 m=num_rows * num_cols
ends mim_45
subckt mim_34 BOT TOP
parameters unit_width unit_height num_rows num_cols
CC0 TOP BOT xcmimc1 w=unit_width * 1.0e6 l=unit_height * 1.0e6 m=num_rows * num_cols
ends mim_34
subckt ideal_balun d c p n
K0 d 0 p c transformer n1=2
K1 d 0 c n transformer n1=2
ends ideal_balun