# define a mask layout view and abstract view with
# 1000 database units per user unit, 100 database units
# as a default cursor grid, 500 database units as a default
# minor grid and 5 minor grids per major grid.
edbTFCreateView lay mask 1000 100 500 5
edbTFCreateView abs mask 1000 100 500 5
 
# create some layer definitions.
# use edbTFFetchColors to get the full list of colors.
# create nwell, color is orange, its use is mask data,
# use fineDot for the stipple, a solid line for the
# edge, and a line width of 0.
edbTFCreateLayer nwell   1 mask orange fineDot solid 0
edbTFCreateLayer pwell   2 mask yellow fineDot solid 0
edbTFCreateLayer ndiff   3 mask orange solid   solid 0
edbTFCreateLayer pdiff   4 mask yellow solid   solid 0
edbTFCreateLayer poly    5 mask red solid   solid 0
edbTFCreateLayer cont    6 mask white X solid 0
edbTFCreateLayer metal1  7 mask blue fineDot solid 0
edbTFCreateLayer via1    8 mask white X solid 0
edbTFCreateLayer metal2  9 mask cyan coarseDot solid 0
edbTFCreateLayer via2   10 mask white X solid 0
edbTFCreateLayer metal3 11 mask red  fineAngle135 solid 0
edbTFCreateLayer via3   12 mask white X solid 0
edbTFCreateLayer metal4 13 mask green fineAngle45 solid 0
edbTFCreateLayer via4   14 mask white X solid 0
edbTFCreateLayer metal5 15 mask lightYellow lightRand2 solid 0
# Next define the details of the layers
# nwell's purpose is nwell, and its mask fabrication step is 1.
edbTFSetLayerMaskInfo nwell  { nwell        } 1
edbTFSetLayerMaskInfo pwell  { pwell        } 2
edbTFSetLayerMaskInfo ndiff  { ndiff device } 3
edbTFSetLayerMaskInfo pdiff  { pdiff device      } 4
edbTFSetLayerMaskInfo poly   { interconnect gate } 5
edbTFSetLayerMaskInfo cont   { insulation   } 6
edbTFSetLayerMaskInfo metal1 { interconnect } 7
edbTFSetLayerMaskInfo via1   { insulation   } 8
edbTFSetLayerMaskInfo metal2 { interconnect } 9
edbTFSetLayerMaskInfo via2   { insulation   } 10
edbTFSetLayerMaskInfo metal3 { interconnect } 11
edbTFSetLayerMaskInfo via3   { insulation   } 12
edbTFSetLayerMaskInfo metal4 { interconnect } 13
edbTFSetLayerMaskInfo via4   { insulation   } 14
edbTFSetLayerMaskInfo metal5 { interconnect } 15
 
# create some via def's
# the polycont cut is 0.8 microns square and cuts are spaced 1 micron apart.
# poly is extended 0.4 microns in X & Y as is metal1 around the cut.
edbTFDefineVia cut {cont 0.8 0.8 1.0 1.0 } {{poly 0.4 0.4} {metal1 0.4 0.4}}
edbTFDefineVia v12 {via1 0.8 0.8 1.0 1.0 } {{metal1 0.4 0.4} {metal2 0.4 0.4}}
edbTFDefineVia v23 {via2 0.8 0.8 1.0 1.0 } {{metal2 0.4 0.4} {metal3 0.4 0.4}}
edbTFDefineVia v34 {via3 0.8 0.8 1.0 1.0 } {{metal3 0.4 0.4} {metal4 0.4 0.4}}
edbTFDefineVia v45 {via4 0.8 0.8 1.0 1.0 } {{metal4 0.4 0.4} {metal5 0.4 0.4}}
 
# define routing info
#                         order  route width  space     pitch pref
edbTFSetLayerRteInfo poly   0       1.0        0.9       2.3    Y
edbTFSetLayerRteInfo metal1 1       1.0        0.9       2.3    X
edbTFSetLayerRteInfo metal2 2       1.0        0.9       2.3    Y
edbTFSetLayerRteInfo metal3 3       1.0        0.9       2.3    X
edbTFSetLayerRteInfo metal4 4       1.0        0.9       2.3    Y
edbTFSetLayerRteInfo metal5 5       1.0        0.9       2.3    X
 
#define font info 0-15 available, define only 3. These are only referenced
# when the library is created. Reload will not affect the font info.
edbTFSetStartingFont 0 font1000
edbTFSetStartingFont 1 font1000
edbTFSetStartingFont 2 font1000
edbTFSetStartingFont 3 font1000