.include "32nm_bulk.pm.txt"
.PARAM VDD=1V
.options list post
.temp 70
.PARAM U=0
.PARAM UL='-VDD/sqrt(2)'
.PARAM UH='VDD/sqrt(2)'
.PARAM BITCAP=1E-12
MPL QD QB VDD VDD pmos l=32n w=36n m=1
MNL QD QB GND GND nmos l=32n w=96n m=1
MPR QBD Q VDD VDD pmos l=32n w=36n m=1
MNR QBD Q GND GND nmos l=32n w=96n m=1
MAL BLB WL QD GND nmos l=32n w=36n m=1
MAR BL WL QBD GND nmos l=32n w=36n m=1
VVDD VDD GND DC=VDD
VWL WL 0 PULSE 0 0 2490p 10p 10p 2490p 5n
CBLB BLB 0 BITCAP
CBL BL 0 BITCAP
.IC V(BL)=VDD
.IC V(BLB)=VDD
EQ Q 0 VOL='1/sqrt(2)*U+1/sqrt(2)*V(V1)'
EQB QB 0 VOL='-1/sqrt(2)*U+1/sqrt(2)*V(V2)'
EV1 V1 0 VOL=' U + sqrt(2)*V(QBD)'
EV2 V2 0 VOL='-U + sqrt(2)*V(QB)'
EVD VD 0 VOL='ABS(V(V1) - V(V2))'
.DC U UL UH 0.01
.PRINT DC V(QD) V(QB) V(Q) V(V1) V(V2)
.MEASURE DC MAXVD MAX V(VD)
.MEASURE DC SNM param='1/sqrt(2)*MAXVD'
.END