Merge branch 'markus_dev' into hicum2-thermal
This commit is contained in:
commit
64c0c41180
|
|
@ -72,6 +72,7 @@ Makefile.in
|
|||
|
||||
# Visual Studio user options files
|
||||
**/*.vcxproj.user
|
||||
.vscode/
|
||||
|
||||
# Visual Studio Code user options files
|
||||
.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 *);
|
||||
|
|
@ -445,6 +449,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);
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ NIintegrate(CKTcircuit *ckt, double *geq, double *ceq, double cap, int qcap)
|
|||
case TRAPEZOIDAL:
|
||||
switch(ckt->CKTorder) {
|
||||
case 1:
|
||||
ckt->CKTstate0[ccap] = ckt->CKTag[0] * ckt->CKTstate0[qcap]
|
||||
ckt->CKTstate0[ccap] = ckt->CKTag[0] * ckt->CKTstate0[qcap]
|
||||
+ ckt->CKTag[1] * ckt->CKTstate1[qcap];
|
||||
break;
|
||||
case 2:
|
||||
ckt->CKTstate0[ccap] = - ckt->CKTstate1[ccap] * ckt->CKTag[1] +
|
||||
ckt->CKTag[0] *
|
||||
ckt->CKTstate0[ccap] = - ckt->CKTstate1[ccap] * ckt->CKTag[1] +
|
||||
ckt->CKTag[0] *
|
||||
( ckt->CKTstate0[qcap] - ckt->CKTstate1[qcap] );
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -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++ -std=c++11
|
||||
AM_CFLAGS = -lstdc++ -I$(top_srcdir)/src/include
|
||||
AM_CXXFLAGS = -I$(top_srcdir)/src/include -lstdc++ -std=c++11
|
||||
|
||||
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 = {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Spice3 Implementation: 2019 Dietmar Warning
|
|||
#include "ngspice/trandefs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/devdefs.h"
|
||||
#include "hicumL2.hpp"
|
||||
|
||||
#define VPT_thresh 1.0e2
|
||||
#define Dexp_lim 80.0
|
||||
|
|
@ -37,35 +38,7 @@ void HICDIO(double, double, double, double, double, double *, double *);
|
|||
|
||||
double FFdVc, FFdVc_ditf;
|
||||
|
||||
/* HICUMlimitlog(deltemp, deltemp_old, LIM_TOL, check)
|
||||
* Logarithmic damping the per-iteration change of deltemp beyond LIM_TOL.
|
||||
*/
|
||||
static double
|
||||
HICUMlimitlog(
|
||||
double deltemp,
|
||||
double deltemp_old,
|
||||
double LIM_TOL,
|
||||
int *check)
|
||||
{
|
||||
*check = 0;
|
||||
if (isnan (deltemp) || isnan (deltemp_old))
|
||||
{
|
||||
fprintf(stderr, "Alberto says: YOU TURKEY! The limiting function received NaN.\n");
|
||||
fprintf(stderr, "New prediction returns to 0.0!\n");
|
||||
deltemp = 0.0;
|
||||
*check = 1;
|
||||
}
|
||||
/* Logarithmic damping of deltemp beyond LIM_TOL */
|
||||
if (deltemp > deltemp_old + LIM_TOL) {
|
||||
deltemp = deltemp_old + LIM_TOL + log10((deltemp-deltemp_old)/LIM_TOL);
|
||||
*check = 1;
|
||||
}
|
||||
else if (deltemp < deltemp_old - LIM_TOL) {
|
||||
deltemp = deltemp_old - LIM_TOL - log10((deltemp_old-deltemp)/LIM_TOL);
|
||||
*check = 1;
|
||||
}
|
||||
return deltemp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////Explicit Capacitance and Charge Expression///////////////
|
||||
|
|
|
|||
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,30 @@
|
|||
# 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
|
||||
* Temperature scaling of all parameters
|
||||
* Models are implemented, missing are the derivatives
|
||||
* As most models are easy and just temperature dependent -> no dual numbers
|
||||
* Assignee: Mario
|
||||
# hicum2trunc.c
|
||||
|
|
@ -23,7 +23,7 @@ Q1 Q1_C Q1_B Q1_E Q1_S Q1_T P1
|
|||
+ fbcpar=0.3 fbepar=1 cjs0=2.6e-014 vds=0.9997 zs=0.4295 vpts=100
|
||||
+ t0=2.089e-013 dt0h=8e-014 tbvl=8.25e-014 tef0=3.271e-013 gtfe=3.548 thcs=5.001e-012
|
||||
+ ahc=0.05 fthc=0.7 rci0=9.523 vlim=0.6999 vces=0.01 vpt=2 tr=0
|
||||
+ cbepar=2.609e-014 cbcpar=1.64512e-014 alqf=0.166667 alit=0.333333 flnqs=1 kf=0
|
||||
+ cbepar=2.609e-014 cbcpar=1.64512e-014 alqf=0.166667 alit=0.333333 flnqs=0 kf=0
|
||||
+ af=2 cfbe=-1 latb=0 latl=0 vgb=0.91 alt0=0.004 kt0=6.588e-005
|
||||
+ zetaci=0.58 alvs=0.001 alces=-0.2286 zetarbi=0.3002 zetarbx=0.06011 zetarcx=-0.02768
|
||||
+ zetare=-0.9605 zetacx=0 vge=1.17 vgc=1.17 vgs=1.17 f1vg=-0.000102377 f2vg=0.00043215
|
||||
|
|
|
|||
Loading…
Reference in New Issue