1 /* -*- tab-width: 4 -*- 2 * 3 * Electric(tm) VLSI Design System 4 * 5 * File: usredtec.h 6 * User interface technology editor: header file 7 * Written by: Steven M. Rubin, Static Free Software 8 * 9 * Copyright (c) 2000 Static Free Software. 10 * 11 * Electric(tm) is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * Electric(tm) is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with Electric(tm); see the file COPYING. If not, write to 23 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 24 * Boston, Mass 02111-1307, USA. 25 * 26 * Static Free Software 27 * 4119 Alpine Road 28 * Portola Valley, California 94028 29 * info@staticfreesoft.com 30 */ 31 32 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS) 33 extern "C" 34 { 35 #endif 36 37 /* the meaning of "EDTEC_option" on nodes */ 38 #define LAYERCOLOR 1 /* color (layer cell) */ 39 #define LAYERSTYLE 2 /* style (layer cell) */ 40 #define LAYERCIF 3 /* CIF name (layer cell) */ 41 #define LAYERFUNCTION 4 /* function (layer cell) */ 42 #define LAYERLETTERS 5 /* letters (layer cell) */ 43 #define LAYERPATTERN 6 /* pattern (layer cell) */ 44 #define LAYERPATCONT 7 /* pattern control (layer cell) */ 45 #define LAYERPATCH 8 /* patch of layer (node/arc cell) */ 46 #define ARCFUNCTION 9 /* function (arc cell) */ 47 #define NODEFUNCTION 10 /* function (node cell) */ 48 #define ARCFIXANG 11 /* fixed-angle (arc cell) */ 49 #define ARCWIPESPINS 12 /* wipes pins (arc cell) */ 50 #define ARCNOEXTEND 13 /* end extension (arc cell) */ 51 #define TECHLAMBDA 14 /* lambda (info cell) */ 52 #define TECHDESCRIPT 15 /* description (info cell) */ 53 #define NODESERPENTINE 16 /* serpentine MOS trans (node cell) */ 54 #define LAYERDRCMINWID 17 /* DRC minimum width (layer cell, OBSOLETE) */ 55 #define PORTOBJ 18 /* port object (node cell) */ 56 #define HIGHLIGHTOBJ 19 /* highlight object (node/arc cell) */ 57 #define LAYERGDS 20 /* Calma GDS-II layer (layer cell) */ 58 #define NODESQUARE 21 /* square node (node cell) */ 59 #define NODEWIPES 22 /* pin node can disappear (node cell) */ 60 #define ARCINC 23 /* increment for arc angles (arc cell) */ 61 #define NODEMULTICUT 24 /* separation of multiple contact cuts (node cell) */ 62 #define NODELOCKABLE 25 /* lockable primitive (node cell) */ 63 #define CENTEROBJ 26 /* grab point object (node cell) */ 64 #define LAYERSPIRES 27 /* SPICE resistance (layer cell) */ 65 #define LAYERSPICAP 28 /* SPICE capacitance (layer cell) */ 66 #define LAYERSPIECAP 29 /* SPICE edge capacitance (layer cell) */ 67 #define LAYERDXF 30 /* DXF layer (layer cell) */ 68 #define LAYER3DHEIGHT 31 /* 3D height (layer cell) */ 69 #define LAYER3DTHICK 32 /* 3D thickness (layer cell) */ 70 #define LAYERPRINTCOL 33 /* print colors (layer cell) */ 71 72 /* the strings that appear in the technology editor */ 73 #define TECEDNODETEXTCOLOR x_("Color: ") 74 #define TECEDNODETEXTSTYLE x_("Style: ") 75 #define TECEDNODETEXTFUNCTION x_("Function: ") 76 #define TECEDNODETEXTLETTERS x_("Layer letters: ") 77 #define TECEDNODETEXTGDS x_("GDS-II Layer: ") 78 #define TECEDNODETEXTCIF x_("CIF Layer: ") 79 #define TECEDNODETEXTDXF x_("DXF Layer(s): ") 80 #define TECEDNODETEXTSPICERES x_("SPICE Resistance: ") 81 #define TECEDNODETEXTSPICECAP x_("SPICE Capacitance: ") 82 #define TECEDNODETEXTSPICEECAP x_("SPICE Edge Capacitance: ") 83 #define TECEDNODETEXTDRCMINWID x_("DRC Minimum Width: ") 84 #define TECEDNODETEXT3DHEIGHT x_("3D Height: ") 85 #define TECEDNODETEXT3DTHICK x_("3D Thickness: ") 86 #define TECEDNODETEXTPRINTCOL x_("Print colors: ") 87 88 typedef struct Ilist 89 { 90 CHAR *name; 91 CHAR *constant; 92 INTBIG value; 93 } LIST; 94 95 96 #define NOSAMPLE ((SAMPLE *)-1) 97 98 typedef struct Isample 99 { 100 NODEINST *node; /* true node used for sample */ 101 NODEPROTO *layer; /* type of node used for sample */ 102 INTBIG xpos, ypos; /* center of sample */ 103 struct Isample *assoc; /* associated sample in first example */ 104 struct Irule *rule; /* rule associated with this sample */ 105 struct Iexample *parent; /* example containing this sample */ 106 struct Isample *nextsample; /* next sample in list */ 107 } SAMPLE; 108 109 110 #define NOEXAMPLE ((EXAMPLE *)-1) 111 112 typedef struct Iexample 113 { 114 SAMPLE *firstsample; /* head of list of samples in example */ 115 SAMPLE *studysample; /* sample under analysis */ 116 INTBIG lx, hx, ly, hy; /* bounding box of example */ 117 struct Iexample *nextexample; /* next example in list */ 118 } EXAMPLE; 119 120 121 /* port connections */ 122 #define NOPCON ((PCON *)-1) 123 124 typedef struct Ipcon 125 { 126 INTBIG *connects; 127 INTBIG *assoc; 128 INTBIG total; 129 INTBIG pcindex; 130 struct Ipcon *nextpcon; 131 } PCON; 132 133 134 /* rectangle rules */ 135 #define NORULE ((RULE *)-1) 136 137 typedef struct Irule 138 { 139 INTBIG *value; /* data points for rule */ 140 INTBIG count; /* number of points in rule */ 141 INTBIG istext; /* nonzero if text at end of rule */ 142 INTBIG rindex; /* identifier for this rule */ 143 BOOLEAN used; /* nonzero if actually used */ 144 BOOLEAN multicut; /* nonzero if this is multiple cut */ 145 INTBIG multixs, multiys; /* size of multicut */ 146 INTBIG multiindent, multisep; /* indent and separation of multicuts */ 147 struct Irule *nextrule; 148 } RULE; 149 150 151 /* the meaning of "us_tecflags" */ 152 #define HASDRCMINWID 01 /* has DRC minimum width information */ 153 #define HASDRCMINWIDR 02 /* has DRC minimum width information */ 154 #define HASCOLORMAP 04 /* has color map */ 155 #define HASARCWID 010 /* has arc width offset factors */ 156 #define HASCIF 020 /* has CIF layers */ 157 #define HASDXF 040 /* has DXF layers */ 158 #define HASGDS 0100 /* has Calma GDS-II layers */ 159 #define HASGRAB 0200 /* has grab point information */ 160 #define HASSPIRES 0400 /* has SPICE resistance information */ 161 #define HASSPICAP 01000 /* has SPICE capacitance information */ 162 #define HASSPIECAP 02000 /* has SPICE edge capacitance information */ 163 #define HAS3DINFO 04000 /* has 3D height/thickness information */ 164 #define HASCONDRC 010000 /* has connected design rules */ 165 #define HASCONDRCR 020000 /* has connected design rules reasons */ 166 #define HASUNCONDRC 040000 /* has unconnected design rules */ 167 #define HASUNCONDRCR 0100000 /* has unconnected design rules reasons */ 168 #define HASCONDRCW 0200000 /* has connected wide design rules */ 169 #define HASCONDRCWR 0400000 /* has connected wide design rules reasons */ 170 #define HASUNCONDRCW 01000000 /* has unconnected wide design rules */ 171 #define HASUNCONDRCWR 02000000 /* has unconnected wide design rules reasons */ 172 #define HASCONDRCM 04000000 /* has connected multicut design rules */ 173 #define HASCONDRCMR 010000000 /* has connected multicut design rules reasons */ 174 #define HASUNCONDRCM 020000000 /* has unconnected multicut design rules */ 175 #define HASUNCONDRCMR 040000000 /* has unconnected multicut design rules reasons */ 176 #define HASEDGEDRC 0100000000 /* has edge design rules */ 177 #define HASEDGEDRCR 0200000000 /* has edge design rules reasons */ 178 #define HASMINNODE 0400000000 /* has minimum node size */ 179 #define HASMINNODER 01000000000 /* has minimum node size reasons */ 180 #define HASPRINTCOL 02000000000 /* has print colors */ 181 182 /* additional technology variables */ 183 #define NOTECHVAR ((TECHVAR *)-1) 184 185 typedef struct Itechvar 186 { 187 CHAR *varname; 188 struct Itechvar *nexttechvar; 189 BOOLEAN changed; 190 INTBIG ival; 191 float fval; 192 CHAR *sval; 193 INTBIG vartype; 194 CHAR *description; 195 } TECHVAR; 196 197 extern TECHVAR us_knownvars[]; 198 199 /* for describing special text in a cell */ 200 typedef struct 201 { 202 NODEINST *ni; 203 void *value; 204 INTBIG x, y; 205 INTBIG funct; 206 } SPECIALTEXTDESCR; 207 extern SPECIALTEXTDESCR us_tecednodetexttable[]; 208 extern SPECIALTEXTDESCR us_tecedarctexttable[]; 209 extern SPECIALTEXTDESCR us_tecedmisctexttable[]; 210 211 /* the globals that define a technology */ 212 extern INTBIG us_teceddrclayers; 213 extern CHAR **us_teceddrclayernames; 214 215 extern LIST us_teclayer_functions[]; 216 extern LIST us_tecarc_functions[]; 217 218 /* prototypes for intramodule routines */ 219 void us_tecedcompact(NODEPROTO *cell); 220 void us_tecedgetbbox(NODEINST *ni, INTBIG *lx, INTBIG *hx, INTBIG *ly, INTBIG *hy); 221 EXAMPLE *us_tecedgetexamples(NODEPROTO *np, BOOLEAN isnode); 222 INTBIG us_teceditfindsequence(LIBRARY **dependentlibs, INTBIG dependentlibcount, 223 CHAR *match, CHAR *seqname, NODEPROTO ***sequence); 224 INTBIG us_teceditgetdependents(LIBRARY *lib, LIBRARY ***liblist); 225 BOOLEAN us_teceditgetlayerinfo(NODEPROTO *np, GRAPHICS *desc, CHAR **cif, INTBIG *func, 226 CHAR **layerletters, CHAR **dxf, CHAR **gds, float *spires, float *spicap, 227 float *spiecap, INTBIG *drcminwid, INTBIG *height3d, INTBIG *thick3d, INTBIG *printcol); 228 void us_teceditsetpatch(NODEINST *ni, GRAPHICS *desc); 229 void us_tecedmakearc(NODEPROTO *np, INTBIG func, INTBIG fixang, INTBIG wipes, 230 INTBIG noextend, INTBIG anginc); 231 void us_tecedmakeinfo(NODEPROTO *np, INTBIG lambda, CHAR *description); 232 void us_tecedmakelayer(NODEPROTO *np, INTBIG colorindex, UINTSML stip[16], INTBIG style, 233 CHAR *ciflayer, INTBIG functionindex, CHAR *layerletters, CHAR *dxf, 234 CHAR *gds, float spires, float spicap, float spiecap, 235 INTBIG height3d, INTBIG thick3d, INTBIG *printcolors); 236 LIBRARY *us_tecedmakelibfromtech(TECHNOLOGY *tech); 237 void us_tecedmakenode(NODEPROTO *np, INTBIG func, BOOLEAN serp, BOOLEAN square, BOOLEAN wipes, 238 BOOLEAN lockable, INTBIG multicutsep); 239 void us_tecedpointout(NODEINST *ni, NODEPROTO *np); 240 CHAR *us_tecedsamplename(NODEPROTO *layernp); 241 void us_tecedswapports(INTBIG *p1, INTBIG *p2, TECH_NODES *tlist); 242 void us_tecfromlibinit(LIBRARY *lib, CHAR *techname, INTBIG dumpformat); 243 void us_tecedfreeexamples(EXAMPLE *ne); 244 void us_tecedgetlayernamelist(void); 245 void us_tecedloaddrcmessage(DRCRULES *rules, LIBRARY *lib); 246 void us_teceditgetdrcarrays(VARIABLE *var, DRCRULES *rules); 247 NODEPROTO *us_tecedgetlayer(NODEINST *ni); 248 CHAR *us_tecedgetportname(NODEINST *ni); 249 void us_teceditgetprintcol(VARIABLE *var, INTBIG *r, INTBIG *g, INTBIG *b, INTBIG *o, INTBIG *f); 250 void us_tecedfindspecialtext(NODEPROTO *np, SPECIALTEXTDESCR *table); 251 252 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS) 253 } 254 #endif 255