help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parameter usage in simulatoin


From: Felix Salfelder
Subject: Re: parameter usage in simulatoin
Date: Sun, 19 Apr 2020 16:45:34 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Apr 19, 2020 at 04:16:17PM +0200, patrick wrote:
> I am trying to vary W/L parameters of a MOS transistor.

Hi Patrick.

Could you share the model or instanciation of that transistor?

> With this syntax:
> 
> .param   L1=180e-9
> .param  W1=300e-9

with this, you define parameters in the top level scope. they are not
necessarily used for all parameters with that name, not even as a
default.

I suspect that you use subckt parameters, and that they are not resolved
as you were expecting. consider for example this netlist.

param w=2

module m(1,2);
   resistor #(.r(w*5)) r(1,2);
endmodule

m m1(0, 1); // !!

Here, you get "parameter w*5 not specified, using default". to pass w
into the subcircuit, instanciate m1 like

m #(.w(w)) m1(0, 1);

and w*5 in m will be five times the global w.

> What is wrong? How can I get some more info on the error.

Indeed, the error message could be improved, maybe print the label of
the instance with the unspecified variable. I don't know how easy that
is. If your error is due to the pattern above, it should still be
simple to find.

cheers
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]