2 * This file is part of the Alliance CAD System
3 * Copyright (C) Laboratoire LIP6 - Département ASIM
4 * Universite Pierre et Marie Curie
6 * Home page : http://www-asim.lip6.fr/alliance/
7 * E-mail support : mailto:alliance-support@asim.lip6.fr
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.
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.
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.
25 /*******************************************************************************
27 * Tool : Spice parser / driver v 7.00 *
28 * Author(s) : Gregoire AVOT *
29 * Updates : March, 18th 1998 *
31 *******************************************************************************/
37 #define SPI_INSPARAM_PTYPE 141200
38 #define SPI_TRSPARAM_PTYPE 151200
40 #define RESINAME 300703
41 #define MSL_CAPANAME 300704
50 typedef struct trsparam
{
51 struct trsparam
*NEXT
;
60 typedef struct resparam
{
61 struct trsparam
*NEXT
;
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
*));
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 */
77 extern char SPI_PARSE_ALLNAME
; /* parse all transistor names */
78 extern char SPI_IGNORE_BULK
; /* ignore bulk connections */
80 void mslAddExtension
__P(( int(*)() )); /* add function called during parsing */
81 void mslRmvExtension
__P(( )); /* remove this function */
83 void mslAddCompletion
__P(( int(*)() )); /* add function called after parsing */
84 void mslRmvCompletion
__P(( )); /* remove this function */
86 void spi_addpreloadedlib
__P(( char *insname
, chain_list
*loconlist
));
88 void parsespice
__P(( char* ));
89 void spicesavelofigsinfile( chain_list
*cl
, FILE *df
);
90 void spicesavelofiginfile( lofig_list
*ptfig
, FILE *df
, int driveincludes
);
92 void spiceprintdate( char *circuit
, FILE *df
);
93 void spi_vect
__P(( char* ));
95 extern int SPI_DRIVE_SPEF_MODE
;
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
);
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
;
110 #define TRUE (1==1) /* c'est ben vrai */
114 #define FALSE (1==0) /* tout faux */
117 extern int SPI_MODEL_CORNER
;
118 void spi_set_model_corner ( int corner
);
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 *, ...));
125 /* Capacite minimum acceptable par Spice en pf */
126 extern float CAPAMINI
;
127 /* Resistance minimum acceptable par Spice en ohm */
128 extern float RESIMINI
;
130 extern int SPI_TRANSISTOR_AS_INSTANCE
;
131 extern int SPI_LOWRESISTANCE_AS_TENSION
;
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 ();