The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Spectre question
https://designers-guide.org/forum/YaBB.pl?num=1192632788

Message started by vaidy.ts on Oct 17th, 2007, 7:53am

Title: Spectre question
Post by vaidy.ts on Oct 17th, 2007, 7:53am

Hello,

I have a question related to Spectre. Lets say I have a model called "mosfet" with a parameter "beta". I then make a subcircuit called "mysubckt" that uses an instance of "mosfet". But when i try to access the parameter "beta" from within "mysubckt", I seem to be running into problems. I tried referring to it like

mosfet:beta
mosfet.beta
etc

but things didnt seem to work.
Can anyone help?
Thanks, regards
Vaidy

Title: Re: Spectre question
Post by Geoffrey_Coram on Oct 18th, 2007, 5:29am

What kind of parameter is it?  Are you talking about an " output parameter"?

To be more specific, for say BSIM3, "vth0" is a parameter, you can set
.model nch nmos level=49 vth0=0.9

There are also what Spectre calls output parameters, eg, gm, gds, etc.; you can't set these (the model computes them), but you should be able to access them for plotting.

And, when you say "access" do you mean plotting, or are you trying to access the value of beta to set something else?  The latter is not possible if your beta is an output parameter; if it's an input parameter, you have to declare a subckt parameter and use it in both places.

Title: Re: Spectre question
Post by bernd on Oct 18th, 2007, 8:29am

Try an inline subcircuit rather tan a subcircuit

inline subckt mysubckt (n1 ... nn)
params ...

mysubckt (n1 ... nn) mosfet ...

ends mysubckt

Bernd

Title: Re: Spectre question
Post by Geoffrey_Coram on Oct 18th, 2007, 10:28am

It could even just be that you're referring to the model name rather than the instance name, eg

.subckt mysubckt
m1 (d g s b) mosfet ...
.model mosfet nmos level=49 beta=5
.ends

x1 (d g s b) mysubckt

you should be referring to x1.m1.beta; mosfet doesn't appear in the name.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.