[SI-LIST] Re: HSpice implementation of recursive convolution

  • From: Raymond Anderson <raymond.anderson@xxxxxxx>
  • To: piesiewicz@xxxxxxxxxxxxx
  • Date: Tue, 02 Sep 2003 14:53:28 -0700

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
  

Other related posts: