diff options
author | fahim-oscad | 2016-04-21 20:21:19 +0530 |
---|---|---|
committer | fahim-oscad | 2016-04-21 20:21:19 +0530 |
commit | 6147bc36dd3ab957b8700e7af26f5c2e2c43cfcc (patch) | |
tree | a051e85dab44c40bcce79803f37b124b5e6218eb | |
parent | a89ff374e616efcc48945d8644f6d329f18a05bb (diff) | |
download | eSim-6147bc36dd3ab957b8700e7af26f5c2e2c43cfcc.tar.gz eSim-6147bc36dd3ab957b8700e7af26f5c2e2c43cfcc.tar.bz2 eSim-6147bc36dd3ab957b8700e7af26f5c2e2c43cfcc.zip |
Modified code for mosfet--- Need to design again
-rw-r--r-- | src/ngspicetoModelica/NgspicetoModelica.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py index 5467b98b..fbf7103e 100644 --- a/src/ngspicetoModelica/NgspicetoModelica.py +++ b/src/ngspicetoModelica/NgspicetoModelica.py @@ -17,7 +17,7 @@ class NgMoConverter: self.deviceDetail = [] self.subCktDetail = [] self.inbuiltModelDetail = [] - self.deviceList = ['d','D','j','J','q','Q'] #MOSFET is excluded as it has special case + self.deviceList = ['d','D','j','J','q','Q','m','M'] self.inbuiltModelDict = {} @@ -363,6 +363,7 @@ class NgMoConverter: each = each.split('=') mosInfo[words[0]][each[0]] = each[1] trans = transInfo[words[5]] + print "trans------------>",trans if trans == 'nmos': start = 'BondLib.Electrical.Analog.Spice.Mn ' else: @@ -404,7 +405,7 @@ class NgMoConverter: ps = '0' pd = '0' stat = start + words[0] + '(Tnom = 300, VT0 = ' + vto + ', GAMMA = ' + gam + ', PHI = ' + phi + ', LD = ' +ld+ ', U0 = ' + str(float(uo)*0.0001) + ', LAMBDA = ' + lam + ', TOX = ' +tox+ ', PB = ' + pb + ', CJ = ' +cj+ ', CJSW = ' +cjsw+ ', MJ = ' + mj + ', MJSW = ' + mjsw + ', CGD0 = ' +cgdo+ ', JS = ' +js+ ', CGB0 = ' +cgbo+ ', CGS0 = ' +cgso+ ', L = ' +l+ ', W = ' + w + ', Level = 1' + ', AD = ' + ad + ', AS = ' + As + ', PD = ' + pd + ', PS = ' + ps + ');' - stat = stat.translate(maketrans('{}', ' ')) + #stat = stat.translate(maketrans('{}', ' ')) #Not required modelicaCompInit.append(stat) #Lets start for inbuilt model of ngspice |