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

Message started by Vudathu on Jan 24th, 2003, 9:11am

Title: Inline Sub Circuit in Spectre ???
Post by Vudathu on Jan 24th, 2003, 9:11am

Hi all,
          I just now came through the concept of Inline Subcircuits while gazing at the user's manual of SPECTRE.

This was during my efforts to write a netlist in SPECTRE for my operational amplifier that I have actually designed in HSPICE.

In the manual I could feel that INLINE SUBCIRCUITS is a powerful concept and would be of great use when used effeciently.

Can anyone please briefly explain me this concept (INLINE SUBCKT)  in SPECTRE ?

It would be great if you can compare it with any of the features that are available in HSPICE.

Hope to see a response very soon.

Thanks to all.

Regards,
Vudathu

Title: Re: Inline Sub Circuit in Spectre ???
Post by Ken Kundert on Jan 29th, 2003, 5:56pm

Vudathu,
    Unlike with HSpice, Spectre does not use the first letter of a the name of a component (an instance in Spectre terminology) to identify its type. Thus, with HSpice if you have a line in your netlist that looks like

Code:
M1 d g b s nmos1 w=1u l=0.25u

you know that the component is a MOSFET. With Spectre, you have to look at the definition of nmos1 to know for sure. Typically, nmos1 will be a model of a MOSFET, in which case Spectre behaves the same as HSpice.

Code:
model nmos1 bsim3v3 ...

However, these days, you might want to model extra effects that the built in model does not include. This is easily done with Spectre. Simply create a subcircuit that models the extra effects and call it nmos1.

Code:
subckt nmos1 (d g s b)
   parameters w l
   M d g b s nmos1x w=w l=l
   model nmos1x nmos level=...
ends nmos1

Now, nmos1 in the instance line references the subcircuit rather than the primitive model. Thus, with Spectre you can have a large netlist, and you can switch from using relatively simple built-in models to using more complex subcircuits without changing the netlist itself. You can make the change by simply using a different model file.

That is a pretty neat trick, but the switch from primitives to subcircuits could cause some problems downstream because it adds another level of hierarchy. For example, if you wanted to know the operating point information for M1, Spectre would indicate that M1, a subcircuit, has no operating point information available. This problem is solved with inline subcircuits. Consider redefining the subcircuit above with an inline subcircuit.

Code:
inline subckt nmos1 (d g s b)
   parameters w l
   nmos1 d g b s nmos1x w=w l=l
   model nmos1x nmos level=...
ends nmos1

Notice that in this definition the keyword inline was added, and the name of M changed to nmos1. Now, if M1 is an instance of an inline subcircuit nmos1 then when a user asks about M1 they actually get information about M1.nmos1. So, basically, the inline subcircuit was originally designed to carry the idea of allowing subcircuits to act as devices forward.

-Ken

Title: Re: Inline Sub Circuit in Spectre ???
Post by sheela on Mar 28th, 2004, 9:32am

Hi Uudathu,

Can you access your netlist in the schematic interface?
If so please help me..

-Sheela

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