.Title G12 Bitcell Simulation
*.option gmin = 1E-14
.par T = 25
*These are the voltage source values for the bitcell
*
Vdd ndd 0 addv
Vblb blb 0 0
Vwl wl 0  0
.par var1 = 1
.par wordhigh = addv
*
* Vsn1 cell 0 asn1
*
*Vpulse_wl wl gnd pulse(0 wordhigh 1n 0.1n 0.1n 3.3n 75n)
*Vpulse_bl bl gnd pulse(vddv 0 2n 0.5n 0.5n 0.5n 75n)
.TRAN 100p 5n
*************OPTIONS SECTION**************
.OPTION ABSTOL=1.0e-12 
+ CHGTOL = 1.0E-16 absolute charge tolerance
+ GMIN=1.0E-12 $ fixed min conductance parallel to all PN junctions
+ ITL1 = 3.0E2 $DC iteration limit
+ ITL2 = 5.0E01 $ DC transfer curve iteration limit per point, 
+ ITL3 = 4.0E00 $ lower transient analysis iteration limit
+ ITL4 = 1.0E01 $ upper transient analysis iteration limit
+ ITL5 = 2.0E03 $ total iteration limit for pseudotran
+ PIVREL = 1.0E-03
+ PIVTOL = 1.0E-15
+ RELTOL = 1.0E-03
+ SCALE = 1
+ TNOM = 25
+ INGOLD = 2
*
*****TEMPERATURE AND VOLTAGE SETTINGS**********
*.TEMP T $ default simulation temperature
*
* .param aDDV = 1.8 $ default Vdd
.param aSSV = 0.0 $ default Vss
*
***************POWER SUPPLIES *********************
*.GROUND GND GND0
VSS nSS 0 aSSV
*
**************OTHER PARAMETERS*****************

.PARAM NLD = 0.18E-6   $drawn nfet length
.PARAM PLD = 0.18E-6   $drawn pfet length
.PARAM PER = 1E-6      $temporary perimeter chosen arbitrarily
.PARAM ARA = 0.24E-12  $temporary area chosen arbitrarily
***************CALLS TO MODEL FILE*****************
.lib  bsim3g12_ll.modlib g12bsim3_ll_nom
*
*  Input and Output Signals
*
.NODESET V(CELL) = VAR1 * VDDV
+ V(CELL) = (1-VAR1) * VDDV
*
C1LIC_P1   WL   BL  0.05E-15
C1M2M1     WL  BL  0.03E-15
C1SN       CELL  nSS 1E-15
C1VDD      nDD   BL   0.05E-15
C1VSS      nSS   BL    0.1E-15
C2LIC_P1   WL  BLB   0.05E-15
C2M2M1     WL  BLB   0.03E-15
C2VSS      nSS   BLB   0.1E-15
CM2_M2     BL  BLB  0.2E-15
CP1VSS     WL  nSS   1E-15
*
*.model pm_ll_1 pmos level=6 tox=25 vtho=-0.4 pbias=-0.16 odif=0.087 abias=0.6
*.model nm_ll_1 nmos level=6 tox 25 vtho=0.4 pbias=-0.16 odif=0.02 abias=0.6
*
*
M1  CELL  CELL  nDD nDD  pm_ll L=0.18u W=0.27u  AD=ARA
+ AS=ARA   PD=PER   PS=PER
M2  CELL CELL nDD nDD pm_ll L=0.18u W=0.27u AD=ARA
+ AS =ARA  PD=PER  PS=PER
M3  CELL  CELL  N5 nSS  nm_ll  L=0.18u W=0.36u AD=ARA
+ AS =ARA   PD=PER   PS=PER
M4  CELL CELL N6 nSS nm_ll L=0.18u W=0.36u AD=ARA
+ AS=ARA PD=PER  PS=PER
M5  N1  WL  CELL nSS  nm_ll  L=0.27u W=0.27u AD=ARA
+ AS=ARA   PD=PER   PS=PER
M6  N8 WL CELL nSS nm_ll L=0.27u W=0.27u AD=ARA
+ AS=ARA PD=PER  PS=PER
*
R1   BL   N1  50  TC1=0
R2   N8   BLB  50  TC1=0
R3   nSS  N5   50  TC1=0
R4   nSS  N6   50   TC1=0
*
.DC aDDV 0 3 0.05
.Print V(cell) I(M2) I(M1) I(M4) I(M3) I(M5) I1(M6)
.graph DC  V(cell)
.End