diff --git a/src/maths/ni/niconv.c b/src/maths/ni/niconv.c index 5d24a23bf..355fa5bd8 100644 --- a/src/maths/ni/niconv.c +++ b/src/maths/ni/niconv.c @@ -81,6 +81,15 @@ NIconvTest(CKTcircuit *ckt) #ifdef NEWCONV i = CKTconvTest(ckt); + /* The individual testers, called by CKTconvTest, set + * ckt->CKTnoncon and ckt->CKTtroubleElt appropriately. */ + if (ckt->CKTnoncon != 0) { + ckt->CKTtroubleNode = 0; + return(1); + } + /* CKTconvTest early-returns nonzero 'i' on the first error + * in evaluating convergence (such as parameter out of range) so + * there may be untested devices that have not yet converged */ if (i) ckt->CKTtroubleNode = 0; return(i); diff --git a/src/spicelib/devices/asrc/asrcconv.c b/src/spicelib/devices/asrc/asrcconv.c index 4fa584a74..459838797 100644 --- a/src/spicelib/devices/asrc/asrcconv.c +++ b/src/spicelib/devices/asrc/asrcconv.c @@ -32,7 +32,7 @@ ASRCconvTest(GENmodel *inModel, CKTcircuit *ckt) } for (i = 0; i < here->ASRCtree->numVars; i++) - asrc_vals[i] = ckt->CKTrhsOld[here->ASRCvars[i]]; + asrc_vals[i] = ckt->CKTrhs[here->ASRCvars[i]]; if (here->ASRCtree->IFeval(here->ASRCtree, ckt->CKTgmin, &rhs, asrc_vals, asrc_derivs) != OK) diff --git a/tests/regression/misc/Makefile.am b/tests/regression/misc/Makefile.am index 5c9ac9d80..d485a8f10 100644 --- a/tests/regression/misc/Makefile.am +++ b/tests/regression/misc/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in -TESTS = bugs-1.cir bugs-2.cir dollar-1.cir empty-1.cir resume-1.cir log-functions-1.cir alter-vec.cir test-noise-2.cir test-noise-3.cir ac-zero.cir asrc-tc-1.cir asrc-tc-2.cir if-elseif.cir +TESTS = bugs-1.cir bugs-2.cir dollar-1.cir empty-1.cir resume-1.cir log-functions-1.cir alter-vec.cir test-noise-2.cir test-noise-3.cir ac-zero.cir asrc-tc-1.cir asrc-tc-2.cir if-elseif.cir convergence.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice