This commit is contained in:
parent
3e6cd21041
commit
c191921453
20
ChangeLog
20
ChangeLog
|
|
@ -1,3 +1,23 @@
|
|||
2003-05-02 Stuart Brorson <sdb@cloud9.net>
|
||||
|
||||
* Added #define TRACE to main.c for use in debugging. Added lots
|
||||
of printf's in the code which are turned on by defining TRACE.
|
||||
This is used to help figure out what the program is doing at each
|
||||
step . . . . .
|
||||
|
||||
* Added lots of comments all over the source tree. This should
|
||||
help explain what the prog is doing for future hackers.
|
||||
|
||||
* Fixed parser to allow POLY attributes in dependent sources
|
||||
(major changes in src/frontend/subckt.c, as well as move location
|
||||
of call to ENHtranslate_poly in src/frontend/inp.c)
|
||||
|
||||
* Fixed bug in device init files (src/spicelib/devices/*init.c)
|
||||
so that Deviceinfo structures operated with XSPICE.
|
||||
|
||||
* Fixed nasty malloc problem in src/xspice/mif/mifgetmod.c which
|
||||
casuedfrequent segfaults (when compiled with XSPICE).
|
||||
|
||||
2003-04-14 Stefan Jones <stefan.jones@multigig.com>
|
||||
|
||||
* configure.in: Made Tcl disable-shared and print info at end of configure
|
||||
|
|
|
|||
|
|
@ -1,4 +1,13 @@
|
|||
2003.4.10 Stuart Brorson <sdb@cloud9.net>
|
||||
2003-05-02 Stuart Brorson <SDB@cloud9.net>
|
||||
* Major changes in subckt.c to handle POLY attributes in
|
||||
dependent sources. Added new case to switch in "translate" to
|
||||
handle E, F, G, H sources. Many other fixes.
|
||||
|
||||
* Moved location of call to ENHtranslate_poly in inp.c. This was
|
||||
necessary to correctly process POLY attributes and the associated
|
||||
netlists and voltage sources.
|
||||
|
||||
2003-04-10 Stuart Brorson <sdb@cloud9.net>
|
||||
* modified inp_readall (inpcom.c) to ignore blank
|
||||
lines terminated by \r\n *and * \n. This fixes problems
|
||||
associated with importing files from Windozeland.
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ com_listing(wordlist *wl)
|
|||
bool expand = FALSE;
|
||||
char *s;
|
||||
|
||||
if (ft_curckt) {
|
||||
if (ft_curckt) { /* if there is a current circuit . . . . */
|
||||
while (wl) {
|
||||
s = wl->wl_word;
|
||||
switch (*s) {
|
||||
|
|
@ -285,9 +285,15 @@ line_free(struct line * deck, bool recurse) {
|
|||
/* The routine to source a spice input deck. We read the deck in, take
|
||||
* out the front-end commands, and create a CKT structure. Also we
|
||||
* filter out the following cards: .save, .width, .four, .print, and
|
||||
* .plot, to perform after the run is over. */
|
||||
* .plot, to perform after the run is over.
|
||||
* Then, we run dodeck, which parses up the deck. */
|
||||
void
|
||||
inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||
/* arguments:
|
||||
* *fp = pointer to the input file
|
||||
* comfile = whether it is a command file. Values are TRUE/FALSE
|
||||
* *filename =
|
||||
*/
|
||||
{
|
||||
struct line *deck, *dd, *ld;
|
||||
struct line *realdeck, *options = NULL;
|
||||
|
|
@ -298,8 +304,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
FILE *lastin, *lastout, *lasterr;
|
||||
char c;
|
||||
|
||||
/* read in the deck from a file */
|
||||
inp_readall(fp, &deck);
|
||||
|
||||
|
||||
/* if nothing came back from inp_readall, just close fp and return to caller */
|
||||
if (!deck) { /* MW. We must close fp always when returning */
|
||||
fclose(fp);
|
||||
return;
|
||||
|
|
@ -354,8 +362,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
/* tfree(dd->li_line);
|
||||
tfree(dd); */
|
||||
}
|
||||
} else {
|
||||
for (dd = deck->li_next; dd; dd = ld->li_next) {
|
||||
} /* end if(comfile) */
|
||||
|
||||
else { /* must be regular deck . . . . */
|
||||
for (dd = deck->li_next; dd; dd = ld->li_next) { /* loop through deck and handle control cards */
|
||||
for (s = dd->li_line; (c = *s) && c <= ' '; s++)
|
||||
;
|
||||
if (c == '*' && (s != deck->li_line || s[1] != '#')) {
|
||||
|
|
@ -372,8 +382,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
if (ciprefix(".control", dd->li_line)) {
|
||||
ld->li_next = dd->li_next;
|
||||
line_free(dd,FALSE); /* SJB - free this line's memory */
|
||||
|
||||
/* tfree(dd->li_line);
|
||||
tfree(dd); */
|
||||
|
||||
if (commands)
|
||||
fprintf(cp_err,
|
||||
"Warning: redundant .control card\n");
|
||||
|
|
@ -382,8 +394,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
} else if (ciprefix(".endc", dd->li_line)) {
|
||||
ld->li_next = dd->li_next;
|
||||
line_free(dd,FALSE); /* SJB - free this line's memory */
|
||||
|
||||
/* tfree(dd->li_line);
|
||||
tfree(dd); */
|
||||
|
||||
if (commands)
|
||||
commands = FALSE;
|
||||
else
|
||||
|
|
@ -442,38 +456,61 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
} else
|
||||
ld = dd;
|
||||
}
|
||||
}
|
||||
if (deck->li_next) {
|
||||
} /* end for(dd=deck->li_next . . . . */
|
||||
|
||||
|
||||
/* we are done handling the control stuff. Now process remainder of deck */
|
||||
if (deck->li_next) {
|
||||
/* There is something left after the controls. */
|
||||
fprintf(cp_out, "\nCircuit: %s\n\n", tt);
|
||||
|
||||
/* Old location of ENHtranslate_poly. This didn't work, because it
|
||||
* didn't handle models in .SUBCKTs correctly. Moved to new location below
|
||||
* by SDB on 4.13.2003
|
||||
*/
|
||||
|
||||
/* Now expand subcircuit macros. Note that we have to fix
|
||||
* the case before we do this but after we deal with the
|
||||
* commands. */
|
||||
if (!cp_getvar("nosubckt", VT_BOOL, (char *) &nosubckts))
|
||||
if( (deck->li_next = inp_subcktexpand(deck->li_next)) == NULL ){
|
||||
line_free(realdeck,TRUE);
|
||||
line_free(deck->li_actual, TRUE);
|
||||
return;
|
||||
} /* done expanding subcircuit macros */
|
||||
|
||||
|
||||
/* Now handle translation of spice2c6 POLYs. */
|
||||
/* New location of ENHtranslate_poly. This should handle .SUBCKTs better . . . .
|
||||
* SDB 4.13.2003. Comments? mailto:sdb@cloud9.net
|
||||
*/
|
||||
#ifdef XSPICE
|
||||
/* gtri - wbk - Translate all SPICE 2G6 polynomial type sources */
|
||||
deck->li_next = ENHtranslate_poly(deck->li_next);
|
||||
/* gtri - end - Translate all SPICE 2G6 polynomial type sources */
|
||||
#endif
|
||||
|
||||
/* Now expand subcircuit macros. Note that we have to fix
|
||||
* the case before we do this but after we deal with the
|
||||
* commands. */
|
||||
if (!cp_getvar("nosubckt", VT_BOOL, (char *) &nosubckts))
|
||||
if((deck->li_next = inp_subcktexpand(deck->li_next)) == NULL){
|
||||
line_free(realdeck,TRUE);
|
||||
line_free(deck->li_actual, TRUE);
|
||||
return;
|
||||
}
|
||||
line_free(deck->li_actual,FALSE); /* SJB - free memory used by old li_actual (if any) */
|
||||
deck->li_actual = realdeck;
|
||||
inp_dodeck(deck, tt, wl_first, FALSE, options, filename);
|
||||
}
|
||||
|
||||
/* Now that the deck is loaded, do the commands */
|
||||
if (controls) {
|
||||
/* now call inp_dodeck, which loads deck into ft_curckt -- the current circuit. */
|
||||
inp_dodeck(deck, tt, wl_first, FALSE, options, filename);
|
||||
|
||||
} /* if (deck->li_next) */
|
||||
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In inp_spsource, done with dodeck.\n");
|
||||
#endif
|
||||
|
||||
/* Now that the deck is loaded, do the commands if there are any */
|
||||
if (controls) {
|
||||
for (end = wl = wl_reverse(controls); wl; wl = wl->wl_next)
|
||||
cp_evloop(wl->wl_word);
|
||||
|
||||
wl_free(end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*saj, to process save commands always, not just in batch mode
|
||||
|
|
@ -495,9 +532,21 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
* follows also. End is the list of commands we execute when the job
|
||||
* is finished: we only bother with this if we might be running in
|
||||
* batch mode, since it isn't much use otherwise. */
|
||||
/*------------------------------------------------------------------
|
||||
* It appears that inp_dodeck adds the circuit described by *deck
|
||||
* to the current circuit (ft_curckt).
|
||||
*-----------------------------------------------------------------*/
|
||||
void
|
||||
inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse,
|
||||
struct line *options, char *filename)
|
||||
/*fcn arguments:
|
||||
* *deck = the spice deck
|
||||
* *tt = the title of the deck
|
||||
* *end = pointer to the wordlist
|
||||
* reuse
|
||||
* *options
|
||||
* *filename
|
||||
*/
|
||||
{
|
||||
struct circ *ct;
|
||||
struct line *dd;
|
||||
|
|
@ -527,23 +576,39 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse,
|
|||
ft_curckt = ct = alloc(struct circ);
|
||||
}
|
||||
cp_getvar("noparse", VT_BOOL, (char *) &noparse);
|
||||
|
||||
/*----------------------------------------------------
|
||||
* Now assuming that we wanna parse this deck, we call
|
||||
* if_inpdeck which takes the deck and returns a
|
||||
* a pointer to the circuit ckt.
|
||||
*---------------------------------------------------*/
|
||||
if (!noparse)
|
||||
ckt = if_inpdeck(deck, &tab);
|
||||
else
|
||||
ckt = NULL;
|
||||
|
||||
out_init();
|
||||
|
||||
/*----------------------------------------------------
|
||||
* Now run throuh the deck and look to see if there are
|
||||
* errors on any line.
|
||||
*---------------------------------------------------*/
|
||||
for (dd = deck; dd; dd = dd->li_next) {
|
||||
|
||||
/* debug statement */
|
||||
/* printf("In inp_dodeck, examining line %s . . . \n", dd->li_line); */
|
||||
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In inp_dodeck, looking for errors and examining line %s . . . \n", dd->li_line);
|
||||
#endif
|
||||
|
||||
if (dd->li_error) {
|
||||
char *p, *q;
|
||||
char *p, *q;
|
||||
|
||||
#ifdef XSPICE
|
||||
/* gtri - modify - 12/12/90 - wbk - add setting of ipc syntax error flag */ g_ipc.syntax_error = IPC_TRUE;
|
||||
/* gtri - modify - 12/12/90 - wbk - add setting of ipc syntax error flag */
|
||||
g_ipc.syntax_error = IPC_TRUE;
|
||||
#endif
|
||||
/* gtri - end - 12/12/90 */
|
||||
|
||||
p = dd->li_error;
|
||||
do {
|
||||
q =strchr(p, '\n');
|
||||
|
|
@ -576,7 +641,7 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse,
|
|||
cp_kwswitch(CT_NODENAMES, ft_curckt->ci_nodes);
|
||||
ft_newcirc(ct);
|
||||
/* Assign current circuit */
|
||||
ft_curckt = ct;
|
||||
ft_curckt = ct;
|
||||
}
|
||||
ct->ci_name = tt;
|
||||
ct->ci_deck = deck;
|
||||
|
|
@ -585,7 +650,7 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse,
|
|||
ct->ci_origdeck = deck->li_actual;
|
||||
else
|
||||
ct->ci_origdeck = ct->ci_deck;
|
||||
ct->ci_ckt = ckt;
|
||||
ct->ci_ckt = ckt; /* attach the input ckt to the list of circuits */
|
||||
ct->ci_symtab = tab;
|
||||
ct->ci_inprogress = FALSE;
|
||||
ct->ci_runonce = FALSE;
|
||||
|
|
@ -616,24 +681,24 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse,
|
|||
static int one = 1;
|
||||
switch (eev->va_type) {
|
||||
case VT_BOOL:
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, &one);
|
||||
break;
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, &one);
|
||||
break;
|
||||
case VT_NUM:
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, (char *) &eev->va_num);
|
||||
break;
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, (char *) &eev->va_num);
|
||||
break;
|
||||
case VT_REAL:
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, (char *) &eev->va_real);
|
||||
break;
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, (char *) &eev->va_real);
|
||||
break;
|
||||
case VT_STRING:
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, eev->va_string);
|
||||
break;
|
||||
}
|
||||
if_option(ct->ci_ckt, eev->va_name,
|
||||
eev->va_type, eev->va_string);
|
||||
break;
|
||||
} /* switch . . . */
|
||||
}
|
||||
}
|
||||
} /* if (!noparse) . . . */
|
||||
|
||||
cp_addkword(CT_CKTNAMES, tt);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -174,8 +174,10 @@ inp_readall(FILE *fp, struct line **data)
|
|||
while ((buffer = readline(fp))) {
|
||||
#endif
|
||||
|
||||
/* debug statement */
|
||||
/* printf ("in inp_readall, just read %s . . .\n", buffer); */
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf ("in inp_readall, just read %s . . .\n", buffer);
|
||||
#endif
|
||||
|
||||
/* OK -- now we have loaded the next line into 'buffer'. Process it. */
|
||||
/* If input line is blank, ignore it & continue looping. */
|
||||
|
|
@ -199,8 +201,9 @@ inp_readall(FILE *fp, struct line **data)
|
|||
fprintf(cp_err, "Warning: premature EOF\n");
|
||||
}
|
||||
*s = '\0'; /* Zap the newline. */
|
||||
if ( s > buffer && s[-1] == '\r') /* Zap the carriage return under windows */
|
||||
s[-1] = '\0';
|
||||
|
||||
if(*(s-1) == '\r') /* Zop the carriage return under windows */
|
||||
*(s-1) = '\0';
|
||||
|
||||
/* now handle .include statements */
|
||||
if (ciprefix(".include", buffer)) {
|
||||
|
|
@ -304,8 +307,10 @@ inp_readall(FILE *fp, struct line **data)
|
|||
for (s = working->li_line; (c = *s) && c <= ' '; s++)
|
||||
;
|
||||
|
||||
/* debug statement */
|
||||
/* printf("Now processing linked list, at s = %s . . . \n", s); */
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In inp_readall, processing linked list element s = %s . . . \n", s);
|
||||
#endif
|
||||
|
||||
switch (c) {
|
||||
case '#':
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ baseaddr(void)
|
|||
if (getenv("SPICE_NO_DATASEG_CHECK"))
|
||||
return 0;
|
||||
|
||||
|
||||
low = 0;
|
||||
high = (char *) ((unsigned long) sbrk(0) & ~((1 << LOG2_PAGESIZE) - 1));
|
||||
|
||||
|
|
|
|||
|
|
@ -110,12 +110,8 @@ if_inpdeck(struct line *deck, INPtables **tab)
|
|||
|
||||
ft_curckt->ci_curTask = ft_curckt->ci_defTask;
|
||||
|
||||
/* Debug statement */
|
||||
/* printf("In if_inpdeck, about to call INPpas1. . . \n"); */
|
||||
INPpas1((void *) ckt, (card *) deck->li_next,(INPtables *)*tab);
|
||||
|
||||
/* Debug statement */
|
||||
/* printf("In if_inpdeck, about to call INPpas2. . . \n"); */
|
||||
INPpas2((void *) ckt, (card *) deck->li_next,
|
||||
(INPtables *) *tab,ft_curckt->ci_defTask);
|
||||
INPkillMods();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,6 +13,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
|||
|
||||
#include "inpdefs.h"
|
||||
|
||||
/* This struct defines a linked list of lines from a SPICE file. */
|
||||
struct line {
|
||||
int li_linenum;
|
||||
char *li_line;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,18 @@
|
|||
* 1999 E. Rouat
|
||||
************/
|
||||
|
||||
/* Uncomment this to get trace of program operation for
|
||||
* debugging
|
||||
*/
|
||||
/* #define TRACE */
|
||||
|
||||
/* This was also added by SDB to aid in
|
||||
* debugging. Remove when finished.
|
||||
*/
|
||||
|
||||
/* #include "memwatch.h"
|
||||
#define MEMWATCH */
|
||||
|
||||
/*
|
||||
* This file will eventually replace spice.h and lots of other
|
||||
* files in src/include
|
||||
|
|
|
|||
17
src/main.c
17
src/main.c
|
|
@ -5,6 +5,7 @@
|
|||
Author: 1985 Wayne A. Christopher
|
||||
|
||||
The main routine for ngspice */
|
||||
|
||||
#include <ngspice.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -326,6 +327,22 @@ main(int argc, char **argv)
|
|||
FILE *circuit_file;
|
||||
|
||||
|
||||
|
||||
#ifdef TRACE
|
||||
/* this is used to detect memory leaks during debugging */
|
||||
/* added by SDB during debug . . . . */
|
||||
/* mtrace(); */
|
||||
#endif
|
||||
|
||||
#ifdef TRACE
|
||||
/* this is also used for memory leak plugging . . . */
|
||||
/* added by SDB during debug . . . . */
|
||||
/* mwDoFlush(1); */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* MFB tends to jump to 0 on errors. This tends to catch it. */
|
||||
if (started) {
|
||||
fprintf(cp_err, "main: Internal Error: jump to zero\n");
|
||||
|
|
|
|||
|
|
@ -159,6 +159,76 @@ gettok(char **s)
|
|||
return (copy(buf));
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*
|
||||
* gettok_noparens was added by SDB on 4.21.2003.
|
||||
* It acts like gettok, except that it stops parsing when it hits a paren
|
||||
* (i.e. it treats parens like whitespace). It is used in translate (subckt.c)
|
||||
* while looking for the POLY token.
|
||||
*-------------------------------------------------------------------------*/
|
||||
char *
|
||||
gettok_noparens(char **s)
|
||||
{
|
||||
char buf[BSIZE_SP];
|
||||
int i = 0;
|
||||
char c;
|
||||
|
||||
while (isspace(**s))
|
||||
(*s)++;
|
||||
if (!**s)
|
||||
return (NULL);
|
||||
while ((c = **s) && !isspace(c) &&
|
||||
( **s != '(' ) && ( **s != ')' ) ) {
|
||||
buf[i++] = *(*s)++;
|
||||
}
|
||||
buf[i] = '\0';
|
||||
while (isspace(**s))
|
||||
(*s)++;
|
||||
return (copy(buf));
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*
|
||||
* get_l_paren iterates the pointer forward in a string until it hits
|
||||
* the position after the next left paren "(". It returns 0 if it found a left
|
||||
* paren, and 1 if no left paren is found.
|
||||
*-------------------------------------------------------------------------*/
|
||||
int
|
||||
get_l_paren(char **s)
|
||||
{
|
||||
while (**s && ( **s != '(' ) )
|
||||
(*s)++;
|
||||
if (!**s)
|
||||
return (1);
|
||||
|
||||
(*s)++;
|
||||
|
||||
if (!**s)
|
||||
return (1);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*
|
||||
* get_r_paren iterates the pointer forward in a string until it hits
|
||||
* the position after the next right paren ")". It returns 0 if it found a right
|
||||
* paren, and 1 if no right paren is found.
|
||||
*-------------------------------------------------------------------------*/
|
||||
int
|
||||
get_r_paren(char **s)
|
||||
{
|
||||
while (**s && ( **s != ')' ) )
|
||||
(*s)++;
|
||||
if (!**s)
|
||||
return (1);
|
||||
|
||||
(*s)++;
|
||||
|
||||
if (!**s)
|
||||
return (1);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifndef HAVE_BCOPY
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ CKTmodCrt(void *ckt, int type, void **modfast, IFuid name)
|
|||
|
||||
error = CKTfndMod(ckt,&type,(void**)&mymodfast,name);
|
||||
if(error == E_NOMOD) {
|
||||
mymodfast = (GENmodel *)MALLOC(*DEVices[type]->DEVmodSize);
|
||||
mymodfast = (GENmodel *)MALLOC(*(DEVices[type]->DEVmodSize));
|
||||
if(mymodfast == (GENmodel *)NULL) return(E_NOMEM);
|
||||
mymodfast->GENmodType = type;
|
||||
mymodfast->GENmodName = name;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int sens_sens(CKTcircuit *ckt, int restart)
|
|||
int (*fn)( );
|
||||
static int is_dc;
|
||||
int k, j, n;
|
||||
int num_vars, branch_eq;
|
||||
int num_vars, branch_eq=0;
|
||||
char *sen_data=NULL;
|
||||
char namebuf[513];
|
||||
IFuid *output_names, freq_name;
|
||||
|
|
@ -601,7 +601,7 @@ inc_freq(double freq, int type, double step_size)
|
|||
double
|
||||
next_freq(int type, double freq, double stepsize)
|
||||
{
|
||||
double s;
|
||||
double s=0;
|
||||
|
||||
switch (type) {
|
||||
case SENS_DC:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ CKTterr(int qcap, CKTcircuit *ckt, double *timeStep)
|
|||
double del;
|
||||
double diff[8];
|
||||
double deltmp[8];
|
||||
double factor;
|
||||
double factor=0;
|
||||
int i;
|
||||
int j;
|
||||
static double gearCoeff[] = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
5.2.2003 -- Stuart Brorson <SDB@cloud9.net)
|
||||
* Added stuff to all deviceinit.c files to make deviceinfo
|
||||
structure line up with the def of the structure when XSPICE is
|
||||
enabled. This fixed a major bug with XSPICE operation.
|
||||
|
||||
2000-08-28 Arno W. Peters <A.W.Peters@ieee.org>
|
||||
|
||||
* asrc/asrcset.c, bjt/bjtsetup.c, bsim1/b1set.c, bsim2/b2set.c,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,23 @@ SPICEdev ASRCinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -24,21 +24,21 @@ BJTdisto(int mode, GENmodel *genmodel, CKTcircuit *ckt)
|
|||
DISTOAN* job = (DISTOAN*) ckt->CKTcurJob;
|
||||
double td;
|
||||
DpassStr pass;
|
||||
double r1h1x,i1h1x;
|
||||
double r1h1y,i1h1y;
|
||||
double r1h1z, i1h1z;
|
||||
double r1h2x, i1h2x;
|
||||
double r1h2y, i1h2y;
|
||||
double r1h2z, i1h2z;
|
||||
double r1hm2x,i1hm2x;
|
||||
double r1hm2y,i1hm2y;
|
||||
double r1hm2z, i1hm2z;
|
||||
double r2h11x,i2h11x;
|
||||
double r2h11y,i2h11y;
|
||||
double r2h11z, i2h11z;
|
||||
double r2h1m2x,i2h1m2x;
|
||||
double r2h1m2y,i2h1m2y;
|
||||
double r2h1m2z, i2h1m2z;
|
||||
double r1h1x = 0, i1h1x = 0;
|
||||
double r1h1y = 0, i1h1y = 0;
|
||||
double r1h1z = 0, i1h1z = 0;
|
||||
double r1h2x = 0, i1h2x = 0;
|
||||
double r1h2y = 0, i1h2y = 0;
|
||||
double r1h2z = 0, i1h2z = 0;
|
||||
double r1hm2x = 0, i1hm2x = 0;
|
||||
double r1hm2y = 0, i1hm2y = 0;
|
||||
double r1hm2z = 0, i1hm2z = 0;
|
||||
double r2h11x = 0, i2h11x = 0;
|
||||
double r2h11y = 0, i2h11y = 0;
|
||||
double r2h11z = 0, i2h11z = 0;
|
||||
double r2h1m2x = 0, i2h1m2x = 0;
|
||||
double r2h1m2y = 0, i2h1m2y = 0;
|
||||
double r2h1m2z = 0, i2h1m2z = 0;
|
||||
double temp, itemp;
|
||||
BJTinstance *here;
|
||||
#ifdef DISTODEBUG
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ BJTdSetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double arg;
|
||||
double c2;
|
||||
double c4;
|
||||
double lcapbe1,lcapbe2,lcapbe3;
|
||||
double lcapbx1,lcapbx2,lcapbx3;
|
||||
double cb;
|
||||
double lcapbe1, lcapbe2, lcapbe3;
|
||||
double lcapbx1, lcapbx2, lcapbx3;
|
||||
double cb = 0;
|
||||
double cbc;
|
||||
double cbcn;
|
||||
double cbe;
|
||||
|
|
@ -54,16 +54,16 @@ BJTdSetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double f3;
|
||||
double fcpc;
|
||||
double fcpe;
|
||||
double gbb1;
|
||||
double gbb1 = 0;
|
||||
double gbc;
|
||||
double gbcn;
|
||||
double gbe;
|
||||
double gbe2,gbe3;
|
||||
double gbe2, gbe3;
|
||||
double gbc2,gbc3;
|
||||
double gben2,gben3;
|
||||
double gbcn2,gbcn3;
|
||||
double gben;
|
||||
double gbb2, gbb3;
|
||||
double gbb2 = 0, gbb3 = 0;
|
||||
double oik;
|
||||
double oikr;
|
||||
double ovtf;
|
||||
|
|
|
|||
|
|
@ -7,23 +7,39 @@
|
|||
#include "bjtinit.h"
|
||||
|
||||
|
||||
SPICEdev BJTinfo = {
|
||||
SPICEdev BJTinfo = { /* description from struct IFdevice */
|
||||
{
|
||||
"BJT",
|
||||
"Bipolar Junction Transistor",
|
||||
"BJT", /* char *name */
|
||||
"Bipolar Junction Transistor", /* char *description */
|
||||
|
||||
&BJTnSize, /* int *terms */
|
||||
&BJTnSize, /* int *numNames */
|
||||
BJTnames, /* char **termnames */
|
||||
|
||||
&BJTpTSize, /* int *numInstanceparms */
|
||||
BJTpTable, /* IFparm *instanceParms */
|
||||
|
||||
&BJTmPTSize, /* int *numModelparms */
|
||||
BJTmPTable, /* IFparm *modelParms */
|
||||
|
||||
&BJTnSize,
|
||||
&BJTnSize,
|
||||
BJTnames,
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
&BJTpTSize,
|
||||
BJTpTable,
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
&BJTmPTSize,
|
||||
BJTmPTable,
|
||||
DEV_DEFAULT
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT /* int flags */
|
||||
},
|
||||
|
||||
|
||||
DEVparam : BJTparam,
|
||||
DEVmodParam : BJTmParam,
|
||||
DEVload : BJTload,
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ BJTload(inModel,ckt)
|
|||
double tr;
|
||||
double vbc;
|
||||
double vbe;
|
||||
double vbx;
|
||||
double vbx=0;
|
||||
double vce;
|
||||
double vcs;
|
||||
double vcs=0;
|
||||
double vt;
|
||||
double vtc;
|
||||
double vte;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev B1info = {
|
|||
|
||||
&B1mPTSize,
|
||||
B1mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev B2info = {
|
|||
|
||||
&B2mPTSize,
|
||||
B2mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,22 @@ SPICEdev BSIM3info = {
|
|||
|
||||
&BSIM3mPTSize,
|
||||
BSIM3mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,22 @@ SPICEdev B3SOIDDinfo = {
|
|||
|
||||
&B3SOIDDmPTSize,
|
||||
B3SOIDDmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT}
|
||||
,
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,22 @@ SPICEdev B3SOIFDinfo = {
|
|||
|
||||
&B3SOIFDmPTSize,
|
||||
B3SOIFDmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT}
|
||||
,
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,22 @@ SPICEdev B3SOIPDinfo = {
|
|||
|
||||
&B3SOIPDmPTSize,
|
||||
B3SOIPDmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT}
|
||||
,
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev BSIM3V1info = {
|
|||
|
||||
&BSIM3V1mPTSize,
|
||||
BSIM3V1mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT,
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,7 +20,23 @@ SPICEdev BSIM3V2info = {
|
|||
|
||||
&BSIM3V2mPTSize,
|
||||
BSIM3V2mPTable,
|
||||
DEV_DEFAULT
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
DEVparam : BSIM3V2param,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev BSIM4info = {
|
|||
|
||||
&BSIM4mPTSize,
|
||||
BSIM4mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,22 @@ SPICEdev CAPinfo = {
|
|||
|
||||
&CAPmPTSize,
|
||||
CAPmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,22 @@ SPICEdev CCCSinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev CCVSinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -17,16 +17,19 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
CKTcrtElt(void *ckt, void *inModPtr, void **inInstPtr, IFuid name)
|
||||
{
|
||||
GENinstance *instPtr = NULL;
|
||||
GENmodel *modPtr=(GENmodel*)inModPtr;
|
||||
GENinstance *instPtr = NULL; /* instPtr points to the data struct for per-instance data */
|
||||
GENmodel *modPtr = (GENmodel*)inModPtr; /* modPtr points to the data struct for per-model data */
|
||||
|
||||
SPICEdev **DEVices;
|
||||
int error;
|
||||
int type;
|
||||
|
||||
DEVices = devices();
|
||||
if((GENmodel *)modPtr==(GENmodel*)NULL)
|
||||
|
||||
if( (GENmodel *)modPtr == (GENmodel*)NULL )
|
||||
return E_NOMOD;
|
||||
type = ((GENmodel*)modPtr)->GENmodType;
|
||||
|
||||
type = ((GENmodel*)modPtr)->GENmodType;
|
||||
|
||||
error = CKTfndDev(ckt, &type, (void**)&instPtr, name, inModPtr,
|
||||
(char *)NULL );
|
||||
|
|
@ -37,13 +40,21 @@ CKTcrtElt(void *ckt, void *inModPtr, void **inInstPtr, IFuid name)
|
|||
} else if (error != E_NODEV)
|
||||
return error;
|
||||
|
||||
#ifdef TRACE
|
||||
/*------ SDB debug statement -------*/
|
||||
printf("about to tmalloc, type = %d. . . \n", type);
|
||||
#endif
|
||||
|
||||
instPtr = (GENinstance *) tmalloc(*DEVices[type]->DEVinstSize);
|
||||
if (instPtr == (GENinstance *)NULL)
|
||||
return E_NOMEM;
|
||||
|
||||
instPtr->GENname = name;
|
||||
instPtr->GENmodPtr = modPtr;
|
||||
instPtr->GENnextInstance = modPtr->GENinstances;
|
||||
|
||||
instPtr->GENmodPtr = modPtr;
|
||||
|
||||
instPtr->GENnextInstance = modPtr->GENinstances;
|
||||
|
||||
modPtr->GENinstances = instPtr;
|
||||
|
||||
if(inInstPtr != NULL)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,22 @@ SPICEdev CPLinfo = {
|
|||
|
||||
&CPLmPTSize,
|
||||
CPLmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,22 @@ SPICEdev CSWinfo = {
|
|||
|
||||
&CSWmPTSize,
|
||||
CSWmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,22 @@ SPICEdev DIOinfo = {
|
|||
|
||||
&DIOmPTSize,
|
||||
DIOmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev HFETAinfo = {
|
|||
|
||||
&HFETAmPTSize,
|
||||
HFETAmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev HFET2info = {
|
|||
|
||||
&HFET2mPTSize,
|
||||
HFET2mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,21 @@ SPICEdev INDinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
0
|
||||
},
|
||||
|
||||
|
|
@ -71,6 +86,22 @@ SPICEdev MUTinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev ISRCinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev JFETinfo = {
|
|||
|
||||
&JFETmPTSize,
|
||||
JFETmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev JFET2info = {
|
|||
|
||||
&JFET2mPTSize,
|
||||
JFET2mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev LTRAinfo = {
|
|||
|
||||
<RAmPTSize,
|
||||
LTRAmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MESinfo = {
|
|||
|
||||
&MESmPTSize,
|
||||
MESmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MESAinfo = {
|
|||
|
||||
&MESAmPTSize,
|
||||
MESAmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MOS1info = {
|
|||
|
||||
&MOS1mPTSize,
|
||||
MOS1mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MOS2info = {
|
|||
|
||||
&MOS2mPTSize,
|
||||
MOS2mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MOS3info = {
|
|||
|
||||
&MOS3mPTSize,
|
||||
MOS3mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MOS6info = {
|
|||
|
||||
&MOS6mPTSize,
|
||||
MOS6mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev MOS9info = {
|
|||
|
||||
&MOS9mPTSize,
|
||||
MOS9mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev RESinfo = {
|
|||
|
||||
&RESmPTSize,
|
||||
RESmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev SOI3info = {
|
|||
|
||||
&SOI3mPTSize,
|
||||
SOI3mPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,22 @@ SPICEdev SWinfo = {
|
|||
|
||||
&SWmPTSize,
|
||||
SWmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev TRAinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,23 @@ SPICEdev TXLinfo = {
|
|||
|
||||
&TXLmPTSize,
|
||||
TXLmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
TXLparam,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev URCinfo = {
|
|||
|
||||
&URCmPTSize,
|
||||
URCmPTable,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev VCCSinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev VCVSinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev VSRCinfo = {
|
|||
|
||||
0,
|
||||
NULL,
|
||||
|
||||
#ifdef XSPICE
|
||||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
|
||||
0, /* This is a SPICE device, it has no MIF info data */
|
||||
NULL, /* This is a SPICE device, it has no MIF info data */
|
||||
/*--------------------------- End of SDB fix -------------------------*/
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ void INP2Q(void *ckt, INPtables * tab, card * current, void *gnode)
|
|||
}
|
||||
mdfast = tab->defQmod;
|
||||
}
|
||||
|
||||
#ifdef TRACE
|
||||
/* --- SDB debug statement --- */
|
||||
printf ("In INP2Q, just about to dive into newInstance\n");
|
||||
#endif
|
||||
|
||||
IFC(newInstance, (ckt, mdfast, &fast, name));
|
||||
IFC(bindNode, (ckt, fast, 1, node1));
|
||||
IFC(bindNode, (ckt, fast, 2, node2));
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab)
|
|||
|
||||
line = image->line;
|
||||
|
||||
/* debug statement */
|
||||
/* printf("In INPdomodel, examining line %s . . . \n", line); */
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPdomodel, examining line %s . . . \n", line);
|
||||
#endif
|
||||
|
||||
INPgetTok(&line, &modname, 1); /* throw away '.model' */
|
||||
INPgetTok(&line, &modname, 1); /* get model name */
|
||||
|
|
@ -471,6 +473,21 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab)
|
|||
}
|
||||
|
||||
|
||||
/* type poly added by SDB . . . */
|
||||
#ifdef XSPICE
|
||||
/* -------- Check if model is a poly (specific to xspice) --------- */
|
||||
else if (strcmp(typename, "poly") == 0) {
|
||||
type = INPtypelook("POLY");
|
||||
if (type < 0) {
|
||||
err =
|
||||
INPmkTemp
|
||||
("Device type POLY not available in this binary\n");
|
||||
}
|
||||
INPmakeMod(modname, type, image);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* -------- Default action --------- */
|
||||
else {
|
||||
#ifndef XSPICE
|
||||
|
|
@ -478,18 +495,35 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab)
|
|||
err = (char *) MALLOC(35 + strlen(typename));
|
||||
(void) sprintf(err, "unknown model type %s - ignored\n", typename);
|
||||
#else
|
||||
|
||||
/* gtri - modify - wbk - 10/23/90 - modify to look for code models */
|
||||
|
||||
/* add new code */
|
||||
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPdomodel, found unknown model type, typename = %s . . .\n", typename);
|
||||
#endif
|
||||
|
||||
/* look for this model type and put it in the table of models */
|
||||
type = INPtypelook(typename);
|
||||
if(type < 0) {
|
||||
err = (char *) MALLOC(35 + strlen(typename));
|
||||
sprintf(err,"Unknown model type %s - ignored\n",typename);
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPdomodel, ignoring unknown model typ typename = %s . . .\n", typename);
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
else {
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPdomodel, adding model typename = %s to model list. . .\n", typename);
|
||||
#endif
|
||||
|
||||
INPmakeMod(modname,type,image);
|
||||
}
|
||||
|
||||
/* gtri - end - wbk - 10/23/90 */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ char *INPfindLev(char *line, int *level)
|
|||
{
|
||||
char *where;
|
||||
|
||||
where = line;
|
||||
/*
|
||||
*where = line;
|
||||
*/
|
||||
|
||||
where = strstr(line, "level");
|
||||
|
||||
|
|
@ -58,7 +60,7 @@ char *INPfindLev(char *line, int *level)
|
|||
|
||||
else { /* no level on the line => default */
|
||||
*level = 1;
|
||||
printf("Level not specified: Using level 1.\n");
|
||||
printf("Warning -- Level not specified on line \"%s\"\nUsing level 1.\n", line);
|
||||
return ((char *) NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,21 +24,40 @@ char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab)
|
|||
char *temp;
|
||||
int error;
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPgetMod, examining model %s . . . \n", name);
|
||||
#endif
|
||||
|
||||
for (modtmp = modtab; modtmp != (INPmodel *) NULL; modtmp =
|
||||
((modtmp)->INPnextModel)) {
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPgetMod, comparing against stored model %s . . . \n", (modtmp)->INPmodName);
|
||||
#endif
|
||||
|
||||
if (strcmp((modtmp)->INPmodName, name) == 0) {
|
||||
/* found the model in question - now instantiate if necessary */
|
||||
/* and return an appropriate pointer to it */
|
||||
if (modtmp->INPmodType < 0) {
|
||||
|
||||
if (modtmp->INPmodType < 0) { /* First check for illegal model type */
|
||||
/* illegal device type, so can't handle */
|
||||
*model = (INPmodel *) NULL;
|
||||
err = (char *) MALLOC((35 + strlen(name)) * sizeof(char));
|
||||
(void) sprintf(err,
|
||||
"Unknown device type for model %s \n",
|
||||
name);
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPgetMod, illegal device type for model %s . . . \n", name);
|
||||
#endif
|
||||
|
||||
return (err);
|
||||
}
|
||||
if (!((modtmp)->INPmodUsed)) {
|
||||
} /* end of checking for illegal model */
|
||||
|
||||
if (!((modtmp)->INPmodUsed)) { /* Check if model is already defined */
|
||||
/* not already defined, so create & give parameters */
|
||||
error = (*(ft_sim->newModel)) (ckt, (modtmp)->INPmodType,
|
||||
&((modtmp)->INPmodfast),
|
||||
|
|
@ -47,12 +66,20 @@ char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab)
|
|||
return (INPerror(error));
|
||||
/* parameter isolation, identification, binding */
|
||||
line = ((modtmp)->INPmodLine)->line;
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPgetMod, inserting new model into table. line = %s . . . \n", line);
|
||||
#endif
|
||||
|
||||
|
||||
INPgetTok(&line, &parm, 1); /* throw away '.model' */
|
||||
INPgetTok(&line, &parm, 1); /* throw away 'modname' */
|
||||
while (*line != 0) {
|
||||
INPgetTok(&line, &parm, 1);
|
||||
if (!*parm)
|
||||
continue;
|
||||
|
||||
for (j = 0; j < (* (*(ft_sim->devices)[(modtmp)->INPmodType]).numModelParms); j++) {
|
||||
|
||||
if (strcmp(parm, "txl") == 0) {
|
||||
|
|
@ -72,7 +99,8 @@ char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab)
|
|||
return (INPerror(error));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} /* end for(j = 0 . . .*/
|
||||
|
||||
if (strcmp(parm, "level") == 0) {
|
||||
/* just grab the level number and throw away */
|
||||
/* since we already have that info from pass1 */
|
||||
|
|
@ -104,5 +132,11 @@ char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab)
|
|||
(void) sprintf(err,
|
||||
" unable to find definition of model %s - default assumed \n",
|
||||
name);
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPgetMod, didn't find model for %s, using default . . . \n", name);
|
||||
#endif
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,8 +117,12 @@ int INPgetTok(char **line, char **token, int gobble)
|
|||
continue;
|
||||
break;
|
||||
}
|
||||
/* debug statement */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
/* printf("found generic token (%s) and rest of line (%s)\n", *token, *line); */
|
||||
#endif
|
||||
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
|
@ -198,8 +202,12 @@ int INPgetNetTok(char **line, char **token, int gobble)
|
|||
continue;
|
||||
break;
|
||||
}
|
||||
/* debug statement */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
/* printf("found netname token (%s) and rest of line (%s)\n", *token, *line); */
|
||||
#endif
|
||||
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +321,11 @@ int INPgetUTok(char **line, char **token, int gobble)
|
|||
break;
|
||||
}
|
||||
*line = point;
|
||||
/* debug statement */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
/* printf("found refdes token (%s) and rest of line (%s)\n",*token,*line); */
|
||||
#endif
|
||||
|
||||
return (OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ int INPmakeMod(char *token, int type, card * line)
|
|||
|
||||
/* Model name was not already in model table. Therefore stick
|
||||
it in the model table. Then reutrn. */
|
||||
|
||||
#ifdef TRACE
|
||||
/* debug statement */
|
||||
printf("In INPmakeMod, about to insert new model name = %s . . .\n", token);
|
||||
#endif
|
||||
|
||||
*i = (INPmodel *) MALLOC(sizeof(INPmodel));
|
||||
if (*i == NULL)
|
||||
return (E_NOMEM);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,10 @@ void INPpas1(void *ckt, card * deck, INPtables * tab)
|
|||
/* First check to see if model is multi-line. If so,
|
||||
read in all lines & stick them into tab. */
|
||||
|
||||
/* debug statement */
|
||||
/* printf("In INPpas1, about to call INPdomodel\n"); */
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPpas1, handling line = %s \n", thisline);
|
||||
#endif
|
||||
|
||||
/* Now invoke INPdomodel to stick model into model table. */
|
||||
temp = INPdomodel(ckt, current, tab);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@ void INPpas2(void *ckt, card * data, INPtables * tab, void *task)
|
|||
void *gnode;
|
||||
int error; /* used by the macros defined above */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("Entered INPpas2 . . . .\n");
|
||||
#endif
|
||||
|
||||
error = INPgetTok(&groundname, &gname, 1);
|
||||
if (error)
|
||||
data->error =
|
||||
|
|
@ -45,6 +50,11 @@ void INPpas2(void *ckt, card * data, INPtables * tab, void *task)
|
|||
|
||||
for (current = data; current != NULL; current = current->nextcard) {
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPpas2, examining card %s . . .\n", current->line);
|
||||
#endif
|
||||
|
||||
c = *(current->line);
|
||||
c = islower(c) ? toupper(c) : c;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ INPpas3(void *ckt, card *data, INPtables *tab, void *task,
|
|||
int length; /* length of a name */
|
||||
void *node1; /* the first node's node pointer */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In INPpas3 . . . \n");
|
||||
#endif
|
||||
|
||||
for(current = data; current != NULL; current = current->nextcard) {
|
||||
line = current->line;
|
||||
INPgetTok(&line,&token,1);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,19 @@ int INPtypelook(char *type)
|
|||
{
|
||||
|
||||
int i;
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
/* printf("In INPtypelook, examining model type = %s . . .\n", type); */
|
||||
#endif
|
||||
|
||||
for (i = 0; i < ft_sim->numDevices; i++) {
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statemnet */
|
||||
/* printf("In INPtypelook, checking model against = %s . . .\n", (*(ft_sim->devices)[i]).name ); */
|
||||
#endif
|
||||
|
||||
if (strcmp(type, (*(ft_sim->devices)[i]).name) == 0) {
|
||||
/*found the device - return it */
|
||||
return i;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
05/05/2003:
|
||||
* Added latest patch from Stuart Brorson <sdb@cloud9.net>,
|
||||
http://www.brorson.com/gEDA/ngspice/ngspice.html ;
|
||||
Spice POLY works
|
||||
Fixes XSPICE integration bugs
|
||||
Comments in parser code and debug printfs
|
||||
14/04/2003:
|
||||
* loadsnap / savesnap commands added
|
||||
* Improved spice Tcl GUI
|
||||
|
|
|
|||
|
|
@ -65,13 +65,10 @@ NON-STANDARD FEATURES
|
|||
|
||||
static int needs_translating(char *card);
|
||||
static int count_tokens(char *card);
|
||||
static char *translate(char *orig_card, char **inst_card,
|
||||
static char *two2three_translate(char *orig_card, char **inst_card,
|
||||
char **mod_card);
|
||||
static int get_poly_dimension(char *card);
|
||||
|
||||
// added as a quick bug fix, a lot of standard models have a linear poly(1) which
|
||||
// fails in this code, Kevin Aylward April 15th 2000
|
||||
char * (*FPConvertSpicePoly1ToBsource)(char *card); // this is so I can use the MFC class libary
|
||||
/*
|
||||
ENHtranslate_poly()
|
||||
|
||||
|
|
@ -79,7 +76,14 @@ Translate all 2G6 style polynomial controlled sources in the deck
|
|||
to new polynomial controlled source code model syntax.
|
||||
*/
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* ENHtranslate_poly takes (a pointer to) the SPICE deck as argument. */
|
||||
/* It loops through the deck, and translates all POLY statements */
|
||||
/* in dependent sources into a .model conformant with the needs of */
|
||||
/* XSPICE. It splices the new statements in the deck, and comments */
|
||||
/* out the old dependent source. */
|
||||
/* It returns (a pointer to) the processed deck. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
struct line * ENHtranslate_poly(
|
||||
struct line *deck) /* Linked list of lines in input deck */
|
||||
{
|
||||
|
|
@ -91,65 +95,65 @@ struct line * ENHtranslate_poly(
|
|||
int poly_dimension;
|
||||
char *buff;
|
||||
|
||||
|
||||
/* Iterate through each card in the deck and translate as needed */
|
||||
for(d = deck; d; d = d->li_next)
|
||||
{
|
||||
|
||||
/* If doesn't need to be translated, continue to next card */
|
||||
if(! needs_translating(d->li_line))
|
||||
continue;
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In ENHtranslate_poly, now examining card %s . . . \n", d->li_line);
|
||||
#endif
|
||||
|
||||
// Start added as a quick fix to a xspice translation bug in poly(1) code
|
||||
// Kevin Aylward April 15th 2000, fuck knows where it is
|
||||
poly_dimension = get_poly_dimension(d->li_line);
|
||||
/* If doesn't need to be translated, continue to next card */
|
||||
if(! needs_translating(d->li_line)) {
|
||||
|
||||
if(poly_dimension == 1)//
|
||||
{
|
||||
buff = (FPConvertSpicePoly1ToBsource)(d->li_line);
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
/* printf("Card doesn't need translating. Continuing . . . .\n"); */
|
||||
#endif
|
||||
|
||||
if(buff)
|
||||
{
|
||||
FREE(d->li_line);
|
||||
continue;
|
||||
}
|
||||
|
||||
d->li_line = buff;
|
||||
}
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("Found a card to translate . . . .\n");
|
||||
#endif
|
||||
|
||||
continue;
|
||||
}
|
||||
// End added as a quick fix to a xspice translation bug in poly(1) code
|
||||
// Kevin Aylward April 15th 2000
|
||||
|
||||
|
||||
/* Create two new line structs and splice into deck */
|
||||
/* Create two new line structs and splice into deck */
|
||||
/* l1 = alloc(line); */ /* jgroves */
|
||||
/* l2 = alloc(line); */ /* jgroves */
|
||||
l1 = alloc(struct line);
|
||||
l2 = alloc(struct line);
|
||||
l2->li_next = d->li_next;
|
||||
l1->li_next = l2;
|
||||
d->li_next = l1;
|
||||
l1 = alloc(struct line);
|
||||
l2 = alloc(struct line);
|
||||
l2->li_next = d->li_next;
|
||||
l1->li_next = l2;
|
||||
d->li_next = l1;
|
||||
|
||||
/* Create the translated cards */
|
||||
d->li_error = two2three_translate(d->li_line, &(l1->li_line), &(l2->li_line));
|
||||
|
||||
/* Comment out the original line */
|
||||
card = (void *) MALLOC(strlen(d->li_line) + 2);
|
||||
strcpy(card,"*");
|
||||
strcat(card, d->li_line);
|
||||
d->li_line = card;
|
||||
|
||||
/* Create the translated cards */
|
||||
d->li_error = translate(d->li_line, &(l1->li_line), &(l2->li_line));
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In ENHtranslate_poly, translated card = %s . . . \n", card);
|
||||
#endif
|
||||
|
||||
/* Comment out the original line */
|
||||
card = (void *) MALLOC(strlen(d->li_line) + 2);
|
||||
strcpy(card,"*");
|
||||
strcat(card, d->li_line);
|
||||
d->li_line = card;
|
||||
|
||||
/* Advance deck pointer to last line added */
|
||||
d = l2;
|
||||
/* Advance deck pointer to last line added */
|
||||
d = l2;
|
||||
}
|
||||
|
||||
|
||||
/* Return head of deck */
|
||||
return(deck);
|
||||
|
||||
} /* ENHtranslate_poly */
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/*
|
||||
needs_translating()
|
||||
|
||||
|
|
@ -160,9 +164,14 @@ a simple linear dependent source. Otherwise return false.
|
|||
|
||||
|
||||
static int needs_translating(
|
||||
char *card) /* the card text to check */
|
||||
char *card) /* the card text to check */
|
||||
{
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
/* printf("In needs_translating, examining card %s . . . \n", card); */
|
||||
#endif
|
||||
|
||||
switch(*card) {
|
||||
|
||||
case 'e':
|
||||
|
|
@ -187,14 +196,12 @@ static int needs_translating(
|
|||
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/*
|
||||
count_tokens()
|
||||
|
||||
Count and return the number of tokens on the card.
|
||||
*/
|
||||
|
||||
|
||||
static int count_tokens(
|
||||
char *card) /* the card text on which to count tokens */
|
||||
{
|
||||
|
|
@ -210,13 +217,19 @@ static int count_tokens(
|
|||
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*
|
||||
translate()
|
||||
two2three_translate()
|
||||
|
||||
Do the syntax translation of the 2G6 source to the new code model syntax.
|
||||
|
||||
Renamed by SDB to eliminate clash with translate fcn defined in subckt.c
|
||||
4.17.2003 -- SDB
|
||||
|
||||
*/
|
||||
|
||||
static char *translate(
|
||||
static char *two2three_translate(
|
||||
char *orig_card, /* the original untranslated card */
|
||||
char **inst_card, /* the instance card created by the translation */
|
||||
char **mod_card) /* the model card created by the translation */
|
||||
|
|
@ -241,6 +254,11 @@ static char *translate(
|
|||
char *card;
|
||||
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In two2three_translate, card to translate = %s . . .\n", orig_card);
|
||||
#endif
|
||||
|
||||
/* Get the first character into local storage for checking type */
|
||||
type = *orig_card;
|
||||
|
||||
|
|
@ -249,12 +267,16 @@ static char *translate(
|
|||
|
||||
/* Determine the dimension of the poly source */
|
||||
dim = get_poly_dimension(orig_card);
|
||||
if(dim <= 0)
|
||||
if(dim <= 0) {
|
||||
printf("ERROR in two2three_translate -- Argument to poly() is not an integer\n");
|
||||
return("ERROR - Argument to poly() is not an integer\n");
|
||||
}
|
||||
|
||||
/* Compute number of input connections based on type and dimension */
|
||||
switch(type) {
|
||||
case 'E':
|
||||
case 'e':
|
||||
case 'G':
|
||||
case 'g':
|
||||
num_conns = 2 * dim;
|
||||
break;
|
||||
|
|
@ -318,7 +340,8 @@ static char *translate(
|
|||
strcpy(*inst_card, "a$poly$");
|
||||
sprintf(*inst_card + strlen(*inst_card), "%s ", name);
|
||||
|
||||
if((type == 'e') || (type == 'g'))
|
||||
if((type == 'e') || (type == 'g') ||
|
||||
(type == 'E') || (type == 'G'))
|
||||
sprintf(*inst_card + strlen(*inst_card), "%%vd [ ");
|
||||
else
|
||||
sprintf(*inst_card + strlen(*inst_card), "%%vnam [ ");
|
||||
|
|
@ -328,7 +351,8 @@ static char *translate(
|
|||
|
||||
sprintf(*inst_card + strlen(*inst_card), "] ");
|
||||
|
||||
if((type == 'e') || (type == 'h'))
|
||||
if((type == 'e') || (type == 'h') ||
|
||||
(type == 'E') || (type == 'H'))
|
||||
sprintf(*inst_card + strlen(*inst_card), "%%vd ");
|
||||
else
|
||||
sprintf(*inst_card + strlen(*inst_card), "%%id ");
|
||||
|
|
@ -344,6 +368,10 @@ static char *translate(
|
|||
sprintf(*mod_card + strlen(*mod_card), "%s ", coef[i]);
|
||||
sprintf(*mod_card + strlen(*mod_card), "]");
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In two2three_translate, translated statements:\n%s \n%s \n", *inst_card, *mod_card);
|
||||
#endif
|
||||
|
||||
/* Free the temporary space */
|
||||
FREE(name);
|
||||
|
|
@ -352,30 +380,26 @@ static char *translate(
|
|||
for(i = 0; i < 2; i++)
|
||||
{
|
||||
FREE(out_conn[i]);
|
||||
|
||||
out_conn[i] = NULL;
|
||||
}
|
||||
out_conn[i] = NULL;
|
||||
}
|
||||
|
||||
FREE(out_conn);
|
||||
|
||||
out_conn = NULL;
|
||||
|
||||
for(i = 0; i < num_conns; i++)
|
||||
{
|
||||
FREE(in_conn[i]);
|
||||
|
||||
in_conn[i] = NULL;
|
||||
}
|
||||
in_conn[i] = NULL;
|
||||
}
|
||||
|
||||
FREE(in_conn);
|
||||
|
||||
in_conn = NULL;
|
||||
|
||||
for(i = 0; i < num_coefs; i++)
|
||||
{
|
||||
FREE(coef[i]);
|
||||
coef[i] = NULL;
|
||||
}
|
||||
FREE(coef[i]);
|
||||
coef[i] = NULL;
|
||||
}
|
||||
|
||||
FREE(coef);
|
||||
|
||||
|
|
@ -384,9 +408,11 @@ static char *translate(
|
|||
/* Return NULL to indicate no error */
|
||||
return(NULL);
|
||||
|
||||
} /* translate */
|
||||
} /* two2three_translate */
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*
|
||||
get_poly_dimension()
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ void icm_poly (Mif_Private_t *private)
|
|||
|
||||
double *acgains; /* Static variable holding AC gains for AC analysis */
|
||||
|
||||
/* debug statement */
|
||||
printf("In icm_poly!!! . . . .\n");
|
||||
|
||||
/* Get number of input values */
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,10 @@ card *current; /* the card we are to parse */
|
|||
Mif_Status_t status; /* return status */
|
||||
Mif_Token_Type_t next_token_type; /* the type of the next token */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In MIF_INP2A, line to process = %s . . . \n", current->line);
|
||||
#endif
|
||||
|
||||
/* get the line text from the card struct */
|
||||
|
||||
|
|
@ -169,7 +173,6 @@ card *current; /* the card we are to parse */
|
|||
name = MIFgettok(&line);
|
||||
INPinsert(&name, tab);
|
||||
|
||||
|
||||
/* locate the last token on the line and put it into "model" */
|
||||
|
||||
while(*line != '\0')
|
||||
|
|
@ -190,6 +193,13 @@ card *current; /* the card we are to parse */
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In MIF_INP2A, after tokenizing, name = %s, model = %s\n",
|
||||
name, model);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* get the integer index into the DEVices data array for this */
|
||||
/* model */
|
||||
|
|
@ -883,3 +893,12 @@ MIFget_port(
|
|||
*status = MIF_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -85,12 +85,14 @@ defaulted later by MIFsetup(). The function returns NULL when
|
|||
successful, and an error string on failure.
|
||||
*/
|
||||
|
||||
/* char *MIFgetMod(ckt,name,model,tab) */ /* former buggy calling method */
|
||||
|
||||
char *MIFgetMod(ckt,name,model,tab)
|
||||
void *ckt; /* The circuit structure */
|
||||
char *name; /* The name of the model to look for */
|
||||
INPmodel **model; /* The model found/created */
|
||||
INPtables *tab; /* Table of model info from first pass */
|
||||
char *MIFgetMod(
|
||||
void *ckt, /* The circuit structure */
|
||||
char *name, /* The name of the model to look for */
|
||||
INPmodel **model, /* The model found/created */
|
||||
INPtables *tab /* Table of model info from first pass */
|
||||
)
|
||||
{
|
||||
INPmodel *modtmp;
|
||||
IFvalue * val;
|
||||
|
|
@ -111,6 +113,10 @@ char *MIFgetMod(ckt,name,model,tab)
|
|||
|
||||
/* locate the named model in the modtab list */
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In MIFgetMod, model name = %s . . .\n", name);
|
||||
#endif
|
||||
|
||||
/* maschmann : remove : from name */
|
||||
|
||||
|
|
@ -120,6 +126,11 @@ char *MIFgetMod(ckt,name,model,tab)
|
|||
|
||||
for (modtmp = modtab; modtmp != NULL; modtmp = ((modtmp)->INPnextModel)) {
|
||||
|
||||
#ifdef TRACE
|
||||
/* SDB debug statement */
|
||||
printf("In MIFgetMod, checking model against stored model = %s . . .\n", (modtmp)->INPmodName );
|
||||
#endif
|
||||
|
||||
if (strcmp((modtmp)->INPmodName,name) == 0) {
|
||||
|
||||
|
||||
|
|
@ -131,7 +142,12 @@ char *MIFgetMod(ckt,name,model,tab)
|
|||
if(modtmp->INPmodType<0) {
|
||||
/* illegal device type, so can't handle */
|
||||
*model = NULL;
|
||||
err = (char *)tmalloc((35+strlen(name)) * sizeof(char));
|
||||
|
||||
/* fixed by SDB -- magic number is 39, not 35.
|
||||
* Also needed parens to correctly compute # of bytes to malloc
|
||||
*/
|
||||
err = (char *)tmalloc( (39+strlen(name)) * sizeof(char) );
|
||||
|
||||
sprintf(err, "MIF: Unknown device type for model %s \n",name);
|
||||
return(err);
|
||||
}
|
||||
|
|
@ -233,3 +249,4 @@ char *MIFgetMod(ckt,name,model,tab)
|
|||
|
||||
return(err);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue