Cleaned up LTRA, TRA and URC code and updated DEVICES file.
This commit is contained in:
parent
8ec77c3b7a
commit
51fee5964c
|
|
@ -1,5 +1,11 @@
|
|||
2003-12-31 Paolo Nenzi <p.nenzi@ieee.org>
|
||||
|
||||
* src/spicelib/devices/tra/*: Cleaned code.
|
||||
|
||||
* src/spicelib/devices/ltra/*: Cleaned code.
|
||||
|
||||
* src/spicelib/devices/urc/*: Cleaned code.
|
||||
|
||||
* tests/transmission/{cpl*, txl*, ibm*}: Added test files for the
|
||||
kspice's cpl and txl devices.
|
||||
|
||||
|
|
@ -18,7 +24,8 @@
|
|||
|
||||
* tests/mes, tests/mes/subth.cir: added test netlist for mes devices.
|
||||
|
||||
* DEVICES: updated documentation including MES and MESA changes.
|
||||
* DEVICES: updated documentation including MES, MESA, CPL, TXL, TRA,
|
||||
LTRA and URC changes.
|
||||
|
||||
2003-12-30 Paolo Nenzi <p.nenzi@ieee.org>
|
||||
|
||||
|
|
|
|||
34
DEVICES
34
DEVICES
|
|
@ -74,11 +74,29 @@ CPL - Simple Coupled Multiconductor Lines (Kspice)
|
|||
you have kspice docs, can you write a short description
|
||||
of its use ?
|
||||
|
||||
- Does not implement parallel code switches
|
||||
|
||||
LTRA - Lossy Transmission line
|
||||
Initial release
|
||||
Initial Release.
|
||||
Ver: N/A
|
||||
Class: O
|
||||
Level: 1 (and only)
|
||||
Status:
|
||||
|
||||
Original spice model.
|
||||
|
||||
- Does not implement parallel code switches
|
||||
|
||||
TRA - Transmission line
|
||||
Initial release
|
||||
Initial Release.
|
||||
Ver: N/A
|
||||
Class: T
|
||||
Level: 1 (and only)
|
||||
Status:
|
||||
|
||||
Original spice model.
|
||||
|
||||
- Does not implement parallel code switches
|
||||
|
||||
TXL - Simple Lossy Transmission Line (Kspice)
|
||||
Initial Release.
|
||||
|
|
@ -93,10 +111,20 @@ TXL - Simple Lossy Transmission Line (Kspice)
|
|||
|
||||
There is some code left out from compilation:
|
||||
TXLaccept and TXLfindBr. Any ideas ?
|
||||
|
||||
- Does not implement parallel code switches
|
||||
|
||||
|
||||
URC - Uniform distributed RC line
|
||||
Initial release
|
||||
Initial Release.
|
||||
Ver: N/A
|
||||
Class: U
|
||||
Level: 1 (and only)
|
||||
Status:
|
||||
|
||||
Original spcice model.
|
||||
|
||||
- Does not implement parallel code switches
|
||||
|
||||
|
||||
***************************************************************************
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "ifsim.h"
|
||||
#include "ltradefs.h"
|
||||
|
|
|
|||
|
|
@ -4,16 +4,13 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "ltradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAaccept(ckt, inModel)
|
||||
CKTcircuit *ckt;
|
||||
GENmodel *inModel;
|
||||
LTRAaccept(CKTcircuit *ckt, GENmodel *inModel)
|
||||
{
|
||||
LTRAmodel *model = (LTRAmodel *) inModel;
|
||||
LTRAinstance *here;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "ltradefs.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -13,9 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAacLoad(inModel, ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
LTRAacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
/*
|
||||
* load the appropriate values for the current timepoint into the sparse
|
||||
* matrix and the right-hand-side vector
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
#include "ifsim.h"
|
||||
|
|
@ -18,12 +17,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
LTRAask(ckt, inst, which, value, select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
LTRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
|
||||
{
|
||||
LTRAinstance *here = (LTRAinstance *) inst;
|
||||
int temp;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,12 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ltradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAdelete(inModel, name, kill)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **kill;
|
||||
LTRAdelete(GENmodel *inModel, IFuid name, GENinstance **kill)
|
||||
{
|
||||
LTRAinstance **fast = (LTRAinstance **) kill;
|
||||
LTRAmodel *model = (LTRAmodel *) inModel;
|
||||
|
|
|
|||
|
|
@ -4,13 +4,11 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ltradefs.h"
|
||||
#include "suffix.h"
|
||||
|
||||
void
|
||||
LTRAdestroy(inModel)
|
||||
GENmodel **inModel;
|
||||
LTRAdestroy(GENmodel **inModel)
|
||||
{
|
||||
LTRAmodel **model = (LTRAmodel **) inModel;
|
||||
LTRAinstance *here;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
Modified: 2000 AlansFixes
|
||||
**********/
|
||||
|
||||
#ifdef __STDC__
|
||||
|
||||
extern int LTRAaccept(CKTcircuit*,GENmodel*);
|
||||
extern int LTRAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
extern int LTRAacLoad(GENmodel*,CKTcircuit*);
|
||||
|
|
@ -44,43 +44,3 @@ extern double LTRAh3dashCoeffSetup(double*,int,double,double,double,double*,int,
|
|||
extern void LTRArcCoeffsSetup(double*,double*,double*,double*,double*,double*,int,double,double,double,double*,int,double);
|
||||
extern void LTRArlcCoeffsSetup(double*,double*,double*,double*,double*,double*,int,double,double,double,double,double*,int,double,int*);
|
||||
extern int LTRAstraightLineCheck(double,double,double,double,double,double,double,double);
|
||||
#else /* stdc */
|
||||
extern int LTRAaccept();
|
||||
extern int LTRAask();
|
||||
extern int LTRAacLoad();
|
||||
extern int LTRAdelete();
|
||||
extern void LTRAdestroy();
|
||||
extern int LTRAload();
|
||||
extern int LTRAmAsk();
|
||||
extern int LTRAmDelete();
|
||||
extern int LTRAparam();
|
||||
extern int LTRAmParam();
|
||||
extern int LTRAsetup();
|
||||
extern int LTRAunsetup();
|
||||
extern int LTRAtemp();
|
||||
extern int LTRAtrunc();
|
||||
|
||||
extern int LTRAquadInterp();
|
||||
/*
|
||||
extern double LTRAcoeffSetup();
|
||||
extern double LTRAtCoeffSetup();
|
||||
extern double LTRAdivDiffs();
|
||||
*/
|
||||
extern double LTRArlcH1dashFunc();
|
||||
extern double LTRArlcH2Func();
|
||||
extern double LTRArlcH3dashFunc();
|
||||
extern double LTRArlcH1dashTwiceIntFunc();
|
||||
extern double LTRArlcH3dashIntFunc();
|
||||
extern double LTRArcH1dashTwiceIntFunc();
|
||||
extern double LTRArcH2TwiceIntFunc();
|
||||
extern double LTRArcH3dashTwiceIntFunc();
|
||||
extern double LTRAlteCalculate();
|
||||
/*
|
||||
extern double LTRAh1dashCoeffSetup();
|
||||
extern double LTRAh3dashCoeffSetup();
|
||||
*/
|
||||
extern void LTRArcCoeffsSetup();
|
||||
extern void LTRArlcCoeffsSetup();
|
||||
extern int LTRAstraightLineCheck();
|
||||
#endif /* stdc */
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "ltradefs.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -12,9 +11,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAload(inModel, ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
LTRAload(GENmodel *inModel, CKTcircuit *ckt)
|
||||
/*
|
||||
* load the appropriate values for the current timepoint into the sparse
|
||||
* matrix and the right-hand-side vector
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "const.h"
|
||||
#include "ifsim.h"
|
||||
#include "ltradefs.h"
|
||||
|
|
@ -16,11 +15,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAmAsk(ckt, inModel, param, value)
|
||||
CKTcircuit *ckt;
|
||||
GENmodel *inModel;
|
||||
int param;
|
||||
IFvalue *value;
|
||||
LTRAmAsk(CKTcircuit *ckt, GENmodel *inModel, int param, IFvalue *value)
|
||||
{
|
||||
LTRAmodel *mods = (LTRAmodel *) inModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,12 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ltradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAmDelete(inModel, modname, kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
LTRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
LTRAmodel **model = (LTRAmodel **) inModel;
|
||||
LTRAmodel *modfast = (LTRAmodel *) kill;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "const.h"
|
||||
#include "ifsim.h"
|
||||
#include "ltradefs.h"
|
||||
|
|
@ -16,10 +15,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAmParam(param, value, inModel)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENmodel *inModel;
|
||||
LTRAmParam(int param, IFvalue *value, GENmodel *inModel)
|
||||
{
|
||||
LTRAmodel *mods = (LTRAmodel *) inModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ltradefs.h"
|
||||
#include "ifsim.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -13,11 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
LTRAparam(param, value, inst, select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
LTRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||
{
|
||||
LTRAinstance *here = (LTRAinstance *) inst;
|
||||
switch (param) {
|
||||
|
|
@ -41,10 +36,13 @@ LTRAparam(param, value, inst, select)
|
|||
switch (value->v.numValue) {
|
||||
case 4:
|
||||
here->LTRAinitCur2 = *(value->v.vec.rVec + 3);
|
||||
break;
|
||||
case 3:
|
||||
here->LTRAinitVolt2 = *(value->v.vec.rVec + 2);
|
||||
break;
|
||||
case 2:
|
||||
here->LTRAinitCur1 = *(value->v.vec.rVec + 1);
|
||||
break;
|
||||
case 1:
|
||||
here->LTRAinitVolt1 = *(value->v.vec.rVec);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "ltradefs.h"
|
||||
|
|
@ -12,11 +11,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAsetup(matrix, inModel, ckt, state)
|
||||
SMPmatrix *matrix;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
int *state;
|
||||
LTRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
||||
/*
|
||||
* load the transmission line structure with those pointers needed later for
|
||||
* fast matrix loading
|
||||
|
|
@ -223,9 +218,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
|||
}
|
||||
|
||||
int
|
||||
LTRAunsetup(inModel, ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
LTRAunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
LTRAmodel *model;
|
||||
LTRAinstance *here;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "ltradefs.h"
|
||||
|
|
@ -13,9 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
LTRAtemp(inModel, ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
LTRAtemp(GENmodel *inModel, CKTcircuit *ckt)
|
||||
/*
|
||||
* pre-process parameters for later use
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,17 +4,13 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "ltradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
LTRAtrunc(inModel, ckt, timeStep)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
double *timeStep;
|
||||
LTRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
||||
|
||||
{
|
||||
LTRAmodel *model = (LTRAmodel *) inModel;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "ifsim.h"
|
||||
#include "tradefs.h"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "tradefs.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,9 +13,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
TRAaccept(ckt,inModel)
|
||||
CKTcircuit *ckt;
|
||||
GENmodel *inModel;
|
||||
TRAaccept(CKTcircuit *ckt, GENmodel *inModel)
|
||||
{
|
||||
TRAmodel *model = (TRAmodel *)inModel;
|
||||
TRAinstance *here;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,13 @@ Author: 1985 Thomas L. Quarles
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "tradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
TRAacLoad(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
TRAacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
/* actually load the current values into the
|
||||
* sparse matrix previously provided
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
#include "ifsim.h"
|
||||
|
|
@ -22,12 +21,7 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
TRAask(ckt,inst,which,value,select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
TRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
|
||||
{
|
||||
TRAinstance *here = (TRAinstance *)inst;
|
||||
int temp;
|
||||
|
|
|
|||
|
|
@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "tradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
TRAdelete(inModel,name,kill)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **kill;
|
||||
TRAdelete(GENmodel *inModel, IFuid name, GENinstance **kill)
|
||||
{
|
||||
TRAinstance **fast = (TRAinstance **)kill;
|
||||
TRAmodel *model = (TRAmodel *)inModel;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,12 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "tradefs.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
void
|
||||
TRAdestroy(inModel)
|
||||
GENmodel **inModel;
|
||||
TRAdestroy(GENmodel **inModel)
|
||||
{
|
||||
TRAmodel **model = (TRAmodel **)inModel;
|
||||
TRAinstance *here;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
|
||||
#ifdef __STDC__
|
||||
extern int TRAacLoad(GENmodel*,CKTcircuit*);
|
||||
extern int TRAaccept(CKTcircuit*,GENmodel*);
|
||||
extern int TRAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
|
|
@ -17,18 +16,3 @@ extern int TRAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
|
|||
extern int TRAunsetup(GENmodel*,CKTcircuit*);
|
||||
extern int TRAtemp(GENmodel*,CKTcircuit*);
|
||||
extern int TRAtrunc(GENmodel*,CKTcircuit*,double*);
|
||||
#else /* stdc */
|
||||
extern int TRAacLoad();
|
||||
extern int TRAaccept();
|
||||
extern int TRAask();
|
||||
extern int TRAdelete();
|
||||
extern void TRAdestroy();
|
||||
extern int TRAload();
|
||||
extern int TRAmAsk();
|
||||
extern int TRAmDelete();
|
||||
extern int TRAparam();
|
||||
extern int TRAsetup();
|
||||
extern int TRAunsetup();
|
||||
extern int TRAtemp();
|
||||
extern int TRAtrunc();
|
||||
#endif /* stdc */
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "tradefs.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -16,9 +15,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
TRAload(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
TRAload(GENmodel *inModel, CKTcircuit *ckt)
|
||||
/* actually load the current values into the
|
||||
* sparse matrix previously provided
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "tradefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
TRAmDelete(inModel,modname,kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
TRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
TRAmodel **model = (TRAmodel **)inModel;
|
||||
TRAmodel *modfast = (TRAmodel *)kill;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "tradefs.h"
|
||||
#include "ifsim.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,11 +14,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
TRAparam(param,value,inst,select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||
{
|
||||
TRAinstance *here = (TRAinstance *)inst;
|
||||
switch(param) {
|
||||
|
|
@ -67,10 +62,13 @@ TRAparam(param,value,inst,select)
|
|||
switch(value->v.numValue){
|
||||
case 4:
|
||||
here->TRAinitCur2 = *(value->v.vec.rVec+3);
|
||||
break;
|
||||
case 3:
|
||||
here->TRAinitVolt2 = *(value->v.vec.rVec+2);
|
||||
break;
|
||||
case 2:
|
||||
here->TRAinitCur1 = *(value->v.vec.rVec+1);
|
||||
break;
|
||||
case 1:
|
||||
here->TRAinitVolt1 = *(value->v.vec.rVec);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "tradefs.h"
|
||||
|
|
@ -16,11 +15,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
TRAsetup(matrix,inModel,ckt,state)
|
||||
SMPmatrix *matrix;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
int *state;
|
||||
TRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
||||
/* load the transmission line structure with those pointers needed later
|
||||
* for fast matrix loading
|
||||
*/
|
||||
|
|
@ -118,9 +113,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
|||
}
|
||||
|
||||
int
|
||||
TRAunsetup(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
TRAunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
TRAmodel *model;
|
||||
TRAinstance *here;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "tradefs.h"
|
||||
|
|
@ -16,9 +15,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
TRAtemp(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
TRAtemp(GENmodel *inModel, CKTcircuit *ckt)
|
||||
/*
|
||||
* pre-process parameters for later use
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "tradefs.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,10 +13,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
TRAtrunc(inModel,ckt,timeStep)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
double *timeStep;
|
||||
TRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
||||
|
||||
{
|
||||
TRAmodel *model = (TRAmodel *)inModel;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "urcdefs.h"
|
||||
#include "suffix.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
#include "ifsim.h"
|
||||
|
|
@ -23,12 +22,7 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
URCask(ckt,inst,which,value,select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
URCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
|
||||
{
|
||||
URCinstance *here = (URCinstance *)inst;
|
||||
switch(which) {
|
||||
|
|
|
|||
|
|
@ -6,17 +6,13 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "urcdefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
URCdelete(inModel,name,inst)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **inst;
|
||||
URCdelete(GENmodel *inModel, IFuid name, GENinstance **inst)
|
||||
{
|
||||
URCmodel *model = (URCmodel *)inModel;
|
||||
URCinstance **fast = (URCinstance**)inst;
|
||||
|
|
|
|||
|
|
@ -7,14 +7,12 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "urcdefs.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
void
|
||||
URCdestroy(inModel)
|
||||
GENmodel **inModel;
|
||||
URCdestroy(GENmodel **inModel)
|
||||
{
|
||||
URCmodel **model = (URCmodel **)inModel;
|
||||
URCinstance *here;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
#include "ifsim.h"
|
||||
|
|
@ -22,11 +21,7 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
URCmAsk(ckt,inst,which,value)
|
||||
CKTcircuit *ckt;
|
||||
GENmodel *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
URCmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
|
||||
{
|
||||
URCmodel *here = (URCmodel *)inst;
|
||||
switch(which) {
|
||||
|
|
|
|||
|
|
@ -6,17 +6,13 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "urcdefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
URCmDelete(inModel,modname,kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
URCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
URCmodel **model = (URCmodel**)inModel;
|
||||
URCmodel *modfast = (URCmodel *)kill;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "urcdefs.h"
|
||||
#include "ifsim.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,10 +13,7 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
URCmParam(param,value,inModel)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENmodel *inModel;
|
||||
URCmParam(int param, IFvalue *value, GENmodel *inModel)
|
||||
{
|
||||
URCmodel *model = (URCmodel *)inModel;
|
||||
switch(param) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1987 Thomas L. Quarles
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "urcdefs.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,11 +14,7 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
URCparam(param,value,inst,select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
URCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||
{
|
||||
URCinstance *here = (URCinstance *)inst;
|
||||
switch(param) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "urcdefs.h"
|
||||
#include "cktdefs.h"
|
||||
|
|
@ -14,11 +13,7 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
URCsetup(matrix,inModel,ckt,state)
|
||||
SMPmatrix *matrix;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
int *state;
|
||||
URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
||||
/* create the resistors/capacitors used to model the URC
|
||||
*/
|
||||
{
|
||||
|
|
@ -280,9 +275,7 @@ URCsetup(matrix,inModel,ckt,state)
|
|||
}
|
||||
|
||||
int
|
||||
URCunsetup(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
URCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
IFuid varUid;
|
||||
int error;
|
||||
|
|
|
|||
Loading…
Reference in New Issue