1 /* 2 * extract.h -- 3 * 4 * Defines the exported interface to the circuit extractor. 5 * 6 * rcsid "$Header: /usr/cvsroot/magic-8.0/extract/extract.h,v 1.3 2009/01/30 03:51:02 tim Exp $" 7 * 8 * ********************************************************************* 9 * * Copyright (C) 1985, 1990 Regents of the University of California. * 10 * * Permission to use, copy, modify, and distribute this * 11 * * software and its documentation for any purpose and without * 12 * * fee is hereby granted, provided that the above copyright * 13 * * notice appear in all copies. The University of California * 14 * * makes no representations about the suitability of this * 15 * * software for any purpose. It is provided "as is" without * 16 * * express or implied warranty. Export of this software outside * 17 * * of the United States of America may require an export license. * 18 * ********************************************************************* 19 * 20 */ 21 22 #ifndef _EXTRACT_H 23 #define _EXTRACT_H 24 25 #include "utils/magic.h" 26 27 /* Extractor warnings */ 28 #define EXTWARN_DUP 0x01 /* Warn if two nodes have the same name */ 29 #define EXTWARN_LABELS 0x02 /* Warn if connecting to unlabelled subcell 30 * node. 31 */ 32 #define EXTWARN_FETS 0x04 /* Warn about badly constructed fets */ 33 34 #define EXTWARN_ALL (EXTWARN_DUP|EXTWARN_LABELS|EXTWARN_FETS) 35 36 extern int ExtDoWarn; /* Bitmask of above */ 37 38 /* Known devices (see ExtTech.c and ExtBasic.c) */ 39 /* Make sure these match extDevTable in extract/ExtBasic.c and */ 40 /* also extflat/EFread.c */ 41 42 #define DEV_FET 0 /* FET w/area, perimeter declared */ 43 #define DEV_MOSFET 1 /* FET w/length, width declared */ 44 #define DEV_ASYMMETRIC 2 /* Like MOSFET but D,S not swappable */ 45 #define DEV_BJT 3 /* Bipolar Junction Transistor */ 46 #define DEV_RES 4 /* Resistor */ 47 #define DEV_CAP 5 /* Capacitor */ 48 #define DEV_CAPREV 6 /* Capacitor, terminals reversed */ 49 #define DEV_VOLT 7 /* Voltage source (used for shorts) */ 50 #define DEV_DIODE 8 /* Diode */ 51 #define DEV_PDIODE 9 /* pDiode, same as Diode */ 52 #define DEV_NDIODE 10 /* nDiode, terminals reversed */ 53 #define DEV_SUBCKT 11 /* general-purpose subcircuit */ 54 #define DEV_RSUBCKT 12 /* Resistor-like subcircuit. */ 55 #define DEV_MSUBCKT 13 /* MOSFET-like subcircuit. */ 56 #define DEV_CSUBCKT 14 /* Capacitor-like subcircuit. */ 57 58 /* Device names for .ext file output (new in version 7.2) */ 59 /* (defined in extract/ExtBasic.c *and* extflat/EFread.c) */ 60 61 extern char *extDevTable[]; 62 63 /* Extractor options */ 64 65 #define EXT_DOADJUST 0x001 /* Extract hierarchical adjustments */ 66 #define EXT_DOCAPACITANCE 0x002 /* Extract capacitance */ 67 #define EXT_DOCOUPLING 0x004 /* Extract coupling capacitance */ 68 #define EXT_DORESISTANCE 0x008 /* Extract resistance */ 69 #define EXT_DOLENGTH 0x010 /* Extract pathlengths */ 70 #define EXT_DOALL 0x01f /* ALL OF THE ABOVE */ 71 #define EXT_DOLOCAL 0x020 /* Write to local directory only */ 72 #define EXT_DOLABELCHECK 0x040 /* Check for connections by label */ 73 #define EXT_DOALIASES 0x080 /* Output all node aliases */ 74 75 extern int ExtOptions; /* Bitmask of above */ 76 77 /* Options for "extract unique" */ 78 #define EXT_UNIQ_ALL 0 79 #define EXT_UNIQ_TAGGED 1 80 #define EXT_UNIQ_NOPORTS 2 81 #define EXT_UNIQ_NOTOPPORTS 3 82 83 extern bool ExtTechLine(); 84 extern void ExtTechInit(); 85 extern void ExtTechFinal(); 86 extern void ExtSetStyle(); 87 extern void ExtPrintStyle(); 88 extern void ExtRevertSubstrate(); 89 extern Plane *ExtCell(); 90 91 extern int ExtGetGateTypesMask(); 92 extern int ExtGetDiffTypesMask(); 93 94 #ifdef MAGIC_WRAPPER 95 extern bool ExtGetDevInfo(); 96 extern bool ExtCompareStyle(); 97 #endif 98 99 #ifdef THREE_D 100 extern void ExtGetZAxis(); 101 #endif 102 103 extern void ExtDumpCaps(); 104 105 #endif /* _EXTRACT_H */ 106