**************************************************************
*   Generic PDK Resistor models                       05/17/03
*                                              PDK Tech Center
**************************************************************

simulator lang=spectre
library gpdk090
//************* Library of typical corner ******************************

section res_t
parameters rnw=409.0 rnl=6.58 rns=6.70 rnwo=72.75 rpl=7.20 rps=7.32 rpwo=145.87
include "gpdk090_resistor.scs" section=res_macro
include "gpdk090_resistor.scs" section=res

endsection res_t

//************* Library of best corner *********************************

section res_b
parameters rnw=334.0 rnl=5.0 rns=4.99 rnwo=59.42 rpl=5.33 rps=4.71 rpwo=116.7
include "gpdk090_resistor.scs" section=res_macro
include "gpdk090_resistor.scs" section=res

endsection res_b

//************* Library of worst corner ********************************

section res_w
parameters rnw=484.0 rnl=8.16 rns=8.41 rnwo=86.06 rpl=9.07 rps=9.93 rpwo=175.04
include "gpdk090_resistor.scs" section=res_macro
include "gpdk090_resistor.scs" section=res

endsection res_w

//**********************************************************************

section res_macro

ahdl_include "resd_va.va"
subckt gpdk090_resnsndiff n2 n1 body
parameters w=1u l=1u rsh=rnwo dw=0.011u ptc1=1.32e-3 ptc2=5.53e-7 pvc1=2.99e-4 pvc2=5.56e-5
R1 (n2 nm n2 n1) resd_va w=w l=l/4 r=rsh etch=dw tc1=ptc1 tc2=ptc2 vc1=pvc1 vc2=pvc2
R2 (nm nn n2 n1) resd_va w=w l=l/4 r=rsh etch=dw tc1=ptc1 tc2=ptc2 vc1=pvc1 vc2=pvc2
R3 (nn nx n2 n1) resd_va w=w l=l/4 r=rsh etch=dw tc1=ptc1 tc2=ptc2 vc1=pvc1 vc2=pvc2
R4 (nx n1 n2 n1) resd_va w=w l=l/4 r=rsh etch=dw tc1=ptc1 tc2=ptc2 vc1=pvc1 vc2=pvc2
d1 (body n2) gpdk090_ndio area=(w-dw)*l/5.0 pj=(w-dw)+2.0*l/5.0
d2 (body nm) gpdk090_ndio area=(w-dw)*l/5.0 pj=2.0*l/5.0
d3 (body nn) gpdk090_ndio area=(w-dw)*l/5.0 pj=2.0*l/5.0
d4 (body nx) gpdk090_ndio area=(w-dw)*l/5.0 pj=2.0*l/5.0
d5 (body n1) gpdk090_ndio area=(w-dw)*l/5.0 pj=(w-dw)+2.0*l/5.0
ends gpdk090_resnsndiff 
endsection res_macro

//**********************************************************************

section res
*
* Sal
* Nplus Resistor
*
model gpdk090_ressndiff rdiff level=1 tr=27 dta=0 rshr=10

inline subckt ressndiff(PLUS MINUS B)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rcont =  15/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  ressndiff PLUSHEAD MINUSHEAD B gpdk090_ressndiff l=l w=w
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends ressndiff
*
* Non-Sal
* Pplus Resistor
*
model gpdk090_resnspdiff rdiff level=1 tr=27 dta=0 rshr=150 

inline subckt resnspdiff(PLUS MINUS B)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rcont =  15/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  resnspdiff PLUSHEAD MINUSHEAD B gpdk090_resnspdiff l=l w=w
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends resnspdiff
*
* Sal
* Pplus Resistor
*
model gpdk090_resspdiff rdiff level=1 tr=27 dta=0 rshr=10

inline subckt resspdiff(PLUS MINUS B)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rcont =  15/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  resspdiff PLUSHEAD MINUSHEAD B gpdk090_resspdiff l=l w=w
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends resspdiff
*
* Non-Sal
* P Poly Resistor
*
model gpdk090_resnsppoly phy_res subtype=poly rsh=400 cj=1.33e-3 cjsw=3.15e-10 tc1c=9.26e-4

inline subckt resnsppoly(PLUS MINUS)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rcont =  10/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  resnsppoly PLUSHEAD MINUSHEAD gpdk090_resnsppoly l=l w=w
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends resnsppoly
*
* Sal
* P Poly Resistor
*
model gpdk090_ressppoly phy_res subtype=poly rsh=10 cj=1.33e-3 cjsw=3.15e-10 tc1c=9.26e-4

inline subckt ressppoly(PLUS MINUS)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rend = 15/(w*1e6) \
       rcont =  10/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  rend1 PLUSHEAD PLUSEND resistor r=rend/2
  ressppoly PLUSEND MINUSEND gpdk090_ressppoly l=l w=w
  rend2 MINUSEND MINUSHEAD resistor r=rend/2
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends ressppoly
*
* Non-Sal
* N Poly Resistor
*
model gpdk090_resnsnpoly phy_res subtype=poly rsh=100 cj=1.33e-3 cjsw=3.15e-10 tc1c=9.26e-4

inline subckt resnsnpoly(PLUS MINUS)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rcont =  10/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  resnsnpoly PLUSHEAD MINUSHEAD gpdk090_resnsnpoly l=l w=w
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends resnsnpoly
*
* Sal
* N Poly Resistor
*
model gpdk090_ressnpoly phy_res subtype=poly rsh=10 cj=1.33e-3 cjsw=3.15e-10 tc1c=9.26e-4

inline subckt ressnpoly(PLUS MINUS)
  parameters \
       l = 0.6e-6 \
       w = 0.6e-6 \
       rend = 15/(w*1e6) \
       rcont =  10/int(((w*1e6)-0.19999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  rend1 PLUSHEAD PLUSEND resistor r=rend/2
  ressnpoly PLUSEND MINUSEND gpdk090_ressnpoly l=l w=w
  rend2 MINUSEND MINUSHEAD resistor r=rend/2
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends ressnpoly
*
*
* Nwell STI
*
model gpdk090_resnwsti phy_res subtype=p rsh=400 etch=0 tc1=3e-3 tc2=-2e-6

inline subckt resnwsti(PLUS MINUS)
  parameters \
       l = 2.0e-6 \
       w = 1.6e-6 \
       rend = 320/(w*1e6) \
       rcont = 15/int(((w*1e6)-1.199999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  rend1 PLUSHEAD PLUSEND resistor r=rend/2
  resnwsti PLUSEND MINUSEND gpdk090_resnwsti l=l w=w
  rend2 MINUSEND MINUSHEAD resistor r=rend/2
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends resnwsti
*
*
* Nwell Oxide
*
model gpdk090_resnwoxide phy_res subtype=p rsh=400 etch=0 tc1=3e-3 tc2=-2e-6

inline subckt resnwoxide(PLUS MINUS)
  parameters \
       l = 2.0e-6 \
       w = 1.6e-6 \
       rend = 320/(w*1e6) \
       rcont = 15/int(((w*1e6)-1.199999)/0.4)
  rcont1 PLUS PLUSHEAD resistor r=rcont/2
  rend1 PLUSHEAD PLUSEND resistor r=rend/2
  resnwoxide PLUSEND MINUSEND gpdk090_resnwoxide l=l w=w
  rend2 MINUSEND MINUSHEAD resistor r=rend/2
  rcont2 MINUSHEAD MINUS resistor r=rcont/2
ends resnwoxide
*
* Met Res
*
model gpdk090_resm1 resistor trise=27 rsh=0.08
model gpdk090_resm2 resistor trise=27 rsh=0.06
model gpdk090_resm3 resistor trise=27 rsh=0.06
model gpdk090_resm4 resistor trise=27 rsh=0.06
model gpdk090_resm5 resistor trise=27 rsh=0.06
model gpdk090_resm6 resistor trise=27 rsh=0.06
model gpdk090_resm7 resistor trise=27 rsh=0.06
model gpdk090_resm8 resistor trise=27 rsh=0.02
model gpdk090_resm9 resistor trise=27 rsh=0.02
*
*
endsection res

endlibrary gpdk090
