Browse Source

* circuit/inp2b.c, circuit/inp2c.c, circuit/inp2d.c,


			
			
				pre-master-46
			
			
		
arno 26 years ago
parent
commit
f3ae54bea6
  1. 91
      src/circuit/ChangeLog
  2. 10
      src/circuit/inp2b.c
  3. 20
      src/circuit/inp2c.c
  4. 14
      src/circuit/inp2d.c
  5. 58
      src/circuit/inp2dot.c
  6. 18
      src/circuit/inp2e.c
  7. 18
      src/circuit/inp2f.c
  8. 18
      src/circuit/inp2g.c
  9. 18
      src/circuit/inp2h.c
  10. 14
      src/circuit/inp2i.c
  11. 16
      src/circuit/inp2j.c
  12. 18
      src/circuit/inp2k.c
  13. 14
      src/circuit/inp2l.c
  14. 20
      src/circuit/inp2m.c
  15. 14
      src/circuit/inp2o.c
  16. 18
      src/circuit/inp2q.c
  17. 31
      src/circuit/inp2r.c
  18. 16
      src/circuit/inp2s.c
  19. 14
      src/circuit/inp2t.c
  20. 12
      src/circuit/inp2u.c
  21. 14
      src/circuit/inp2v.c
  22. 14
      src/circuit/inp2w.c
  23. 16
      src/circuit/inp2z.c

91
src/circuit/ChangeLog

@ -1,63 +1,83 @@
2000-07-07 Arno W. Peters <A.W.Peters@ieee.org>
* circuit/inp2b.c, circuit/inp2c.c, circuit/inp2d.c,
circuit/inp2dot.c, circuit/inp2e.c, circuit/inp2f.c,
circuit/inp2g.c, circuit/inp2h.c, circuit/inp2i.c,
circuit/inp2j.c, circuit/inp2k.c, circuit/inp2l.c,
circuit/inp2m.c, circuit/inp2o.c, circuit/inp2q.c,
circuit/inp2r.c, circuit/inp2s.c, circuit/inp2t.c,
circuit/inp2u.c, circuit/inp2v.c, circuit/inp2w.c,
circuit/inp2z.c: Added ; after macros.
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.
* 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
BSIM5 and BSIM6. I have merged the inpfindl.c coming
with the BSIM4 distribution.
* inp2r.c: Added acval=val to initialize the acval parameter to
a significative value. Hope does not brak anything.
* inp2m.c: Added BSIM4 support.
* inpdomod.c: Added support for BSIM4 device model.
2000-03-28 Paolo Nenzi <p.nenzi@ieee.org>
* ptfuncs.c: I have applied a couple of patches by GLAO Dezay. He noted
that PTln, PTlog and PTsqrt returned non consistent values
if the argument was out of domain. If arg <0 they returned
f(-arg). The patch is masked by #ifdef EXPERIMENTAL_CODE.
You have to remove these lines or #define it to compile
Dezai's patched code.
* ptfuncs.c: I have applied a couple of patches by GLAO Dezay. He
noted that PTln, PTlog and PTsqrt returned non consistent values
if the argument was out of domain. If arg <0 they returned
f(-arg). The patch is masked by #ifdef EXPERIMENTAL_CODE. You
have to remove these lines or #define it to compile Dezai's
patched code.
2000-03-11 Paolo Nenzi <p.nenzi@ieee.org>
* inp2dot.c: Applied Glao Dezai patch, adding which = -1 in the .sens code.
* inp2dot.c: Applied Glao Dezai patch, adding which = -1 in the
.sens code.
2000-01-17 Paolo Nenzi <p.nenzi@ieee.org>
* inp2m.c, inpdomod.c: Inserted code to dupport BSIM3V1 model as
level 49.
* inp2m.c, inpdomod.c: Inserted code to dupport BSIM3V1 model as
level 49.
2000-01-16 Paolo Nenzi <p.nenzi@ieee.org>
* inp2r.c: Modified resistor code. Added ac value (ala HSPICE), from
Serban Popescu contributed sources.
* inp2r.c: Modified resistor code. Added ac value (ala HSPICE),
from Serban Popescu contributed sources.
2000-01-15 Paolo Nenzi <p.nenzi@ieee.org>
* inp2m.c, inpdomod.c : Inserted code to support BSIM3V2 model as
level 50.
* inp2m.c, inpdomod.c: Inserted code to support BSIM3V2 model as
level 50.
1999-12-20 Paolo Nenzi <p.nenzi@ieee.org>
* inpgtok.c, inpptree.c: Bug Fix
Bug: Scale factors (eg. m, k, meg, etc.) for constants in arbitrary
source (b devices) are not recognized.
Fix: Changes to inpgtok.c and inpptree.c, as supplied by Berkeley.
NOTE: These changes were orignally supplied to me as a patch to 3e2
by Beorn Johnson who was maintaining Spice a while back. They were
supposed to have been incorporated in Spice 3f2 at that time, but are
missing from the 3f5 version that I recently got from Berkeley. I
don't know if they were removed in ignorance or because of a conflict
with some other requirement, but they appear to work in 3f5. ALSO,
the fix for 3e2 had many more changes, all of which remain in 3f5, so
don't try these alone on 3e2.
* inpgtok.c, inpptree.c: Bug Fix
Bug: Scale factors (eg. m, k, meg, etc.) for constants in
arbitrary source (b devices) are not recognized.
Fix: Changes to inpgtok.c and inpptree.c, as supplied by Berkeley.
NOTE: These changes were orignally supplied to me as a patch to
3e2 by Beorn Johnson who was maintaining Spice a while back. They
were supposed to have been incorporated in Spice 3f2 at that time,
but are missing from the 3f5 version that I recently got from
Berkeley. I don't know if they were removed in ignorance or
because of a conflict with some other requirement, but they appear
to work in 3f5. ALSO, the fix for 3e2 had many more changes, all
of which remain in 3f5, so don't try these alone on 3e2.
1999-09-07 Arno <A.W.Peters@ieee.org>
@ -67,8 +87,8 @@
1999-09-05 Emmanuel Rouat <emmanuel.rouat@wanadoo.fr>
* inpptree.c (PTdifferentiate): removed superfluous argument
to 2 occurences of function mkf
* inpptree.c (PTdifferentiate): removed superfluous argument to 2
occurences of function mkf
* *.c: put all function prototypes in inp.h
@ -81,6 +101,7 @@
* inpdomod.c: added level check for ps model, jfet level 2
* inp2j.c: added code for ps model, jfet level 2
1999-08-08 Emmanuel Rouat <emmanuel.rouat@wanadoo.fr>
* inp2dot.c (INP2dot):changed HAS_SENSE2 in WANT_SENSE2

10
src/circuit/inp2b.c

@ -49,10 +49,10 @@ void INP2B(void *ckt, INPtables * tab, card * current)
if (!tab->defBmod) {
/* create default B model */
IFnewUid(ckt, &uid, (IFuid) NULL, "B", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defBmod), uid))
IFC(newModel, (ckt, type, &(tab->defBmod), uid));
}
IFC(newInstance, (ckt, tab->defBmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
IFC(newInstance, (ckt, tab->defBmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
}

20
src/circuit/inp2c.c

@ -55,10 +55,10 @@ void INP2C(void *ckt, INPtables * tab, card * current)
if (!tab->defCmod) {
IFnewUid(ckt, &uid, (IFuid) NULL, "C", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defCmod), uid))
IFC(newModel, (ckt, type, &(tab->defCmod), uid));
}
IFC(newInstance, (ckt, tab->defCmod, &fast, name))
GCA(INPpName, ("capacitance", &ptemp, ckt, type, fast))
IFC(newInstance, (ckt, tab->defCmod, &fast, name));
GCA(INPpName, ("capacitance", &ptemp, ckt, type, fast));
} else { /* looks like character strings */
INPgetTok(&line, &model, 1);
INPinsert(&model, tab);
@ -76,17 +76,17 @@ void INP2C(void *ckt, INPtables * tab, card * current)
if (!tab->defCmod) {
IFnewUid(ckt, &uid, (IFuid) NULL, "C", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defCmod), uid))
IFC(newModel, (ckt, type, &(tab->defCmod), uid));
}
mdfast = tab->defCmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(newInstance, (ckt, mdfast, &fast, name));
}
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("capacitance", &ptemp, ckt, type, fast))
GCA(INPpName, ("capacitance", &ptemp, ckt, type, fast));
}
}

14
src/circuit/inp2d.c

@ -62,16 +62,16 @@ void INP2D(void *ckt, INPtables * tab, card * current)
/* create default D model */
IFnewUid(ckt, &uid, (IFuid) NULL, "D", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defDmod), uid))
IFC(newModel, (ckt, type, &(tab->defDmod), uid));
}
mdfast = tab->defDmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("area", &ptemp, ckt, type, fast))
GCA(INPpName, ("area", &ptemp, ckt, type, fast));
}
}

58
src/circuit/inp2dot.c

@ -49,9 +49,8 @@ dot_nodeset(char *line, void *ckt, INPtables *tab, card *current,
INPgetTok(&line, &name, 1);
INPtermInsert(ckt, &name, tab, &node1);
ptemp.rValue = INPevaluate(&line, &error, 1);
IFC(setNodeParm,
(ckt, node1, which, &ptemp,
(IFvalue *) NULL)) continue;
IFC(setNodeParm, (ckt, node1, which, &ptemp, (IFvalue *) NULL));
continue;
}
LITERR(" Error: .nodeset syntax error.\n");
break;
@ -273,9 +272,8 @@ dot_ic(char *line, void *ckt, INPtables *tab, card *current,
INPgetTok(&line, &name, 1);
INPtermInsert(ckt, &name, tab, &node1);
ptemp.rValue = INPevaluate(&line, &error, 1);
IFC(setNodeParm,
(ckt, node1, which, &ptemp,
(IFvalue *) NULL)) continue;
IFC(setNodeParm, (ckt, node1, which, &ptemp, (IFvalue *) NULL));
continue;
}
LITERR(" Error: .ic syntax error.\n");
break;
@ -307,17 +305,17 @@ dot_ac(char *line, void *ckt, INPtables *tab, card *current,
LITERR("AC small signal analysis unsupported.\n");
return (0);
}
IFC(newAnalysis, (ckt, which, "AC Analysis", &foo, task))
INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */
IFC(newAnalysis, (ckt, which, "AC Analysis", &foo, task));
INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */
ptemp.iValue = 1;
GCA(INPapName, (ckt, which, foo, steptype, &ptemp))
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* number of points */
GCA(INPapName, (ckt, which, foo, "numsteps", parm))
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */
GCA(INPapName, (ckt, which, foo, "start", parm))
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */
GCA(INPapName, (ckt, which, foo, "stop", parm))
return (0);
GCA(INPapName, (ckt, which, foo, steptype, &ptemp));
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* number of points */
GCA(INPapName, (ckt, which, foo, "numsteps", parm));
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */
GCA(INPapName, (ckt, which, foo, "start", parm));
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */
GCA(INPapName, (ckt, which, foo, "stop", parm));
return (0);
}
static int
@ -343,22 +341,22 @@ dot_pz(char *line, void *ckt, INPtables *tab, card *current,
LITERR("Pole-zero analysis unsupported.\n");
return (0);
}
IFC(newAnalysis, (ckt, which, "Pole-Zero Analysis", &foo, task))
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodei", parm))
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodeg", parm))
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodej", parm))
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodek", parm))
INPgetTok(&line, &steptype, 1); /* get V or I */
IFC(newAnalysis, (ckt, which, "Pole-Zero Analysis", &foo, task));
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodei", parm));
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodeg", parm));
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodej", parm));
parm = INPgetValue(ckt, &line, IF_NODE, tab);
GCA(INPapName, (ckt, which, foo, "nodek", parm));
INPgetTok(&line, &steptype, 1); /* get V or I */
ptemp.iValue = 1;
GCA(INPapName, (ckt, which, foo, steptype, &ptemp))
INPgetTok(&line, &steptype, 1); /* get POL, ZER, or PZ */
GCA(INPapName, (ckt, which, foo, steptype, &ptemp));
INPgetTok(&line, &steptype, 1); /* get POL, ZER, or PZ */
ptemp.iValue = 1;
GCA(INPapName, (ckt, which, foo, steptype, &ptemp))
return (0);
GCA(INPapName, (ckt, which, foo, steptype, &ptemp));
return (0);
}

18
src/circuit/inp2e.c

@ -53,16 +53,16 @@ void INP2E(void *ckt, INPtables * tab, card * current)
if (!tab->defEmod) {
/* create default E model */
IFnewUid(ckt, &uid, (IFuid) NULL, "E", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defEmod), uid))
IFC(newModel, (ckt, type, &(tab->defEmod), uid));
}
IFC(newInstance, (ckt, tab->defEmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defEmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("gain", &ptemp, ckt, type, fast))
GCA(INPpName, ("gain", &ptemp, ckt, type, fast));
}
}

18
src/circuit/inp2f.c

@ -46,16 +46,16 @@ void INP2F(void *ckt, INPtables * tab, card * current)
if (!tab->defFmod) {
/* create default F model */
IFnewUid(ckt, &uid, (IFuid) NULL, "F", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defFmod), uid))
IFC(newModel, (ckt, type, &(tab->defFmod), uid));
}
IFC(newInstance, (ckt, tab->defFmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("control", parm, ckt, type, fast))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defFmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("control", parm, ckt, type, fast));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("gain", &ptemp, ckt, type, fast))
GCA(INPpName, ("gain", &ptemp, ckt, type, fast));
}
}

18
src/circuit/inp2g.c

@ -53,16 +53,16 @@ void INP2G(void *ckt, INPtables * tab, card * current)
if (!tab->defGmod) {
/* create default G model */
IFnewUid(ckt, &uid, (IFuid) NULL, "G", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defGmod), uid))
IFC(newModel, (ckt, type, &(tab->defGmod), uid));
}
IFC(newInstance, (ckt, tab->defGmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defGmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("gain", &ptemp, ckt, type, fast))
GCA(INPpName, ("gain", &ptemp, ckt, type, fast));
}
}

18
src/circuit/inp2h.c

@ -46,16 +46,16 @@ void INP2H(void *ckt, INPtables * tab, card * current)
if (!tab->defHmod) {
/* create default H model */
IFnewUid(ckt, &uid, (IFuid) NULL, "H", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defHmod), uid))
IFC(newModel, (ckt, type, &(tab->defHmod), uid));
}
IFC(newInstance, (ckt, tab->defHmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("control", parm, ckt, type, fast))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defHmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("control", parm, ckt, type, fast));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("gain", &ptemp, ckt, type, fast))
GCA(INPpName, ("gain", &ptemp, ckt, type, fast));
}
}

14
src/circuit/inp2i.c

@ -46,14 +46,14 @@ void INP2I(void *ckt, INPtables * tab, card * current)
if (!tab->defImod) {
/* create default I model */
IFnewUid(ckt, &uid, (IFuid) NULL, "I", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defImod), uid))
IFC(newModel, (ckt, type, &(tab->defImod), uid));
}
IFC(newInstance, (ckt, tab->defImod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defImod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("dc", &ptemp, ckt, type, fast))
GCA(INPpName, ("dc", &ptemp, ckt, type, fast));
}
}

16
src/circuit/inp2j.c

@ -67,17 +67,17 @@ void INP2J(void *ckt, INPtables * tab, card * current)
/* create default J model */
IFnewUid(ckt, &uid, (IFuid) NULL, "J", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defJmod), uid))
IFC(newModel, (ckt, type, &(tab->defJmod), uid));
}
mdfast = tab->defJmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("area", &ptemp, ckt, type, fast))
GCA(INPpName, ("area", &ptemp, ckt, type, fast));
}
}

18
src/circuit/inp2k.c

@ -38,18 +38,18 @@ void INP2K(void *ckt, INPtables * tab, card * current)
if (!tab->defKmod) {
/* create deafult K model */
IFnewUid(ckt, &uid, (IFuid) NULL, "K", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defKmod), uid))
IFC(newModel, (ckt, type, &(tab->defKmod), uid));
}
IFC(newInstance, (ckt, tab->defKmod, &fast, name))
IFC(newInstance, (ckt, tab->defKmod, &fast, name));
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("inductor1", parm, ckt, type, fast))
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("inductor2", parm, ckt, type, fast))
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("inductor1", parm, ckt, type, fast));
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
GCA(INPpName, ("inductor2", parm, ckt, type, fast));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("coefficient", &ptemp, ckt, type, fast))
GCA(INPpName, ("coefficient", &ptemp, ckt, type, fast));
}
}

14
src/circuit/inp2l.c

@ -45,14 +45,14 @@ void INP2L(void *ckt, INPtables * tab, card * current)
if (!tab->defLmod) {
/* create default L model */
IFnewUid(ckt, &uid, (IFuid) NULL, "L", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defLmod), uid))
IFC(newModel, (ckt, type, &(tab->defLmod), uid));
}
IFC(newInstance, (ckt, tab->defLmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defLmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("inductance", &ptemp, ckt, type, fast))
GCA(INPpName, ("inductance", &ptemp, ckt, type, fast));
}
}

20
src/circuit/inp2m.c

@ -84,17 +84,17 @@ void INP2M(void *ckt, INPtables * tab, card * current)
/* create default M model */
IFnewUid(ckt, &uid, (IFuid) NULL, "M", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defMmod), uid))
IFC(newModel, (ckt, type, &(tab->defMmod), uid));
}
mdfast = tab->defMmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
LITERR(" error: no unlabeled parameter permitted on mosfet\n");
}
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
LITERR(" error: no unlabeled parameter permitted on mosfet\n");
}
}

14
src/circuit/inp2o.c

@ -78,14 +78,14 @@ void INP2O(void *ckt, INPtables * tab, card * current)
/* create default O model */
IFnewUid(ckt, &uid, (IFuid) NULL, "O", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defOmod), uid))
IFC(newModel, (ckt, type, &(tab->defOmod), uid));
}
mdfast = tab->defOmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
}

18
src/circuit/inp2q.c

@ -78,18 +78,18 @@ void INP2Q(void *ckt, INPtables * tab, card * current, void *gnode)
/* create default Q model */
IFnewUid(ckt, &uid, (IFuid) NULL, "Q", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defQmod), uid))
IFC(newModel, (ckt, type, &(tab->defQmod), uid));
}
mdfast = tab->defQmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("area", &ptemp, ckt, type, fast))
GCA(INPpName, ("area", &ptemp, ckt, type, fast));
}
}

31
src/circuit/inp2r.c

@ -63,8 +63,10 @@ void INP2R(void *ckt, INPtables * tab, card * current)
INPgetTok(&line, &model, 1);
if (*model) { /* token isn't null */
if (INPlookMod(model)) { /* If this is a valid model connect it */
if (*model) {
/* token isn't null */
if (INPlookMod(model)) {
/* If this is a valid model connect it */
INPinsert(&model, tab);
thismodel = (INPmodel *) NULL;
current->error = INPgetMod(ckt, model, &thismodel, tab);
@ -76,27 +78,28 @@ void INP2R(void *ckt, INPtables * tab, card * current)
mdfast = thismodel->INPmodfast;
type = thismodel->INPmodType;
}
} else { /* It is not a model */
} else {
/* It is not a model */
line = saveline; /* go back */
type = mytype;
if (!tab->defRmod) { /* create default R model */
IFnewUid(ckt, &uid, (IFuid) NULL, "R", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defRmod), uid))
IFC(newModel, (ckt, type, &(tab->defRmod), uid));
}
mdfast = tab->defRmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
} else { /* The token is null and a default model will be created */
IFC(newInstance, (ckt, mdfast, &fast, name));
} else {
/* The token is null and a default model will be created */
type = mytype;
if (!tab->defRmod) {
/* create default R model */
IFnewUid(ckt, &uid, (IFuid) NULL, "R", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defRmod), uid))
IFC(newModel, (ckt, type, &(tab->defRmod), uid));
}
IFC(newInstance, (ckt, tab->defRmod, &fast, name))
IFC(newInstance, (ckt, tab->defRmod, &fast, name));
}
if (error1 == 0) { /* got a resistance above */
@ -104,12 +107,12 @@ void INP2R(void *ckt, INPtables * tab, card * current)
GCA(INPpName, ("resistance", &ptemp, ckt, type, fast))
}
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("resistance", &ptemp, ckt, type, fast))
GCA(INPpName, ("resistance", &ptemp, ckt, type, fast));
}
return;
}

16
src/circuit/inp2s.c

@ -70,17 +70,17 @@ void INP2S(void *ckt, INPtables * tab, card * current)
/* create deafult S model */
IFnewUid(ckt, &uid, (IFuid) NULL, "S", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defSmod), uid))
IFC(newModel, (ckt, type, &(tab->defSmod), uid));
}
mdfast = tab->defSmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
/* ignore a number */
}
}

14
src/circuit/inp2t.c

@ -54,12 +54,12 @@ void INP2T(void *ckt, INPtables * tab, card * current)
if (!tab->defTmod) {
/* create deafult T model */
IFnewUid(ckt, &uid, (IFuid) NULL, "T", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defTmod), uid))
IFC(newModel, (ckt, type, &(tab->defTmod), uid));
}
IFC(newInstance, (ckt, tab->defTmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
IFC(bindNode, (ckt, fast, 4, node4))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
IFC(newInstance, (ckt, tab->defTmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
}

12
src/circuit/inp2u.c

@ -65,13 +65,13 @@ void INP2U(void *ckt, INPtables * tab, card * current)
/* create deafult U model */
IFnewUid(ckt, &uid, (IFuid) NULL, "U", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defUmod), uid))
IFC(newModel, (ckt, type, &(tab->defUmod), uid));
}
mdfast = tab->defUmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
}

14
src/circuit/inp2v.c

@ -46,14 +46,14 @@ void INP2V(void *ckt, INPtables * tab, card * current)
if (!tab->defVmod) {
/* create default V model */
IFnewUid(ckt, &uid, (IFuid) NULL, "V", UID_MODEL, (void **) NULL);
IFC(newModel, (ckt, type, &(tab->defVmod), uid))
IFC(newModel, (ckt, type, &(tab->defVmod), uid));
}
IFC(newInstance, (ckt, tab->defVmod, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, tab->defVmod, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("dc", &ptemp, ckt, type, fast))
GCA(INPpName, ("dc", &ptemp, ckt, type, fast));
}
}

14
src/circuit/inp2w.c

@ -67,17 +67,17 @@ void INP2W(void *ckt, INPtables * tab, card * current)
/* create deafult W model */
IFnewUid(ckt, &uid, (IFuid) NULL, "W", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defWmod), uid))
IFC(newModel, (ckt, type, &(tab->defWmod), uid));
}
mdfast = tab->defWmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(newInstance, (ckt, mdfast, &fast, name));
GCA(INPpName, ("control", &ptemp, ckt, type, fast))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
GCA(INPpName, ("control", &ptemp, ckt, type, fast));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
/* ignore a number */
}
}

16
src/circuit/inp2z.c

@ -67,17 +67,17 @@ void INP2Z(void *ckt, INPtables * tab, card * current)
/* create default Z model */
IFnewUid(ckt, &uid, (IFuid) NULL, "Z", UID_MODEL,
(void **) NULL);
IFC(newModel, (ckt, type, &(tab->defZmod), uid))
IFC(newModel, (ckt, type, &(tab->defZmod), uid));
}
mdfast = tab->defZmod;
}
IFC(newInstance, (ckt, mdfast, &fast, name))
IFC(bindNode, (ckt, fast, 1, node1))
IFC(bindNode, (ckt, fast, 2, node2))
IFC(bindNode, (ckt, fast, 3, node3))
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab))
if (waslead) {
IFC(newInstance, (ckt, mdfast, &fast, name));
IFC(bindNode, (ckt, fast, 1, node1));
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
ptemp.rValue = leadval;
GCA(INPpName, ("area", &ptemp, ckt, type, fast))
GCA(INPpName, ("area", &ptemp, ckt, type, fast));
}
}
Loading…
Cancel
Save