A python3 implementation of the gm/ID starter kit
Report bug
·
Request feature
pygmid is a Python 3 version of the gm/ID starter kit by Prof. Boris Murmann of Stanford University. The package also offers some scripts from the Paul Jesper's book.
If you find this package useful for your research, please consider citing it.
The original MATLAB gm/ID starter kit can be found here
To install pygmid from source, download from Github and run pip:
pip install .
in the root directory.
pygmid can also be installed from PyPI:
pip install pygmid
A gm/ID lookup object can be generated with the Lookup
class. The lookup object requires lookup data for initialisation. Both .mat
files generated using MATLAB or .pkl
files generated using pygmid's own characterisation script are supported.
You can create a lookup object as follows:
from pygmid import Lookup as lk
NCH = lk('180nch.mat')
The Lookup
class allows for pseudo array access of the MOS matrix data. You can access data as follows:
# get VGS data as array from NCH
VGS_array = NCH['VGS']
Data is returned as a deep copy of the array contained in the Lookup
object.
Lookup of interpolated data occurs as follows:
VDSs = NCH['VDS']
VGSs = np.arange(0.4, 0.6, 0.05)
# Plot ID versus VDS
ID = NCH.look_up('ID', vds=VDSs, vgs=VGSs)
# alias function lookup can also be used
ID = NCH.lookup('ID', vds=VDSs, vgs=VGSs)
# check bias
VGS = NCH.look_upVGS(GM_ID = 10, VDS = 0.6, VSB = 0.1, L = 0.18)
print(f'VGS is: {VGS}')
plt.plot(VDSs, np.transpose(ID))
Modes 1 (Simple parameter lookup), mode 2 (arbitrary ratio lookup) and mode 3 (cross lookup of ratios) are implemented. The companion lookupVGS function is also included.
The EKV extraction function can be used as follows:
from pygmid import EKV_param_extraction, XTRACT
(VDS, n, VT, JS, d1n, d1VT, d1logJS, d2n, d2VT, d2logJS)\
= EKV_param_extraction(NCH, 1, L = 0.18, VDS = 0.6, VSB = 0.0)
Sample usage of this and other utility functions can be found in debug_utility.py
.
Usage of lookup scripts are given in debug_lookup.py
and debug_lookupVGS.py
.
Sample outputs for the 180nm generic pdk used in the Murmann starter pack are given below:
The generic PDK data is hosted here.
pygmid
also features a CLI which can be used to run techweeps to generate transistor data.
Documentation will be added in due course. This functionality is in a state of flux.
- Cian O'Donnell : cian.odonnell@mcci.ie
- Tiarnach Ó Riada : tiarnach.oriada@tyndall.ie
- Neil Stuart
- Danylo Galach
- José Rui Custódio
A special thanks to Prof. Boris Murmann for giving permission to use his work and release this package under the Apache 2.0 License.