## 2D Field Solver and W element

### Understanding 2D Field Solver Code

Let us try to understand the HSPICE code.

```* W element, field-solver interface

*                  XXXXXX
*  ------------------------------------ Z = 5mils
*       Er = 4.3   H = 4mils
*  ------------------------------------ Z = 1mils
*  //// Bottom Ground Plane ///////////
*  ------------------------------------ Z = 0
```

Notice that we are able to express a lot of things in semi graphical form even without the use of graphics. This enhances the readability of the hspice code. Use a lot of comments to keep your code easily understandable.

The next statement is a W element.

W1 in1 0 out1 0 FSmodel=demo N=1 l=0.97

N=1 defines the number of elements in the W element. When simulating for cross talk, we will usually use a three element W element where the central element will be the victim and the side two elements will be aggressor. For now, a single element W element is sufficient for our purpose. The l=0.97 defines the length of the W element. When no unit is defined, the length is in meters. The length is of not much consequence to us.

We are trying to define out stack up using the codes. The stack up is formed of two types of material. The copper material is used for the traces, while dielectric material is used for the dielectric between the copper and the ground. Each material has its property, for example the conductivity. The following two statements define two types of the material used in our microstrip.

.MATERIAL copper METAL CONDUCTIVITY=5.76e+07
.MATERIAL diel_1 DIELECTRIC ER = 4.3 LOSSTANGENT=1.2e-3 CONDUCTIVITY=8.2e-4

The diel_1 defines the dielectric material. ER = 4.3 is the most important parameter for our concern now.

We need to define the width of the microstrip trace and its height. This is done with the SHAPE statement. We define a rectangle named rect that has width of 5 mils and height 1 mils.

.SHAPE rect RECTANGLE WIDTH = 5mils HEIGHT = 1mils

We now define our stackup using LAYERSTACK statement.

* Dielectric stack-up
.LAYERSTACK Stack
+ LAYER = (copper, 1mils)
+ LAYER = (diel_1 4mils)

Our stackup is very simple. There is a ground plane made up of MATERIAL copper of height 1 mils, followed by a dielectric diel_1 of height 4 mils. Sometimes we may have a third layer made up of say, soldermask. For simplicity let us assume that we do not have a soldermask.

We set the field solver options using .FSOPTIONS statement.

* Field-solver options
.FSOPTIONS myOption ACCURACY = LOW GRIDFACTOR = 1
+ ComputeRo=yes ComputeRs=yes ComputeGo=Yes ComputeGd=yes PRINTDATA=YES

We have set the ACCURACY to LOW for quick results, although you may like to set it to HIGH to see what difference it makes. Even though we do not need Rs, Go, Gd, we have set the field solver to compute it.

We now create a model for the microstrip as follows

.MODEL demo W ModelType=FieldSolver
+ LAYERSTACK=Stack FSOptions=myOption
+ RLGCFILE= rlgc.txt
+ CONDUCTOR = ( MATERIAL=copper, SHAPE=rect, ORIGIN=(1000mils, 5mils) )

The RLGCFILE = rlgc.txt sets the name of the file in which the result of the field solver gets extracted. We place our trace at coordinate 1000 mils, 5 mils. The y axis value 5 mils comes from the fact the height of the ground layer is 1 mil and the dielectric layer is 4 mils.

The following is the last set of codes.

*Analysis
.tran 0.1ns 100ns
.option post
.end

This is the hello world program of hspice – sort of. If you are interested, you may like to read details of each of the statements in the hspice help file. Hspice does not has fancy GUI. We can not draw fancy windows. But hspice is very accurate and it has support for modeling almost everything we can think of. It commands respect in signal integrity engineers’ community. We do need however, to code everything. Once we have codes for some common simulations, we can use them as templates for any future simulations. This speeds up the process. By changing a few parameters in a file we are ready to simulate a new set of conditions.

If you want, you can set the accuracy to high as follows.

* Field-solver options
.FSOPTIONS myOption ACCURACY = HIGH GRIDFACTOR = 1
+ ComputeRo=yes ComputeRs=yes ComputeGo=Yes ComputeGd=yes PRINTDATA=YES

This gives the following values in the rlgc matrix.

 ```*SYSTEM_NAME : demo * * Half Space, AIR * ------------------------------------ Z = 1.270000e-004 * diel_1 H = 1.016000e-004 * ------------------------------------ Z = 2.540000e-005 * //// Bottom Ground Plane /////////// * ------------------------------------ Z = 0 * L(H/m), C(F/m), Ro(Ohm/m), Go(S/m), Rs(Ohm/(m*sqrt(Hz)), Gd(S/(m*Hz)) .MODEL demo W MODELTYPE=RLGC, N=1 + Lo = 3.422881e-007 + Co = 9.630937e-011 + Ro = 5.381905e+000 + Go = 1.682898e-003 + Rs = 1.581319e-003 + Gd = 3.630778e-013 ```

If you run this file in hspice, it will generate and rlgc file. The content of the rlgc file will look as follows.

If we want we can compute the value of the characteristic impedance we can use the formula Zo = [L/C]1/2 . It gives value of 59.61 Ohms. This is 2.61 Ohms or 4.37% higher than the formula method.

In the next page we will learn about the hspice code used for 2D field solvers.