16 #include "component.h"
21 #define CIR_dmux4to16 -1
81 #define NP(node) real (getV (node))
82 #define BP(pnode,nnode) (NP(pnode) - NP(nnode))
83 #define _load_static_residual2(pnode,nnode,current)\
84 _rhs[pnode] -= current;\
85 _rhs[nnode] += current;
86 #define _load_static_augmented_residual2(pnode,nnode,current)\
87 _rhs[pnode] -= current;\
88 _rhs[nnode] += current;
89 #define _load_static_residual1(node,current)\
90 _rhs[node] -= current;
91 #define _load_static_augmented_residual1(node,current)\
92 _rhs[node] -= current;
93 #define _load_static_jacobian4(pnode,nnode,vpnode,vnnode,conductance)\
94 _jstat[pnode][vpnode] += conductance;\
95 _jstat[nnode][vnnode] += conductance;\
96 _jstat[pnode][vnnode] -= conductance;\
97 _jstat[nnode][vpnode] -= conductance;\
99 _ghs[pnode] += conductance * BP(vpnode,vnnode);\
100 _ghs[nnode] -= conductance * BP(vpnode,vnnode);\
102 _rhs[pnode] += conductance * BP(vpnode,vnnode);\
103 _rhs[nnode] -= conductance * BP(vpnode,vnnode);\
105 #define _load_static_jacobian2p(node,vpnode,vnnode,conductance)\
106 _jstat[node][vpnode] += conductance;\
107 _jstat[node][vnnode] -= conductance;\
109 _ghs[node] += conductance * BP(vpnode,vnnode);\
111 _rhs[node] += conductance * BP(vpnode,vnnode);\
113 #define _load_static_jacobian2s(pnode,nnode,node,conductance)\
114 _jstat[pnode][node] += conductance;\
115 _jstat[nnode][node] -= conductance;\
117 _ghs[pnode] += conductance * NP(node);\
118 _ghs[nnode] -= conductance * NP(node);\
120 _rhs[pnode] += conductance * NP(node);\
121 _rhs[nnode] -= conductance * NP(node);\
123 #define _load_static_jacobian1(node,vnode,conductance)\
124 _jstat[node][vnode] += conductance;\
126 _ghs[node] += conductance * NP(vnode);\
128 _rhs[node] += conductance * NP(vnode);\
130 #define _load_dynamic_residual2(pnode,nnode,charge)\
131 if (doTR) _charges[pnode][nnode] += charge;\
133 _qhs[pnode] -= charge;\
134 _qhs[nnode] += charge;\
136 #define _load_dynamic_residual1(node,charge)\
137 if (doTR) _charges[node][node] += charge;\
139 _qhs[node] -= charge;\
141 #define _load_dynamic_jacobian4(pnode,nnode,vpnode,vnnode,capacitance)\
143 _jdyna[pnode][vpnode] += capacitance;\
144 _jdyna[nnode][vnnode] += capacitance;\
145 _jdyna[pnode][vnnode] -= capacitance;\
146 _jdyna[nnode][vpnode] -= capacitance;\
149 _caps[pnode][nnode][vpnode][vnnode] += capacitance;\
152 _chs[pnode] += capacitance * BP(vpnode,vnnode);\
153 _chs[nnode] -= capacitance * BP(vpnode,vnnode);\
155 #define _load_dynamic_jacobian2s(pnode,nnode,vnode,capacitance)\
157 _jdyna[pnode][vnode] += capacitance;\
158 _jdyna[nnode][vnode] -= capacitance;\
161 _caps[pnode][nnode][vnode][vnode] += capacitance;\
164 _chs[pnode] += capacitance * NP(vnode);\
165 _chs[nnode] -= capacitance * NP(vnode);\
167 #define _load_dynamic_jacobian2p(node,vpnode,vnnode,capacitance)\
169 _jdyna[node][vpnode] += capacitance;\
170 _jdyna[node][vnnode] -= capacitance;\
173 _caps[node][node][vpnode][vnnode] += capacitance;\
176 _chs[node] += capacitance * BP(vpnode,vnnode);\
178 #define _load_dynamic_jacobian1(node,vnode,capacitance)\
180 _jdyna[node][vnode] += capacitance;\
183 _caps[node][node][vnode][vnode] += capacitance;\
186 _chs[node] += capacitance * NP(vnode);\
189 #define _save_whitenoise1(n1,pwr,type)\
190 _white_pwr[n1][n1] += pwr;
191 #define _save_whitenoise2(n1,n2,pwr,type)\
192 _white_pwr[n1][n2] += pwr;
193 #define _save_flickernoise1(n1,pwr,exp,type)\
194 _flicker_pwr[n1][n1] += pwr;\
195 _flicker_exp[n1][n1] += exp;
196 #define _save_flickernoise2(n1,n2,pwr,exp,type)\
197 _flicker_pwr[n1][n2] += pwr;\
198 _flicker_exp[n1][n2] += exp;
199 #define _load_whitenoise2(n1,n2,pwr)\
200 cy (n1,n2) -= pwr/kB/T0; cy (n2,n1) -= pwr/kB/T0;\
201 cy (n1,n1) += pwr/kB/T0; cy (n2,n2) += pwr/kB/T0;
202 #define _load_whitenoise1(n1,pwr)\
203 cy (n1,n1) += pwr/kB/T0;
204 #define _load_flickernoise2(n1,n2,pwr,exp)\
205 cy (n1,n2) -= pwr*pow(_freq,-exp)/kB/T0;\
206 cy (n2,n1) -= pwr*pow(_freq,-exp)/kB/T0;\
207 cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;\
208 cy (n2,n2) += pwr*pow(_freq,-exp)/kB/T0;
209 #define _load_flickernoise1(n1,pwr,exp)\
210 cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;
213 #define m00_hypot(v00,x,y) v00 = xhypot(x,y);
214 #define m10_hypot(v10,v00,x,y) v10 = (x)/(v00);
215 #define m11_hypot(v11,v00,x,y) v11 = (y)/(v00);
216 #define m00_max(v00,x,y) v00 = ((x)>(y))?(x):(y);
217 #define m10_max(v10,v00,x,y) v10 = ((x)>(y))?1.0:0.0;
218 #define m11_max(v11,v00,x,y) v11 = ((x)>(y))?0.0:1.0;
219 #define m00_min(v00,x,y) v00 = ((x)<(y))?(x):(y);
220 #define m10_min(v10,v00,x,y) v10 = ((x)<(y))?1.0:0.0;
221 #define m11_min(v11,v00,x,y) v11 = ((x)<(y))?0.0:1.0;
222 #define m00_pow(v00,x,y) v00 = pow(x,y);
223 #define m10_pow(v10,v00,x,y) v10 = (x==0.0)?0.0:(v00)*(y)/(x);
224 #define m11_pow(v11,v00,x,y) v11 = (x==0.0)?0.0:(log(x)*(v00));
226 #define m00_div(v00,v10,x,y) double v10=1/(y); double v00=(x)*v10;
227 #define m10_div(v10,v00,vv,x,y)
228 #define m11_div(v11,v00,vv,x,y) double v11 = -v00*vv;
230 #define m00_mult(v00,v10,v11,x,y) double v10=(x); double v11=(y); double v00=v10*v11;
231 #define m00_add(v00,x,y) double v00=(x)+(y);
233 #define m00_cos(v00,x) v00 = cos(x);
234 #define m10_cos(v10,v00,x) v10 = (-sin(x));
235 #define m00_sin(v00,x) v00 = sin(x);
236 #define m10_sin(v10,v00,x) v10 = (cos(x));
237 #define m00_tan(v00,x) v00 = tan(x);
238 #define m10_tan(v10,v00,x) v10 = (1.0/cos(x)/cos(x));
239 #define m00_cosh(v00,x) v00 = cosh(x);
240 #define m10_cosh(v10,v00,x) v10 = (sinh(x));
241 #define m00_sinh(v00,x) v00 = sinh(x);
242 #define m10_sinh(v10,v00,x) v10 = (cosh(x));
243 #define m00_tanh(v00,x) v00 = tanh(x);
244 #define m10_tanh(v10,v00,x) v10 = (1.0/cosh(x)/cosh(x));
245 #define m00_acos(v00,x) v00 = acos(x);
246 #define m10_acos(v10,v00,x) v10 = (-1.0/sqrt(1-x*x));
247 #define m00_asin(v00,x) v00 = asin(x);
248 #define m10_asin(v10,v00,x) v10 = (+1.0/sqrt(1-x*x));
249 #define m00_atan(v00,x) v00 = atan(x);
250 #define m10_atan(v10,v00,x) v10 = (+1.0/(1+x*x));
251 #define m00_atanh(v00,x) v00 = atanh(x);
252 #define m10_atanh(v10,v00,x) v10 = (+1.0/(1-x*x));
253 #define m00_logE(v00,x) v00 = log(x);
254 #define m10_logE(v10,v00,x) v10 = (1.0/x);
255 #define m00_log10(v00,x) v00 = log10(x);
256 #define m10_log10(v10,v00,x) v10 = (1.0/x/M_LN10);
257 #define m00_sqrt(v00,x) v00 = sqrt(x);
258 #define m10_sqrt(v10,v00,x) v10 = (0.5/v00);
259 #define m00_fabs(v00,x) v00 = fabs(x);
260 #define m10_fabs(v10,v00,x) v10 = (((x)>=0)?(+1.0):(-1.0));
262 #define m00_exp(v00,x) v00 = exp(x);
263 #define m10_exp(v10,v00,x) v10 = v00;
265 #define m00_abs(v00) ((v00)<(0)?(-(v00)):(v00))
266 #define m00_floor(v00,x) v00 = floor(x);
267 #define m00_limexp(v00,x) v00 = ((x)<80.0?exp(x):exp(80.0)*(x-79.0));
268 #define m10_limexp(v10,v00,x) v10 = ((x)<80.0?(v00):exp(80.0));
270 #define m20_logE(v00) (-1.0/v00/v00)
271 #define m20_exp(v00) exp(v00)
272 #define m20_limexp(v00) ((v00)<80.0?exp(v00):0.0)
273 #define m20_sqrt(v00) (-0.25/(v00)/sqrt(v00))
274 #define m20_fabs(v00) 0.0
275 #define m20_pow(x,y) ((y)*((y)-1.0)*pow(x,y)/(x)/(x))
276 #define m00_vt(x) (kBoverQ*(x))
277 #define m10_vt(x) (kBoverQ)
280 #define _modelname "dmux4to16"
281 #define _instancename getName()
282 #define _circuit_temp (getPropertyDouble("Temp")+273.15)
283 #define _param_given(p) (isPropertyGiven(p)?1:0)
287 #define _vt_nom (kBoverQ*_circuit_temp)
289 using namespace device;
298 void dmux4to16::initModel (
void)
341 initializeInstance ();
362 void dmux4to16::initVerilog (
void)
369 for (i1 = 0; i1 < 53; i1++) {
370 for (i2 = 0; i2 < 53; i2++) {
371 _charges[i1][i2] = 0.0;
375 for (i1 = 0; i1 < 53; i1++) {
376 for (i2 = 0; i2 < 53; i2++) {
377 for (i3 = 0; i3 < 53; i3++) {
378 for (i4 = 0; i4 < 53; i4++) {
379 _caps[i1][i2][i3][i4] = 0.0;
383 for (i1 = 0; i1 < 53; i1++) {
388 for (i2 = 0; i2 < 53; i2++) {
389 _jstat[i1][i2] = 0.0;
390 _jdyna[i1][i2] = 0.0;
396 void dmux4to16::loadVariables (
void)
408 #define _DERIVATEFORDDX
411 void dmux4to16::initializeModel (
void)
413 #if defined(_DYNAMIC)
417 #if defined(_DYNAMIC)
418 Cd=((Delay*1.43)/Rd);
424 void dmux4to16::initializeInstance (
void)
429 void dmux4to16::initialStep (
void)
434 void dmux4to16::finalStep (
void)
439 void dmux4to16::calcVerilog (
void)
444 #if defined(_DERIVATE)
452 #if defined(_DERIVATE)
460 #if defined(_DERIVATE)
468 #if defined(_DERIVATE)
476 #if defined(_DERIVATE)
484 #if defined(_DERIVATE)
492 #if defined(_DERIVATE)
500 #if defined(_DERIVATE)
508 #if defined(_DERIVATE)
516 #if defined(_DERIVATE)
524 #if defined(_DERIVATE)
532 #if defined(_DERIVATE)
540 #if defined(_DERIVATE)
548 #if defined(_DERIVATE)
556 #if defined(_DERIVATE)
564 #if defined(_DERIVATE)
572 #if defined(_DERIVATE)
576 #if defined(_DERIVATE)
580 #if defined(_DERIVATE)
584 #if defined(_DERIVATE)
588 #if defined(_DERIVATE)
591 #if defined(_DERIVATE)
595 #if defined(_DERIVATE)
599 #if defined(_DERIVATE)
603 #if defined(_DERIVATE)
607 #if defined(_DERIVATE)
611 #if defined(_DERIVATE)
612 IY0_VEN_GND=VENI_VEN_GND*VDI*VCI*VBI*VAI;
613 IY0_VD_GND=(VENI*VDI_VD_GND)*VCI*VBI*VAI;
614 IY0_VC_GND=((VENI*VDI)*VCI_VC_GND)*VBI*VAI;
615 IY0_VB_GND=(((VENI*VDI)*VCI)*VBI_VB_GND)*VAI;
616 IY0_VA_GND=((((VENI*VDI)*VCI)*VBI)*VAI_VA_GND);
618 IY0=((((VENI*VDI)*VCI)*VBI)*VAI);
620 double m00_tanh(d00_tanh0,(TR*(IY0-0.5)))
621 #if defined(_DERIVATE)
622 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY0-0.5)))
625 #if defined(_DERIVATE)
634 #if defined(_DERIVATE)
638 #if defined(_DERIVATE)
641 #if defined(_DYNAMIC)
643 #if defined(_DERIVATE)
648 #if defined(_DERIVATE)
652 #if defined(_DERIVATE)
655 #if defined(_DERIVATE)
656 IY1_VEN_GND=VENI_VEN_GND*VDI*VCI*VBI*
NP(
A);
657 IY1_VD_GND=(VENI*VDI_VD_GND)*VCI*VBI*
NP(
A);
658 IY1_VC_GND=((VENI*VDI)*VCI_VC_GND)*VBI*
NP(
A);
659 IY1_VB_GND=(((VENI*VDI)*VCI)*VBI_VB_GND)*
NP(
A);
660 IY1_VA_GND=((((VENI*VDI)*VCI)*VBI));
662 IY1=((((VENI*VDI)*VCI)*VBI)*
NP(
A));
664 double m00_tanh(d00_tanh0,(TR*(IY1-0.5)))
665 #if defined(_DERIVATE)
666 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY1-0.5)))
669 #if defined(_DERIVATE)
678 #if defined(_DERIVATE)
682 #if defined(_DERIVATE)
685 #if defined(_DYNAMIC)
687 #if defined(_DERIVATE)
692 #if defined(_DERIVATE)
696 #if defined(_DERIVATE)
699 #if defined(_DERIVATE)
700 IY2_VEN_GND=VENI_VEN_GND*VDI*VCI*
NP(
B)*VAI;
701 IY2_VD_GND=(VENI*VDI_VD_GND)*VCI*
NP(
B)*VAI;
702 IY2_VC_GND=((VENI*VDI)*VCI_VC_GND)*
NP(
B)*VAI;
703 IY2_VB_GND=(((VENI*VDI)*VCI))*VAI;
704 IY2_VA_GND=((((VENI*VDI)*VCI)*
NP(
B))*VAI_VA_GND);
706 IY2=((((VENI*VDI)*VCI)*
NP(
B))*VAI);
708 double m00_tanh(d00_tanh0,(TR*(IY2-0.5)))
709 #if defined(_DERIVATE)
710 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY2-0.5)))
713 #if defined(_DERIVATE)
722 #if defined(_DERIVATE)
726 #if defined(_DERIVATE)
729 #if defined(_DYNAMIC)
731 #if defined(_DERIVATE)
736 #if defined(_DERIVATE)
740 #if defined(_DERIVATE)
743 #if defined(_DERIVATE)
744 IY3_VEN_GND=VENI_VEN_GND*VDI*VCI*
NP(
B)*
NP(
A);
745 IY3_VD_GND=(VENI*VDI_VD_GND)*VCI*
NP(
B)*
NP(
A);
746 IY3_VC_GND=((VENI*VDI)*VCI_VC_GND)*
NP(
B)*
NP(
A);
747 IY3_VB_GND=(((VENI*VDI)*VCI))*
NP(
A);
748 IY3_VA_GND=((((VENI*VDI)*VCI)*
NP(
B)));
750 IY3=((((VENI*VDI)*VCI)*
NP(
B))*
NP(
A));
752 double m00_tanh(d00_tanh0,(TR*(IY3-0.5)))
753 #if defined(_DERIVATE)
754 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY3-0.5)))
757 #if defined(_DERIVATE)
766 #if defined(_DERIVATE)
770 #if defined(_DERIVATE)
773 #if defined(_DYNAMIC)
775 #if defined(_DERIVATE)
780 #if defined(_DERIVATE)
784 #if defined(_DERIVATE)
787 #if defined(_DERIVATE)
788 IY4_VEN_GND=VENI_VEN_GND*VDI*
NP(
C)*VBI*VAI;
789 IY4_VD_GND=(VENI*VDI_VD_GND)*
NP(
C)*VBI*VAI;
790 IY4_VC_GND=((VENI*VDI))*VBI*VAI;
791 IY4_VB_GND=(((VENI*VDI)*
NP(
C))*VBI_VB_GND)*VAI;
792 IY4_VA_GND=((((VENI*VDI)*
NP(
C))*VBI)*VAI_VA_GND);
794 IY4=((((VENI*VDI)*
NP(
C))*VBI)*VAI);
796 double m00_tanh(d00_tanh0,(TR*(IY4-0.5)))
797 #if defined(_DERIVATE)
798 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY4-0.5)))
801 #if defined(_DERIVATE)
810 #if defined(_DERIVATE)
814 #if defined(_DERIVATE)
817 #if defined(_DYNAMIC)
819 #if defined(_DERIVATE)
824 #if defined(_DERIVATE)
828 #if defined(_DERIVATE)
831 #if defined(_DERIVATE)
832 IY5_VEN_GND=VENI_VEN_GND*VDI*
NP(
C)*VBI*
NP(
A);
833 IY5_VD_GND=(VENI*VDI_VD_GND)*
NP(
C)*VBI*
NP(
A);
834 IY5_VC_GND=((VENI*VDI))*VBI*
NP(
A);
835 IY5_VB_GND=(((VENI*VDI)*
NP(
C))*VBI_VB_GND)*
NP(
A);
836 IY5_VA_GND=((((VENI*VDI)*
NP(
C))*VBI));
838 IY5=((((VENI*VDI)*
NP(
C))*VBI)*
NP(
A));
840 double m00_tanh(d00_tanh0,(TR*(IY5-0.5)))
841 #if defined(_DERIVATE)
842 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY5-0.5)))
845 #if defined(_DERIVATE)
854 #if defined(_DERIVATE)
858 #if defined(_DERIVATE)
861 #if defined(_DYNAMIC)
863 #if defined(_DERIVATE)
868 #if defined(_DERIVATE)
872 #if defined(_DERIVATE)
875 #if defined(_DERIVATE)
876 IY6_VEN_GND=VENI_VEN_GND*VDI*
NP(
C)*
NP(
B)*VAI;
877 IY6_VD_GND=(VENI*VDI_VD_GND)*
NP(
C)*
NP(
B)*VAI;
878 IY6_VC_GND=((VENI*VDI))*
NP(
B)*VAI;
879 IY6_VB_GND=(((VENI*VDI)*
NP(
C)))*VAI;
880 IY6_VA_GND=((((VENI*VDI)*
NP(
C))*
NP(
B))*VAI_VA_GND);
882 IY6=((((VENI*VDI)*
NP(
C))*
NP(
B))*VAI);
884 double m00_tanh(d00_tanh0,(TR*(IY6-0.5)))
885 #if defined(_DERIVATE)
886 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY6-0.5)))
889 #if defined(_DERIVATE)
898 #if defined(_DERIVATE)
902 #if defined(_DERIVATE)
905 #if defined(_DYNAMIC)
907 #if defined(_DERIVATE)
912 #if defined(_DERIVATE)
916 #if defined(_DERIVATE)
919 #if defined(_DERIVATE)
920 IY7_VEN_GND=VENI_VEN_GND*VDI*
NP(
C)*
NP(
B)*
NP(
A);
921 IY7_VD_GND=(VENI*VDI_VD_GND)*
NP(
C)*
NP(
B)*
NP(
A);
922 IY7_VC_GND=((VENI*VDI))*
NP(
B)*
NP(
A);
923 IY7_VB_GND=(((VENI*VDI)*
NP(
C)))*
NP(
A);
924 IY7_VA_GND=((((VENI*VDI)*
NP(
C))*
NP(
B)));
928 double m00_tanh(d00_tanh0,(TR*(IY7-0.5)))
929 #if defined(_DERIVATE)
930 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY7-0.5)))
933 #if defined(_DERIVATE)
942 #if defined(_DERIVATE)
946 #if defined(_DERIVATE)
949 #if defined(_DYNAMIC)
951 #if defined(_DERIVATE)
956 #if defined(_DERIVATE)
960 #if defined(_DERIVATE)
963 #if defined(_DERIVATE)
964 IY8_VEN_GND=VENI_VEN_GND*
NP(
D)*VCI*VBI*VAI;
965 IY8_VD_GND=(VENI)*VCI*VBI*VAI;
966 IY8_VC_GND=((VENI*
NP(
D))*VCI_VC_GND)*VBI*VAI;
967 IY8_VB_GND=(((VENI*
NP(
D))*VCI)*VBI_VB_GND)*VAI;
968 IY8_VA_GND=((((VENI*
NP(
D))*VCI)*VBI)*VAI_VA_GND);
970 IY8=((((VENI*
NP(
D))*VCI)*VBI)*VAI);
972 double m00_tanh(d00_tanh0,(TR*(IY8-0.5)))
973 #if defined(_DERIVATE)
974 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY8-0.5)))
977 #if defined(_DERIVATE)
986 #if defined(_DERIVATE)
990 #if defined(_DERIVATE)
993 #if defined(_DYNAMIC)
995 #if defined(_DERIVATE)
1000 #if defined(_DERIVATE)
1004 #if defined(_DERIVATE)
1007 #if defined(_DERIVATE)
1008 IY9_VEN_GND=VENI_VEN_GND*
NP(
D)*VCI*VBI*
NP(
A);
1009 IY9_VD_GND=(VENI)*VCI*VBI*
NP(
A);
1010 IY9_VC_GND=((VENI*
NP(
D))*VCI_VC_GND)*VBI*
NP(
A);
1011 IY9_VB_GND=(((VENI*
NP(
D))*VCI)*VBI_VB_GND)*
NP(
A);
1012 IY9_VA_GND=((((VENI*
NP(
D))*VCI)*VBI));
1014 IY9=((((VENI*
NP(
D))*VCI)*VBI)*
NP(
A));
1016 double m00_tanh(d00_tanh0,(TR*(IY9-0.5)))
1017 #if defined(_DERIVATE)
1018 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY9-0.5)))
1021 #if defined(_DERIVATE)
1030 #if defined(_DERIVATE)
1034 #if defined(_DERIVATE)
1037 #if defined(_DYNAMIC)
1039 #if defined(_DERIVATE)
1044 #if defined(_DERIVATE)
1048 #if defined(_DERIVATE)
1051 #if defined(_DERIVATE)
1052 IY10_VEN_GND=VENI_VEN_GND*
NP(
D)*VCI*
NP(
B)*VAI;
1053 IY10_VD_GND=(VENI)*VCI*
NP(
B)*VAI;
1054 IY10_VC_GND=((VENI*
NP(
D))*VCI_VC_GND)*
NP(
B)*VAI;
1055 IY10_VB_GND=(((VENI*
NP(
D))*VCI))*VAI;
1056 IY10_VA_GND=((((VENI*
NP(
D))*VCI)*
NP(
B))*VAI_VA_GND);
1058 IY10=((((VENI*
NP(
D))*VCI)*
NP(
B))*VAI);
1060 double m00_tanh(d00_tanh0,(TR*(IY10-0.5)))
1061 #if defined(_DERIVATE)
1062 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY10-0.5)))
1065 #if defined(_DERIVATE)
1074 #if defined(_DERIVATE)
1078 #if defined(_DERIVATE)
1081 #if defined(_DYNAMIC)
1083 #if defined(_DERIVATE)
1088 #if defined(_DERIVATE)
1092 #if defined(_DERIVATE)
1095 #if defined(_DERIVATE)
1096 IY11_VEN_GND=VENI_VEN_GND*
NP(
D)*VCI*
NP(
B)*
NP(
A);
1097 IY11_VD_GND=(VENI)*VCI*
NP(
B)*
NP(
A);
1098 IY11_VC_GND=((VENI*
NP(
D))*VCI_VC_GND)*
NP(
B)*
NP(
A);
1099 IY11_VB_GND=(((VENI*
NP(
D))*VCI))*
NP(
A);
1100 IY11_VA_GND=((((VENI*
NP(
D))*VCI)*
NP(
B)));
1102 IY11=((((VENI*
NP(
D))*VCI)*
NP(
B))*
NP(
A));
1104 double m00_tanh(d00_tanh0,(TR*(IY11-0.5)))
1105 #if defined(_DERIVATE)
1106 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY11-0.5)))
1109 #if defined(_DERIVATE)
1118 #if defined(_DERIVATE)
1122 #if defined(_DERIVATE)
1125 #if defined(_DYNAMIC)
1127 #if defined(_DERIVATE)
1132 #if defined(_DERIVATE)
1136 #if defined(_DERIVATE)
1139 #if defined(_DERIVATE)
1140 IY12_VEN_GND=VENI_VEN_GND*
NP(
D)*
NP(
C)*VBI*VAI;
1141 IY12_VD_GND=(VENI)*
NP(
C)*VBI*VAI;
1142 IY12_VC_GND=((VENI*
NP(
D)))*VBI*VAI;
1143 IY12_VB_GND=(((VENI*
NP(
D))*
NP(
C))*VBI_VB_GND)*VAI;
1144 IY12_VA_GND=((((VENI*
NP(
D))*
NP(
C))*VBI)*VAI_VA_GND);
1146 IY12=((((VENI*
NP(
D))*
NP(
C))*VBI)*VAI);
1148 double m00_tanh(d00_tanh0,(TR*(IY12-0.5)))
1149 #if defined(_DERIVATE)
1150 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY12-0.5)))
1153 #if defined(_DERIVATE)
1162 #if defined(_DERIVATE)
1166 #if defined(_DERIVATE)
1169 #if defined(_DYNAMIC)
1171 #if defined(_DERIVATE)
1176 #if defined(_DERIVATE)
1180 #if defined(_DERIVATE)
1183 #if defined(_DERIVATE)
1184 IY13_VEN_GND=VENI_VEN_GND*
NP(
D)*
NP(
C)*VBI*
NP(
A);
1185 IY13_VD_GND=(VENI)*
NP(
C)*VBI*
NP(
A);
1186 IY13_VC_GND=((VENI*
NP(
D)))*VBI*
NP(
A);
1187 IY13_VB_GND=(((VENI*
NP(
D))*
NP(
C))*VBI_VB_GND)*
NP(
A);
1188 IY13_VA_GND=((((VENI*
NP(
D))*
NP(
C))*VBI));
1190 IY13=((((VENI*
NP(
D))*
NP(
C))*VBI)*
NP(
A));
1192 double m00_tanh(d00_tanh0,(TR*(IY13-0.5)))
1193 #if defined(_DERIVATE)
1194 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY13-0.5)))
1197 #if defined(_DERIVATE)
1206 #if defined(_DERIVATE)
1210 #if defined(_DERIVATE)
1213 #if defined(_DYNAMIC)
1215 #if defined(_DERIVATE)
1220 #if defined(_DERIVATE)
1224 #if defined(_DERIVATE)
1227 #if defined(_DERIVATE)
1228 IY14_VEN_GND=VENI_VEN_GND*
NP(
D)*
NP(
C)*
NP(
B)*VAI;
1229 IY14_VD_GND=(VENI)*
NP(
C)*
NP(
B)*VAI;
1230 IY14_VC_GND=((VENI*
NP(
D)))*
NP(
B)*VAI;
1231 IY14_VB_GND=(((VENI*
NP(
D))*
NP(
C)))*VAI;
1232 IY14_VA_GND=((((VENI*
NP(
D))*
NP(
C))*
NP(
B))*VAI_VA_GND);
1234 IY14=((((VENI*
NP(
D))*
NP(
C))*
NP(
B))*VAI);
1236 double m00_tanh(d00_tanh0,(TR*(IY14-0.5)))
1237 #if defined(_DERIVATE)
1238 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY14-0.5)))
1241 #if defined(_DERIVATE)
1250 #if defined(_DERIVATE)
1254 #if defined(_DERIVATE)
1257 #if defined(_DYNAMIC)
1259 #if defined(_DERIVATE)
1264 #if defined(_DERIVATE)
1268 #if defined(_DERIVATE)
1271 #if defined(_DERIVATE)
1275 IY15_VB_GND=(((VENI*
NP(
D))*
NP(
C)))*
NP(
A);
1276 IY15_VA_GND=((((VENI*
NP(
D))*
NP(
C))*
NP(
B)));
1280 double m00_tanh(d00_tanh0,(TR*(IY15-0.5)))
1281 #if defined(_DERIVATE)
1282 double m10_tanh(d10_tanh0,d00_tanh0,(TR*(IY15-0.5)))
1285 #if defined(_DERIVATE)
1294 #if defined(_DERIVATE)
1298 #if defined(_DERIVATE)
1301 #if defined(_DYNAMIC)
1303 #if defined(_DERIVATE)
1308 #if defined(_DERIVATE)
1312 #if defined(_DERIVATE)
1331 for (
int i1 = 0; i1 < 53; i1++) {
1332 setI (i1, _rhs[i1]);
1333 for (
int i2 = 0; i2 < 53; i2++) {
1334 setY (i1, i2, _jstat[i1][i2]);
1368 matrix dmux4to16::calcMatrixY (nr_double_t frequency)
1374 for (
int i1 = 0; i1 < 53; i1++) {
1375 for (
int i2 = 0; i2 < 53; i2++) {
1376 y (i1,i2) =
rect (_jstat[i1][i2], _jdyna[i1][i2] * 2 *
M_PI * _freq);
1410 int i1, i2, i3, i4, state;
1413 for (i1 = 0; i1 < 53; i1++) {
1414 for (i2 = 0; i2 < 53; i2++) {
1415 state = 2 * (i2 + 53 * i1);
1417 if (_charges[i1][i2] != 0.0)
1422 for (i1 = 0; i1 < 53; i1++) {
1423 state = 2 * (i1 + 53 * i1);
1424 if (_charges[i1][i1] != 0.0)
1429 for (i1 = 0; i1 < 53; i1++) {
1430 for (i2 = 0; i2 < 53; i2++) {
1432 for (i3 = 0; i3 < 53; i3++) {
1433 for (i4 = 0; i4 < 53; i4++) {
1435 if (_caps[i1][i2][i3][i4] != 0.0)
1440 for (i1 = 0; i1 < 53; i1++) {
1441 for (i2 = 0; i2 < 53; i2++) {
1443 for (i3 = 0; i3 < 53; i3++) {
1444 if (_caps[i1][i2][i3][i3] != 0.0)
1449 for (i1 = 0; i1 < 53; i1++) {
1450 for (i3 = 0; i3 < 53; i3++) {
1451 for (i4 = 0; i4 < 53; i4++) {
1453 if (_caps[i1][i1][i3][i4] != 0.0)
1458 for (i1 = 0; i1 < 53; i1++) {
1459 for (i3 = 0; i3 < 53; i3++) {
1460 if (_caps[i1][i1][i3][i3] != 0.0)
1466 matrix dmux4to16::calcMatrixCy (nr_double_t frequency)
1506 for (
int i1 = 0; i1 < 53; i1++) {
1507 setQ (i1, _qhs[i1]);
1508 setCV (i1, _chs[i1]);
1509 setGV (i1, _ghs[i1]);
1510 for (
int i2 = 0; i2 < 53; i2++) {
1511 setQV (i1, i2, _jdyna[i1][i2]);