fix sense2, which is unsupported code
This commit is contained in:
parent
ffc7a0aa1b
commit
581e0a6d11
|
|
@ -800,6 +800,7 @@ AC_MSG_RESULT([Settings which were chosen:])
|
|||
if test "x$enable_sense2" = xyes; then
|
||||
AC_DEFINE([WANT_SENSE2], [], [Define if we want spice2 sensitivity analysis])
|
||||
AC_MSG_RESULT([Spice2 sensitivity analysis enabled])
|
||||
AC_MSG_WARN([This feature is UNSUPPORTED])
|
||||
fi
|
||||
if test "x$enable_nobypass" = xyes; then
|
||||
AC_DEFINE([NOBYPASS], [], [Define if we want NOBYPASS])
|
||||
|
|
@ -943,6 +944,8 @@ AM_CONDITIONAL([NUMDEV_WANTED], [test "x$enable_cider" = xyes])
|
|||
|
||||
AM_CONDITIONAL([PSS_WANTED], [test "x$enable_pss" = xyes])
|
||||
|
||||
AM_CONDITIONAL([SENSE2_WANTED], [test "x$enable_sense2" = xyes])
|
||||
|
||||
# adms option
|
||||
if test "x$enable_adms" = xyes ; then
|
||||
AC_MSG_RESULT([**********************************
|
||||
|
|
@ -1167,6 +1170,7 @@ AC_CONFIG_FILES([Makefile
|
|||
src/xspice/enh/Makefile
|
||||
src/xspice/ipc/Makefile
|
||||
src/xspice/idn/Makefile
|
||||
src/unsupported/Makefile
|
||||
tests/Makefile
|
||||
tests/bsim1/Makefile
|
||||
tests/bsim2/Makefile
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = misc maths frontend spicelib include/ngspice
|
||||
DIST_SUBDIRS = misc maths frontend spicelib include/ngspice xspice ciderlib
|
||||
DIST_SUBDIRS = misc maths frontend spicelib include/ngspice xspice ciderlib unsupported
|
||||
|
||||
if XSPICE_WANTED
|
||||
SUBDIRS += xspice
|
||||
|
|
@ -11,6 +11,10 @@ if CIDER_WANTED
|
|||
SUBDIRS += ciderlib
|
||||
endif
|
||||
|
||||
if SENSE2_WANTED
|
||||
SUBDIRS += unsupported
|
||||
endif
|
||||
|
||||
if !TCL_MODULE
|
||||
if !SHARED_MODULE
|
||||
bin_PROGRAMS = ngspice ngnutmeg
|
||||
|
|
@ -27,7 +31,7 @@ endif !SHARED_MODULE
|
|||
endif !TCL_MODULE
|
||||
|
||||
EXTRA_DIST = ngspice.txt setplot spectrum \
|
||||
devload devaxis ciderinit winmain.c winmain.h unsupported \
|
||||
devload devaxis ciderinit winmain.c winmain.h \
|
||||
tclspice.c tclspice.map pkgIndex.tcl.in spinit.in tclspinit.in \
|
||||
main.c sharedspice.c
|
||||
|
||||
|
|
@ -137,6 +141,10 @@ ngspice_LDADD += \
|
|||
spicelib/analysis/libckt.la \
|
||||
spicelib/devices/libdev.la
|
||||
|
||||
if SENSE2_WANTED
|
||||
ngspice_LDADD += unsupported/libunsupported.la
|
||||
endif
|
||||
|
||||
if XSPICE_WANTED
|
||||
ngspice_LDADD += \
|
||||
xspice/cm/libcmxsp.la \
|
||||
|
|
|
|||
|
|
@ -382,10 +382,14 @@ extern int PZinit(CKTcircuit *);
|
|||
extern int PZpost(CKTcircuit *);
|
||||
extern int PZaskQuest(CKTcircuit *, JOB *, int , IFvalue *);
|
||||
extern int PZsetParm(CKTcircuit *, JOB *, int , IFvalue *);
|
||||
|
||||
#ifdef WANT_SENSE2
|
||||
extern int SENaskQuest(CKTcircuit *, JOB *, int , IFvalue *);
|
||||
extern void SENdestroy(SENstruct *);
|
||||
extern int SENsetParm(CKTcircuit *, JOB *, int , IFvalue *);
|
||||
extern int SENstartup(CKTcircuit *);
|
||||
extern int SENstartup(CKTcircuit *, int);
|
||||
#endif
|
||||
|
||||
extern int SPIinit(IFfrontEnd *, IFsimulator **);
|
||||
extern int TFanal(CKTcircuit *, int);
|
||||
extern int TFaskQuest(CKTcircuit *, JOB *, int , IFvalue *);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ extern SPICEanalysis SENSinfo;
|
|||
extern SPICEanalysis PSSinfo;
|
||||
#endif
|
||||
|
||||
#ifdef WANT_SENSE2
|
||||
extern SPICEanalysis SEN2info;
|
||||
#endif
|
||||
|
||||
SPICEanalysis *analInfo[] = {
|
||||
&OPTinfo,
|
||||
&ACinfo,
|
||||
|
|
@ -34,6 +38,9 @@ SPICEanalysis *analInfo[] = {
|
|||
#ifdef WITH_PSS
|
||||
&PSSinfo,
|
||||
#endif
|
||||
#ifdef WANT_SENSE2
|
||||
&SEN2info,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ CKTsetup(CKTcircuit *ckt)
|
|||
|
||||
#ifdef WANT_SENSE2
|
||||
if(ckt->CKTsenInfo){
|
||||
if (error = CKTsenSetup(ckt)) return(error);
|
||||
error = CKTsenSetup(ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ Modified: 2000 AlansFixes
|
|||
int
|
||||
DCop(CKTcircuit *ckt, int notused)
|
||||
{
|
||||
#ifdef WANT_SENSE2
|
||||
int i, senmode, size;
|
||||
long save;
|
||||
#endif
|
||||
|
||||
int converged;
|
||||
int error;
|
||||
IFuid *nameList; /* va: tmalloc'ed list */
|
||||
|
|
@ -133,7 +138,10 @@ DCop(CKTcircuit *ckt, int notused)
|
|||
for(i = 1; i<=size ; i++){
|
||||
ckt->CKTrhsOp[i] = ckt->CKTrhsOld[i];
|
||||
}
|
||||
if(error = CKTsenDCtran(ckt)) return(error);
|
||||
error = CKTsenDCtran(ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
|
||||
ckt->CKTmode = save;
|
||||
ckt->CKTsenInfo->SENmode = senmode;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ DCtran(CKTcircuit *ckt,
|
|||
int firsttime;
|
||||
int error;
|
||||
#ifdef WANT_SENSE2
|
||||
int save, save2, size;
|
||||
long save1;
|
||||
#ifdef SENSDEBUG
|
||||
FILE *outsen;
|
||||
#endif /* SENSDEBUG */
|
||||
|
|
@ -316,7 +318,10 @@ DCtran(CKTcircuit *ckt,
|
|||
save2 = ckt->CKTorder;
|
||||
ckt->CKTmode = save_mode;
|
||||
ckt->CKTorder = save_order;
|
||||
if(error = CKTsenDCtran(ckt)) return(error);
|
||||
error = CKTsenDCtran(ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
|
||||
ckt->CKTmode = save1;
|
||||
ckt->CKTorder = save2;
|
||||
}
|
||||
|
|
@ -792,7 +797,10 @@ resume:
|
|||
save2 = ckt->CKTorder;
|
||||
ckt->CKTmode = save_mode;
|
||||
ckt->CKTorder = save_order;
|
||||
if(error = CKTsenDCtran(ckt)) return(error);
|
||||
error = CKTsenDCtran (ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
|
||||
ckt->CKTmode = save1;
|
||||
ckt->CKTorder = save2;
|
||||
}
|
||||
|
|
@ -852,7 +860,10 @@ resume:
|
|||
save2 = ckt->CKTorder;
|
||||
ckt->CKTmode = save_mode;
|
||||
ckt->CKTorder = save_order;
|
||||
if(error = CKTsenDCtran(ckt)) return(error);
|
||||
error = CKTsenDCtran(ckt);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
ckt->CKTmode = save1;
|
||||
ckt->CKTorder = save2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
static runDesc *plot = NULL;
|
||||
|
||||
#ifdef WANT_SENSE2
|
||||
long save;
|
||||
#ifdef SENSDEBUG
|
||||
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode&DCSEN) ){
|
||||
printf("\nDC Sensitivity Results\n\n");
|
||||
|
|
@ -458,7 +459,10 @@ resume:
|
|||
senmode = ckt->CKTsenInfo->SENmode;
|
||||
save = ckt->CKTmode;
|
||||
ckt->CKTsenInfo->SENmode = DCSEN;
|
||||
if(error = CKTsenDCtran(ckt)) return (error);
|
||||
error = CKTsenDCtran(ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
|
||||
ckt->CKTmode = save;
|
||||
ckt->CKTsenInfo->SENmode = senmode;
|
||||
|
||||
|
|
|
|||
|
|
@ -567,6 +567,8 @@ dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
|||
int i; /* generic loop variable */
|
||||
char *token; /* a token from the line */
|
||||
|
||||
NG_IGNORE(gnode);
|
||||
|
||||
/* .sens {AC} {DC} {TRAN} [dev=nnn parm=nnn]* */
|
||||
which = -1;
|
||||
for (i = 0; i < ft_sim->numAnalyses; i++) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = readme spiced.c
|
||||
|
||||
noinst_LTLIBRARIES = libunsupported.la
|
||||
|
||||
libunsupported_la_SOURCES = \
|
||||
cktsenac.c \
|
||||
cktsenup.c \
|
||||
cktsncom.c \
|
||||
cktsndct.c \
|
||||
cktsnset.c \
|
||||
cktsnld.c \
|
||||
sen2dest.c \
|
||||
sen2setp.c \
|
||||
snaskq.c \
|
||||
snstart.c
|
||||
|
||||
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include
|
||||
AM_CFLAGS = $(STATIC)
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
|
@ -5,7 +5,7 @@ Author: 1985 Thomas L. Quarles
|
|||
/*
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -20,8 +20,7 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
int
|
||||
CKTsenAC(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
CKTsenAC(CKTcircuit *ckt)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
@ -30,13 +29,17 @@ register CKTcircuit *ckt;
|
|||
#endif /* SENSDEBUG */
|
||||
|
||||
|
||||
if(error = CKTsenLoad(ckt)) return(error);
|
||||
error = CKTsenLoad(ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
|
||||
#ifdef SENSDEBUG
|
||||
printf("after CKTsenLoad\n");
|
||||
#endif /* SENSDEBUG */
|
||||
|
||||
if(error = CKTsenComp(ckt)) return(error);
|
||||
error = CKTsenComp(ckt);
|
||||
if (error)
|
||||
return(error);
|
||||
|
||||
#ifdef SENSDEBUG
|
||||
printf("after CKTsenComp\n");
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1985 Thomas L. Quarles
|
|||
* in the given circuit
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -22,10 +22,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTsenUpdate(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
CKTsenUpdate(CKTcircuit *ckt)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int error;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Author: 1985 Thomas L. Quarles
|
|||
* of the given circuit
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -21,10 +21,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTsenComp(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
CKTsenComp(CKTcircuit *ckt)
|
||||
{
|
||||
register int size;
|
||||
int size;
|
||||
int row;
|
||||
int col;
|
||||
SENstruct *info;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Author: 1985 Thomas L. Quarles
|
|||
* calculations
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -21,8 +21,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTsenDCtran(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
CKTsenDCtran(CKTcircuit *ckt)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Author: 1985 Thomas L. Quarles
|
|||
* in the given circuit
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -23,10 +23,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTsenLoad(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
CKTsenLoad(CKTcircuit *ckt)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int size,row,col;
|
||||
int error;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Author: 1985 Thomas L. Quarles
|
|||
/*
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -22,10 +22,9 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
void
|
||||
CKTsenPrint(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
CKTsenPrint(CKTcircuit *ckt)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i=0;i<DEVmaxnum;i++) {
|
||||
if ( DEVices[i]->DEVsenPrint && ckt->CKThead[i] ) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Author: 1985 Thomas L. Quarles
|
|||
* in the given circuit
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/smpdefs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -24,13 +24,11 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTsenSetup(ckt)
|
||||
register CKTcircuit *ckt;
|
||||
|
||||
CKTsenSetup(CKTcircuit *ckt)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int error;
|
||||
register SENstruct *info;
|
||||
SENstruct *info;
|
||||
#ifdef SENSDEBUG
|
||||
printf("CKTsenSetup\n");
|
||||
#endif /* SENSDEBUG */
|
||||
|
|
|
|||
|
|
@ -9,20 +9,18 @@ Author: 1985 Thomas L. Quarles
|
|||
* given circuit
|
||||
*/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/cktdefs.h"
|
||||
#include "ngspice/devdefs.h"
|
||||
#include "util.h"
|
||||
#include "ngspice/ifsim.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
void
|
||||
SENdestroy(info)
|
||||
SENstruct *info;
|
||||
SENdestroy(SENstruct *info)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int size;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,23 +3,21 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/ifsim.h"
|
||||
#include "ngspice/iferrmsg.h"
|
||||
#include "ngspice/sen2defs.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
#include "util.h"
|
||||
#include "ngspice/suffix.h"
|
||||
#include "../spicelib/analysis/analysis.h"
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
SENsetParm(ckt,anal,which,value)
|
||||
CKTcircuit *ckt;
|
||||
JOB *anal;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
SENsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
||||
{
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
switch(which) {
|
||||
|
||||
case SEN_DC:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/ifsim.h"
|
||||
#include "ngspice/iferrmsg.h"
|
||||
|
|
@ -13,12 +13,12 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
SENaskQuest(ckt,anal,which,value)
|
||||
CKTcircuit *ckt;
|
||||
JOB *anal;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
SENaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
||||
{
|
||||
NG_IGNORE(ckt);
|
||||
NG_IGNORE(anal);
|
||||
NG_IGNORE(value);
|
||||
|
||||
switch(which) {
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
|
||||
#include "spice.h"
|
||||
#include "ngspice/ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ngspice/ifsim.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
#include "util.h"
|
||||
#include "ngspice/const.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
|
@ -17,8 +16,7 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
int
|
||||
SENstartup(ckt)
|
||||
CKTcircuit *ckt;
|
||||
SENstartup(CKTcircuit *ckt, int restart)
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
|
|
@ -26,6 +24,11 @@ SENstartup(ckt)
|
|||
int type;
|
||||
GENinstance *fast;
|
||||
|
||||
if (restart) {
|
||||
fprintf(stderr, "unsupported code, (SENstartup), doesn't support restart\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef SENSDEBUG
|
||||
printf("SENstartup\n");
|
||||
#endif /* SENSDEBUG */
|
||||
|
|
@ -38,7 +41,7 @@ SENstartup(ckt)
|
|||
for(i=0;i<ckt->CKTsenInfo->SENnumVal;i++) {
|
||||
type = -1;
|
||||
fast = NULL;
|
||||
err = CKTfndDev((GENERIC*)ckt,&type,(GENERIC**)&fast,
|
||||
err = CKTfndDev(ckt, &type, &fast,
|
||||
((ckt->CKTsenInfo->SENdevices)[i]),
|
||||
NULL, NULL);
|
||||
if(err != OK) return(err);
|
||||
|
|
|
|||
Loading…
Reference in New Issue