|
|
@ -32,7 +32,7 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, struct card *current) |
|
|
int error1; /* secondary error code temporary */ |
|
|
int error1; /* secondary error code temporary */ |
|
|
INPmodel *thismodel; /* pointer to model structure describing our model */ |
|
|
INPmodel *thismodel; /* pointer to model structure describing our model */ |
|
|
GENmodel *mdfast = NULL; /* pointer to the actual model */ |
|
|
GENmodel *mdfast = NULL; /* pointer to the actual model */ |
|
|
GENinstance *fast; /* pointer to the actual instance */ |
|
|
|
|
|
|
|
|
GENinstance *fast = NULL;/* pointer to the actual instance */ |
|
|
IFvalue ptemp; /* a value structure to package inductance into */ |
|
|
IFvalue ptemp; /* a value structure to package inductance into */ |
|
|
int waslead; /* flag to indicate that funny unlabeled number was found */ |
|
|
int waslead; /* flag to indicate that funny unlabeled number was found */ |
|
|
double leadval; /* actual value of unlabeled number */ |
|
|
double leadval; /* actual value of unlabeled number */ |
|
|
@ -49,15 +49,26 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, struct card *current) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
line = current->line; |
|
|
line = current->line; |
|
|
INPgetNetTok(&line, &name, 1); |
|
|
|
|
|
|
|
|
INPgetNetTok(&line, &name, 1); /* Lname */ |
|
|
|
|
|
if (*line == '\0') { |
|
|
|
|
|
fprintf(stderr, "\nWarning: '%s' is not a valid inductor instance line, ignored!\n\n", current->line); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
INPgetNetTok(&line, &nname1, 1); /* <node> */ |
|
|
|
|
|
if (*line == '\0') { |
|
|
|
|
|
fprintf(stderr, "\nWarning: '%s' is not a valid inductor instance line, ignored!\n\n", current->line); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
INPgetNetTok(&line, &nname2, 1); /* <node> */ |
|
|
|
|
|
if (*line == '\0') { |
|
|
|
|
|
fprintf(stderr, "\nWarning: '%s' is not a valid inductor instance line, ignored!\n\n", current->line); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
INPinsert(&name, tab); |
|
|
INPinsert(&name, tab); |
|
|
INPgetNetTok(&line, &nname1, 1); |
|
|
|
|
|
INPtermInsert(ckt, &nname1, tab, &node1); |
|
|
INPtermInsert(ckt, &nname1, tab, &node1); |
|
|
INPgetNetTok(&line, &nname2, 1); |
|
|
|
|
|
INPtermInsert(ckt, &nname2, tab, &node2); |
|
|
INPtermInsert(ckt, &nname2, tab, &node2); |
|
|
|
|
|
|
|
|
// val = INPevaluate(&line, &error1, 1); |
|
|
|
|
|
|
|
|
|
|
|
/* enable reading values like 4u7 */ |
|
|
/* enable reading values like 4u7 */ |
|
|
if (newcompat.lt) |
|
|
if (newcompat.lt) |
|
|
val = INPevaluateRKM_L(&line, &error1, 1); /* [<val>] */ |
|
|
val = INPevaluateRKM_L(&line, &error1, 1); /* [<val>] */ |
|
|
@ -110,7 +121,12 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, struct card *current) |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!fast || !fast->GENmodPtr) { |
|
|
|
|
|
fprintf(stderr, "\nWarning: Instance for inductor '%s' could not be set up properly, ignored!\n\n", current->line); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (error1 == 0) { /* Looks like a number */ |
|
|
if (error1 == 0) { /* Looks like a number */ |
|
|
ptemp.rValue = val; |
|
|
ptemp.rValue = val; |
|
|
GCA(INPpName, ("inductance", &ptemp, ckt, type, fast)); |
|
|
GCA(INPpName, ("inductance", &ptemp, ckt, type, fast)); |
|
|
|