|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
源代码如下:*WIJK is the connecting Weight betWeen neuron J and neuron K in layer I*xi (i = 1, ... , 9) is the output from i th neuron of the first hidden layer*yj (j = 1, ... , 8) is the output from j th neuron of the second hidden layer*f is the output of the only neuron in the output layer*n1, n2 and n3 stand for drain, gate and source nodes, respectively*the gate current (igate) is assumed to be zero*Define the input parameters (channel length, oxide thickness and chirality).param LG = 5 tins = 1 n = 10
*Hidden layer 1.param k1 = ‘W111*par(tins)-W121*par(LG)-W131*par(n)-W141*V(GS) + W151*V(DS) + b11’.param k2 = ‘W112*par(tins)-W122*par(LG)-W132*par(n)-W142*V(GS) + W152*V(DS) + b12’.param k3 = ‘W113*par(tins)-W123*par(LG)-W133*par(n)-W143*V(GS) + W153*V(DS) + b13’.param k4 = ‘W114*par(tins)-W124*par(LG)-W134*par(n)-W144*V(GS) + W154*V(DS) + b14’.param k5 = ‘W115*par(tins)-W125*par(LG)-W135*par(n)-W145*V(GS) + W155*V(DS) + b15’.param k6 = ‘W116*par(tins)-W126*par(LG)-W136*par(n)-W146*V(GS) + W156*V(DS) + b16’.param k7 = ‘W117*par(tins)-W127*par(LG)-W137*par(n)-W147*V(GS) + W157*V(DS) + b17’.param k8 = ‘W118*par(tins)-W128*par(LG)-W138*par(n)-W148*V(GS) + W158*V(DS) + b18’.param k9 = ‘W119*par(tins)-W129*par(LG)-W139*par(n)-W149*V(GS) + W159*V(DS) + b19’.param x1 = ’(2/(1 + exp(-2*par(k1))))-1’.param x2 = ’(2/(1 + exp(-2*par(k2))))-1’.param x3 = ’(2/(1 + exp(-2*par(k3))))-1’.param x4 = ’(2/(1 + exp(-2*par(k4))))-1’.param x5 = ’(2/(1 + exp(-2*par(k5))))-1’.param x6 = ’(2/(1 + exp(-2*par(k6))))-1’.param x7 = ’(2/(1 + exp(-2*par(k7))))-1’.param x8 = ’(2/(1 + exp(-2*par(k8))))-1’.param x9 = ’(2/(1 + exp(-2*par(k9))))-1’
*Hidden layer 2.param z1 = ‘W211*par(x1) + W221*par(x2)-W231*par(x3) + W241*par(x4) + W251*par(x5) + W261*par(x6) + W271*par(x7)-W281*par(x8) + W291*par(x9) + b21’.param z2 = ‘W212*par(x1) + W222*par(x2)-W232*par(x3) + W242*par(x4) + W252*par(x5) + W262*par(x6) + W272*par(x7)-W282*par(x8) + W292*par(x9) + b22’.param z3 = ‘W213*par(x1) + W223*par(x2)-W233*par(x3) + W243*par(x4) + W253*par(x5) + W263*par(x6) + W273*par(x7)-W283*par(x8)+ W293*par(x9)+ b23’.param z4 = ‘W214*par(x1) + W224*par(x2)-W234*par(x3) + W244*par(x4) + W254*par(x5) + W264*par(x6) + W274*par(x7)-W284*par(x8) + W294*par(x9) + b24’.param z5 = ‘W215*par(x1) + W225*par(x2)-W235*par(x3) + W245*par(x4) + W255*par(x5) + W265*par(x6) + W275*par(x7)-W285*par(x8) + W295*par(x9) + b25’.param z6 = ‘W216*par(x1) + W226*par(x2)-W236*par(x3) + W246*par(x4) + W256*par(x5) + W266*par(x6) + W276*par(x7)-W286*par(x8) + W296*par(x9) + b26’.param z7 = ‘W217*par(x1) + W227*par(x2)-W237*par(x3) + W247*par(x4) + W257*par(x5) + W267*par(x6) + W277*par(x7)-W287*par(x8) + W297*par(x9) + b27’.param z8 = ‘W218*par(x1)+ W228*par(x2)-W238*par(x3)+ W248*par(x4) + W258*par(x5) + W268*par(x6) + W278*par(x7)-W288*par(x8) + W298*par(x9) + b28’.param y1 = ’2/(1 + exp(-2*par(z1)))-1’.param y2 = ’2/(1 + exp(-2*par(z2)))-1’.param y3 = ’2/(1 + exp(-2*par(z3)))-1’.param y4 = ’2/(1 + exp(-2*par(z4)))-1’.param y5 = ’2/(1 + exp(-2*par(z5)))-1’.param y6 = ’2/(1 + exp(-2*par(z6)))-1’.param y7 = ’2/(1 + exp(-2*par(z7)))-1’.param y8 = ’2/(1 + exp(-2*par(z8)))-1’
*Output layer.param f = ‘W311*par(z1) + W321*par(z2) + W331*par(z3)-W341*par(z4) + W351*par(z5) + W361*par(z6) +W371*par(z7) + W381*par(z8)-b31’*Definethesubcircuit.subckt CNT-MOSFET n1 n2 n3igate n2 n3 0gdrain n1 n3 cur = ’par(f)’.ends
错误提醒如下:
**error** (c:\synopsys\hspice_c-2009.09\demo\hspice\bench\try.sp:31) unknow word before or at "-"
***** job aborted |
|