introduced dual numbers, ported hiucm2load to c++ hicumL2.cpp, boolean
type protected by extern "C"
This commit is contained in:
parent
b83e05ee95
commit
a2946e98a4
|
|
@ -72,4 +72,5 @@ Makefile.in
|
|||
|
||||
# Visual Studio user options files
|
||||
**/*.vcxproj.user
|
||||
.vscode/
|
||||
|
||||
|
|
|
|||
10
configure.ac
10
configure.ac
|
|
@ -35,14 +35,17 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|||
ext_CFLAGS="${CFLAGS+yes}"
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AX_PROG_CC_FOR_BUILD
|
||||
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
|
||||
AC_SUBST([AM_CPPFLAGS], ['-I. -I$(srcdir) -I$(top_builddir)/src/include'])
|
||||
AC_SUBST([AM_CPPFLAGS], ['-I. -I$(srcdir) -I$(top_builddir)/src/include -I/home/markus/Documents/Gitprojects/cppduals'])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
|
||||
|
||||
# Package Options
|
||||
# ---------------
|
||||
|
||||
|
|
@ -220,7 +223,7 @@ if test "x$ext_CFLAGS" != xyes; then
|
|||
else
|
||||
AC_DEFINE([NGDEBUG], [1], [Compile with debug info])
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="-g -O1"
|
||||
CFLAGS="-g " #why -O1 here
|
||||
else
|
||||
CFLAGS="-g"
|
||||
fi
|
||||
|
|
@ -633,6 +636,7 @@ AC_ARG_ENABLE([rpath],
|
|||
]
|
||||
)
|
||||
|
||||
|
||||
if test "x$_use_rpath" = xyes ; then
|
||||
# Try to figure out if we need -Rpath for finding X11 libs
|
||||
# at runtime. Why autoconf doesn't already do this, I don't
|
||||
|
|
@ -694,6 +698,8 @@ else
|
|||
AC_MSG_RESULT([No X display!])
|
||||
has_no_x=true
|
||||
fi
|
||||
# Additional libs of hicum group
|
||||
X_LIBS = "$X_LIBS -lstdc++"
|
||||
|
||||
if test "x$enable_help" = xyes && test "x$no_x" != xyes ; then
|
||||
has_no_help=false
|
||||
|
|
|
|||
|
|
@ -563,6 +563,7 @@ libngspice_la_LIBADD += \
|
|||
libngspice_la_CFLAGS = -shared
|
||||
|
||||
libngspice_la_LDFLAGS = -shared
|
||||
libngspice_la_LDFLAGS += -lstdc++
|
||||
|
||||
if SHWIN
|
||||
libngspice_la_LDFLAGS += -Wl,--output-def=ngspice.def -Wl,--out-implib=ngspice.dll.a
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
#define ngspice_BOOL_H
|
||||
|
||||
//typedef unsigned char bool;
|
||||
#ifndef __cplusplus
|
||||
typedef int bool;
|
||||
#endif
|
||||
|
||||
typedef int BOOL ;
|
||||
|
||||
|
||||
#define BOOLEAN int
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
|
@ -13,4 +16,5 @@ typedef int BOOL ;
|
|||
#define YES 1
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -428,6 +428,10 @@ extern int DCpss(CKTcircuit *, int);
|
|||
/* SP */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
extern int NaskQuest(CKTcircuit *, JOB *, int, IFvalue *);
|
||||
extern int NsetParm(CKTcircuit *, JOB *, int, IFvalue *);
|
||||
extern int NIacIter(CKTcircuit *);
|
||||
|
|
@ -436,6 +440,7 @@ extern int NIconvTest(CKTcircuit *);
|
|||
extern void NIdestroy(CKTcircuit *);
|
||||
extern int NIinit(CKTcircuit *);
|
||||
extern int NIintegrate(CKTcircuit *, double *, double *, double , int);
|
||||
extern void dummdumm(int dumm);
|
||||
extern int NIiter(CKTcircuit * , int);
|
||||
extern int NIpzMuller(PZtrial **, PZtrial *);
|
||||
extern int NIpzComplex(PZtrial **, PZtrial *);
|
||||
|
|
@ -445,6 +450,9 @@ extern int NIreinit(CKTcircuit *);
|
|||
extern int NIsenReinit(CKTcircuit *);
|
||||
extern int NIdIter (CKTcircuit *);
|
||||
extern void NInzIter(CKTcircuit *, int, int);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PREDICTOR
|
||||
extern int NIpred(CKTcircuit *ckt);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
#define ccap qcap+1
|
||||
|
||||
void dummdumm(int dumm)
|
||||
{
|
||||
double dummy;
|
||||
dummy=1;
|
||||
}
|
||||
|
||||
int
|
||||
NIintegrate(CKTcircuit *ckt, double *geq, double *ceq, double cap, int qcap)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,15 +5,16 @@ noinst_LTLIBRARIES = libhicum2.la
|
|||
libhicum2_la_SOURCES = \
|
||||
hicum2.c \
|
||||
hicum2acld.c \
|
||||
hicum2ask.c \
|
||||
hicum2ask.c \
|
||||
hicum2conv.c \
|
||||
hicum2defs.h \
|
||||
hicum2ext.h \
|
||||
hicum2ext.h \
|
||||
hicum2getic.c \
|
||||
hicum2init.c \
|
||||
hicum2init.h \
|
||||
hicum2itf.h \
|
||||
hicum2load.c \
|
||||
hicum2itf.h \
|
||||
hicumL2.hpp \
|
||||
hicumL2.cpp \
|
||||
hicum2mask.c \
|
||||
hicum2mpar.c \
|
||||
hicum2noise.c \
|
||||
|
|
@ -25,8 +26,8 @@ libhicum2_la_SOURCES = \
|
|||
hicum2trunc.c
|
||||
|
||||
|
||||
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include
|
||||
AM_CFLAGS = $(STATIC)
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -lstdc++
|
||||
AM_CFLAGS = -I/home/markus/Documents/Gitprojects/cppduals -lstdc++ -I$(top_srcdir)/src/include
|
||||
AM_CXXFLAGS = -I/home/markus/Documents/Gitprojects/cppduals -I$(top_srcdir)/src/include -lstdc++
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ extern int HICUMask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
|
|||
extern int HICUMconvTest(GENmodel*,CKTcircuit*);
|
||||
extern int HICUMdelete(GENinstance*);
|
||||
extern int HICUMgetic(GENmodel*,CKTcircuit*);
|
||||
extern int HICUMload(GENmodel*,CKTcircuit*);
|
||||
//extern int HICUMload(GENmodel*,CKTcircuit*);//moved to hicumL2.hpp
|
||||
extern int HICUMmAsk(CKTcircuit*,GENmodel*,int,IFvalue*);
|
||||
extern int HICUMmParam(int,IFvalue*,GENmodel*);
|
||||
extern int HICUMparam(int,IFvalue*,GENinstance*,IFvalue*);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "hicum2itf.h"
|
||||
#include "hicum2ext.h"
|
||||
#include "hicum2init.h"
|
||||
#include "hicumL2.hpp"
|
||||
|
||||
|
||||
SPICEdev HICUMinfo = {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef hicumL2_H
|
||||
#define hicumL2_H
|
||||
#include "hicum2defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void hicum_diode(double T, double IS, double UM1, double U, double *Iz, double *Gz, double *Tz);
|
||||
void hicum_qjmodf(double T, double c_0, double u_d, double z, double a_j, double U_cap, double *C, double *C_dU, double *C_dvt, double *Qz, double *Qz_dU, double *Qz_dvt);
|
||||
static double HICUMlimitlog( double deltemp, double deltemp_old, double LIM_TOL, int *check);
|
||||
int hicum_thermal_update(HICUMmodel *, HICUMinstance *);
|
||||
int HICUMload(GENmodel *inModel, CKTcircuit *ckt);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* hicumL2_H */
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Overview of Spice Files for HiCUM
|
||||
|
||||
This file gives an overview of the files needed for the ngspice HiCUM version, e.g. their:
|
||||
- intent
|
||||
- status
|
||||
- assignee (Mario or Markus)
|
||||
|
||||
# hicum2.c
|
||||
# hicum2acld..c
|
||||
# hicum2ask.c
|
||||
# hicum2conv.c
|
||||
# hicum2defs.h
|
||||
# hicum2ext.h
|
||||
# hicum2getic.h
|
||||
# hicum2init.h
|
||||
# hicum2itf.h
|
||||
# hicum2load.c
|
||||
# hicum2mask.c
|
||||
# hicum2mpar.c
|
||||
# hicum2noise.c
|
||||
# hicum2param.c
|
||||
# hicum2pzld.c
|
||||
# hicum2setup.c
|
||||
# hicum2soachk.c
|
||||
# hicum2temp.c
|
||||
# hicum2trunc.c
|
||||
Loading…
Reference in New Issue