1 /* -*- tab-width: 4 -*-
2  *
3  * Electric(tm) VLSI Design System
4  *
5  * File: tecschem.h
6  * Schematic technology header
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 /* special cases of the NODEINST->userbits&NTECHBITS field */
38 #define FFTYPE              01400000		/* FlipFlop type bits */
39 #define FFTYPERS                   0		/*    FlipFlop is RS */
40 #define FFTYPEJK             0400000		/*    FlipFlop is JK */
41 #define FFTYPED             01000000		/*    FlipFlop is D */
42 #define FFTYPET             01400000		/*    FlipFlop is T */
43 #define FFCLOCK             06000000		/* FlipFlop clocking bits */
44 #define FFCLOCKMS                  0		/*    FlipFlop is Master/slave */
45 #define FFCLOCKP            02000000		/*    FlipFlop is Positive clock */
46 #define FFCLOCKN            04000000		/*    FlipFlop is Negative clock */
47 
48 #define TRANNMOS                   0		/* Transistor is N channel MOS */
49 #define TRANDMOS             0400000		/* Transistor is Depletion MOS */
50 #define TRANPMOS            01000000		/* Transistor is P channel MOS */
51 #define TRANNPN             01400000		/* Transistor is NPN Junction */
52 #define TRANPNP             02000000		/* Transistor is PNP Junction */
53 #define TRANNJFET           02400000		/* Transistor is N Channel Junction FET */
54 #define TRANPJFET           03000000		/* Transistor is P Channel Junction FET */
55 #define TRANDMES            03400000		/* Transistor is Depletion MESFET */
56 #define TRANEMES            04000000		/* Transistor is Enhancement MESFET */
57 
58 #define DIODENORM                  0		/* Diode is normal */
59 #define DIODEZENER           0400000		/* Diode is Zener */
60 
61 #define CAPACNORM                  0		/* Capacitor is normal */
62 #define CAPACELEC            0400000		/* Capacitor is Electrolytic */
63 
64 #define TWOPVCCS                   0		/* Two-port is Transconductance (VCCS) */
65 #define TWOPCCVS             0400000		/* Two-port is Transresistance (CCVS) */
66 #define TWOPVCVS            01000000		/* Two-port is Voltage gain (VCVS) */
67 #define TWOPCCCS            01400000		/* Two-port is Current gain (CCCS) */
68 #define TWOPTLINE           02000000		/* Two-port is Transmission Line */
69 
70 /* all of the primitives */
71 extern TECHNOLOGY *sch_tech;			/* the technology */
72 
73 extern NODEPROTO  *sch_wirepinprim;		/* wire pin */
74 extern NODEPROTO  *sch_buspinprim;		/* bus pin */
75 extern NODEPROTO  *sch_wireconprim;		/* wire connect */
76 extern NODEPROTO  *sch_bufprim;			/* general BUFFER */
77 extern NODEPROTO  *sch_andprim;			/* general AND */
78 extern NODEPROTO  *sch_orprim;			/* general OR */
79 extern NODEPROTO  *sch_xorprim;			/* general XOR */
80 extern NODEPROTO  *sch_ffprim;			/* general FLIP FLOP */
81 extern NODEPROTO  *sch_muxprim;			/* general MUX */
82 extern NODEPROTO  *sch_bboxprim;		/* black box */
83 extern NODEPROTO  *sch_switchprim;		/* switch */
84 extern NODEPROTO  *sch_offpageprim;		/* off page connector */
85 extern NODEPROTO  *sch_pwrprim;			/* power */
86 extern NODEPROTO  *sch_gndprim;			/* ground */
87 extern NODEPROTO  *sch_sourceprim;		/* source (voltage, current) */
88 extern NODEPROTO  *sch_transistorprim;	/* transistor */
89 extern NODEPROTO  *sch_resistorprim;	/* resistor */
90 extern NODEPROTO  *sch_capacitorprim;	/* capacitor */
91 extern NODEPROTO  *sch_diodeprim;		/* diode */
92 extern NODEPROTO  *sch_inductorprim;	/* inductor */
93 extern NODEPROTO  *sch_meterprim;		/* meter */
94 extern NODEPROTO  *sch_wellprim;		/* well connection */
95 extern NODEPROTO  *sch_substrateprim;	/* substrate connection */
96 extern NODEPROTO  *sch_twoportprim;		/* generic two-port block */
97 extern NODEPROTO  *sch_transistor4prim;	/* 4-port transistor */
98 extern NODEPROTO  *sch_globalprim;		/* global signal */
99 
100 extern ARCPROTO   *sch_wirearc;			/* wire arc */
101 extern ARCPROTO   *sch_busarc;			/* bus arc */
102 
103 extern INTBIG      sch_wirepinsizex;	/* X size if wire-pin primitives */
104 extern INTBIG      sch_wirepinsizey;	/* Y size if wire-pin primitives */
105 
106 extern INTBIG      sch_meterkey;		/* key for "SCHEM_meter_type" */
107 extern INTBIG      sch_diodekey;		/* key for "SCHEM_diode" */
108 extern INTBIG      sch_capacitancekey;	/* key for "SCHEM_capacitance" */
109 extern INTBIG      sch_resistancekey;	/* key for "SCHEM_resistance" */
110 extern INTBIG      sch_inductancekey;	/* key for "SCHEM_inductance" */
111 extern INTBIG      sch_functionkey;		/* key for "SCHEM_function" */
112 extern INTBIG      sch_spicemodelkey;	/* key for "SIM_spice_model" */
113 extern INTBIG      sch_globalnamekey;	/* key for "SCHEM_global_name" */
114 
115 /* prototypes for technology routines */
116 BOOLEAN sch_initprocess(TECHNOLOGY*, INTBIG);
117 void    sch_termprocess(void);
118 void    sch_setmode(INTBIG, CHAR*[]);
119 INTBIG  sch_request(CHAR*, va_list);
120 void    sch_shapenodepoly(NODEINST*, INTBIG, POLYGON*);
121 INTBIG  sch_nodepolys(NODEINST*, INTBIG*, WINDOWPART*);
122 INTBIG  sch_allnodepolys(NODEINST*, POLYLIST*, WINDOWPART*, BOOLEAN);
123 INTBIG  sch_nodeEpolys(NODEINST*, INTBIG*, WINDOWPART*);
124 void    sch_shapeEnodepoly(NODEINST*, INTBIG, POLYGON*);
125 INTBIG  sch_allnodeEpolys(NODEINST *ni, POLYLIST *plist, WINDOWPART *win, BOOLEAN onlyreasonable);
126 void    sch_nodesizeoffset(NODEINST *ni, INTBIG *lx, INTBIG *ly, INTBIG *hx, INTBIG *hy);
127 void    sch_shapeportpoly(NODEINST*, PORTPROTO*, POLYGON*, XARRAY, BOOLEAN);
128 INTBIG  sch_arcpolys(ARCINST*, WINDOWPART*);
129 void    sch_shapearcpoly(ARCINST*, INTBIG, POLYGON*);
130 INTBIG  sch_allarcpolys(ARCINST*, POLYLIST*, WINDOWPART*);
131 
132 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS)
133 }
134 #endif
135