remove PSS2
This commit is contained in:
parent
1b4c17a464
commit
0be61b3e5a
|
|
@ -145,10 +145,6 @@ AC_ARG_ENABLE([cider],
|
||||||
AC_ARG_ENABLE([adms],
|
AC_ARG_ENABLE([adms],
|
||||||
[AS_HELP_STRING([--enable-adms], [Enable ADMS code models, (experimental)])])
|
[AS_HELP_STRING([--enable-adms], [Enable ADMS code models, (experimental)])])
|
||||||
|
|
||||||
# --enable-xspice: define XSPICE in the code. This is for xspice support
|
|
||||||
AC_ARG_ENABLE([pss],
|
|
||||||
[AS_HELP_STRING([--enable-pss], [Enable PSS analysis, (very experimental)])])
|
|
||||||
|
|
||||||
# --enable-ndev: define NDEV in the code. An interface for external device i.e. numerical device
|
# --enable-ndev: define NDEV in the code. An interface for external device i.e. numerical device
|
||||||
AC_ARG_ENABLE([ndev],
|
AC_ARG_ENABLE([ndev],
|
||||||
[AS_HELP_STRING([--enable-ndev], [Enable NDEV interface, (experimental)])])
|
[AS_HELP_STRING([--enable-ndev], [Enable NDEV interface, (experimental)])])
|
||||||
|
|
@ -786,9 +782,6 @@ if test "x$enable_pzdebug" = xyes; then
|
||||||
AC_DEFINE([PZDEBUG], [], [Define if you want to debug pole-zero analysis])
|
AC_DEFINE([PZDEBUG], [], [Define if you want to debug pole-zero analysis])
|
||||||
AC_MSG_RESULT([WARNING: Pole/Zero analysis debug is enabled])
|
AC_MSG_RESULT([WARNING: Pole/Zero analysis debug is enabled])
|
||||||
fi
|
fi
|
||||||
if test "x$enable_pss" = xyes; then
|
|
||||||
AC_DEFINE([WITH_PSS], [], [Define if you want PSS analysis])
|
|
||||||
fi
|
|
||||||
if test "x$enable_blktmsdebug" = xyes; then
|
if test "x$enable_blktmsdebug" = xyes; then
|
||||||
AC_DEFINE([D_DBG_BLOCKTIMES], [], [Define if we want debug distortion analysis (BLOCKTIMES)])
|
AC_DEFINE([D_DBG_BLOCKTIMES], [], [Define if we want debug distortion analysis (BLOCKTIMES)])
|
||||||
AC_MSG_RESULT([WARNING: Distortion analysis debug *D_DBG_BLOCKTIMES* is enabled])
|
AC_MSG_RESULT([WARNING: Distortion analysis debug *D_DBG_BLOCKTIMES* is enabled])
|
||||||
|
|
@ -874,8 +867,6 @@ AM_CONDITIONAL([CIDER_WANTED], [test "x$enable_cider" = xyes])
|
||||||
AM_CONDITIONAL([NUMDEV_WANTED], [test "x$enable_cider" = xyes])
|
AM_CONDITIONAL([NUMDEV_WANTED], [test "x$enable_cider" = xyes])
|
||||||
|
|
||||||
|
|
||||||
AM_CONDITIONAL([PSS_WANTED], [test "x$enable_pss" = xyes])
|
|
||||||
|
|
||||||
# adms option
|
# adms option
|
||||||
if test "x$enable_adms" = xyes ; then
|
if test "x$enable_adms" = xyes ; then
|
||||||
AC_MSG_RESULT([**********************************
|
AC_MSG_RESULT([**********************************
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
Colpitt's Oscillator Circuit
|
|
||||||
* Colpitt is an harmonic oscillator (LC based) which use
|
|
||||||
* a capacitive partition of resonator to feed the single
|
|
||||||
* active device.
|
|
||||||
* Prediceted frequency is about 3.33945e+06 Hz.
|
|
||||||
|
|
||||||
* Models:
|
|
||||||
.model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50)
|
|
||||||
|
|
||||||
r1 1 0 1
|
|
||||||
q1 2 1 3 qnl
|
|
||||||
vcc 4 0 5
|
|
||||||
rl 4 2 750
|
|
||||||
c1 2 3 500p
|
|
||||||
c2 4 3 4500p
|
|
||||||
l1 4 2 5uH
|
|
||||||
re 3 6 4.65k
|
|
||||||
vee 6 0 dc -10 pwl 0 0 1e-9 -10
|
|
||||||
|
|
||||||
*.tran 30n 12u
|
|
||||||
.pss 4e6 500e-6 3 1024 11 50 5e-3 uic
|
|
||||||
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
Complimentary Cross Quad CMOS Oscillator
|
|
||||||
* Predicted frequency is 5.59197e+08 Hz.
|
|
||||||
|
|
||||||
* Supply
|
|
||||||
vdd vdd gnd 1.2 pwl 0 1.2 1e-9 1.2
|
|
||||||
rdd vdd vdd_ana 70m
|
|
||||||
rgnd gnd gnd_ana 70m
|
|
||||||
|
|
||||||
* Cross quad
|
|
||||||
mpsx v_plus v_minus vdd_ana vdd_ana pch w=10u l=0.1u
|
|
||||||
mnsx v_plus v_minus gnd_ana gnd_ana nch w=10u l=0.1u
|
|
||||||
mpdx v_minus v_plus vdd_ana vdd_ana pch w=10u l=0.1u
|
|
||||||
mndx v_minus v_plus gnd_ana gnd_ana nch w=10u l=0.1u
|
|
||||||
|
|
||||||
* Lumped elements model of real inductor
|
|
||||||
ls v_plus i1 19.462n ic=0.06
|
|
||||||
rs i1 v_minus 7.789
|
|
||||||
cs v_plus v_minus 443f
|
|
||||||
coxs v_plus is 2.178p
|
|
||||||
coxd v_minus id 2.178p
|
|
||||||
rsis is gnd_ana 308
|
|
||||||
rsid id gnd_ana 308
|
|
||||||
csis is gnd_ana 51f
|
|
||||||
csid id gnd_ana 51f
|
|
||||||
|
|
||||||
* Parallel capacitor to determine leading resonance
|
|
||||||
cp v_plus v_minus 3.4p
|
|
||||||
|
|
||||||
.model nch nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u )
|
|
||||||
.model pch pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u )
|
|
||||||
|
|
||||||
*.tran 0.05n 1u uic
|
|
||||||
.pss 624e6 1u v_plus 1024 10 50 5e-3 uic
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
Hartley's Oscillator Circuit
|
|
||||||
* Hartley is an harmonic oscillator (LC based) which use
|
|
||||||
* an inductive partition of resonator to feed the single
|
|
||||||
* active device. Output is taken on node 2.
|
|
||||||
* Prediceted frequency is about 122.06 Hz.
|
|
||||||
|
|
||||||
* Models:
|
|
||||||
.model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50)
|
|
||||||
|
|
||||||
vcc 1 0 5 pwl 0 0 1e-5 5
|
|
||||||
r1 1 2 0.2k
|
|
||||||
q1 2 3 0 qnl
|
|
||||||
c1 3 4 633n
|
|
||||||
l1 3 0 1.5
|
|
||||||
l2 0 4 500m
|
|
||||||
r2 4 2 100
|
|
||||||
|
|
||||||
*.tran 300n 50m
|
|
||||||
.pss 150 200e-3 2 1024 11 50 5e-3 uic
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
Ring CMOS Oscillator
|
|
||||||
* Predicted frequency is 3.84841e+09 Hz.
|
|
||||||
|
|
||||||
* Supply
|
|
||||||
vdd vdd gnd 1.2 pwl 0 1.2 1e-9 1.2
|
|
||||||
rdd vdd vdd_ana 70m
|
|
||||||
rgnd gnd gnd_ana 70m
|
|
||||||
|
|
||||||
* Inverter
|
|
||||||
mp1 inv1 inv3 vdd_ana vdd_ana pch w=10u l=0.18u
|
|
||||||
mn1 inv1 inv3 gnd_ana gnd_ana nch w=10u l=0.18u
|
|
||||||
mp2 inv2 inv1 vdd_ana vdd_ana pch w=10u l=0.18u
|
|
||||||
mn2 inv2 inv1 gnd_ana gnd_ana nch w=10u l=0.18u
|
|
||||||
mp3 inv3 inv2 vdd_ana vdd_ana pch w=10u l=0.18u
|
|
||||||
mn3 inv3 inv2 gnd_ana gnd_ana nch w=10u l=0.18u
|
|
||||||
|
|
||||||
* Buffer out
|
|
||||||
mp4 bout inv3 vdd_ana vdd_ana pch w=10u l=0.18u
|
|
||||||
mn4 bout inv3 gnd_ana gnd_ana nch w=10u l=0.18u
|
|
||||||
|
|
||||||
.model nch nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u )
|
|
||||||
.model pch pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u )
|
|
||||||
|
|
||||||
*.tran 0.005n 100n
|
|
||||||
*.plot tran v(4)
|
|
||||||
.pss 624e6 500n bout 1024 10 100 5e-3 uic
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
Vackar's Oscillator Circuit
|
|
||||||
* Vackar is a derivation of Colpitt's oscillator (LC based).
|
|
||||||
* Oscillation is taken on node 4.
|
|
||||||
* Predicted frequency is 1.92291e+06Hz.
|
|
||||||
|
|
||||||
* Models:
|
|
||||||
.model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50)
|
|
||||||
|
|
||||||
vcc 1 0 5 pwl 0 10 1e-9 5
|
|
||||||
lrfc 1 2 100u
|
|
||||||
cdec 2 0 7n
|
|
||||||
q1 3 2 0 qnl
|
|
||||||
rb 3 0 4700
|
|
||||||
c1 3 4 100p
|
|
||||||
c2 3 0 600p
|
|
||||||
c0 4 0 1n
|
|
||||||
l1 4 1 6.2u
|
|
||||||
|
|
||||||
*.tran 30n 12u
|
|
||||||
*.plot tran v(4)
|
|
||||||
.pss 4e6 10e-6 4 1024 10 50 5e-3 uic
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
Van Der Pol Oscillator
|
|
||||||
* Prediceted frequency is about 4.58957e+06 Hz.
|
|
||||||
|
|
||||||
* Third harmonic is high as the first one
|
|
||||||
Ba gib 0 I=-1e-2*v(gib,0)+1e-2*v(gib,0)^3
|
|
||||||
* Q is about 10
|
|
||||||
La gib 0 1.2e-6
|
|
||||||
Ra gib 0 158.113
|
|
||||||
Ca gib 0 1e-9 ic=0.5
|
|
||||||
*La gib 0 1e-9
|
|
||||||
*Ra gib 0 474.6
|
|
||||||
*Ca gib 0 1e-9 ic=0.5
|
|
||||||
* Ghost node... Test for my PSS!
|
|
||||||
Rb bad 0 1k
|
|
||||||
|
|
||||||
*.tran 1e-9 150e-6 uic
|
|
||||||
.pss 0.8e6 130e-6 gib 1024 11 50 5e-3 uic
|
|
||||||
|
|
@ -275,14 +275,6 @@ struct comm spcp_coms[] = {
|
||||||
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
||||||
NULL,
|
NULL,
|
||||||
"[.tran line args] : Do a transient analysis." } ,
|
"[.tran line args] : Do a transient analysis." } ,
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
{ "pss", com_pss, TRUE, TRUE,
|
|
||||||
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
|
||||||
NULL,
|
|
||||||
"[.pss line args] : Do a periodic state analysis." } ,
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
{ "ac", com_ac, TRUE, TRUE,
|
{ "ac", com_ac, TRUE, TRUE,
|
||||||
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
@ -706,14 +698,6 @@ struct comm nutcp_coms[] = {
|
||||||
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
||||||
NULL,
|
NULL,
|
||||||
"[.tran line args] : Do a transient analysis." } ,
|
"[.tran line args] : Do a transient analysis." } ,
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
{ "pss", NULL, TRUE, TRUE,
|
|
||||||
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
|
||||||
NULL,
|
|
||||||
"[.pss line args] : Do a periodic steady state analysis." } ,
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
{ "ac", NULL, TRUE, TRUE,
|
{ "ac", NULL, TRUE, TRUE,
|
||||||
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
{ 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
||||||
|
|
@ -169,17 +169,6 @@ com_noise(wordlist *wl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
void
|
|
||||||
com_pss(wordlist *wl)
|
|
||||||
{
|
|
||||||
dosim("pss", wl);
|
|
||||||
}
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dosim(
|
dosim(
|
||||||
char *what, /* in: command (pz,op,dc,ac,tf,tran,sens,disto,noise,run) */
|
char *what, /* in: command (pz,op,dc,ac,tf,tran,sens,disto,noise,run) */
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@ void com_dc(wordlist *wl);
|
||||||
void com_ac(wordlist *wl);
|
void com_ac(wordlist *wl);
|
||||||
void com_tf(wordlist *wl);
|
void com_tf(wordlist *wl);
|
||||||
void com_tran(wordlist *wl);
|
void com_tran(wordlist *wl);
|
||||||
/* SP: Stady State Analysis */
|
|
||||||
void com_pss(wordlist *wl);
|
|
||||||
/* SP */
|
|
||||||
void com_sens(wordlist *wl);
|
void com_sens(wordlist *wl);
|
||||||
void com_disto(wordlist *wl);
|
void com_disto(wordlist *wl);
|
||||||
void com_noise(wordlist *wl);
|
void com_noise(wordlist *wl);
|
||||||
|
|
|
||||||
|
|
@ -303,53 +303,6 @@ if_sens_run(CKTcircuit *ckt, wordlist *args, INPtables *tab)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* *********************** */
|
|
||||||
/* PSS - Spertica - 100910 */
|
|
||||||
/* *********************** */
|
|
||||||
if (strcmp(token, "pss") == 0) {
|
|
||||||
JOB *pssJob;
|
|
||||||
which = -1;
|
|
||||||
for (j = 0; j < ft_sim->numAnalyses; j++)
|
|
||||||
if (strcmp(ft_sim->analyses[j]->name, "PSS") == 0) {
|
|
||||||
which = j;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (which == -1) {
|
|
||||||
current->error = INPerrCat
|
|
||||||
(current->error,
|
|
||||||
INPmkTemp("periodic steady state analysis unsupported\n"));
|
|
||||||
return (0); /* temporary */
|
|
||||||
}
|
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "pssan",
|
|
||||||
& pssJob, ft_curckt->ci_specTask);
|
|
||||||
if (err) {
|
|
||||||
ft_sperror(err, "createPSS");
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Guessed Frequency */
|
|
||||||
error = INPapName(ckt, which, pssJob, "fguess", parm);
|
|
||||||
if (error)
|
|
||||||
current->error = INPerrCat(current->error, INPerror(error));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Stabilization time */
|
|
||||||
error = INPapName(ckt, which, pssJob, "stabtime", parm);
|
|
||||||
if (error)
|
|
||||||
current->error = INPerrCat(current->error, INPerror(error));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */
|
|
||||||
error = INPapName(ckt, which, pssJob, "points", parm);
|
|
||||||
if (error)
|
|
||||||
current->error = INPerrCat(current->error, INPerror(error));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */
|
|
||||||
error = INPapName(ckt, which, pssJob, "harmonics", parm);
|
|
||||||
if (error)
|
|
||||||
current->error = INPerrCat(current->error, INPerror(error));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
next:
|
next:
|
||||||
while (*line) { /* read the entire line */
|
while (*line) { /* read the entire line */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,11 +218,6 @@ if_run(CKTcircuit *ckt, char *what, wordlist *args, INPtables *tab)
|
||||||
eq(what, "sens") ||
|
eq(what, "sens") ||
|
||||||
eq(what, "tf") ||
|
eq(what, "tf") ||
|
||||||
eq(what, "noise")
|
eq(what, "noise")
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
|| eq(what, "pss")
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
s = wl_flatten(args); /* va: tfree char's tmalloc'ed in wl_flatten */
|
s = wl_flatten(args); /* va: tfree char's tmalloc'ed in wl_flatten */
|
||||||
|
|
@ -339,11 +334,6 @@ if_run(CKTcircuit *ckt, char *what, wordlist *args, INPtables *tab)
|
||||||
(eq(what, "adjsen")) ||
|
(eq(what, "adjsen")) ||
|
||||||
(eq(what, "sens")) ||
|
(eq(what, "sens")) ||
|
||||||
(eq(what, "tf")) ||
|
(eq(what, "tf")) ||
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
(eq(what, "pss")) ||
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
(eq(what, "run")))
|
(eq(what, "run")))
|
||||||
{
|
{
|
||||||
/*CDHW Run the analysis pointed to by ci_curTask CDHW*/
|
/*CDHW Run the analysis pointed to by ci_curTask CDHW*/
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ include_HEADERS = \
|
||||||
plot.h \
|
plot.h \
|
||||||
pnode.h \
|
pnode.h \
|
||||||
profile.h \
|
profile.h \
|
||||||
pssdefs.h \
|
|
||||||
pzdefs.h \
|
pzdefs.h \
|
||||||
sen2defs.h \
|
sen2defs.h \
|
||||||
sensdefs.h \
|
sensdefs.h \
|
||||||
|
|
|
||||||
|
|
@ -264,17 +264,6 @@ struct CKTcircuit {
|
||||||
Enh_Ckt_Data_t *enh; /* data used by general enhancements */
|
Enh_Ckt_Data_t *enh; /* data used by general enhancements */
|
||||||
#endif
|
#endif
|
||||||
/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */
|
/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis - 100609 */
|
|
||||||
double CKTstabTime; /* PSS stab time */
|
|
||||||
double CKTguessedFreq; /* PSS guessed frequency */
|
|
||||||
int CKTharms; /* PSS harmonics */
|
|
||||||
long int CKTpsspoints; /* PSS number of samples */
|
|
||||||
char *CKToscNode; /* PSS oscnode */
|
|
||||||
double CKTsteady_coeff;
|
|
||||||
int CKTsc_iter;
|
|
||||||
/* SP: 100609 */
|
|
||||||
#endif
|
|
||||||
unsigned int CKTisLinear:1; /* flag to indicate that the circuit
|
unsigned int CKTisLinear:1; /* flag to indicate that the circuit
|
||||||
contains only linear elements */
|
contains only linear elements */
|
||||||
unsigned int CKTnoopac:1; /* flag to indicate that OP will not be evaluated
|
unsigned int CKTnoopac:1; /* flag to indicate that OP will not be evaluated
|
||||||
|
|
@ -391,12 +380,6 @@ extern int TFsetParm(CKTcircuit *, JOB *, int , IFvalue *);
|
||||||
extern int TRANaskQuest(CKTcircuit *, JOB *, int , IFvalue *);
|
extern int TRANaskQuest(CKTcircuit *, JOB *, int , IFvalue *);
|
||||||
extern int TRANsetParm(CKTcircuit *, JOB *, int , IFvalue *);
|
extern int TRANsetParm(CKTcircuit *, JOB *, int , IFvalue *);
|
||||||
extern int TRANinit(CKTcircuit *, JOB *);
|
extern int TRANinit(CKTcircuit *, JOB *);
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
extern int PSSaskQuest( CKTcircuit *, JOB *, int , IFvalue *);
|
|
||||||
extern int PSSsetParm( CKTcircuit *, JOB *, int , IFvalue *);
|
|
||||||
extern int PSSinit(CKTcircuit *, JOB *);
|
|
||||||
extern int DCpss( CKTcircuit *, int );
|
|
||||||
/* SP */
|
|
||||||
extern int NaskQuest(CKTcircuit *, JOB *, int, IFvalue *);
|
extern int NaskQuest(CKTcircuit *, JOB *, int, IFvalue *);
|
||||||
extern int NsetParm(CKTcircuit *, JOB *, int, IFvalue *);
|
extern int NsetParm(CKTcircuit *, JOB *, int, IFvalue *);
|
||||||
extern int NIacIter(CKTcircuit *);
|
extern int NIacIter(CKTcircuit *);
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
/**********
|
|
||||||
Author: 2010-05 Stefano Perticaroli ``spertica''
|
|
||||||
**********/
|
|
||||||
|
|
||||||
#ifndef PSS_H
|
|
||||||
#define PSS_H
|
|
||||||
|
|
||||||
#include "ngspice/jobdefs.h"
|
|
||||||
#include "ngspice/tskdefs.h"
|
|
||||||
/*
|
|
||||||
* PSSdefs.h - defs for pss analyses
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int JOBtype;
|
|
||||||
JOB *JOBnextJob;
|
|
||||||
char *JOBname;
|
|
||||||
double PSSguessedFreq;
|
|
||||||
CKTnode *PSSoscNode;
|
|
||||||
double PSSstabTime;
|
|
||||||
long PSSmode;
|
|
||||||
long int PSSpoints;
|
|
||||||
int PSSharms;
|
|
||||||
void *PSSplot_td;
|
|
||||||
void *PSSplot_fd;
|
|
||||||
int sc_iter;
|
|
||||||
double steady_coeff;
|
|
||||||
} PSSan;
|
|
||||||
|
|
||||||
#define GUESSED_FREQ 1
|
|
||||||
#define STAB_TIME 2
|
|
||||||
#define OSC_NODE 3
|
|
||||||
#define PSS_POINTS 4
|
|
||||||
#define PSS_HARMS 5
|
|
||||||
#define PSS_UIC 6
|
|
||||||
#define SC_ITER 7
|
|
||||||
#define STEADY_COEFF 8
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -98,15 +98,6 @@ libckt_la_SOURCES = \
|
||||||
cluster.c
|
cluster.c
|
||||||
|
|
||||||
|
|
||||||
if PSS_WANTED
|
|
||||||
libckt_la_SOURCES += \
|
|
||||||
dcpss.c \
|
|
||||||
pssaskq.c \
|
|
||||||
pssinit.c \
|
|
||||||
psssetp.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices
|
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices
|
||||||
AM_CFLAGS = $(STATIC)
|
AM_CFLAGS = $(STATIC)
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,6 @@ extern SPICEanalysis DISTOinfo;
|
||||||
extern SPICEanalysis NOISEinfo;
|
extern SPICEanalysis NOISEinfo;
|
||||||
extern SPICEanalysis SENSinfo;
|
extern SPICEanalysis SENSinfo;
|
||||||
|
|
||||||
#ifdef WITH_PSS
|
|
||||||
extern SPICEanalysis PSSinfo;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SPICEanalysis *analInfo[] = {
|
SPICEanalysis *analInfo[] = {
|
||||||
&OPTinfo,
|
&OPTinfo,
|
||||||
&ACinfo,
|
&ACinfo,
|
||||||
|
|
@ -31,9 +27,6 @@ SPICEanalysis *analInfo[] = {
|
||||||
&DISTOinfo,
|
&DISTOinfo,
|
||||||
&NOISEinfo,
|
&NOISEinfo,
|
||||||
&SENSinfo,
|
&SENSinfo,
|
||||||
#ifdef WITH_PSS
|
|
||||||
&PSSinfo,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,54 +0,0 @@
|
||||||
/**********
|
|
||||||
Author: 2010-05 Stefano Perticaroli ``spertica''
|
|
||||||
**********/
|
|
||||||
|
|
||||||
#include "ngspice/ngspice.h"
|
|
||||||
#include "ngspice/ifsim.h"
|
|
||||||
#include "ngspice/iferrmsg.h"
|
|
||||||
#include "ngspice/cktdefs.h"
|
|
||||||
#include "ngspice/pssdefs.h"
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
int
|
|
||||||
PSSaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
|
||||||
{
|
|
||||||
PSSan *job = (PSSan *) anal;
|
|
||||||
|
|
||||||
NG_IGNORE(ckt);
|
|
||||||
|
|
||||||
switch(which) {
|
|
||||||
|
|
||||||
case GUESSED_FREQ:
|
|
||||||
value->rValue = job->PSSguessedFreq;
|
|
||||||
break;
|
|
||||||
case OSC_NODE:
|
|
||||||
value->nValue = job->PSSoscNode;
|
|
||||||
break;
|
|
||||||
case STAB_TIME:
|
|
||||||
value->rValue = job->PSSstabTime;
|
|
||||||
break;
|
|
||||||
case PSS_UIC:
|
|
||||||
if (job->PSSmode & MODEUIC) {
|
|
||||||
value->iValue = 1;
|
|
||||||
} else {
|
|
||||||
value->iValue = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PSS_POINTS:
|
|
||||||
value->iValue = job->PSSpoints;
|
|
||||||
break;
|
|
||||||
case PSS_HARMS:
|
|
||||||
value->iValue = job->PSSharms;
|
|
||||||
break;
|
|
||||||
case SC_ITER:
|
|
||||||
value->iValue = job->sc_iter;
|
|
||||||
break;
|
|
||||||
case STEADY_COEFF:
|
|
||||||
value->rValue = job->steady_coeff;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return(E_BADPARM);
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
/**********
|
|
||||||
Author: 2010-05 Stefano Perticaroli ``spertica''
|
|
||||||
**********/
|
|
||||||
|
|
||||||
#include "ngspice/ngspice.h"
|
|
||||||
#include "ngspice/cktdefs.h"
|
|
||||||
#include "ngspice/trandefs.h"
|
|
||||||
#include "ngspice/pssdefs.h"
|
|
||||||
#include "ngspice/iferrmsg.h"
|
|
||||||
|
|
||||||
int PSSinit(CKTcircuit *ckt, JOB *anal)
|
|
||||||
{
|
|
||||||
PSSan *job = (PSSan *) anal;
|
|
||||||
|
|
||||||
/* Final time depends on stabilization time requested for PSS
|
|
||||||
and on at least one more oscillation period */
|
|
||||||
ckt->CKTfinalTime = job->PSSstabTime + 2/job->PSSguessedFreq;
|
|
||||||
/* Step is chosen empirically to be 1% of PSSguessedFreq */
|
|
||||||
ckt->CKTstep = 0.01 * (1/job->PSSguessedFreq);
|
|
||||||
/* Init time should be always zero */
|
|
||||||
ckt->CKTinitTime = 0;
|
|
||||||
/* MaxStep should not exceed Nyquist criterion */
|
|
||||||
ckt->CKTmaxStep = 0.5*(1/job->PSSguessedFreq);
|
|
||||||
ckt->CKTdelmin = 1e-9*ckt->CKTmaxStep;
|
|
||||||
ckt->CKTmode = job->PSSmode;
|
|
||||||
/* modified CKTdefs.h for the following - 100609 */
|
|
||||||
ckt->CKTstabTime = job->PSSstabTime;
|
|
||||||
ckt->CKTguessedFreq = job->PSSguessedFreq;
|
|
||||||
ckt->CKTharms = job->PSSharms;
|
|
||||||
ckt->CKTpsspoints = job->PSSpoints;
|
|
||||||
ckt->CKTsc_iter = job->sc_iter;
|
|
||||||
ckt->CKTsteady_coeff = job->steady_coeff;
|
|
||||||
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
/**********
|
|
||||||
Author: 2010-05 Stefano Perticaroli ``spertica''
|
|
||||||
**********/
|
|
||||||
|
|
||||||
#include "ngspice/ngspice.h"
|
|
||||||
#include "ngspice/ifsim.h"
|
|
||||||
#include "ngspice/iferrmsg.h"
|
|
||||||
#include "ngspice/cktdefs.h"
|
|
||||||
#include "ngspice/pssdefs.h"
|
|
||||||
|
|
||||||
#include "analysis.h"
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
int
|
|
||||||
PSSsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
|
||||||
{
|
|
||||||
PSSan *job = (PSSan *) anal;
|
|
||||||
|
|
||||||
NG_IGNORE(ckt);
|
|
||||||
|
|
||||||
switch(which) {
|
|
||||||
|
|
||||||
case GUESSED_FREQ:
|
|
||||||
job->PSSguessedFreq = value->rValue;
|
|
||||||
break;
|
|
||||||
case OSC_NODE:
|
|
||||||
job->PSSoscNode = value->nValue;
|
|
||||||
break;
|
|
||||||
case STAB_TIME:
|
|
||||||
job->PSSstabTime = value->rValue;
|
|
||||||
break;
|
|
||||||
case PSS_POINTS:
|
|
||||||
job->PSSpoints = value->iValue;
|
|
||||||
break;
|
|
||||||
case PSS_HARMS:
|
|
||||||
job->PSSharms = value->iValue;
|
|
||||||
break;
|
|
||||||
case PSS_UIC:
|
|
||||||
if(value->iValue) {
|
|
||||||
job->PSSmode |= MODEUIC;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SC_ITER:
|
|
||||||
job->sc_iter = value->iValue;
|
|
||||||
break;
|
|
||||||
case STEADY_COEFF:
|
|
||||||
job->steady_coeff = value->rValue;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return(E_BADPARM);
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static IFparm PSSparms[] = {
|
|
||||||
{ "fguess", GUESSED_FREQ, IF_SET|IF_REAL, "guessed frequency" },
|
|
||||||
{ "oscnode", OSC_NODE, IF_SET|IF_STRING, "oscillation node" },
|
|
||||||
{ "stabtime", STAB_TIME, IF_SET|IF_REAL, "stabilization time" },
|
|
||||||
{ "points", PSS_POINTS, IF_SET|IF_INTEGER, "pick equispaced number of time points in PSS" },
|
|
||||||
{ "harmonics", PSS_HARMS, IF_SET|IF_INTEGER, "consider only given number of harmonics in PSS from DC" },
|
|
||||||
{ "uic", PSS_UIC, IF_SET|IF_INTEGER, "use initial conditions (1 true - 0 false)" },
|
|
||||||
{ "sc_iter", SC_ITER, IF_SET|IF_INTEGER, "maxmimum number of shooting cycle iterations" },
|
|
||||||
{ "steady_coeff", STEADY_COEFF, IF_SET|IF_INTEGER, "set steady coefficient for convergence test" }
|
|
||||||
};
|
|
||||||
|
|
||||||
SPICEanalysis PSSinfo = {
|
|
||||||
{
|
|
||||||
"PSS",
|
|
||||||
"Periodic Steady State analysis",
|
|
||||||
|
|
||||||
sizeof(PSSparms)/sizeof(IFparm),
|
|
||||||
PSSparms
|
|
||||||
},
|
|
||||||
sizeof(PSSan),
|
|
||||||
TIMEDOMAIN,
|
|
||||||
1,
|
|
||||||
PSSsetParm,
|
|
||||||
PSSaskQuest,
|
|
||||||
PSSinit,
|
|
||||||
DCpss
|
|
||||||
};
|
|
||||||
|
|
@ -627,73 +627,6 @@ dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_PSS
|
|
||||||
/*SP: Steady State Analyis */
|
|
||||||
static int
|
|
||||||
dot_pss(char *line, void *ckt, INPtables *tab, card *current,
|
|
||||||
void *task, void *gnode, JOB *foo)
|
|
||||||
{
|
|
||||||
int error; /* error code temporary */
|
|
||||||
IFvalue ptemp; /* a value structure to package resistance into */
|
|
||||||
IFvalue *parm; /* a pointer to a value struct for function returns */
|
|
||||||
char *nname; /* the oscNode name */
|
|
||||||
CKTnode *nnode; /* the oscNode node */
|
|
||||||
int which; /* which analysis we are performing */
|
|
||||||
int i; /* generic loop variable */
|
|
||||||
char *word; /* something to stick a word of input into */
|
|
||||||
|
|
||||||
NG_IGNORE(gnode);
|
|
||||||
|
|
||||||
/* .pss Fguess StabTime OscNode <UIC>*/
|
|
||||||
which = -1;
|
|
||||||
for (i = 0; i < ft_sim->numAnalyses; i++) {
|
|
||||||
if (strcmp(ft_sim->analyses[i]->name, "PSS") == 0) {
|
|
||||||
which = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (which == -1) {
|
|
||||||
LITERR("Periodic steady state analysis unsupported.\n");
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
IFC(newAnalysis, (ckt, which, "Periodic steady state Analysis", &foo, task));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Fguess */
|
|
||||||
GCA(INPapName, (ckt, which, foo, "fguess", parm));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* StabTime */
|
|
||||||
GCA(INPapName, (ckt, which, foo, "stabtime", parm));
|
|
||||||
|
|
||||||
INPgetNetTok(&line, &nname, 0);
|
|
||||||
INPtermInsert(ckt, &nname, tab, &nnode);
|
|
||||||
ptemp.nValue = nnode;
|
|
||||||
GCA(INPapName, (ckt, which, foo, "oscnode", &ptemp)) /* OscNode given as string */
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */
|
|
||||||
GCA(INPapName, (ckt, which, foo, "points", parm));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS harmonics */
|
|
||||||
GCA(INPapName, (ckt, which, foo, "harmonics", parm));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* SC iterations */
|
|
||||||
GCA(INPapName, (ckt, which, foo, "sc_iter", parm));
|
|
||||||
|
|
||||||
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Steady coefficient */
|
|
||||||
GCA(INPapName, (ckt, which, foo, "steady_coeff", parm));
|
|
||||||
|
|
||||||
if (*line) {
|
|
||||||
INPgetTok(&line, &word, 1); /* uic? */
|
|
||||||
if (strcmp(word, "uic") == 0) {
|
|
||||||
ptemp.iValue = 1;
|
|
||||||
GCA(INPapName, (ckt, which, foo, "uic", &ptemp));
|
|
||||||
} else {
|
|
||||||
fprintf(stderr,"Error: unknown parameter %s on .pss - ignored\n", word);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dot_options(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
dot_options(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
||||||
|
|
@ -774,13 +707,6 @@ INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *
|
||||||
} else if ((strcmp(token, ".tran") == 0)) {
|
} else if ((strcmp(token, ".tran") == 0)) {
|
||||||
rtn = dot_tran(line, ckt, tab, current, task, gnode, foo);
|
rtn = dot_tran(line, ckt, tab, current, task, gnode, foo);
|
||||||
goto quit;
|
goto quit;
|
||||||
#ifdef WITH_PSS
|
|
||||||
/* SP: Steady State Analysis */
|
|
||||||
} else if ((strcmp(token, ".pss") == 0)) {
|
|
||||||
rtn = dot_pss(line, ckt, tab, current, task, gnode, foo);
|
|
||||||
goto quit;
|
|
||||||
/* SP */
|
|
||||||
#endif
|
|
||||||
} else if ((strcmp(token, ".subckt") == 0) ||
|
} else if ((strcmp(token, ".subckt") == 0) ||
|
||||||
(strcmp(token, ".ends") == 0)) {
|
(strcmp(token, ".ends") == 0)) {
|
||||||
/* not yet implemented - warn & ignore */
|
/* not yet implemented - warn & ignore */
|
||||||
|
|
|
||||||
|
|
@ -2756,10 +2756,6 @@
|
||||||
RelativePath="..\src\spicelib\devices\jfet2\psmodel.h"
|
RelativePath="..\src\spicelib\devices\jfet2\psmodel.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\src\include\ngspice\pssdefs.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\frontend\plotting\pvec.h"
|
RelativePath="..\src\frontend\plotting\pvec.h"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue