Applied Widlok patch (inp2dot.c and inpdoopt.c) and support for u2 function
This commit is contained in:
parent
fbfd009182
commit
808021fef2
|
|
@ -1,8 +1,10 @@
|
|||
2000-05-21 Paolo Nenzi <p.nenzi@ieee.org>
|
||||
|
||||
* inp2r.c: Modified ac parameter parsing code to conform to
|
||||
spice parameter parsing format
|
||||
2000-05-22 Paolo Nenzi <p.nenzi@ieee.org>
|
||||
|
||||
* inp2dot.c: Applied Widlok patch.
|
||||
* inpdoopt.c: Applied Widolok patch:commented the entire function,
|
||||
seems obsolete.
|
||||
* inpptree.c, ptfuncs.c: Applied Widlok patch. Now there is a
|
||||
new step function called u2.
|
||||
2000-04-04 Paolo Nenzi <p.nenzi@ieee.org>
|
||||
|
||||
* inpfindl.c: Modified the file for BSIM4 and future extensions to
|
||||
|
|
|
|||
|
|
@ -448,14 +448,18 @@ char *word; /* something to stick a word of input into */
|
|||
/* not allowed to pay attention to additional input - return */
|
||||
return(1);
|
||||
/*NOTREACHED*/
|
||||
/* MW. .options is handled before - this is not needed
|
||||
} else if ( (strcmp(token,".options")==0) ||
|
||||
(strcmp(token,".option")==0) ||
|
||||
(strcmp(token,".opt")==0) ){
|
||||
/* .option - specify program options - rather complicated */
|
||||
/* use a subroutine to handle all of them to keep this */
|
||||
/* subroutine managable */
|
||||
* .option - specify program options - rather complicated /
|
||||
* use a subroutine to handle all of them to keep this /
|
||||
* subroutine managable /
|
||||
INPdoOpts(ckt,ft_curckt->ci_curOpt,current,tab);
|
||||
return(0);
|
||||
INPdoOpts is never called (I hope) */
|
||||
|
||||
|
||||
} else if (strcmp(token, ".sens") == 0) {
|
||||
which = -1; /* Bug fix from Glao Dezai */
|
||||
for(i=0;i<ft_sim->numAnalyses;i++) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
/* MW. this is never called - look at inp2dot.c
|
||||
void
|
||||
INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab)
|
||||
{
|
||||
|
|
@ -44,7 +45,7 @@ INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab)
|
|||
return;
|
||||
}
|
||||
line = optCard->line;
|
||||
INPgetTok(&line,&token,1); /* throw away '.option' */
|
||||
INPgetTok(&line,&token,1); * throw away '.option' *
|
||||
while (*line) {
|
||||
INPgetTok(&line,&token,1);
|
||||
for(i=0;i<prm->numParms;i++) {
|
||||
|
|
@ -80,3 +81,4 @@ INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab)
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -77,7 +77,9 @@ static struct func {
|
|||
{ "tanh", PTF_TANH, PTtanh } ,
|
||||
{ "u", PTF_USTEP, PTustep } ,
|
||||
{ "uramp", PTF_URAMP, PTuramp } ,
|
||||
{ "-", PTF_UMINUS, PTuminus }
|
||||
{ "-", PTF_UMINUS, PTuminus },
|
||||
/* MW. cif function added */
|
||||
{ "u2", PTF_USTEP2, PTustep2}
|
||||
} ;
|
||||
|
||||
#define NUM_FUNCS (sizeof (funcs) / sizeof (struct func))
|
||||
|
|
@ -329,6 +331,11 @@ PTdifferentiate(INPparseNode *p, int varnum)
|
|||
arg1 = mkf(PTF_USTEP, p->left);
|
||||
break;
|
||||
|
||||
/* MW. PTF_CIF for new cif function */
|
||||
case PTF_USTEP2:
|
||||
arg1 = mkcon((double) 0.0);
|
||||
break;
|
||||
|
||||
case PTF_UMINUS: /* - 1 ; like a constant (was 0 !) */
|
||||
arg1 = mkcon((double) - 1.0);
|
||||
break;
|
||||
|
|
@ -896,6 +903,10 @@ PTlexer(char **line)
|
|||
char *sbuf, *s;
|
||||
|
||||
sbuf = *line;
|
||||
#ifdef notdef
|
||||
printf("entering lexer, sbuf = '%s', lastoken = %d, lasttype = %d\n",
|
||||
sbuf, lasttoken, lasttype);
|
||||
#endif
|
||||
while ((*sbuf == ' ') || (*sbuf == '\t') || (*sbuf == '='))
|
||||
sbuf++;
|
||||
|
||||
|
|
@ -987,7 +998,7 @@ PTlexer(char **line)
|
|||
return (&el);
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef notdef
|
||||
|
||||
/* Debugging stuff. */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue