Browse Source

inp2m.c, #6/7, reorder code

pre-master-46
rlar 9 years ago
parent
commit
576e522d38
  1. 9
      src/spicelib/parser/inp2m.c

9
src/spicelib/parser/inp2m.c

@ -91,13 +91,14 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current)
INPtermInsert(ckt, &token, tab, &node[i]);
}
numnodes = i;
if (numnodes > model_numnodes(thismodel->INPmodType)) {
int model_numnodes_ = model_numnodes(thismodel->INPmodType);
if (i > model_numnodes_) {
LITERR ("too much nodes connected to instance");
return;
}
numnodes = i;
if (thismodel->INPmodType != INPtypelook("Mos1") &&
thismodel->INPmodType != INPtypelook("Mos2") &&
thismodel->INPmodType != INPtypelook("Mos3") &&
@ -139,8 +140,6 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current)
IFC (newInstance, (ckt, mdfast, &fast, name));
/* use type - not thismodel->INPmodType as it might not exist! */
int model_numnodes_ = model_numnodes(type);
for (i = 0; i < model_numnodes_; i++)
if (i < numnodes)
IFC (bindNode, (ckt, fast, i + 1, node[i]));

Loading…
Cancel
Save