diff --git a/src/ciderlib/support/misc.c b/src/ciderlib/support/misc.c index e96ed0ff0..3ef34ec17 100644 --- a/src/ciderlib/support/misc.c +++ b/src/ciderlib/support/misc.c @@ -134,16 +134,16 @@ foundError(int error) switch( error ) { /* Removed for Spice3e1 Compatibility case spSMALL_PIVOT: - printf( "Warning: LU Decomposition Problem - SMALL PIVOT\n" ); + fprintf(stderr, "Warning: LU Decomposition Problem - SMALL PIVOT\n" ); matrixError = FALSE; break; */ case spPANIC: - printf( "Error: LU Decomposition Failed - PANIC\n" ); + fprintf(stderr, "Error: LU Decomposition Failed - PANIC\n" ); matrixError = TRUE; break; case spSINGULAR: - printf( "Error: LU Decomposition Failed - SINGULAR\n" ); + fprintf(stderr, "Error: LU Decomposition Failed - SINGULAR\n" ); matrixError = TRUE; break; /* Removed for Spice3e1 Compatibility diff --git a/src/frontend/inp.c b/src/frontend/inp.c index 0df4e6eaa..682400818 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -1107,8 +1107,8 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) strstr(dd->line, " rms ") || strstr(dd->line, " integ ")) { - printf("Warning: .OPTION AUTOSTOP will not be effective because one of 'max|min|avg|rms|integ' is used in .meas\n"); - printf(" AUTOSTOP being disabled...\n"); + fprintf(stderr, "Warning: .OPTION AUTOSTOP will not be effective because one of 'max|min|avg|rms|integ' is used in .meas\n"); + fprintf(stderr, " AUTOSTOP being disabled...\n"); cp_remvar("autostop"); } } diff --git a/src/maths/ni/niiter.c b/src/maths/ni/niiter.c index f3e546c5a..e7c115836 100644 --- a/src/maths/ni/niiter.c +++ b/src/maths/ni/niiter.c @@ -55,7 +55,7 @@ NIiter(CKTcircuit *ckt, int maxIter) #endif if (ckt->CKTniState & NIUNINITIALIZED) { - error = NIreinit(ckt); + error = NIreinit(ckt); /* always returns 0 */ if (error) { #ifdef STEPDEBUG printf("re-init returned error \n"); diff --git a/src/spicelib/analysis/cktsetup.c b/src/spicelib/analysis/cktsetup.c index d858fca55..8b5141f50 100644 --- a/src/spicelib/analysis/cktsetup.c +++ b/src/spicelib/analysis/cktsetup.c @@ -151,7 +151,7 @@ CKTsetup(CKTcircuit *ckt) #ifdef KLU if (ckt->CKTmatrix->CKTkluMODE) { - fprintf (stderr, "Using KLU as Direct Linear Solver\n") ; + fprintf (stdout, "Using KLU as Direct Linear Solver\n") ; /* Convert the COO Storage to CSC for KLU and Fill the Binding Table */ SMPconvertCOOtoCSC (matrix) ; @@ -171,10 +171,12 @@ CKTsetup(CKTcircuit *ckt) BindNode.CSC = NULL ; BindNode.CSC_Complex = NULL ; matched = (BindElement *) bsearch (&BindNode, BindStruct, nz, sizeof (BindElement), BindCompare) ; - if (matched == NULL) { - printf ("Ptr %p not found in BindStruct Table\n", ckt->enh->rshunt_data.diag [i]) ; + if (!matched) { + fprintf (stderr, "Error: Ptr %p not found in BindStruct Table\n", ckt->enh->rshunt_data.diag [i]) ; + ckt->enh->rshunt_data.diag[i] = NULL; } - ckt->enh->rshunt_data.diag [i] = matched->CSC ; + else + ckt->enh->rshunt_data.diag [i] = matched->CSC ; i++; } } @@ -182,7 +184,7 @@ CKTsetup(CKTcircuit *ckt) #endif } else { - fprintf (stderr, "Using SPARSE 1.3 as Direct Linear Solver\n") ; + fprintf (stdout, "Using SPARSE 1.3 as Direct Linear Solver\n") ; } #endif diff --git a/src/spicelib/devices/vbic/vbicbindCSC.c b/src/spicelib/devices/vbic/vbicbindCSC.c index 90403845d..189cc519a 100644 --- a/src/spicelib/devices/vbic/vbicbindCSC.c +++ b/src/spicelib/devices/vbic/vbicbindCSC.c @@ -223,6 +223,25 @@ VBICbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt) CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICtempSubsPtr, VBICtempSubsBinding, VBICtempNode, VBICsubsNode); CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICtempSubsSIPtr, VBICtempSubsSIBinding, VBICtempNode, VBICsubsSINode); CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICtempTempPtr, VBICtempTempBinding, VBICtempNode, VBICtempNode); + + if (here->VBIC_excessPhase) { + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1Xf1Ptr , VBICxf1Xf1Binding , VBICxf1Node , VBICxf1Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1Xf2Ptr , VBICxf1Xf2Binding , VBICxf1Node , VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node , VBICcollCINode); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node , VBICbaseBINode); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node , VBICemitEINode); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf2Xf2Ptr , VBICxf2Xf2Binding , VBICxf2Node , VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf2Xf1Ptr , VBICxf2Xf1Binding , VBICxf2Node , VBICxf1Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICbaseBIXf2Ptr, VBICbaseBIXf2Binding, VBICbaseBINode, VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICemitEIXf2Ptr, VBICemitEIXf2Binding, VBICemitEINode, VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1IbrPtr , VBICxf1IbrBinding , VBICxf1Node , VBICbrEq); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf2IbrPtr , VBICxf2IbrBinding , VBICxf2Node , VBICbrEq); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICibrXf2Ptr , VBICibrXf2Binding , VBICbrEq , VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICibrXf1Ptr , VBICibrXf1Binding , VBICbrEq , VBICxf1Node); + CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICibrIbrPtr , VBICibrIbrBinding , VBICbrEq , VBICbrEq); + } + } } } @@ -321,6 +340,25 @@ VBICbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt) CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICtempSubsSIPtr, VBICtempSubsSIBinding, VBICtempNode, VBICsubsSINode); CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICtempTempPtr, VBICtempTempBinding, VBICtempNode, VBICtempNode); } + + if (here->VBIC_excessPhase) { + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf1Ptr , VBICxf1Xf1Binding , VBICxf1Node , VBICxf1Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf2Ptr , VBICxf1Xf2Binding , VBICxf1Node , VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node , VBICcollCINode); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node , VBICbaseBINode); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node , VBICemitEINode); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf2Ptr , VBICxf2Xf2Binding , VBICxf2Node , VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf1Ptr , VBICxf2Xf1Binding , VBICxf2Node , VBICxf1Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICbaseBIXf2Ptr, VBICbaseBIXf2Binding, VBICbaseBINode, VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICemitEIXf2Ptr, VBICemitEIXf2Binding, VBICemitEINode, VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1IbrPtr , VBICxf1IbrBinding , VBICxf1Node , VBICbrEq); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2IbrPtr , VBICxf2IbrBinding , VBICxf2Node , VBICbrEq); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICibrXf2Ptr , VBICibrXf2Binding , VBICbrEq , VBICxf2Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICibrXf1Ptr , VBICibrXf1Binding , VBICbrEq , VBICxf1Node); + CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICibrIbrPtr , VBICibrIbrBinding , VBICbrEq , VBICbrEq); + } + } } diff --git a/tests/.gitignore b/tests/.gitignore index 663d85c5a..323656295 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,6 +1,7 @@ *.test *.log *.out +*.vcd ngspiceCkt hspiceCkt diff --git a/tests/bin/check.sh b/tests/bin/check.sh index 6551f01e6..7abb2fd26 100644 --- a/tests/bin/check.sh +++ b/tests/bin/check.sh @@ -17,7 +17,7 @@ fi SPICE=$1 TEST=$2 -FILTER="CPU|Dynamic|Note|Circuit|Trying|Reference|Date|Doing|---|v-sweep|time|est|Error|Warning|Data|Index|trans|acan|oise|nalysis|ole|Total|memory|urrent|Got|Added|BSIM|bsim|B4SOI|b4soi|codemodel|^binary raw file|^ngspice.*done|Operating" +FILTER="SPARSE|KLU|CPU|Dynamic|Note|Circuit|Trying|Reference|Date|Doing|---|v-sweep|time|est|Error|Warning|Data|Index|trans|acan|oise|nalysis|ole|Total|memory|urrent|Got|Added|BSIM|bsim|B4SOI|b4soi|codemodel|^binary raw file|^ngspice.*done|Operating" testname=`basename $TEST .cir` testdir=`dirname $TEST` diff --git a/visualc/make-install-vngspice.bat b/visualc/make-install-vngspice.bat index 3891a718e..4f37bba02 100644 --- a/visualc/make-install-vngspice.bat +++ b/visualc/make-install-vngspice.bat @@ -27,6 +27,7 @@ if "%2" == "fftw" goto copy2 if "%3" == "fftw" goto copy2 copy %1\ngspice.exe %dst%\bin\ +copy .\spinitr .\spinit goto end :copy2 @@ -56,6 +57,7 @@ if "%2" == "fftw" goto copy2-64 if "%3" == "fftw" goto copy2-64 copy %1\ngspice.exe %dst%\bin\ +copy .\spinitr64 .\spinit goto end :copy2-64 @@ -65,7 +67,6 @@ copy ..\..\fftw-3.3-dll64\libfftw3-3.dll %dst%\bin\ :end mkdir %dst%\share\ngspice\scripts\src\ngspice copy .\spinit_all %dst%\share\ngspice\scripts\spinit -copy .\spinitr .\spinit cd ..\src copy ciderinit %dst%\share\ngspice\scripts copy devaxis %dst%\share\ngspice\scripts diff --git a/visualc/make-install-vngspiced.bat b/visualc/make-install-vngspiced.bat index 3de5fc68a..af00c4f0a 100644 --- a/visualc/make-install-vngspiced.bat +++ b/visualc/make-install-vngspiced.bat @@ -27,6 +27,7 @@ if "%2" == "fftw" goto copy2 if "%3" == "fftw" goto copy2 copy %1\ngspice.exe %dst%\bin\ +copy .\spinitd .\spinit goto end :copy2 @@ -56,6 +57,7 @@ if "%2" == "fftw" goto copy2-64 if "%3" == "fftw" goto copy2-64 copy %1\ngspice.exe %dst%\bin\ +copy .\spinitd64 .\spinit goto end :copy2-64 @@ -65,7 +67,7 @@ copy ..\..\fftw-3.3-dll64\libfftw3-3.dll %dst%\bin\ :end mkdir %dst%\share\ngspice\scripts\src\ngspice copy .\spinit_all %dst%\share\ngspice\scripts\spinit -copy .\spinitr .\spinit + cd ..\src copy ciderinit %dst%\share\ngspice\scripts copy devaxis %dst%\share\ngspice\scripts