/* available devices:
	nfet,pfet,enfet,epfet,nffet,pffet
	hnfet,hpfet
	poly capacitor
	bipolar NPN transistor
	micro-machined devices
*/
#define cif_tech gen
style lambda=lambda_v
    scalefactor lambda_1 scaleunit
    layer CVN hnwell
	bloat-or allHVPDiff,hpfet * lambda_7
	bloat-or allHVNOhmic * lambda_3
	calma 40 1
    layer CVP hpwell
	bloat-or allHVNDiff,hnfet * lambda_7
        bloat-or allHVPOhmic * lambda_3
	calma 39 1
    layer CWN nwell
	bloat-or pbase,pbc/act * lambda_6
	bloat-or allPDiff,PFet * lambda_5
	bloat-or allNOhmic * lambda_3
	bloat-or clc/a * lambda_1
	or	 col
	grow lambda_3
	shrink lambda_3
	calma 42 1
    layer CWP pwell
	bloat-or allNDiff,NFet * lambda_5
        bloat-or allPOhmic * lambda_3
	grow lambda_3
	shrink lambda_3
	calma 41 1
    layer CMS allMetal2
	labels m2
	calma 51 1
    layer CMF pad
	grow lambda_1
	or allMetal1
	labels homeMetal1
	calma 49 1
    layer CPG cap,cc
	or allPoly
	labels poly,nfet,pfet
	calma 46 1
    layer CAA clc
	grow lambda_1
	or em,emc,col
	or allActive
	or allHVDiff,allHVOhmic,hnfet,hpfet
#ifdef OPEN
	or open,pstop
#endif
	labels ndiff,pdiff
	calma 43 1
    /* use CX layer to distinguish "col" and "nsd" while CIF input */
    /* use CX layer for high-voltage MOSFETs too... (for cifin) */
    layer CX col,clc
	grow lambda_1
/*	or allHVDiff,allHVOhmic,hnfet,hpfet
	or hnw,hpw */
	calma 60 1
    layer CVA pad
	shrink pad_via
#ifdef OPEN
	or open
#endif
	calma 50 1
    layer CVA m2c
	squares lambda_1 lambda_2 lambda_3
	calma 50 1
    layer CEL allPoly2
	calma 56 1
    layer CCE capc,ec
	squares lambda_2
	calma 55 1
    /* NOTE: no calma layer spec. for CCC, contact will not in
	stream file */
    layer CCC gc
	calma 63 1
    /* contacts for pdc/nsc (ndc/psc) must be generated separatelt */
    layer CCA ndc,pdc,BiCut
	squares lambda_2
#ifdef OPEN
	or open
#endif
	calma 48 1
    layer CCA nsc,psc
	squares lambda_2
	calma 48 1
    layer CCA hndc,hpdc
	squares lambda_2 lambda_2 lambda_2
	calma 48 1
    layer CCA hnsc,hpsc
	squares lambda_2 lambda_2 lambda_2
	calma 48 1
    layer CCP pc
	squares lambda_2
	calma 47 1
    layer CBA emc,emit
	grow lambda_4
	bloat-or pbc * lambda_1
	or pbase
	calma 58 1
    /* temp CIF layer for select generation */
    templayer XTN clc
	grow lambda_1
	or em,emc,col
	grow lambda_2
	bloat-or allNDiff * lambda_2 allPOhmic 0
	bloat-or allHVNDiff * lambda_2 allHVPOhmic 0
	grow lambda_1
	shrink lambda_1
	shrink lambda_half
	grow lambda_half
    templayer XTP pbc
	grow lambda_1
	bloat-or allPDiff * lambda_2 allNOhmic 0
	bloat-or allHVPDiff * lambda_2 allHVNOhmic 0
	grow lambda_1
	shrink lambda_1
	shrink lambda_half
	grow lambda_half
    layer CSN clc
	grow lambda_1
	or em,emc,col
	grow lambda_2
	bloat-or allNDiff * lambda_2 allPOhmic 0
	bloat-or allHVNDiff * lambda_2 allHVPOhmic 0
	bloat-or NFet * lambda_2 ndiff lambda_3 allPOhmic 0
	bloat-or hnfet * lambda_2 hndiff lambda_3 allHVPOhmic 0
	bloat-or allNOhmic * lambda_2 allPDiff 0
	bloat-or allHVNOhmic * lambda_2 allHVPDiff 0
	bloat-or ndop * lambda_2 allPOhmic,allPDiff,pdop 0
	grow lambda_1
	shrink lambda_1
	shrink lambda_half
	grow lambda_half
	and-not XTP
	calma 45 1
    layer CSP pbc
	grow lambda_1
	bloat-or allPDiff * lambda_2 allNOhmic 0
	bloat-or allHVPDiff * lambda_2 allHVNOhmic 0
	bloat-or PFet * lambda_2 pdiff lambda_3 allNOhmic 0
	bloat-or hpfet * lambda_2 hpdiff lambda_3 allHVNOhmic 0
	bloat-or allPOhmic * lambda_2 allNDiff 0
	bloat-or allHVPOhmic * lambda_2 allHVNDiff 0
	bloat-or pdop * lambda_2 allNOhmic,allNDiff,ndop 0
	grow lambda_1
	shrink lambda_1
	shrink lambda_half
	grow lambda_half
#ifdef OPEN
	bloat-min pstop * lambda_2 open 0
#endif
	and-not XTN
	and-not CSN
	calma 44 1
    layer COP open
        calma 23 1
    layer CPS pstop
        calma 24 1
    layer COG pad
	shrink pad_glass
	or glass
#ifdef OPEN
	or open
#endif
	labels pad
	calma 52 1
    layer XP pad
	shrink pad_glass
	calma 26 1

#undef cif_tech
