Merge branch 'pre-master' into bt_dev
This commit is contained in:
commit
26d3da5b43
|
|
@ -38,7 +38,7 @@ cd release64_cyg
|
|||
if [ $? -ne 0 ]; then echo "cd release64_cyg failed"; exit 1 ; fi
|
||||
echo
|
||||
# You may add --enable-adms to the following command for adding adms generated devices
|
||||
../configure --with-x=yes --with-readline=yes --disable-debug --enable-cider --enable-openmp --enable-xspice --enable-osdi --enable-shortcheck CFLAGS="-O2 -m64" LDFLAGS="-s -m64"
|
||||
../configure --with-x=yes --with-readline=yes --disable-debug --enable-cider --enable-openmp --enable-xspice --enable-osdi --enable-predictor --enable-shortcheck CFLAGS="-O2 -m64" LDFLAGS="-s -m64"
|
||||
#../configure --with-x=no --with-readline=yes --disable-debug --enable-xspice --enable-cider --enable-openmp
|
||||
|
||||
if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
Example of string-valued parameters for XSPICE LUT
|
||||
|
||||
.param and="0001" or="0111"
|
||||
|
||||
* Simple AND gate via parameter.
|
||||
|
||||
.model l_and d_lut table_values=and
|
||||
aand [ d1 d2 ] o_and l_and
|
||||
|
||||
* More usefully, strings may be passed as sub-circuit parameters
|
||||
|
||||
xor d1 d2 o_or pgate table=or
|
||||
|
||||
.subckt pgate 1 2 out table="0000"
|
||||
.model poly d_lut table_values=table
|
||||
ap [ 1 2 ] out poly
|
||||
.ends
|
||||
|
||||
* Strings can be concatenated by .param, but not in .subckt lines or instances.
|
||||
|
||||
.param both=or{and}
|
||||
xboth d1 d2 d3 o_both pgate3 table=both
|
||||
|
||||
.subckt pgate3 1 2 3 out table="00000000"
|
||||
.model poly3 d_lut table_values=table
|
||||
ap3 [ 1 2 3 ] out poly3
|
||||
.ends
|
||||
|
||||
* Verify the above with a simple transient simulation.
|
||||
|
||||
v1 a1 0 pulse 1 0 0 1n 1n 0.5u 1u
|
||||
v2 a2 0 pulse 1 0 0 1n 1n 1u 2u
|
||||
v3 a3 0 pulse 1 0 0 1n 1n 2u 4u
|
||||
aadc [ a1 a2 a3 ] [ d1 d2 d3 ] adc
|
||||
.model adc adc_bridge in_low=0.5 in_high=0.5
|
||||
|
||||
.control
|
||||
tran 0.1u 4.1u
|
||||
plot d1 d2 d3 o_and o_or o_both digitop
|
||||
.endc
|
||||
.end
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
set ngbehavior=ltpsa
|
||||
|
|
@ -167,7 +167,7 @@ ngspice_LDADD += \
|
|||
xspice/ipc/libipcxsp.la \
|
||||
xspice/idn/libidnxsp.la
|
||||
endif
|
||||
ngspice_LDADD += @XSPICEDLLIBS@
|
||||
ngspice_LDADD += $(XSPICEDLLIBS)
|
||||
|
||||
ngspice_LDADD += \
|
||||
frontend/parser/libparser.la \
|
||||
|
|
@ -453,7 +453,7 @@ libspice_la_LIBADD += \
|
|||
xspice/ipc/libipcxsp.la \
|
||||
xspice/idn/libidnxsp.la
|
||||
endif
|
||||
libspice_la_LIBADD += @XSPICEDLLIBS@
|
||||
libspice_la_LIBADD += $(XSPICEDLLIBS)
|
||||
|
||||
libspice_la_LIBADD += \
|
||||
frontend/parser/libparser.la \
|
||||
|
|
@ -577,7 +577,7 @@ libngspice_la_LIBADD += \
|
|||
xspice/ipc/libipcxsp.la \
|
||||
xspice/idn/libidnxsp.la
|
||||
endif
|
||||
libngspice_la_LIBADD += @XSPICEDLLIBS@
|
||||
libngspice_la_LIBADD += $(XSPICEDLLIBS)
|
||||
|
||||
libngspice_la_LIBADD += \
|
||||
frontend/parser/libparser.la \
|
||||
|
|
|
|||
|
|
@ -238,6 +238,17 @@ void inp_probe(struct card* deck)
|
|||
if (strchr("ehvk", *instname))
|
||||
continue;
|
||||
|
||||
/* exclude a devices (code models may have special characters in their instance line.
|
||||
digital nodes should not get V sources in series anyway.) */
|
||||
if ('a' == *instname)
|
||||
continue;
|
||||
|
||||
/* exclude x devices (Subcircuits may contain digital a devices,
|
||||
and digital nodes should not get V sources in series anyway.),
|
||||
when probe_alli_nox is set in .spiceinit. */
|
||||
if ('x' == *instname && cp_getvar("probe_alli_nox", CP_BOOL, NULL, 0))
|
||||
continue;
|
||||
|
||||
/* special treatment for controlled current sources and switches:
|
||||
We have three or four tokens until model name, but only the first 2 are relevant nodes. */
|
||||
if (strchr("fgsw", *instname))
|
||||
|
|
|
|||
|
|
@ -4672,10 +4672,10 @@ int get_number_terminals(char *c)
|
|||
while ((i < 12) && (*cc != '\0')) {
|
||||
char* comma;
|
||||
name[i] = gettok_instance(&cc);
|
||||
if (strstr(name[i], "off") || strchr(name[i], '='))
|
||||
if (search_plain_identifier(name[i], "off") || strchr(name[i], '='))
|
||||
j++;
|
||||
#ifdef CIDER
|
||||
if (strstr(name[i], "save") || strstr(name[i], "print"))
|
||||
if (search_plain_identifier(name[i], "save") || search_plain_identifier(name[i], "print"))
|
||||
j++;
|
||||
#endif
|
||||
/* If we have IC=VBE, VCE instead of IC=VBE,VCE we need to inc
|
||||
|
|
@ -7006,9 +7006,12 @@ static void inp_poly_err(struct card *card)
|
|||
void tprint(struct card *t)
|
||||
{
|
||||
struct card *tmp;
|
||||
|
||||
static int npr;
|
||||
char outfile[100];
|
||||
sprintf(outfile, "tprint-out%d.txt", npr);
|
||||
npr++;
|
||||
/*debug: print into file*/
|
||||
FILE *fd = fopen("tprint-out.txt", "w");
|
||||
FILE *fd = fopen(outfile, "w");
|
||||
for (tmp = t; tmp; tmp = tmp->nextcard)
|
||||
if (*(tmp->line) != '*')
|
||||
fprintf(fd, "%6d %6d %s\n", tmp->linenum_orig, tmp->linenum,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ libosdi_la_SOURCES = \
|
|||
osdicallbacks.c
|
||||
|
||||
|
||||
|
||||
libosdi_la_LIBADD = $(XSPICEDLLIBS)
|
||||
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include
|
||||
AM_CFLAGS = $(STATIC)
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ typedef struct OsdiDescriptor {
|
|||
double temperature, uint32_t num_terminals,
|
||||
OsdiSimParas *sim_params, OsdiInitInfo *res);
|
||||
|
||||
uint32_t (*eval)(void *handle, void *inst, void *model, const OsdiSimInfo *info);
|
||||
uint32_t (*eval)(void *handle, void *inst, const void *model, const OsdiSimInfo *info);
|
||||
void (*load_noise)(void *inst, void *model, double freq, double *noise_dens,
|
||||
double *ln_noise_dens);
|
||||
void (*load_residual_resist)(void *inst, void* model, double *dst);
|
||||
|
|
|
|||
|
|
@ -60,6 +60,9 @@ static void eval(const OsdiDescriptor *descr, const GENinstance *gen_inst,
|
|||
static void load(CKTcircuit *ckt, const GENinstance *gen_inst, void *model,
|
||||
void *inst, OsdiExtraInstData *extra_inst_data, bool is_tran,
|
||||
bool is_init_tran, const OsdiDescriptor *descr) {
|
||||
|
||||
NG_IGNORE(extra_inst_data);
|
||||
|
||||
double dump;
|
||||
if (is_tran) {
|
||||
/* load dc matrix and capacitances (charge derivative multiplied with
|
||||
|
|
@ -113,10 +116,8 @@ static void load(CKTcircuit *ckt, const GENinstance *gen_inst, void *model,
|
|||
}
|
||||
|
||||
extern int OSDIload(GENmodel *inModel, CKTcircuit *ckt) {
|
||||
OsdiNgspiceHandle handle;
|
||||
GENmodel *gen_model;
|
||||
GENinstance *gen_inst;
|
||||
double dump;
|
||||
|
||||
bool is_init_smsig = ckt->CKTmode & MODEINITSMSIG;
|
||||
bool is_sweep = ckt->CKTmode & MODEDCTRANCURVE;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ Author: 1985 Thomas L. Quarles
|
|||
* this is a driver program to iterate through all the various accept
|
||||
* functions provided for the circuit elements in the given circuit */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "ngspice/config.h"
|
||||
#include "ngspice/devdefs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue