#                  File: mTSMd018.ext
#                   For: Extract definition file
#                Vendor: MOSIS/TSMC
#            Technology: 0.18U (Lambda = 0.09um) / N-well (SCN6M_DEEP) 
# Technology Setup and Test/Demo Suite: in file mTSMd025.tdb
# Copyright (c)  2000-2001
# Tanner Research, Inc.  All rights reserved
#
# This file will work only with L-EDIT Version 7 and greater.
# ****************************************************************************

connect(n well wire, ndiff, ndiff)
connect(subs, pdiff, pdiff)
connect(allsubs, subs, subs)
connect(ndiff, Metal1, Active Contact)
connect(pdiff, Metal1, Active Contact)
connect(poly wire, Metal1, Poly Contact)
connect(Metal1, Metal2, Via1)
connect(Metal2, Metal3, Via2)
connect(Metal3, Metal4, Via3)
connect(Metal4, Metal5, Via4)
connect(Metal5, Metal6, Via5_M5M6)
connect(CTM, Metal6, Via5_CTM)
connect(LPNP emitter, pdiff, LPNP emitter)
connect(LPNP collector, pdiff, LPNP collector)
connect(Metal1, Metal2, EXT_SHORT_M1M2)
connect(Active, Act2, Act2)

# NMOS transistor with poly gate
device = MOSFET(
               RLAYER=ntran;  
               Drain=ndiff, WIDTH;
               Gate=poly wire;   
               Source=ndiff, WIDTH;
               Bulk=subs;
               MODEL=NMOS;
               )
# PMOS transistor with poly gate
device = MOSFET(
               RLAYER=ptran;
               Drain=pdiff, WIDTH;
               Gate=poly wire;
               Source=pdiff, WIDTH;
               Bulk=n well wire;
               MODEL=PMOS;
               )
# PNP transistor
device = BJT(
            RLAYER=LPNP ID;
            Collector=LPNP collector;
            Base=n well wire ;
            Emitter=LPNP emitter;
            Substrate=allsubs;
            MODEL=PNP;
            )
# NMOS capacitor
device = CAP(
            RLAYER=nmos capacitor;
            Plus=poly wire;
            Minus=ndiff;
            MODEL=;
            )
# PMOS capacitor
device = CAP(
            RLAYER=pmos capacitor;
            Plus=poly wire;
            Minus=pdiff;
            MODEL=;
            )
# CTM capacitor
device = CAP(
            RLAYER=ctm capacitor;
            Plus=CTM;
            Minus=Metal5;
            MODEL=ctmcap;
            )
# Poly resistor
device = RES(
            RLAYER=poly resistor;
            Plus=poly wire, WIDTH;
            Minus=poly wire, WIDTH;
            MODEL=;
            )
# Poly SB resistor
device = RES(
            RLAYER=poly SB resistor;
            Plus=poly wire, WIDTH;
            Minus=poly wire, WIDTH;
            MODEL=;
            )
# N Diffusion resistor
device = RES(
            RLAYER=ndiff resistor;
            Plus=ndiff, WIDTH;
            Minus=ndiff, WIDTH;
            MODEL=;
            )
# P Diffusion resistor
device = RES(
            RLAYER=pdiff resistor;
            Plus=pdiff, WIDTH;
            Minus=pdiff, WIDTH;
            MODEL=;
            )
# N Well resistor
device = RES(
            RLAYER=nwell resistor;
            Plus=n well wire, WIDTH;
            Minus=n well wire, WIDTH;
            MODEL=;
            )
# Bonding Area Capacitance
device = CAP(
		RLAYER=Pad Comment;
            Plus=Metal1;
		Minus=allsubs;
		MODEL=;
		)

# Diodes
device = DIODE(
		RLAYER=diode pdiff;
		Plus=pdiff, WIDTH;
		Minus=n well wire, WIDTH;
		MODEL=Dpdiff;
		)IGNORE_SHORTS
device = DIODE(
		RLAYER=diode ndiff;
		Plus=subs, WIDTH;
		Minus=ndiff, WIDTH;
		MODEL=Dndiff;
		)IGNORE_SHORTS

# Lateral Diode
device = DIODE(
		RLAYER=diode_lat;
		Plus=pdiff, WIDTH;
		Minus=ndiff, WIDTH;
		MODEL=D_lateral;
		)IGNORE_SHORTS

