Thanks for responding, I have already tried what you suggested. The problem is, that the current of the source must be updated every, user defined, transient step, here dt. This updating is done in a recursive manner in a two step process. I enclose the listing in HSpice, with suggestions from you, and the problem is that the equations seem to be calculated only once and are not updated every dt step during transient analysis. How to solve this problem ? (make HSpice update given parameters every dt step during transient analysis) .OPTIONS LIST NODE POST .OP .PARAM k_11=1g .PARAM p_1=-5g .PARAM dt=20p .PARAM theta='(-1/p_1**2-dt/p_1+exp(p_1*dt)/p_1**2)/dt' .PARAM x='x+theta*V(1,2)' .PARAM x='exp(p_1*dt)*x+(exp(p_1*dt)*(p_1*dt-1)+1)*V(1,2)/(dt*p_1**2)' .PARAM i_eq='k_11*x' .TRAN dt 2n V1 1 0 10 AC 1 PWL 1p 0 2p 0.5 4p 1 2n 1 I1 1 2 i_eq R1 1 2 1/'k_11*theta' C1 2 0 1p .END -----Ursprüngliche Nachricht----- Von: "Raymond Anderson" <raymond.anderson@xxxxxxx> An: <piesiewicz@xxxxxxxxxxxxx> Cc: "Signal Integrity" <si-list@xxxxxxxxxxxxx> Gesendet: Dienstag, 2. September 2003 23:53 Betreff: Re: [SI-LIST] HSpice implementation of recursive convolution > Equations may be evaluated within an Hspice deck at runtime by defining > the equations within a .param statement. > > Here is a snippet from an Hspice deck showing a number of component > values being calculated by way of equations at runtime: > > .param pi2='2*3.14159' > .param c1=1uF > .param r1='1/(pi2*fI*c1)' > .param r2='1/(pi2*z1*c1)' > .param r3='pi2*z2*r1/(pi2*p1-pi2*z2)' > .param c2='1/(pi2*z2*(r1+r3))' > .param c3='1/(pi2*p2*r2)' > > I haven't looked into the details of your code, but the general > implementation might look something like this: > > > .param v = 'Vtran(n1) - Vtran(n2)' > .param x = 'x+theta*v' > .param x = 'exp(p_1*dt)*x+ exp(p_1*dt-1)*v' > .param i_eq = 'k_11*x' > > Hopefully this gives you a starting point. > > BTW, the 'S element' in the recent versions of Hspice utilizes > recursive convolution internally when doing time domain simulation > of s-parameter defined transfer functions. > > > -Ray Anderson > Sun Microsystems Inc. > > > > Radoslaw Piesiewicz wrote: > > Hi, > > I have a problem, namely how to implement the following code (it is recursive convolution) in HSpice, the code is from some simulator that works similarly to HSpice. The problem is to calculate the current Curr, it is done in two step process > > at every step in the transient analysis (at the intervals of FIXED parameter). The problem is in implementing the part CALC ... ENDCALC > > > > Thanks > > > > Code: > > > > Var k_11 1.0G > > Var p_1 -5.0G > > Var dt 2p > > Var theta FUNC=(p_1**2+exp(p_1*dt)) > > Var x=0 > > Var i_eq 0 > > Var v=0 > > > > Res 'portVCCS' n1 n2 1.0 G=k_11*theta > > Curr 'portCurr' n1 n2 TRAN=i_eq > > > > Cap 'Cload' n2 GND 1p > > > > Volt 'Vin' n1 GND TRAN=1*(t>0) > > > > Sweep '' > > + LOOP 1001 TIME LIN 0 2n FIXED > > + X 't' 's' 0 2n MULTX='n' > > + Y 'u_(out)' 'V' 0 2 > > > > CALC > > > > v = Vtran(n1) - Vtran(n2) > > x= x+theta*v > > x= exp(p_1*dt)*x+ exp(p_1*dt-1)*v > > i_eq=k_11*x > > > > ENDCALC > > > > Show Y Vtran(n2) > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > Dipl.-Ing. Radoslaw Piesiewicz > > ------------------------------------------------------------------ To unsubscribe from si-list: si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field or to administer your membership from a web page, go to: //www.freelists.org/webpage/si-list For help: si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field List archives are viewable at: //www.freelists.org/archives/si-list or at our remote archives: http://groups.yahoo.com/group/si-list/messages Old (prior to June 6, 2001) list archives are viewable at: http://www.qsl.net/wb6tpu