/* available devices:
	nfet,pfet,enfet,epfet,nffet,pffet,hvnfet,hvpfet
	poly capacitor
	bipolar NPN transistor
	buried CCD devices
	linear capacitor
	micro-machined devices
        "pad" layer generate *no* metal3
*/
#define cif_tech gen
style lambda=lambda_v
    scalefactor lambda_1 scaleunit
    layer CWC cwell
	calma 59 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
	and-not CWC
	shrink lambda_3
	grow lambda_3
	grow lambda_3
	shrink lambda_3
	calma 41 1
    layer CMT allMetal3
        labels m3
        calma 62 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,pbase,pbc
	or allActive
	or allHVDiff
	or allCCDiff
#ifdef OPEN
	or open,pstop
#endif
	labels ndiff,pdiff
	calma 43 1
    /* use CX layer to distinguish "col" and "nsd" while CIF input */
    layer CX col,clc
	grow lambda_1
	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 48 1
    /* contacts for pdc/nsc (ndc/psc) must be generated separatelt */
    layer CCA ndc,pdc,BiCut,nbdc
	squares lambda_2
#ifdef OPEN
	or open
#endif
	calma 48 1
    layer CCA nsc,psc
	squares 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
	grow lambda_2
	shrink lambda_2
	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,ndop * lambda_2 allPOhmic,allPDiff,pdop 0
	bloat-or nbd,nbdc,wcap * lambda_2
	grow lambda_1
	shrink lambda_1
	shrink lambda_half
	grow lambda_half
    templayer XTP pbc
	grow lambda_1
	bloat-or allPDiff,pdop * lambda_2 allNOhmic,allNDiff,ndop 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 NFet * lambda_2 ndiff lambda_3 allPOhmic 0
	bloat-or allNOhmic * lambda_2 allPDiff 0
	bloat-or nbd,nbdc,wcap * lambda_2
	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 PFet * lambda_2 pdiff lambda_3 allNOhmic 0
	bloat-or allPOhmic * lambda_2 allNDiff 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 CCD allCCDiff
	grow lambda_2
	calma 57 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

    render CWN 12  -0.2   0.2
    render CAA 2   -0.15  0.15
    render CPG 1    0.025 0.05
    render CEL 14   0.1   0.05
    render CCC 19   0.0   0.2
    render CCA 19   0.0   0.2
    render CCP 19   0.075 0.125
    render CMF 20   0.2   0.05
    render CVA 19   0.25  0.05
    render CMS 21   0.3   0.05

#undef cif_tech
