# read table data
from pygmid import Lookup as lk
import numpy as np
= lk('sg13_lv_nmos.mat')
lv_nmos = lk('sg13_lv_pmos.mat')
lv_pmos # list of parameters: VGS, VDS, VSB, L, W, NFING, ID, VT, GM, GMB, GDS, CGG, CGB, CGD, CGS, CDD, CSS, STH, SFL
# if not specified, minimum L, VDS=max(vgs)/2=0.9 and VSB=0 are used
Copyright 2025 Harald Pretl
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
In [99]:
In [100]:
# define the given values
= 10e-6
id_spec = 20
gm_id_spec = 1 L_spec
In [101]:
# get the vgs for NMOS and PMOS
= lv_nmos.look_upVGS(GM_ID=gm_id_spec, L=L_spec, VDS=0.75, VSB=0.8)
vgsn = lv_nmos.look_upVGS(GM_ID=gm_id_spec, L=L_spec, VDS=vgsn, VSB=0.8)
vgsn
= lv_pmos.look_upVGS(GM_ID=gm_id_spec, L=L_spec, VDS=0.75, VSB=0.0)
vgsp = lv_pmos.look_upVGS(GM_ID=gm_id_spec, L=L_spec, VDS=vgsp, VSB=0.0)
vgsp
print('VGS of NMOS =', round(float(vgsn), 3), 'V')
print('VGS of PMOS =', round(float(vgsp), 3), 'V')
VGS of NMOS = 0.356 V
VGS of PMOS = 0.387 V
In [102]:
# find the W of the transistors
= lv_nmos.lookup('ID_W', GM_ID=gm_id_spec, L=L_spec, VDS=vgsn, VSB=0)
idn_w = id_spec / idn_w
wn print('NMOS W =', round(wn, 2), 'um, rounded W =', round(wn*2)/2, 'um')
= lv_pmos.lookup('ID_W', GM_ID=gm_id_spec, L=L_spec, VDS=vgsp, VSB=0)
idp_w = id_spec / idp_w
wp print('PMOS W =', round(wp, 2), 'um, rounded W =', round(wp*2)/2, 'um')
NMOS W = 14.45 um, rounded W = 14.5 um
PMOS W = 51.9 um, rounded W = 52.0 um