applied main changes to ngspice

This commit is contained in:
Jim Holmes 2014-10-26 18:56:04 +02:00 committed by rlar
parent da0c63c3b0
commit 73455c42e7
9 changed files with 57 additions and 4 deletions

View File

@ -720,6 +720,13 @@ AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d],
[AC_DEFINE([HAVE_LIBFFTW3], [], [Have fft routines in libfftw3])
LIBS="$LIBS -lfftw3"])
AC_CHECK_LIB([z],[compress],
[LIBS="$LIBS -lz"],
[AC_MSG_ERROR([Couldn't find z compression libraries.])])
AC_MSG_RESULT([LXT2 waveform database included])
#AC_DEFINE([LXT2], [1], [The LXT2 waveform database])
AC_CHECK_HEADERS([zlibdefs.h zlib.h malloc.h alloca.h inttypes.h])
# Check for a few mathematical functions:
AC_CHECK_FUNCS([erfc logb scalb scalbn asinh acosh atanh finite])
# According POSIX we should look for macros first

View File

@ -16,6 +16,12 @@
#endif
/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */
#define LXT2
#ifdef LXT2
#define LXT2_TIME_RESOLUTION_EXPONENT -12
#include "ngspice/lxt2_write.h"
#endif
#define MAXNUMDEVS 64 /* Max number of possible devices PN:XXX may cause toubles*/
#define MAXNUMDEVNODES 4 /* Max No. of nodes per device */
@ -288,6 +294,11 @@ struct CKTcircuit {
NGHASHPTR DEVnameHash;
NGHASHPTR MODnameHash;
#ifdef LXT2
lxt2_t lxt2;
#endif
};
@ -317,6 +328,7 @@ extern int CKTdltNNum(CKTcircuit *, int);
extern int CKTdltNod(CKTcircuit *, CKTnode *);
extern int CKTdoJob(CKTcircuit *, int , TSKtask *);
extern void CKTdump(CKTcircuit *, double, void *);
extern void CKTemitlxt2(runDesc *);
extern int CKTsoaInit(void);
extern int CKTsoaCheck(CKTcircuit *);
#ifdef CIDER

View File

@ -123,4 +123,9 @@ void EVTaccept(
struct dvec *EVTfindvec(char *node);
void EVTemitlxt2(
CKTcircuit *ckt, /* The circuit structure */
int node_index, /* The node index of lxt2 data stream */
Evt_Node_t *from); /* Location to event node data to emit to lxt2 */
#endif

View File

@ -48,4 +48,6 @@ typedef struct SPICEanalysis SPICEanalysis;
typedef struct runDesc runDesc;
typedef struct lxt2_s lxt2_t;
#endif

View File

@ -691,13 +691,21 @@ show_help(void)
static void
show_version(void)
{
printf("%s compiled from %s revision %s\n"
printf("%s compiled from %s revision(%s) branch(SMBV)\n"
"-----------------------------------------------------\n"
"Written originally by Berkeley University\n"
"Currently maintained by the NGSpice Project\n\n"
"Developed and maintained by the Ngspice Project\n"
"Enhanced by Sherlock Model-Based Verification, L.L.C.\n"
"-----------------------------------------------------\n"
"Copyright (C) 1985-1996,"
" The Regents of the University of California\n"
"Copyright (C) 1999-2011,"
" The NGSpice Project\n", cp_program, PACKAGE, VERSION);
" The NGSpice Project\n"
"Copyright (C) 2001-2012,"
" Tony Bybell\n"
"Copyright (C) 2011-2014,"
" Sherlock Model-Based Verification, L.L.C.\n",
cp_program, PACKAGE, VERSION);
}
#ifdef SIMULATOR

View File

@ -32,6 +32,7 @@ libckt_la_SOURCES = \
ckti2nod.c \
cktic.c \
cktlnkeq.c \
cktlxt2.c \
cktload.c \
cktmapn.c \
cktmask.c \
@ -79,6 +80,8 @@ libckt_la_SOURCES = \
dkerproc.c \
dloadfns.c \
dsetparm.c \
lxt2_init.c \
lxt2_write.c \
naskq.c \
nevalsrc.c \
ninteg.c \

View File

@ -200,6 +200,9 @@ DCtran(CKTcircuit *ckt,
}
#ifdef XSPICE
#ifdef LXT2
lxt2_init(job->TRANplot);
#endif
/* gtri - begin - wbk - set a breakpoint at end of supply ramping time */
/* must do this after CKTtime set to 0 above */
if(ckt->enh->ramp.ramptime > 0.0)
@ -474,8 +477,12 @@ DCtran(CKTcircuit *ckt,
#ifdef CLUSTER
CLUoutput(ckt);
#endif
if(ckt->CKTtime >= ckt->CKTinitTime)
if (ckt->CKTtime >= ckt->CKTinitTime) {
CKTdump(ckt, ckt->CKTtime, job->TRANplot);
#ifdef LXT2
CKTemitlxt2(job->TRANplot);
#endif
}
#ifdef XSPICE
/* gtri - begin - wbk - Update event queues/data for accepted timepoint */
/* Note: this must be done AFTER sending results to SI so it can't */
@ -492,6 +499,11 @@ DCtran(CKTcircuit *ckt,
printf(" done: time is %g, final time is %g, and tol is %g\n",
ckt->CKTtime, ckt->CKTfinalTime, ckt->CKTminBreak);
#endif
#ifdef LXT2
lxt2_end(job->TRANplot);
#endif
SPfrontEnd->OUTendPlot (job->TRANplot);
job->TRANplot = NULL;
UPDATE_STATS(0);

View File

@ -17,6 +17,7 @@ libevtxsp_la_SOURCES = \
evtdeque.c \
evtinit.c \
evtload.c \
evtlxt2.c \
evtnode_copy.c \
evtplot.c \
evtqueue.c \

View File

@ -232,6 +232,9 @@ int EVTiter(
/* resolved node value has not changed */
if(g_mif_info.circuit.anal_type == MIF_TRAN) {
#ifdef LXT2
EVTemitlxt2(ckt, node_index, &(rhsold[node_index]));
#endif
node = *(node_data->tail[node_index]);
node_data->tail[node_index] = &(node->next);
EVTnode_copy(ckt, node_index, &(rhsold[node_index]), &(node->next));