[SI-LIST] Re: S-parameter for differential signals in Hspice

Here are examples of what I've used, for both single-ended and
differential S-params.  I gave up using the .NET statement - with this
method, I can easily build the same circuit for other simulators.
They're for W-elements, but you should be able to easily substitute your
own DUT for the RLGC files (please don't ask for the rlgc files).

SINGLE-ENDED:
vna_s_params

.param trace_L=3D6
.option probe $ reduce unwanted output
.options INGOLD=3D1 $ use scientific notation vs. "Meg"
.AC Lin  800  30K 20G

.subckt myTline p_in p_out
W_myTline   p_in 0 p_out 0 RLGCfile=3DmyRLGC.rlc N=3D1 =
L=3D'.0254*trace_L'
.ends myTline

**** Stimulus at port1
V_src_1 N_src_1 0 DC=3D0 ac 2 $ 0VDC, 2VAC (will get divided by 2 by
source R)
R_src_1 N_src_1 N_port1_1 R=3D50
R_load_port2_1 N_port2_1 0 R=3D50
X_Tline_1   N_port1_1 N_port2_1 myTline=20
**** Calculate S11
E_s11_port1 N_s11_src_1 0 N_port1_1 0 1 $ copy port1
V_s11_vsrc  N_s11_src_1 N_s11 DC=3D0 ac 1 $ subtract original voltage
R_s11 N_s11 0 R=3D1

.print v(N_s11) v(N_port2_1) $ v(N_s11) is S11, v(N_port2_1) is S21
.END

DIFFERENTIAL:
sdd21_example

.param trace_L=3D14.3
.option probe $ reduce unwanted output
.options INGOLD=3D1 $ use scientific notation vs. "Meg"
.AC Lin  800  30K 20G

.subckt myTline p1_in   n1_in
+               p1_out  n1_out

W_myTline_coupled   p1_in       n1_in   0
+                   p1_out      n1_out  0
+                   RLGCfile=3Dsdd21_example.rlc N=3D2 =
L=3D'.0254*trace_L'
.ends myTline                 =20

**** Stimulus at port1
V_src_1 N_src_1 0 DC=3D0 ac 2 $ 0VDC, 2VAC (will get divided by 2 by
source R)
R_src_1 N_src_1 N_port1_1 R=3D50
**** Terminate Ports
R_load_port2_1 N_port2_1 0 R=3D50
R_load_port3_1 N_port3_1 0 R=3D50
R_load_port4_1 N_port4_1 0 R=3D50
X_Tline_1   N_port1_1   N_port3_1=09
+           N_port2_1   N_port4_1
+           myTline=20
**** Calculate S11 (not used here, but want to provide the algorithm)
E_s11_port1 N_s11_src_1 0 N_port1_1 0 1 $ copy port1
V_s11_vsrc  N_s11_src_1 N_s11 DC=3D0 ac 1 $ subtract original voltage
R_s11 N_s11 0 R=3D1

**** Stimulus at port3 (not needed for reciprocal, symmetric system)
V_src_3 N_src_3 0 DC=3D0 ac 2 $ 0VDC, 2VAC (will get divided by 2 by
source R)
R_src_3 N_src_3 N_port3_3 R=3D50
**** Terminate Ports
R_load_port1_3 N_port1_3 0 R=3D50
R_load_port2_3 N_port2_3 0 R=3D50
R_load_port4_3 N_port4_3 0 R=3D50
X_Tline_3   N_port1_3   N_port3_3
+           N_port2_3   N_port4_3
+           myTline=20

**** SDD21 =3D 1/2 (S21 - S41 - S23 + S43)
e_sdd21a N_sdd21a  0        N_port2_1 0 1 $ copy S21
e_sdd21b N_sdd21a  N_sdd21b  N_port4_1 0 1 $ subtract S41
e_sdd21c N_sdd21b  N_sdd21c  N_port2_3 0 1 $ subtract S23
e_sdd21d N_sdd21d  N_sdd21c  N_port4_3 0 1 $ add S43
r_sdd21a N_sdd21d  N_sdd21 R=3D1   $ divide result by 2
r_sdd21b N_sdd21 0 R=3D1

**** For reciprocal, symmetric systems, SDD21 is mag(S21 - S41)
e_sdd21syma  N_sdd21syma 0 N_port2_1 0 1 $ copy S21
e_sdd21symb  N_sdd21syma N_sdd21sym N_port4_1 0 1 $ subtract S41
r_sdd21sym   N_sdd21sym 0 R=3D1
**.print vdb(N_sdd21sym)

**.print vm(N_sdd21) vp(N_sdd21) vdb(N_sdd21)
.print vdb(N_sdd21)
**.print vdb(N_s11)

.END

Jeff Loyer


-----Original Message-----
From: si-list-bounce@xxxxxxxxxxxxx [mailto:si-list-bounce@xxxxxxxxxxxxx]
On Behalf Of Steve Nguyen
Sent: Thursday, January 22, 2004 5:15 PM
To: Si-List
Subject: [SI-LIST] S-parameter for differential signals in Hspice


        Hi All,
 Can anyone show me examples how to to s-parameter for differential =3D
signal in Hspice please ?

in single ended setup: I'm using network statement
ex:=3D20
vinac in 0 0 ac 1
.Net v(out) vinac rout=3D3D50 rin=3D3D50
.print ac s11(db) ....

and in differential mode:
vinpac inp 0 vcm ac 1
vinnac inn 0 vcm ac 1,180
.Net ???????????

what else do I need to do ??? Please help.

- Thank you very much

- Steve


=3D20



------------------------------------------------------------------
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:
http://www.freelists.org/webpage/si-list

For help:
si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field

List technical documents are available at:
                http://www.si-list.org

List archives are viewable at:    =20
                http://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
 =20

------------------------------------------------------------------
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:
http://www.freelists.org/webpage/si-list

For help:
si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field

List technical documents are available at:
                http://www.si-list.org

List archives are viewable at:     
                http://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: