diff --git a/src/spicelib/devices/bjt/bjtdefs.h b/src/spicelib/devices/bjt/bjtdefs.h index f3fdd675a..30d819f2c 100644 --- a/src/spicelib/devices/bjt/bjtdefs.h +++ b/src/spicelib/devices/bjt/bjtdefs.h @@ -14,6 +14,18 @@ Author: 1985 Thomas L. Quarles /* structures to describe Bipolar Junction Transistors */ +/* indices to array of BJT noise sources */ + +#define BJTRCNOIZ 0 +#define BJTRBNOIZ 1 +#define BJT_RE_NOISE 2 +#define BJTICNOIZ 3 +#define BJTIBNOIZ 4 +#define BJTFLNOIZ 5 +#define BJTTOTNOIZ 6 + +#define BJTNSRCS 7 /* the number of BJT noise sources */ + /* data needed to describe a single instance */ typedef struct sBJTinstance { @@ -266,17 +278,6 @@ typedef struct sBJTinstance { #endif -/* indices to array of BJT noise sources */ - -#define BJTRCNOIZ 0 -#define BJTRBNOIZ 1 -#define BJT_RE_NOISE 2 -#define BJTICNOIZ 3 -#define BJTIBNOIZ 4 -#define BJTFLNOIZ 5 -#define BJTTOTNOIZ 6 - -#define BJTNSRCS 7 /* the number of BJT noise sources */ #ifndef NONOISE double BJTnVar[NSTATVARS][BJTNSRCS]; diff --git a/src/spicelib/devices/dio/diodefs.h b/src/spicelib/devices/dio/diodefs.h index 03f9d04ae..e1223f973 100644 --- a/src/spicelib/devices/dio/diodefs.h +++ b/src/spicelib/devices/dio/diodefs.h @@ -14,6 +14,14 @@ Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 /* data structures used to describe diodes */ +/* indices to array of diode noise sources */ + +#define DIORSNOIZ 0 +#define DIOIDNOIZ 1 +#define DIOFLNOIZ 2 +#define DIOTOTNOIZ 3 + +#define DIONSRCS 4 /* information needed per instance */ @@ -132,15 +140,6 @@ typedef struct sDIOinstance { #endif -/* indices to array of diode noise sources */ - -#define DIORSNOIZ 0 -#define DIOIDNOIZ 1 -#define DIOFLNOIZ 2 -#define DIOTOTNOIZ 3 - -#define DIONSRCS 4 - #ifndef NONOISE double DIOnVar[NSTATVARS][DIONSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/jfet/jfetdefs.h b/src/spicelib/devices/jfet/jfetdefs.h index 90a1d5cd7..ae8c02412 100644 --- a/src/spicelib/devices/jfet/jfetdefs.h +++ b/src/spicelib/devices/jfet/jfetdefs.h @@ -17,6 +17,15 @@ Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern /* structures used to describe Junction Field Effect Transistors */ +/* indices to an array of JFET noise sources */ + +#define JFETRDNOIZ 0 +#define JFETRSNOIZ 1 +#define JFETIDNOIZ 2 +#define JFETFLNOIZ 3 +#define JFETTOTNOIZ 4 + +#define JFETNSRCS 5 /* information used to describe a single instance */ @@ -111,16 +120,6 @@ typedef struct sJFETinstance { #endif -/* indices to an array of JFET noise sources */ - -#define JFETRDNOIZ 0 -#define JFETRSNOIZ 1 -#define JFETIDNOIZ 2 -#define JFETFLNOIZ 3 -#define JFETTOTNOIZ 4 - -#define JFETNSRCS 5 - #ifndef NONOISE double JFETnVar[NSTATVARS][JFETNSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/jfet2/jfet2defs.h b/src/spicelib/devices/jfet2/jfet2defs.h index bb0aae1d4..916ae744b 100644 --- a/src/spicelib/devices/jfet2/jfet2defs.h +++ b/src/spicelib/devices/jfet2/jfet2defs.h @@ -22,6 +22,15 @@ Modified to add PS model and new parameter definitions ( Anthony E. Parker ) /* structures used to describe Junction Field Effect Transistors */ +/* indices to an array of JFET2 noise sources */ + +#define JFET2RDNOIZ 0 +#define JFET2RSNOIZ 1 +#define JFET2IDNOIZ 2 +#define JFET2FLNOIZ 3 +#define JFET2TOTNOIZ 4 + +#define JFET2NSRCS 5 /* information used to describe a single instance */ @@ -116,16 +125,6 @@ typedef struct sJFET2instance { #endif -/* indices to an array of JFET2 noise sources */ - -#define JFET2RDNOIZ 0 -#define JFET2RSNOIZ 1 -#define JFET2IDNOIZ 2 -#define JFET2FLNOIZ 3 -#define JFET2TOTNOIZ 4 - -#define JFET2NSRCS 5 - #ifndef NONOISE double JFET2nVar[NSTATVARS][JFET2NSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/mes/mesdefs.h b/src/spicelib/devices/mes/mesdefs.h index 24fa8b443..bc0a33615 100644 --- a/src/spicelib/devices/mes/mesdefs.h +++ b/src/spicelib/devices/mes/mesdefs.h @@ -16,6 +16,15 @@ Author: 1985 S. Hwang /* structures used to describe MESFET Transistors */ +/* indices to the array of MESFET noise sources */ + +#define MESRDNOIZ 0 +#define MESRSNOIZ 1 +#define MESIDNOIZ 2 +#define MESFLNOIZ 3 +#define MESTOTNOIZ 4 + +#define MESNSRCS 5 /* the number of MESFET noise sources */ /* information used to describe a single instance */ @@ -128,16 +137,6 @@ int MESmode; #endif -/* indices to the array of MESFET noise sources */ - -#define MESRDNOIZ 0 -#define MESRSNOIZ 1 -#define MESIDNOIZ 2 -#define MESFLNOIZ 3 -#define MESTOTNOIZ 4 - -#define MESNSRCS 5 /* the number of MESFET noise sources */ - #ifndef NONOISE double MESnVar[NSTATVARS][MESNSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/mesa/mesadefs.h b/src/spicelib/devices/mesa/mesadefs.h index a7d89dade..1c21ccccd 100644 --- a/src/spicelib/devices/mesa/mesadefs.h +++ b/src/spicelib/devices/mesa/mesadefs.h @@ -14,6 +14,15 @@ Author: Trond Ytterdal /* structures used to describe MESFET Transistors */ +/* indices to the array of MESAFET noise sources */ + +#define MESARDNOIZ 0 +#define MESARSNOIZ 1 +#define MESAIDNOIZ 2 +#define MESAFLNOIZ 3 +#define MESATOTNOIZ 4 + +#define MESANSRCS 5 /* the number of MESAFET noise sources */ /* information used to describe a single instance */ @@ -176,16 +185,6 @@ int MESAmode; #endif -/* indices to the array of MESAFET noise sources */ - -#define MESARDNOIZ 0 -#define MESARSNOIZ 1 -#define MESAIDNOIZ 2 -#define MESAFLNOIZ 3 -#define MESATOTNOIZ 4 - -#define MESANSRCS 5 /* the number of MESAFET noise sources */ - #ifndef NONOISE double MESAnVar[NSTATVARS][MESANSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/mos1/mos1defs.h b/src/spicelib/devices/mos1/mos1defs.h index 85f9d7afa..128b2a703 100644 --- a/src/spicelib/devices/mos1/mos1defs.h +++ b/src/spicelib/devices/mos1/mos1defs.h @@ -15,6 +15,16 @@ Modified: 2000 AlansFixes /* declarations for level 1 MOSFETs */ +/* indices to the array of MOSFET(1) noise sources */ + +#define MOS1RDNOIZ 0 +#define MOS1RSNOIZ 1 +#define MOS1IDNOIZ 2 +#define MOS1FLNOIZ 3 +#define MOS1TOTNOIZ 4 + +#define MOS1NSRCS 5 /* the number of MOS1FET noise sources*/ + /* information needed for each instance */ typedef struct sMOS1instance { @@ -142,14 +152,6 @@ typedef struct sMOS1instance { #endif -#define MOS1RDNOIZ 0 -#define MOS1RSNOIZ 1 -#define MOS1IDNOIZ 2 -#define MOS1FLNOIZ 3 -#define MOS1TOTNOIZ 4 - -#define MOS1NSRCS 5 /* the number of MOS1FET noise sources*/ - #ifndef NONOISE double MOS1nVar[NSTATVARS][MOS1NSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/mos2/mos2defs.h b/src/spicelib/devices/mos2/mos2defs.h index 79fcf8e4a..8c26f7bbf 100644 --- a/src/spicelib/devices/mos2/mos2defs.h +++ b/src/spicelib/devices/mos2/mos2defs.h @@ -15,6 +15,16 @@ Modified: 2000 AlansFIxes /* declarations for level 2 MOSFETs */ +/* indices to the array of MOSFET(2) noise sources */ + +#define MOS2RDNOIZ 0 +#define MOS2RSNOIZ 1 +#define MOS2IDNOIZ 2 +#define MOS2FLNOIZ 3 +#define MOS2TOTNOIZ 4 + +#define MOS2NSRCS 5 /* the number of MOS2FET noise sources */ + /* information needed for each instance */ typedef struct sMOS2instance { @@ -254,16 +264,6 @@ typedef struct sMOS2instance { #endif -/* indices to the array of MOSFET(2) noise sources */ - -#define MOS2RDNOIZ 0 -#define MOS2RSNOIZ 1 -#define MOS2IDNOIZ 2 -#define MOS2FLNOIZ 3 -#define MOS2TOTNOIZ 4 - -#define MOS2NSRCS 5 /* the number of MOS2FET noise sources */ - #ifndef NONOISE double MOS2nVar[NSTATVARS][MOS2NSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/mos3/mos3defs.h b/src/spicelib/devices/mos3/mos3defs.h index 268a9b158..080c1332c 100644 --- a/src/spicelib/devices/mos3/mos3defs.h +++ b/src/spicelib/devices/mos3/mos3defs.h @@ -15,6 +15,16 @@ Modified: 2000 AlanFixes /* declarations for level 3 MOSFETs */ +/* indices to the array of MOSFET(3) noise sources */ + +#define MOS3RDNOIZ 0 +#define MOS3RSNOIZ 1 +#define MOS3IDNOIZ 2 +#define MOS3FLNOIZ 3 +#define MOS3TOTNOIZ 4 + +#define MOS3NSRCS 5 /* the number of MOSFET(3) noise sources */ + /* information needed for each instance */ typedef struct sMOS3instance { @@ -253,15 +263,6 @@ typedef struct sMOS3instance { #endif /* end distortion coeffs. */ -/* indices to the array of MOSFET(3) noise sources */ - -#define MOS3RDNOIZ 0 -#define MOS3RSNOIZ 1 -#define MOS3IDNOIZ 2 -#define MOS3FLNOIZ 3 -#define MOS3TOTNOIZ 4 - -#define MOS3NSRCS 5 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double MOS3nVar[NSTATVARS][MOS3NSRCS]; diff --git a/src/spicelib/devices/mos9/mos9defs.h b/src/spicelib/devices/mos9/mos9defs.h index 6f673df91..764647483 100644 --- a/src/spicelib/devices/mos9/mos9defs.h +++ b/src/spicelib/devices/mos9/mos9defs.h @@ -15,6 +15,16 @@ Modified: Alan Gillespie /* declarations for level 9 MOSFETs */ +/* indices to the array of MOSFET(9) noise sources */ + +#define MOS9RDNOIZ 0 +#define MOS9RSNOIZ 1 +#define MOS9IDNOIZ 2 +#define MOS9FLNOIZ 3 +#define MOS9TOTNOIZ 4 + +#define MOS9NSRCS 5 /* the number of MOSFET(9) noise sources */ + /* information needed for each instance */ typedef struct sMOS9instance { @@ -255,15 +265,6 @@ typedef struct sMOS9instance { #endif /* end distortion coeffs. */ -/* indices to the array of MOSFET(3) noise sources */ - -#define MOS9RDNOIZ 0 -#define MOS9RSNOIZ 1 -#define MOS9IDNOIZ 2 -#define MOS9FLNOIZ 3 -#define MOS9TOTNOIZ 4 - -#define MOS9NSRCS 5 /* the number of MOSFET(9) noise sources */ #ifndef NONOISE double MOS9nVar[NSTATVARS][MOS9NSRCS]; diff --git a/src/spicelib/devices/res/resdefs.h b/src/spicelib/devices/res/resdefs.h index 327031cbc..716ff8522 100644 --- a/src/spicelib/devices/res/resdefs.h +++ b/src/spicelib/devices/res/resdefs.h @@ -15,6 +15,13 @@ Modified: 2000 AlansFixes /* definitions used to describe resistors */ +/* indices to array of RES noise sources */ + +#define RESTHNOIZ 0 /* Thermal noise source */ +#define RESFLNOIZ 1 /* Flicker noise source */ +#define RESTOTNOIZ 2 /* Total noise */ + +#define RESNSRCS 3 /* the number of RES noise sources */ /* information used to describe a single instance */ @@ -73,15 +80,6 @@ typedef struct sRESinstance { int RESsenParmNo; /* parameter # for sensitivity use; * set equal to 0 if not a design parameter*/ - /* indices to array of RES noise sources */ - -#define RESTHNOIZ 0 /* Thermal noise source */ -#define RESFLNOIZ 1 /* Flicker noise source */ -#define RESTOTNOIZ 2 /* Total noise */ - -#define RESNSRCS 3 /* the number of RES noise sources */ - - #ifndef NONOISE double RESnVar[NSTATVARS][RESNSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/soi3/soi3defs.h b/src/spicelib/devices/soi3/soi3defs.h index 465597cf8..5a5fa9208 100644 --- a/src/spicelib/devices/soi3/soi3defs.h +++ b/src/spicelib/devices/soi3/soi3defs.h @@ -33,6 +33,16 @@ ngspice integration /* declarations for SOI3 MOSFETs */ +/* indices to the array of SOI(3) noise sources */ + +#define SOI3RDNOIZ 0 +#define SOI3RSNOIZ 1 +#define SOI3IDNOIZ 2 +#define SOI3FLNOIZ 3 +#define SOI3TOTNOIZ 4 + +#define SOI3NSRCS 5 /* the number of SOI(3) noise sources */ + /* information needed for each instance */ typedef struct sSOI3instance { @@ -304,17 +314,6 @@ typedef struct sSOI3instance { double *SOI3TOUT4_tout3Ptr; double *SOI3TOUT4_tout4Ptr; - -/* indices to the array of SOI(3) noise sources */ - -#define SOI3RDNOIZ 0 -#define SOI3RSNOIZ 1 -#define SOI3IDNOIZ 2 -#define SOI3FLNOIZ 3 -#define SOI3TOTNOIZ 4 - -#define SOI3NSRCS 5 /* the number of SOI(3) noise sources */ - #ifndef NONOISE double SOI3nVar[NSTATVARS][SOI3NSRCS]; #else /* NONOISE */ diff --git a/src/spicelib/devices/vbic/vbicdefs.h b/src/spicelib/devices/vbic/vbicdefs.h index 1cd42e311..f9a20e780 100644 --- a/src/spicelib/devices/vbic/vbicdefs.h +++ b/src/spicelib/devices/vbic/vbicdefs.h @@ -16,6 +16,25 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH /* structures to describe Bipolar Junction Transistors */ +/* indices to array of VBIC noise sources */ + +#define VBICRCNOIZ 0 +#define VBICRCINOIZ 1 +#define VBICRBNOIZ 2 +#define VBICRBINOIZ 3 +#define VBICRENOIZ 4 +#define VBICRBPNOIZ 5 +#define VBICRSNOIZ 6 +#define VBICICNOIZ 7 +#define VBICIBNOIZ 8 +#define VBICIBEPNOIZ 9 +#define VBICICCPNOIZ 10 +#define VBICFLBENOIZ 11 +#define VBICFLBEPNOIZ 12 +#define VBICTOTNOIZ 13 + +#define VBICNSRCS 14 /* the number of VBIC noise sources */ + /* data needed to describe a single instance */ typedef struct sVBICinstance { @@ -219,25 +238,6 @@ typedef struct sVBICinstance { #define VBICsenCsub VBICsens+45 /* stores the perturbed values of csub */ -/* indices to array of VBIC noise sources */ - -#define VBICRCNOIZ 0 -#define VBICRCINOIZ 1 -#define VBICRBNOIZ 2 -#define VBICRBINOIZ 3 -#define VBICRENOIZ 4 -#define VBICRBPNOIZ 5 -#define VBICRSNOIZ 6 -#define VBICICNOIZ 7 -#define VBICIBNOIZ 8 -#define VBICIBEPNOIZ 9 -#define VBICICCPNOIZ 10 -#define VBICFLBENOIZ 11 -#define VBICFLBEPNOIZ 12 -#define VBICTOTNOIZ 13 - -#define VBICNSRCS 14 /* the number of VBIC noise sources */ - #ifndef NONOISE double VBICnVar[NSTATVARS][VBICNSRCS]; #else /*NONOISE*/