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?