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