Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / mbkspice / msl.h
1 /*
2 * This file is part of the Alliance CAD System
3 * Copyright (C) Laboratoire LIP6 - Département ASIM
4 * Universite Pierre et Marie Curie
5 *
6 * Home page : http://www-asim.lip6.fr/alliance/
7 * E-mail support : mailto:alliance-support@asim.lip6.fr
8 *
9 * This library is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Library General Public License as published
11 * by the Free Software Foundation; either version 2 of the License, or (at
12 * your option) any later version.
13 *
14 * Alliance VLSI CAD System is distributed in the hope that it will be
15 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17 * Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with the GNU C Library; see the file COPYING. If not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24
25 /*******************************************************************************
26 * *
27 * Tool : Spice parser / driver v 7.00 *
28 * Author(s) : Gregoire AVOT *
29 * Updates : March, 18th 1998 *
30 * *
31 *******************************************************************************/
32 #ifndef MSLH
33 #define MSLH
34
35 #include EQT_H
36
37 #define SPI_INSPARAM_PTYPE 141200
38 #define SPI_TRSPARAM_PTYPE 151200
39
40 #define RESINAME 300703
41 #define MSL_CAPANAME 300704
42
43 #define TPARAM_L 1
44 #define TPARAM_W 2
45 #define TPARAM_AS 3
46 #define TPARAM_AD 4
47 #define TPARAM_PS 5
48 #define TPARAM_PD 6
49
50 typedef struct trsparam {
51 struct trsparam *NEXT;
52 char *NAME;
53 int FIELD;
54 } trsparam_list;
55
56 #define RPARAM_R 1
57 #define RPARAM_TC1 2
58 #define RPARAM_TC2 3
59
60 typedef struct resparam {
61 struct trsparam *NEXT;
62 char *NAME;
63 int FIELD;
64 } resparam_list;
65
66 extern trsparam_list *spi_addtrsparam __P((trsparam_list *, char *, int));
67 extern void spi_freetrsparamlist __P((trsparam_list *));
68 extern resparam_list *spi_addresparam __P((resparam_list *, char *, int));
69 extern void spi_freeresparamlist __P((resparam_list *));
70
71 extern int msl_line; /* current line number */
72 extern int msl_figloaded; /* TRUE if inside a SUBCKT */
73 extern char *msl_figname; /* name of main SUBCKT */
74 extern char *msl_subckt; /* name of current SUBCKT */
75 extern lofig_list *msl_ptfig; /* last lofig parsed */
76
77 extern char SPI_PARSE_ALLNAME; /* parse all transistor names */
78 extern char SPI_IGNORE_BULK; /* ignore bulk connections */
79
80 void mslAddExtension __P(( int(*)() )); /* add function called during parsing */
81 void mslRmvExtension __P(( )); /* remove this function */
82
83 void mslAddCompletion __P(( int(*)() )); /* add function called after parsing */
84 void mslRmvCompletion __P(( )); /* remove this function */
85
86 void spi_addpreloadedlib __P(( char *insname, chain_list *loconlist ));
87
88 void parsespice __P(( char* ));
89 void spicesavelofigsinfile( chain_list *cl, FILE *df);
90 void spicesavelofiginfile( lofig_list *ptfig, FILE *df, int driveincludes);
91
92 void spiceprintdate( char *circuit, FILE *df );
93 void spi_vect __P(( char* ));
94
95 extern int SPI_DRIVE_SPEF_MODE;
96
97 /*** Fonctions utilisateurs pour configurer le driver ***/
98 extern void spi_setfuncinode( void (*fn)( FILE*, lofig_list*, void* ), void *data );
99 extern num_list* spi_getinode( locon_list *locon );
100 extern void spi_setinode( locon_list *locon, num_list *head );
101 extern void spi_clearinode( locon_list *locon );
102
103 eqt_ctx *spi_init_eqt ();
104 extern float SPI_SCALE_CAPAFACTOR;
105 extern float SPI_SCALE_RESIFACTOR;
106 extern float SPI_SCALE_TRANSFACTOR;
107 extern float SPI_SCALE_DIODEFACTOR;
108
109 #ifndef TRUE
110 #define TRUE (1==1) /* c'est ben vrai */
111 #endif
112
113 #ifndef FALSE
114 #define FALSE (1==0) /* tout faux */
115 #endif
116
117 extern int SPI_MODEL_CORNER;
118 void spi_set_model_corner ( int corner );
119
120 #define SPI_NONODES (-1l)
121 char* spinamenode __P(( losig_list*, long ));
122 char* spinamenodedetail __P(( losig_list*, long, char ));
123 void spi_print __P((FILE *, ...));
124
125 /* Capacite minimum acceptable par Spice en pf */
126 extern float CAPAMINI ;
127 /* Resistance minimum acceptable par Spice en ohm */
128 extern float RESIMINI ;
129
130 extern int SPI_TRANSISTOR_AS_INSTANCE;
131 extern int SPI_LOWRESISTANCE_AS_TENSION;
132
133 extern char* spi_makename __P(( char* ));
134 extern char* SPI_SUFFIX;
135 extern char SPI_INS_SEPAR ;
136 extern char SPI_REPLACE_INS_SEPAR ;
137 extern void spi_env ();
138
139
140 #endif