• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Anyone here good with SPICE?

Special K

Diamond Member
I have an odd problem with a SPICE simulation I am running. I have the width of some transistors defined as multiples of a variable WIDTH. I then sweep the WIDTH parameter over a range of values until I find the one which gives the optimal delay for my circuit.

The problem is, when I go back into my circuit and set the transistor widths equal to the numerical values returned by the sweep analysis and simulate again, the results I obtain are off by about 10% or so compared to the sweep simulation. Why would there be such a large discrepancy between:

W=6*WIDTH (where WIDTH=0.5e-6)

and

W=3e-6

Any ideas?
 
Your netlister isn't fingering the devices differently, is it? How about area/periphery of the diffusions? Which spice engine are you using?
 
Originally posted by: CTho9305
Your netlister isn't fingering the devices differently, is it? How about area/periphery of the diffusions? Which spice engine are you using?

The engine is Eldo, within Mentor Graphics Design Architect. What exactly do you mean by your first two questions?
 
Fingering devices means breaking a large device into multiple parallel smaller ones. There are multiple reasons to do this (fitting in a particular shape, reducing poly resistance, taking advantage of narrow-channel effects). If you're designing on a schematic or other "higher-level" representation, the "netlister" - which converts the schematic to a real spice netlister - may automatically finger devices based on certain rules. If you netlisted the schematic once with a small W and then hacked the netlist, you could get different results when compared to netlisting with a larger W first.

On bulk (i.e. non-SOI) processes, there's appreciable cap that comes from the source / drain diffusions. Device models usually have "AD" and "PD" parameters for the area of the diffusion (used to calculate up-down cap) and periphery of the diffusion (used to calculate side cap). If you netlisted with a small W and hacked the netlist to increase W, you may have left the diffusion dimensions unchanged, which would affect the parasitic caps. When you netlist again but with a large W, you get the correct AD and PD, changing the cap. The diffusions matter on SOI, but much less. edit: ...and AS/PS for the source - AD/PD are just the drain.
 
I didn't manually hack the netlist to change the width. In the circuit schematic, I just set the widths of the transistors equal to some multiple of a variable WIDTH. User-defined variables are entered in a menu within the simulation GUI, and are automatically inserted as paramters when the netlist is generated. I re-extracted the netlist each time I changed anything in the schematic.

The netlister is not spltting the transistors into a group of parallel devices. I checked the output netlist and it has the exact same number of devices as the schematic.

I think I see what you are saying. Here is an example of one of the transistors whose width is being swept. The following entry is taken from the "first pass" netlist (after netlist generation, but before simulation):

MP10 N$28 A V_IN V_IN phvth L=2.5e-07 W={6*WIDTH} AD={width*0.625e-6} AS={width*0.625e-6}
+ PD={width + 1.25e-6} PS={width + 1.25e-6}

Here is the same transistor in the second pass netlist that is actually used by the simulator:

MP10 N$28 A V_IN V_IN PHVTH L=2.5E-07 W={6*WIDTH} AD={WIDTH*0.625E-6} AS={WIDTH*0.625E-6}
186 + PD={WIDTH + 1.25E-6} PS={WIDTH + 1.25E-6}

Now contrast those entries with one of a transistor whose width is not being swept. First from the "first pass" netlist:

MP12 SN CON N$33 V_IN phvth L=2.5e-07 W=2.1e-6 AD=1.3125e-12 AS=1.3125e-12 PD=3.35e-06

And now from the "second pass" netlist:

183 MP12 SN CON N$33 V_IN PHVTH L=2.5E-07 W=2.1E-6 AD=1.3125E-12 AS=1.3125E-12 PD=3.35E-06
184 + PS=3.35E-06

Notice that for the transistors whose widths are not being swept, AD=AS=width*0.625e-6. However, for the transistors whose widths are being swept, it looks like AD and AS are being calculated incorrectly. For example, for MP10, we have:

W={6*WIDTH}
AD={WIDTH*0.625E-6}

But shouldn't AD={6*WIDTH*0.625E-6}, based on how my parameters are defined? Is the simulation not scaling my drain/source caps up for some reason?

EDIT: After re-reading my post above, I think I might have had an issue with defining my sweeping variable as WIDTH, because SPICE might already be using that for something else. When I redefine my sweeping paramater to LSW, I can't even simulate the design and it tells me that the parameter WIDTH is not defined. When I look in the netlist, a sample entry looks like this:

153 MP4 CON CIN N$28 V_IN PHVTH L=2.5E-07 W={6*LSW} AD={WIDTH*0.625E-6} AS={WIDTH*0.625E-6}
154 + PD={WIDTH + 1.25E-6} PS={WIDTH + 1.25E-6}

Why is it still using the parameter WIDTH when I didn't even try to define it anywhere?
 
But shouldn't AD={6*WIDTH*0.625E-6}, based on how my parameters are defined? Is the simulation not scaling my drain/source caps up for some reason?

I think if you set W=WIDTH rather than n*WIDTH (and then sweep it over different values), it will work properly. It looks like this is effectively acting like netlist hacking, and not recomputing the area and periphery.

Why is it still using the parameter WIDTH when I didn't even try to define it anywhere?
Do you know how it's coming up with AS/AD/PS/PD? Are they normally updated properly when you change the device width and aren't using parameters? Can you edit them (make sure they properly include the sweep variable)?
 
Originally posted by: CTho9305
But shouldn't AD={6*WIDTH*0.625E-6}, based on how my parameters are defined? Is the simulation not scaling my drain/source caps up for some reason?

I think if you set W=WIDTH rather than n*WIDTH (and then sweep it over different values), it will work properly. It looks like this is effectively acting like netlist hacking, and not recomputing the area and periphery.

Why is it still using the parameter WIDTH when I didn't even try to define it anywhere?
Do you know how it's coming up with AS/AD/PS/PD? Are they normally updated properly when you change the device width and aren't using parameters? Can you edit them (make sure they properly include the sweep variable)?

Alright, here is what I figured out - you are correct that the root problem I am having here is that the AS, AD, PS, and PD parameters are not being correctly updated when I sweep the width of the transistors. Naturally, if these parameters are not scaled up by the same factor as W, then the delays reported are going to be too low.

If you look at the 2 lines again:

153 MP4 CON CIN N$28 V_IN PHVTH L=2.5E-07 W={6*LSW} AD={WIDTH*0.625E-6} AS={WIDTH*0.625E-6}
154 + PD={WIDTH + 1.25E-6} PS={WIDTH + 1.25E-6}

you will notice that PS, PD, AS, and AD are defined in terms of the width. If I go into the model properties, width is simply set equal to W, which in this case includes the sweep term LSW. However for some reason, it keeps saying the width variable is undefined when it tries to calculate AS, AD, PS, and PD. I never noticed this problem before because I already had a "WIDTH" variable defined elswhere in the circuit, so SPICE was apparently using the WIDTH of a different transistor to calculate the source/drain caps. Obviously that's going to lead to inaccuracies.

What I had to do was go into the model properties for each individual transistor and change the equation it was using to calculate those four dimensions. Instead of calculating them based off of the WIDTH variable (which is set = to W in the model, which makes me wonder why the simulator is complaining), I set the equation to calculate it based off of the sweep parameter LSW. So if a transistor has W=6*LSW, I had to change its equations to be:

PS = 6*LSW + 1.25e-6
AS = 6*LSW*0.625e-6

This is a major PITA, as I then have to go and change them all back when I am done performing the sweep. It does give consistent results however, so I am sure this is what was causing my problem initially.

Do you know why it would be telling me the variable "WIDTH" is undefined, when in the model parameters I see that WIDTH is being set equal to W, where W is calculated based off of the sweep parameter?
 
Do you know why it would be telling me the variable "WIDTH" is undefined, when in the model parameters I see that WIDTH is being set equal to W, where W is calculated based off of the sweep parameter?

I'd need to understand more about what you're setting where and how. I've never used Mentor tools, so I probably can't really help you much more.
 
Back
Top