Browse Source

src/spicelib/devices/*/*def*.h, declare external node variables const

for almost all other external nodes (notable exception "txl")
src/spicelib/devices/*/*def*.h, declare external node variables const

1) The compiler shall emit an error message if we still mess around
     with external node numbers.
2) To mark which elements of the instance struct are meant to be set
     externally when parsing the netlist

These "external" node variables are exclusively set via the
  overlay struct GENinstance, member GENnode[]

We shall not mess around with these "external" node variables
  because it would get rather difficult to avoid bugs considering
  re-invocation of the XXXsetup() routine.
This gets interesting for devices with optional ports,
  which get copied around depending on the amount of connected ports.
pre-master-46
rlar 9 years ago
parent
commit
00c743c37d
  1. 4
      src/spicelib/devices/asrc/asrcdefs.h
  2. 8
      src/spicelib/devices/bjt/bjtdefs.h
  3. 8
      src/spicelib/devices/bsim1/bsim1def.h
  4. 8
      src/spicelib/devices/bsim2/bsim2def.h
  5. 8
      src/spicelib/devices/bsim3/bsim3def.h
  6. 14
      src/spicelib/devices/bsim3soi_dd/b3soidddef.h
  7. 14
      src/spicelib/devices/bsim3soi_fd/b3soifddef.h
  8. 14
      src/spicelib/devices/bsim3soi_pd/b3soipddef.h
  9. 8
      src/spicelib/devices/bsim3v0/bsim3v0def.h
  10. 8
      src/spicelib/devices/bsim3v1/bsim3v1def.h
  11. 8
      src/spicelib/devices/bsim3v32/bsim3v32def.h
  12. 8
      src/spicelib/devices/bsim4/bsim4def.h
  13. 8
      src/spicelib/devices/bsim4v5/bsim4v5def.h
  14. 8
      src/spicelib/devices/bsim4v6/bsim4v6def.h
  15. 8
      src/spicelib/devices/bsim4v7/bsim4v7def.h
  16. 14
      src/spicelib/devices/bsimsoi/b4soidef.h
  17. 4
      src/spicelib/devices/cap/capdefs.h
  18. 4
      src/spicelib/devices/cccs/cccsdefs.h
  19. 4
      src/spicelib/devices/ccvs/ccvsdefs.h
  20. 4
      src/spicelib/devices/csw/cswdefs.h
  21. 4
      src/spicelib/devices/dio/diodefs.h
  22. 6
      src/spicelib/devices/hfet1/hfetdefs.h
  23. 8
      src/spicelib/devices/hisim2/hsm2def.h
  24. 12
      src/spicelib/devices/hisimhv1/hsmhvdef.h
  25. 12
      src/spicelib/devices/hisimhv2/hsmhv2def.h
  26. 4
      src/spicelib/devices/ind/inddefs.h
  27. 4
      src/spicelib/devices/isrc/isrcdefs.h
  28. 6
      src/spicelib/devices/jfet/jfetdefs.h
  29. 6
      src/spicelib/devices/jfet2/jfet2defs.h
  30. 8
      src/spicelib/devices/ltra/ltradefs.h
  31. 6
      src/spicelib/devices/mes/mesdefs.h
  32. 6
      src/spicelib/devices/mesa/mesadefs.h
  33. 8
      src/spicelib/devices/mos1/mos1defs.h
  34. 8
      src/spicelib/devices/mos2/mos2defs.h
  35. 8
      src/spicelib/devices/mos3/mos3defs.h
  36. 8
      src/spicelib/devices/mos6/mos6defs.h
  37. 8
      src/spicelib/devices/mos9/mos9defs.h
  38. 6
      src/spicelib/devices/nbjt/nbjtdefs.h
  39. 6
      src/spicelib/devices/nbjt2/nbjt2def.h
  40. 2
      src/spicelib/devices/ndev/ndevdefs.h
  41. 4
      src/spicelib/devices/numd/numddefs.h
  42. 4
      src/spicelib/devices/numd2/numd2def.h
  43. 8
      src/spicelib/devices/numos/numosdef.h
  44. 4
      src/spicelib/devices/res/resdefs.h
  45. 12
      src/spicelib/devices/soi3/soi3defs.h
  46. 8
      src/spicelib/devices/sw/swdefs.h
  47. 8
      src/spicelib/devices/tra/tradefs.h
  48. 6
      src/spicelib/devices/urc/urcdefs.h
  49. 8
      src/spicelib/devices/vbic/vbicdefs.h
  50. 8
      src/spicelib/devices/vccs/vccsdefs.h
  51. 8
      src/spicelib/devices/vcvs/vcvsdefs.h
  52. 4
      src/spicelib/devices/vsrc/vsrcdefs.h

4
src/spicelib/devices/asrc/asrcdefs.h

@ -23,8 +23,8 @@ typedef struct sASRCinstance {
* current model */
IFuid ASRCname; /* pointer to character string naming this instance */
int ASRCstates; /* state info */
int ASRCposNode; /* number of positive node of source */
int ASRCnegNode; /* number of negative node of source */
const int ASRCposNode; /* number of positive node of source */
const int ASRCnegNode; /* number of negative node of source */
int ASRCtype; /* Whether source is voltage or current */
int ASRCbranch; /* number of branch equation added for v source */

8
src/spicelib/devices/bjt/bjtdefs.h

@ -23,10 +23,10 @@ typedef struct sBJTinstance {
IFuid BJTname; /* pointer to character string naming this instance */
int BJTstate; /* pointer to start of state vector for bjt */
int BJTcolNode; /* number of collector node of bjt */
int BJTbaseNode; /* number of base node of bjt */
int BJTemitNode; /* number of emitter node of bjt */
int BJTsubstNode; /* number of substrate node of bjt */
const int BJTcolNode; /* number of collector node of bjt */
const int BJTbaseNode; /* number of base node of bjt */
const int BJTemitNode; /* number of emitter node of bjt */
const int BJTsubstNode; /* number of substrate node of bjt */
int BJTcolPrimeNode; /* number of internal collector node of bjt */
int BJTbasePrimeNode; /* number of internal base node of bjt */
int BJTemitPrimeNode; /* number of internal emitter node of bjt */

8
src/spicelib/devices/bsim1/bsim1def.h

@ -26,10 +26,10 @@ typedef struct sBSIM1instance {
IFuid B1name; /* pointer to character string naming this instance */
int B1states; /* index into state table for this device */
int B1dNode; /* number of the gate node of the mosfet */
int B1gNode; /* number of the gate node of the mosfet */
int B1sNode; /* number of the source node of the mosfet */
int B1bNode; /* number of the bulk node of the mosfet */
const int B1dNode; /* number of the gate node of the mosfet */
const int B1gNode; /* number of the gate node of the mosfet */
const int B1sNode; /* number of the source node of the mosfet */
const int B1bNode; /* number of the bulk node of the mosfet */
int B1dNodePrime; /* number of the internal drain node of the mosfet */
int B1sNodePrime; /* number of the internal source node of the mosfet */

8
src/spicelib/devices/bsim2/bsim2def.h

@ -22,10 +22,10 @@ typedef struct sBSIM2instance {
IFuid B2name; /* pointer to character string naming this instance */
int B2states; /* index into state table for this device */
int B2dNode; /* number of the gate node of the mosfet */
int B2gNode; /* number of the gate node of the mosfet */
int B2sNode; /* number of the source node of the mosfet */
int B2bNode; /* number of the bulk node of the mosfet */
const int B2dNode; /* number of the gate node of the mosfet */
const int B2gNode; /* number of the gate node of the mosfet */
const int B2sNode; /* number of the source node of the mosfet */
const int B2bNode; /* number of the bulk node of the mosfet */
int B2dNodePrime; /* number of the internal drain node of the mosfet */
int B2sNodePrime; /* number of the internal source node of the mosfet */

8
src/spicelib/devices/bsim3/bsim3def.h

@ -22,10 +22,10 @@ typedef struct sBSIM3instance
struct sBSIM3instance *BSIM3nextInstance;
IFuid BSIM3name;
int BSIM3states; /* index into state table for this device */
int BSIM3dNode;
int BSIM3gNode;
int BSIM3sNode;
int BSIM3bNode;
const int BSIM3dNode;
const int BSIM3gNode;
const int BSIM3sNode;
const int BSIM3bNode;
int BSIM3dNodePrime;
int BSIM3sNodePrime;
int BSIM3qNode; /* MCJ */

14
src/spicelib/devices/bsim3soi_dd/b3soidddef.h

@ -26,13 +26,13 @@ typedef struct sB3SOIDDinstance
IFuid B3SOIDDname;
int B3SOIDDstates; /* index into state table for this device */
int B3SOIDDdNode;
int B3SOIDDgNode;
int B3SOIDDsNode;
int B3SOIDDeNode;
int B3SOIDDbNodeExt;
int B3SOIDDtempNodeExt;
int B3SOIDDpNodeExt;
const int B3SOIDDdNode;
const int B3SOIDDgNode;
const int B3SOIDDsNode;
const int B3SOIDDeNode;
const int B3SOIDDbNodeExt;
const int B3SOIDDtempNodeExt;
const int B3SOIDDpNodeExt;
int B3SOIDDbNode;
int B3SOIDDtempNode;
int B3SOIDDpNode;

14
src/spicelib/devices/bsim3soi_fd/b3soifddef.h

@ -26,13 +26,13 @@ typedef struct sB3SOIFDinstance
IFuid B3SOIFDname;
int B3SOIFDstates; /* index into state table for this device */
int B3SOIFDdNode;
int B3SOIFDgNode;
int B3SOIFDsNode;
int B3SOIFDeNode;
int B3SOIFDbNodeExt;
int B3SOIFDtempNodeExt;
int B3SOIFDpNodeExt;
const int B3SOIFDdNode;
const int B3SOIFDgNode;
const int B3SOIFDsNode;
const int B3SOIFDeNode;
const int B3SOIFDbNodeExt;
const int B3SOIFDtempNodeExt;
const int B3SOIFDpNodeExt;
int B3SOIFDbNode;
int B3SOIFDtempNode;
int B3SOIFDpNode;

14
src/spicelib/devices/bsim3soi_pd/b3soipddef.h

@ -30,13 +30,13 @@ typedef struct sB3SOIPDinstance
IFuid B3SOIPDname;
int B3SOIPDstates; /* index into state table for this device */
int B3SOIPDdNode;
int B3SOIPDgNode;
int B3SOIPDsNode;
int B3SOIPDeNode;
int B3SOIPDbNodeExt;
int B3SOIPDtempNodeExt;
int B3SOIPDpNodeExt;
const int B3SOIPDdNode;
const int B3SOIPDgNode;
const int B3SOIPDsNode;
const int B3SOIPDeNode;
const int B3SOIPDbNodeExt;
const int B3SOIPDtempNodeExt;
const int B3SOIPDpNodeExt;
int B3SOIPDpNode;
int B3SOIPDbNode;
int B3SOIPDtempNode;

8
src/spicelib/devices/bsim3v0/bsim3v0def.h

@ -20,10 +20,10 @@ typedef struct sBSIM3v0instance
IFuid BSIM3v0name;
int BSIM3v0states; /* index into state table for this device */
int BSIM3v0dNode;
int BSIM3v0gNode;
int BSIM3v0sNode;
int BSIM3v0bNode;
const int BSIM3v0dNode;
const int BSIM3v0gNode;
const int BSIM3v0sNode;
const int BSIM3v0bNode;
int BSIM3v0dNodePrime;
int BSIM3v0sNodePrime;
int BSIM3v0qNode; /* MCJ */

8
src/spicelib/devices/bsim3v1/bsim3v1def.h

@ -21,10 +21,10 @@ typedef struct sBSIM3v1instance
IFuid BSIM3v1name;
int BSIM3v1states; /* index into state table for this device */
int BSIM3v1dNode;
int BSIM3v1gNode;
int BSIM3v1sNode;
int BSIM3v1bNode;
const int BSIM3v1dNode;
const int BSIM3v1gNode;
const int BSIM3v1sNode;
const int BSIM3v1bNode;
int BSIM3v1dNodePrime;
int BSIM3v1sNodePrime;
int BSIM3v1qNode; /* MCJ */

8
src/spicelib/devices/bsim3v32/bsim3v32def.h

@ -22,10 +22,10 @@ typedef struct sBSIM3v32instance
struct sBSIM3v32instance *BSIM3v32nextInstance;
IFuid BSIM3v32name;
int BSIM3v32states; /* index into state table for this device */
int BSIM3v32dNode;
int BSIM3v32gNode;
int BSIM3v32sNode;
int BSIM3v32bNode;
const int BSIM3v32dNode;
const int BSIM3v32gNode;
const int BSIM3v32sNode;
const int BSIM3v32bNode;
int BSIM3v32dNodePrime;
int BSIM3v32sNodePrime;
int BSIM3v32qNode; /* MCJ */

8
src/spicelib/devices/bsim4/bsim4def.h

@ -73,10 +73,10 @@ typedef struct sBSIM4instance
struct sBSIM4instance *BSIM4nextInstance;
IFuid BSIM4name;
int BSIM4states; /* index into state table for this device */
int BSIM4dNode;
int BSIM4gNodeExt;
int BSIM4sNode;
int BSIM4bNode;
const int BSIM4dNode;
const int BSIM4gNodeExt;
const int BSIM4sNode;
const int BSIM4bNode;
int BSIM4dNodePrime;
int BSIM4gNodePrime;
int BSIM4gNodeMid;

8
src/spicelib/devices/bsim4v5/bsim4v5def.h

@ -24,10 +24,10 @@ typedef struct sBSIM4v5instance
struct sBSIM4v5instance *BSIM4v5nextInstance;
IFuid BSIM4v5name;
int BSIM4v5states; /* index into state table for this device */
int BSIM4v5dNode;
int BSIM4v5gNodeExt;
int BSIM4v5sNode;
int BSIM4v5bNode;
const int BSIM4v5dNode;
const int BSIM4v5gNodeExt;
const int BSIM4v5sNode;
const int BSIM4v5bNode;
int BSIM4v5dNodePrime;
int BSIM4v5gNodePrime;
int BSIM4v5gNodeMid;

8
src/spicelib/devices/bsim4v6/bsim4v6def.h

@ -33,10 +33,10 @@ typedef struct sBSIM4v6instance
struct sBSIM4v6instance *BSIM4v6nextInstance;
IFuid BSIM4v6name;
int BSIM4v6states; /* index into state table for this device */
int BSIM4v6dNode;
int BSIM4v6gNodeExt;
int BSIM4v6sNode;
int BSIM4v6bNode;
const int BSIM4v6dNode;
const int BSIM4v6gNodeExt;
const int BSIM4v6sNode;
const int BSIM4v6bNode;
int BSIM4v6dNodePrime;
int BSIM4v6gNodePrime;
int BSIM4v6gNodeMid;

8
src/spicelib/devices/bsim4v7/bsim4v7def.h

@ -34,10 +34,10 @@ typedef struct sBSIM4v7instance
struct sBSIM4v7instance *BSIM4v7nextInstance;
IFuid BSIM4v7name;
int BSIM4v7states; /* index into state table for this device */
int BSIM4v7dNode;
int BSIM4v7gNodeExt;
int BSIM4v7sNode;
int BSIM4v7bNode;
const int BSIM4v7dNode;
const int BSIM4v7gNodeExt;
const int BSIM4v7sNode;
const int BSIM4v7bNode;
int BSIM4v7dNodePrime;
int BSIM4v7gNodePrime;
int BSIM4v7gNodeMid;

14
src/spicelib/devices/bsimsoi/b4soidef.h

@ -31,13 +31,13 @@ typedef struct sB4SOIinstance
IFuid B4SOIname;
int B4SOIstates; /* index into state table for this device */
int B4SOIdNode;
int B4SOIgNodeExt; /* v3.1 changed gNode to gNodeExt */
int B4SOIsNode;
int B4SOIeNode;
int B4SOIpNodeExt;
int B4SOIbNodeExt;
int B4SOItempNodeExt;
const int B4SOIdNode;
const int B4SOIgNodeExt; /* v3.1 changed gNode to gNodeExt */
const int B4SOIsNode;
const int B4SOIeNode;
const int B4SOIpNodeExt;
const int B4SOIbNodeExt;
const int B4SOItempNodeExt;
int B4SOIpNode;
int B4SOIbNode;
int B4SOItempNode;

4
src/spicelib/devices/cap/capdefs.h

@ -24,8 +24,8 @@ typedef struct sCAPinstance {
* current model*/
IFuid CAPname; /* pointer to character string naming this instance */
int CAPstate; /* pointer to start of capacitor state vector */
int CAPposNode; /* number of positive node of capacitor */
int CAPnegNode; /* number of negative node of capacitor */
const int CAPposNode; /* number of positive node of capacitor */
const int CAPnegNode; /* number of negative node of capacitor */
double CAPtemp; /* temperature at which this capacitor operates */
double CAPdtemp; /* delta-temperature of this instance */

4
src/spicelib/devices/cccs/cccsdefs.h

@ -22,8 +22,8 @@ typedef struct sCCCSinstance {
IFuid CCCSname; /* pointer to character string naming this instance */
int CCCSstate; /* not used */
int CCCSposNode; /* number of positive node of source */
int CCCSnegNode; /* number of negative node of source */
const int CCCSposNode; /* number of positive node of source */
const int CCCSnegNode; /* number of negative node of source */
int CCCScontBranch; /* number of branch eq of controlling source */
char *CCCScontName; /* pointer to name of controlling instance */

4
src/spicelib/devices/ccvs/ccvsdefs.h

@ -22,8 +22,8 @@ typedef struct sCCVSinstance {
IFuid CCVSname; /* pointer to character string naming this instance */
int CCVSstate; /* not used */
int CCVSposNode; /* number of positive node of source */
int CCVSnegNode; /* number of negative node of source */
const int CCVSposNode; /* number of positive node of source */
const int CCVSnegNode; /* number of negative node of source */
IFuid CCVScontName; /* pointer to name of controlling instance */
int CCVSbranch; /* equation number of branch equation added for v source */

4
src/spicelib/devices/csw/cswdefs.h

@ -25,8 +25,8 @@ typedef struct sCSWinstance {
IFuid CSWname; /* pointer to character string naming this instance */
int CSWstate; /* pointer to start of switch's section of state vector */
int CSWposNode; /* number of positive node of switch */
int CSWnegNode; /* number of negative node of switch */
const int CSWposNode; /* number of positive node of switch */
const int CSWnegNode; /* number of negative node of switch */
int CSWcontBranch; /* number of branch of controlling current */
IFuid CSWcontName; /* name of controlling source */

4
src/spicelib/devices/dio/diodefs.h

@ -23,8 +23,8 @@ typedef struct sDIOinstance {
* current model*/
IFuid DIOname; /* pointer to character string naming this instance */
int DIOstate; /* pointer to start of state vector for diode */
int DIOposNode; /* number of positive node of diode */
int DIOnegNode; /* number of negative node of diode */
const int DIOposNode; /* number of positive node of diode */
const int DIOnegNode; /* number of negative node of diode */
int DIOposPrimeNode; /* number of positive prime node of diode */
double *DIOposPosPrimePtr; /* pointer to sparse matrix at

6
src/spicelib/devices/hfet1/hfetdefs.h

@ -20,9 +20,9 @@ typedef struct sHFETAinstance {
IFuid HFETAname;
int HFETAstate; /* index into state table for this device */
int HFETAdrainNode;
int HFETAgateNode;
int HFETAsourceNode;
const int HFETAdrainNode;
const int HFETAgateNode;
const int HFETAsourceNode;
int HFETAdrainPrimeNode;
int HFETAgatePrimeNode;
int HFETAsourcePrimeNode;

8
src/spicelib/devices/hisim2/hsm2def.h

@ -143,10 +143,10 @@ typedef struct sHSM2instance {
IFuid HSM2name; /* pointer to character string naming this instance */
int HSM2states; /* index into state table for this device */
int HSM2dNode; /* number of the drain node of the mosfet */
int HSM2gNode; /* number of the gate node of the mosfet */
int HSM2sNode; /* number of the source node of the mosfet */
int HSM2bNode; /* number of the bulk node of the mosfet */
const int HSM2dNode; /* number of the drain node of the mosfet */
const int HSM2gNode; /* number of the gate node of the mosfet */
const int HSM2sNode; /* number of the source node of the mosfet */
const int HSM2bNode; /* number of the bulk node of the mosfet */
int HSM2dNodePrime; /* number od the inner drain node */
int HSM2gNodePrime; /* number of the inner gate node */
int HSM2sNodePrime; /* number od the inner source node */

12
src/spicelib/devices/hisimhv1/hsmhvdef.h

@ -219,12 +219,12 @@ typedef struct sHSMHVinstance {
IFuid HSMHVname; /* pointer to character string naming this instance */
int HSMHVstates; /* index into state table for this device */
int HSMHVdNode; /* number of the drain node of the mosfet */
int HSMHVgNode; /* number of the gate node of the mosfet */
int HSMHVsNode; /* number of the source node of the mosfet */
int HSMHVbNode; /* number of the bulk node of the mosfet */
int HSMHVsubNodeExt; /* number of the substrate node */
int HSMHVtempNodeExt;/* number of the temp node----------SHE--------*/
const int HSMHVdNode; /* number of the drain node of the mosfet */
const int HSMHVgNode; /* number of the gate node of the mosfet */
const int HSMHVsNode; /* number of the source node of the mosfet */
const int HSMHVbNode; /* number of the bulk node of the mosfet */
const int HSMHVsubNodeExt; /* number of the substrate node */
const int HSMHVtempNodeExt;/* number of the temp node----------SHE--------*/
int HSMHVsubNode; /* number of the substrate node */
int HSMHVtempNode; /* number of the temp node */
int HSMHVdNodePrime; /* number od the inner drain node */

12
src/spicelib/devices/hisimhv2/hsmhv2def.h

@ -267,12 +267,12 @@ typedef struct sHSMHV2instance {
IFuid HSMHV2name; /* pointer to character string naming this instance */
int HSMHV2states; /* index into state table for this device */
int HSMHV2dNode; /* number of the drain node of the mosfet */
int HSMHV2gNode; /* number of the gate node of the mosfet */
int HSMHV2sNode; /* number of the source node of the mosfet */
int HSMHV2bNode; /* number of the bulk node of the mosfet */
int HSMHV2subNodeExt; /* number of the substrate node */
int HSMHV2tempNodeExt;/* number of the temp node----------SHE--------*/
const int HSMHV2dNode; /* number of the drain node of the mosfet */
const int HSMHV2gNode; /* number of the gate node of the mosfet */
const int HSMHV2sNode; /* number of the source node of the mosfet */
const int HSMHV2bNode; /* number of the bulk node of the mosfet */
const int HSMHV2subNodeExt; /* number of the substrate node */
const int HSMHV2tempNodeExt;/* number of the temp node----------SHE--------*/
int HSMHV2subNode; /* number of the substrate node */
int HSMHV2tempNode; /* number of the temp node */
int HSMHV2dNodePrime; /* number od the inner drain node */

4
src/spicelib/devices/ind/inddefs.h

@ -32,8 +32,8 @@ struct sINDinstance {
* current model */
IFuid INDname; /* pointer to character string naming this instance */
int INDstate; /* pointer to beginning of state vector for inductor */
int INDposNode; /* number of positive node of inductor */
int INDnegNode; /* number of negative node of inductor */
const int INDposNode; /* number of positive node of inductor */
const int INDnegNode; /* number of negative node of inductor */
int INDbrEq; /* number of the branch equation added for current */
double INDinduct; /* inductance */

4
src/spicelib/devices/isrc/isrcdefs.h

@ -25,8 +25,8 @@ typedef struct sISRCinstance {
IFuid ISRCname; /* pointer to character string naming this instance */
int ISRCstate; /* not used */
int ISRCnegNode; /* number of negative node of source */
int ISRCposNode; /* number of positive node of source */
const int ISRCnegNode; /* number of negative node of source */
const int ISRCposNode; /* number of positive node of source */
int ISRCfunctionType; /* code number of function type for source */
int ISRCfunctionOrder; /* order of the function for the source */

6
src/spicelib/devices/jfet/jfetdefs.h

@ -26,9 +26,9 @@ typedef struct sJFETinstance {
* current model*/
IFuid JFETname; /* pointer to character string naming this instance */
int JFETstate; /* pointer to start of state vector for jfet */
int JFETdrainNode; /* number of drain node of jfet */
int JFETgateNode; /* number of gate node of jfet */
int JFETsourceNode; /* number of source node of jfet */
const int JFETdrainNode; /* number of drain node of jfet */
const int JFETgateNode; /* number of gate node of jfet */
const int JFETsourceNode; /* number of source node of jfet */
int JFETdrainPrimeNode; /* number of internal drain node of jfet */
int JFETsourcePrimeNode; /* number of internal source node of jfet */

6
src/spicelib/devices/jfet2/jfet2defs.h

@ -31,9 +31,9 @@ typedef struct sJFET2instance {
* current model*/
IFuid JFET2name; /* pointer to character string naming this instance */
int JFET2state; /* pointer to start of state vector for jfet */
int JFET2drainNode; /* number of drain node of jfet */
int JFET2gateNode; /* number of gate node of jfet */
int JFET2sourceNode; /* number of source node of jfet */
const int JFET2drainNode; /* number of drain node of jfet */
const int JFET2gateNode; /* number of gate node of jfet */
const int JFET2sourceNode; /* number of source node of jfet */
int JFET2drainPrimeNode; /* number of internal drain node of jfet */
int JFET2sourcePrimeNode; /* number of internal source node of jfet */

8
src/spicelib/devices/ltra/ltradefs.h

@ -23,10 +23,10 @@ typedef struct sLTRAinstance {
* current model*/
IFuid LTRAname; /* pointer to character string naming this instance */
int LTRAstate; /* not used */
int LTRAposNode1; /* number of positive node of end 1 of t. line */
int LTRAnegNode1; /* number of negative node of end 1 of t. line */
int LTRAposNode2; /* number of positive node of end 2 of t. line */
int LTRAnegNode2; /* number of negative node of end 2 of t. line */
const int LTRAposNode1; /* number of positive node of end 1 of t. line */
const int LTRAnegNode1; /* number of negative node of end 1 of t. line */
const int LTRAposNode2; /* number of positive node of end 2 of t. line */
const int LTRAnegNode2; /* number of negative node of end 2 of t. line */
int LTRAbrEq1; /* number of branch equation for end 1 of t. line */
int LTRAbrEq2; /* number of branch equation for end 2 of t. line */

6
src/spicelib/devices/mes/mesdefs.h

@ -25,9 +25,9 @@ typedef struct sMESinstance {
* current model*/
IFuid MESname; /* pointer to character string naming this instance */
int MESstate; /* pointer to start of state vector for mesfet */
int MESdrainNode; /* number of drain node of mesfet */
int MESgateNode; /* number of gate node of mesfet */
int MESsourceNode; /* number of source node of mesfet */
const int MESdrainNode; /* number of drain node of mesfet */
const int MESgateNode; /* number of gate node of mesfet */
const int MESsourceNode; /* number of source node of mesfet */
int MESdrainPrimeNode; /* number of internal drain node of mesfet */
int MESsourcePrimeNode; /* number of internal source node of mesfet */

6
src/spicelib/devices/mesa/mesadefs.h

@ -24,9 +24,9 @@ typedef struct sMESAinstance {
IFuid MESAname; /* pointer to character string naming this instance */
int MESAstate; /* pointer to start of state vector for MESAfet */
int MESAdrainNode; /* number of drain node of MESAfet */
int MESAgateNode; /* number of gate node of MESAfet */
int MESAsourceNode; /* number of source node of MESAfet */
const int MESAdrainNode; /* number of drain node of MESAfet */
const int MESAgateNode; /* number of gate node of MESAfet */
const int MESAsourceNode; /* number of source node of MESAfet */
int MESAdrainPrimeNode; /* number of internal drain node of MESAfet */
int MESAgatePrimeNode; /* number of internal gate node of MESAfet */
int MESAsourcePrimeNode; /* number of internal source node of MESAfet */

8
src/spicelib/devices/mos1/mos1defs.h

@ -24,10 +24,10 @@ typedef struct sMOS1instance {
IFuid MOS1name; /* pointer to character string naming this instance */
int MOS1states; /* index into state table for this device */
int MOS1dNode; /* number of the gate node of the mosfet */
int MOS1gNode; /* number of the gate node of the mosfet */
int MOS1sNode; /* number of the source node of the mosfet */
int MOS1bNode; /* number of the bulk node of the mosfet */
const int MOS1dNode; /* number of the gate node of the mosfet */
const int MOS1gNode; /* number of the gate node of the mosfet */
const int MOS1sNode; /* number of the source node of the mosfet */
const int MOS1bNode; /* number of the bulk node of the mosfet */
int MOS1dNodePrime; /* number of the internal drain node of the mosfet */
int MOS1sNodePrime; /* number of the internal source node of the mosfet */

8
src/spicelib/devices/mos2/mos2defs.h

@ -23,10 +23,10 @@ typedef struct sMOS2instance {
*current model*/
IFuid MOS2name; /* pointer to character string naming this instance */
int MOS2states; /* index into state table for this device */
int MOS2dNode; /* number of the gate node of the mosfet */
int MOS2gNode; /* number of the gate node of the mosfet */
int MOS2sNode; /* number of the source node of the mosfet */
int MOS2bNode; /* number of the bulk node of the mosfet */
const int MOS2dNode; /* number of the gate node of the mosfet */
const int MOS2gNode; /* number of the gate node of the mosfet */
const int MOS2sNode; /* number of the source node of the mosfet */
const int MOS2bNode; /* number of the bulk node of the mosfet */
int MOS2dNodePrime; /* number of the internal drain node of the mosfet */
int MOS2sNodePrime; /* number of the internal source node of the mosfet */

8
src/spicelib/devices/mos3/mos3defs.h

@ -23,10 +23,10 @@ typedef struct sMOS3instance {
*current model*/
IFuid MOS3name; /* pointer to character string naming this instance */
int MOS3states; /* index into state table for this device */
int MOS3dNode; /* number of the gate node of the mosfet */
int MOS3gNode; /* number of the gate node of the mosfet */
int MOS3sNode; /* number of the source node of the mosfet */
int MOS3bNode; /* number of the bulk node of the mosfet */
const int MOS3dNode; /* number of the gate node of the mosfet */
const int MOS3gNode; /* number of the gate node of the mosfet */
const int MOS3sNode; /* number of the source node of the mosfet */
const int MOS3bNode; /* number of the bulk node of the mosfet */
int MOS3dNodePrime; /* number of the internal drain node of the mosfet */
int MOS3sNodePrime; /* number of the internal source node of the mosfet */

8
src/spicelib/devices/mos6/mos6defs.h

@ -21,10 +21,10 @@ typedef struct sMOS6instance {
*current model*/
IFuid MOS6name; /* pointer to character string naming this instance */
int MOS6states; /* index into state table for this device */
int MOS6dNode; /* number of the gate node of the mosfet */
int MOS6gNode; /* number of the gate node of the mosfet */
int MOS6sNode; /* number of the source node of the mosfet */
int MOS6bNode; /* number of the bulk node of the mosfet */
const int MOS6dNode; /* number of the gate node of the mosfet */
const int MOS6gNode; /* number of the gate node of the mosfet */
const int MOS6sNode; /* number of the source node of the mosfet */
const int MOS6bNode; /* number of the bulk node of the mosfet */
int MOS6dNodePrime; /* number of the internal drain node of the mosfet */
int MOS6sNodePrime; /* number of the internal source node of the mosfet */

8
src/spicelib/devices/mos9/mos9defs.h

@ -23,10 +23,10 @@ typedef struct sMOS9instance {
*current model*/
IFuid MOS9name; /* pointer to character string naming this instance */
int MOS9states; /* index into state table for this device */
int MOS9dNode; /* number of the gate node of the mosfet */
int MOS9gNode; /* number of the gate node of the mosfet */
int MOS9sNode; /* number of the source node of the mosfet */
int MOS9bNode; /* number of the bulk node of the mosfet */
const int MOS9dNode; /* number of the gate node of the mosfet */
const int MOS9gNode; /* number of the gate node of the mosfet */
const int MOS9sNode; /* number of the source node of the mosfet */
const int MOS9bNode; /* number of the bulk node of the mosfet */
int MOS9dNodePrime; /* number of the internal drain node of the mosfet */
int MOS9sNodePrime; /* number of the internal source node of the mosfet */

6
src/spicelib/devices/nbjt/nbjtdefs.h

@ -40,9 +40,9 @@ typedef struct sNBJTinstance {
#define NBJTdIcDVbe NBJTstate+7
#define NBJTnumStates 8
int NBJTcolNode; /* number of collector node of bjt */
int NBJTbaseNode; /* number of base node of bjt */
int NBJTemitNode; /* number of emitter node of bjt */
const int NBJTcolNode; /* number of collector node of bjt */
const int NBJTbaseNode; /* number of base node of bjt */
const int NBJTemitNode; /* number of emitter node of bjt */
ONEdevice *NBJTpDevice;
GLOBvalues NBJTglobals; /* Temp.-Dep. Global Parameters */
int NBJTtype;

6
src/spicelib/devices/nbjt2/nbjt2def.h

@ -40,9 +40,9 @@ typedef struct sNBJT2instance {
#define NBJT2dIcDVbe NBJT2state+7
#define NBJT2numStates 8
int NBJT2colNode; /* number of collector node of bjt */
int NBJT2baseNode; /* number of base node of bjt */
int NBJT2emitNode; /* number of emitter node of bjt */
const int NBJT2colNode; /* number of collector node of bjt */
const int NBJT2baseNode; /* number of base node of bjt */
const int NBJT2emitNode; /* number of emitter node of bjt */
double NBJT2width; /* width factor for the bjt */
double NBJT2area; /* area factor for the bjt */
TWOdevice *NBJT2pDevice;

2
src/spicelib/devices/ndev/ndevdefs.h

@ -30,7 +30,7 @@ typedef struct sNDEVinstance {
IFuid NDEVname; /* pointer to character string naming this
* instance */
int NDEVstate; /* pointer to start of state vector for diode */
int pin[7]; /* max 7 terminals are allowed */
const int pin[7]; /* max 7 terminals are allowed */
int term; /* the real number of terminals */
CKTnode *node[7]; /* the array of CKT node's node pointer */
char *bname[7]; /* the electrode boundary label for numerical solver */

4
src/spicelib/devices/numd/numddefs.h

@ -34,8 +34,8 @@ typedef struct sNUMDinstance {
#define NUMDconduct NUMDstate+2
#define NUMDnumStates 3
int NUMDposNode; /* number of positive node of diode */
int NUMDnegNode; /* number of negative node of diode */
const int NUMDposNode; /* number of positive node of diode */
const int NUMDnegNode; /* number of negative node of diode */
ONEdevice *NUMDpDevice;
GLOBvalues NUMDglobals; /* Temp.-Dep. Global Parameters */
int NUMDtype; /* device type pn or np */

4
src/spicelib/devices/numd2/numd2def.h

@ -34,8 +34,8 @@ typedef struct sNUMD2instance {
#define NUMD2conduct NUMD2state+2
#define NUMD2numStates 3
int NUMD2posNode; /* number of positive node of diode */
int NUMD2negNode; /* number of negative node of diode */
const int NUMD2posNode; /* number of positive node of diode */
const int NUMD2negNode; /* number of negative node of diode */
TWOdevice *NUMD2pDevice;
GLOBvalues NUMD2globals; /* Temp.-Dep. Global Parameters */
int NUMD2type; /* device type pn or np */

8
src/spicelib/devices/numos/numosdef.h

@ -48,10 +48,10 @@ typedef struct sNUMOSinstance {
#define NUMOSdIgDVgb NUMOSstate+14
#define NUMOSnumStates 15
int NUMOSdrainNode; /* number of drain node of MOSFET */
int NUMOSgateNode; /* number of gate node of MOSFET */
int NUMOSsourceNode; /* number of source node of MOSFET */
int NUMOSbulkNode; /* number of bulk node of MOSFET */
const int NUMOSdrainNode; /* number of drain node of MOSFET */
const int NUMOSgateNode; /* number of gate node of MOSFET */
const int NUMOSsourceNode; /* number of source node of MOSFET */
const int NUMOSbulkNode; /* number of bulk node of MOSFET */
double NUMOSarea; /* area factor for the mosfet */
double NUMOSwidth; /* width factor for the mosfet */
double NUMOSlength; /* length factor for the mosfet */

4
src/spicelib/devices/res/resdefs.h

@ -25,8 +25,8 @@ typedef struct sRESinstance {
IFuid RESname; /* pointer to character string naming this instance */
int RESstate; /* not used but needed for sructure consistency */
int RESposNode; /* number of positive node of resistor */
int RESnegNode; /* number of negative node of resistor */
const int RESposNode; /* number of positive node of resistor */
const int RESnegNode; /* number of negative node of resistor */
double REStemp; /* temperature at which this resistor operates */
double RESdtemp; /* delta-temperature of a particular instance */

12
src/spicelib/devices/soi3/soi3defs.h

@ -44,12 +44,12 @@ typedef struct sSOI3instance {
int SOI3states; /* index into state table for this device */
int SOI3dNode; /* number of the drain node of the mosfet */
int SOI3gfNode; /* number of the front gate node of the mosfet */
int SOI3sNode; /* number of the source node of the mosfet */
int SOI3gbNode; /* number of the back gate node of the mosfet */
int SOI3bNode; /* number of the bulk node of the mosfet */
int SOI3toutNode; /* number of thermal output node (tout) */
const int SOI3dNode; /* number of the drain node of the mosfet */
const int SOI3gfNode; /* number of the front gate node of the mosfet */
const int SOI3sNode; /* number of the source node of the mosfet */
const int SOI3gbNode; /* number of the back gate node of the mosfet */
const int SOI3bNode; /* number of the bulk node of the mosfet */
const int SOI3toutNode; /* number of thermal output node (tout) */
int SOI3branch; /* branch number for zero voltage source if no thermal */

8
src/spicelib/devices/sw/swdefs.h

@ -25,10 +25,10 @@ typedef struct sSWinstance {
IFuid SWname; /* pointer to character string naming this instance */
int SWstate; /* pointer to start of switch's section of state vector */
int SWposNode; /* number of positive node of switch */
int SWnegNode; /* number of negative node of switch */
int SWposCntrlNode; /* number of positive controlling node of switch */
int SWnegCntrlNode; /* number of negative controlling node of switch */
const int SWposNode; /* number of positive node of switch */
const int SWnegNode; /* number of negative node of switch */
const int SWposCntrlNode; /* number of positive controlling node of switch */
const int SWnegCntrlNode; /* number of negative controlling node of switch */
double *SWposPosPtr; /* pointer to sparse matrix diagonal at
(positive,positive) for switch conductance */

8
src/spicelib/devices/tra/tradefs.h

@ -23,10 +23,10 @@ typedef struct sTRAinstance {
* current model*/
IFuid TRAname; /* pointer to character string naming this instance */
int TRAstate; /* not used */
int TRAposNode1; /* number of positive node of end 1 of t. line */
int TRAnegNode1; /* number of negative node of end 1 of t. line */
int TRAposNode2; /* number of positive node of end 2 of t. line */
int TRAnegNode2; /* number of negative node of end 2 of t. line */
const int TRAposNode1; /* number of positive node of end 1 of t. line */
const int TRAnegNode1; /* number of negative node of end 1 of t. line */
const int TRAposNode2; /* number of positive node of end 2 of t. line */
const int TRAnegNode2; /* number of negative node of end 2 of t. line */
int TRAintNode1; /* number of internal node of end 1 of t. line */
int TRAintNode2; /* number of internal node of end 2 of t. line */

6
src/spicelib/devices/urc/urcdefs.h

@ -24,9 +24,9 @@ typedef struct sURCinstance {
* current model*/
IFuid URCname; /* pointer to character string naming this instance */
int URCstate; /* not used */
int URCposNode; /* number of positive node of URC */
int URCnegNode; /* number of negative node of URC */
int URCgndNode; /* number of the "ground" node of the URC */
const int URCposNode; /* number of positive node of URC */
const int URCnegNode; /* number of negative node of URC */
const int URCgndNode; /* number of the "ground" node of the URC */
double URClength; /* length of line */
int URClumps; /* number of lumps in line */

8
src/spicelib/devices/vbic/vbicdefs.h

@ -25,10 +25,10 @@ typedef struct sVBICinstance {
IFuid VBICname; /* pointer to character string naming this instance */
int VBICstate; /* pointer to start of state vector for vbic */
int VBICcollNode; /* number of collector node of vbic */
int VBICbaseNode; /* number of base node of vbic */
int VBICemitNode; /* number of emitter node of vbic */
int VBICsubsNode; /* number of substrate node of vbic */
const int VBICcollNode; /* number of collector node of vbic */
const int VBICbaseNode; /* number of base node of vbic */
const int VBICemitNode; /* number of emitter node of vbic */
const int VBICsubsNode; /* number of substrate node of vbic */
int VBICcollCXNode; /* number of internal collector node of vbic */
int VBICcollCINode; /* number of internal collector node of vbic */
int VBICbaseBXNode; /* number of internal base node of vbic */

8
src/spicelib/devices/vccs/vccsdefs.h

@ -24,10 +24,10 @@ typedef struct sVCCSinstance {
IFuid VCCSname; /* pointer to character string naming this instance */
int VCCSstates; /* state info */
int VCCSposNode; /* number of positive node of source */
int VCCSnegNode; /* number of negative node of source */
int VCCScontPosNode; /* number of positive node of controlling source */
int VCCScontNegNode; /* number of negative node of controlling source */
const int VCCSposNode; /* number of positive node of source */
const int VCCSnegNode; /* number of negative node of source */
const int VCCScontPosNode; /* number of positive node of controlling source */
const int VCCScontNegNode; /* number of negative node of controlling source */
double VCCSinitCond; /* initial condition (of controlling source) */
double VCCScoeff; /* coefficient */

8
src/spicelib/devices/vcvs/vcvsdefs.h

@ -25,10 +25,10 @@ typedef struct sVCVSinstance {
IFuid VCVSname; /* pointer to character string naming this instance */
int VCVSstates; /* state info */
int VCVSposNode; /* number of positive node of source */
int VCVSnegNode; /* number of negative node of source */
int VCVScontPosNode; /* number of positive node of controlling source */
int VCVScontNegNode; /* number of negative node of controlling source */
const int VCVSposNode; /* number of positive node of source */
const int VCVSnegNode; /* number of negative node of source */
const int VCVScontPosNode; /* number of positive node of controlling source */
const int VCVScontNegNode; /* number of negative node of controlling source */
int VCVSbranch; /* equation number of branch equation added for v source */
double VCVSinitCond; /* initial condition (of controlling source) */

4
src/spicelib/devices/vsrc/vsrcdefs.h

@ -27,8 +27,8 @@ typedef struct sVSRCinstance {
IFuid VSRCname; /* pointer to character string naming this instance */
int VSRCstate; /* not used */
int VSRCposNode; /* number of positive node of source */
int VSRCnegNode; /* number of negative node of source */
const int VSRCposNode; /* number of positive node of source */
const int VSRCnegNode; /* number of negative node of source */
int VSRCbranch; /* equation number of branch equation added for source */

Loading…
Cancel
Save