emphasize the adms3 `U' device hijack
This commit is contained in:
parent
84b58ebd3b
commit
9b34d99e51
|
|
@ -33,6 +33,9 @@ void INP2W(CKTcircuit *ckt, INPtables *tab, card *current);
|
|||
void INP2Y(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2Z(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
|
||||
#if ADMS >= 3
|
||||
void INP2adms(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
#endif
|
||||
|
||||
/* ptfuncs.c */
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "ngspice/fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
#if ADMS >= 3
|
||||
|
||||
void INP2adms(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
/* Uname <node> <node> ... <model> [param1=<val1>] [param1=<val2>] ... */
|
||||
|
||||
char *line; /* the part of the current line left to parse */
|
||||
|
|
@ -29,7 +29,7 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
double leadval; /* actual value of unlabeled number */
|
||||
|
||||
#ifdef TRACE
|
||||
printf("INP2U: Parsing '%s'\n", current->line);
|
||||
printf("INP2adms: Parsing '%s'\n", current->line);
|
||||
#endif
|
||||
|
||||
nsize = 0;
|
||||
|
|
@ -43,7 +43,7 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
while(!INPlookMod(name) && (*line != '\0'))
|
||||
{
|
||||
#ifdef TRACE
|
||||
printf("INP2U: found node %s\n",name);
|
||||
printf("INP2adms: found node %s\n",name);
|
||||
#endif
|
||||
nsize++;
|
||||
node=TREALLOC(CKTnode*,node,nsize);
|
||||
|
|
@ -56,7 +56,7 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
thismodel = NULL;
|
||||
INPinsert(&name, tab);
|
||||
#ifdef TRACE
|
||||
printf("INP2U: found dynamic model %s\n",name);
|
||||
printf("INP2adms: found dynamic model %s\n",name);
|
||||
#endif
|
||||
current->error = INPgetMod(ckt, name, &thismodel, tab);
|
||||
if (thismodel == NULL) {
|
||||
|
|
@ -72,15 +72,21 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
}
|
||||
PARSECALL((&line, ckt, thismodel->INPmodType, fast, &leadval, &waslead, tab));
|
||||
#ifdef TRACE
|
||||
printf("INP2U: Looking up model done\n");
|
||||
printf("INP2adms: Looking up model done\n");
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "Unable to find definition of model %s\n", name);
|
||||
controlled_exit(EXIT_BAD);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
/* Uname <node> <node> <model> [l=<val>] [n=<val>] */
|
||||
|
||||
int mytype; /* the type my lookup says URC is */
|
||||
|
|
@ -141,5 +147,6 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
IFC(bindNode, (ckt, fast, 2, node2));
|
||||
IFC(bindNode, (ckt, fast, 3, node3));
|
||||
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* ADMS */
|
||||
|
|
|
|||
|
|
@ -221,7 +221,11 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
|
||||
case 'U':
|
||||
/* Uname <node> <node> <model> [l=<val>] [n=<val>] */
|
||||
#if ADMS >= 3
|
||||
INP2adms(ckt, tab, current);
|
||||
#else
|
||||
INP2U(ckt, tab, current);
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* Kspice addition - saj */
|
||||
|
|
|
|||
Loading…
Reference in New Issue