Add default model selection to diode, modify some commenmts
This commit is contained in:
parent
3f904908cc
commit
96d1badb0b
|
|
@ -1158,7 +1158,7 @@ inp_dodeck(
|
|||
#endif
|
||||
|
||||
if (dd->warning) {
|
||||
out_printf("Caution for line %d :\n %s\n%s\n",
|
||||
out_printf("Warning for line %d:\n %s\n%s\n",
|
||||
dd->linenum_orig, dd->line, dd->warning);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8692,7 +8692,7 @@ static void inp_rem_unused_models(struct nscope *root, struct card *deck)
|
|||
mark_all_binned(m->model->level, elem_model_name);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "warning, can't find model %s\n\n",
|
||||
fprintf(stderr, "\nWarning, can't find model %s\n",
|
||||
elem_model_name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,14 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname2, tab, &node2);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
char* errormsg = INPgetMod(ckt, model, &thismodel, tab);
|
||||
/* If ft_usedefmodel, just issue a warning and continue
|
||||
with default model parameters */
|
||||
if (ft_usedefmodel)
|
||||
current->warning = errormsg;
|
||||
/* If current->error is set, ngspice will stop */
|
||||
else
|
||||
current->error = errormsg;
|
||||
if (thismodel != NULL) {
|
||||
if ((mytype != thismodel->INPmodType)
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid of default model */
|
||||
char* errormsg;
|
||||
|
||||
line = current->line;
|
||||
INPgetNetTok(&line, &name, 1);
|
||||
|
|
@ -47,9 +46,12 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname3, tab, &node3);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
errormsg = INPgetMod(ckt, model, &thismodel, tab);
|
||||
char *errormsg = INPgetMod(ckt, model, &thismodel, tab);
|
||||
/* If ft_usedefmodel, just issue a warning and continue
|
||||
with default model parameters */
|
||||
if (ft_usedefmodel)
|
||||
current->warning = errormsg;
|
||||
/* If current->error is set, ngspice will stop */
|
||||
else
|
||||
current->error = errormsg;
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue