Is it possible to do a Spectre sens analysis for a subcircuit? For instance having ..
subckt inv ( a b ) M1 ( a b vdd vdd ) pmos l=0.1u w=0.1u M2 ( 0 b a 0 ) nmos l=0.1u w=0.1u ends
X1 (a b) inv
.. I'd like to get the sensitivity of the current I(X1:a) against the voltage of a. Using a line such as ..
sens ( X1:a ) to ( a ) for (dcOp )
.. gives the error message "`X1': Not a signal, device instance or a model."
Is there a way to achieve that?
I don't think this is possible. For a start, the to part has to be a component or instance parameter - it cannot be a voltage. Secondly, the output variable can't be a subcircuit current.
I did manage to do it this way though:
// global 0 vdd model nmos bsim4 type=n model pmos bsim4 type=p subckt inv ( a b ) prb (a aint) iprobe M1 ( aint b vdd vdd ) pmos l=0.1u w=0.1u M2 ( 0 b aint 0 ) nmos l=0.1u w=0.1u ends X1 (a b) inv v1 (a 0) vsource dc=0.5 vdd (vdd 0) vsource dc=1 dcOp dc opts options sensfile="sens.out" sens (X1.prb:1) to (v1:dc) for (dcOp)
But this may not be exactly what you want...
Thanks, Andrew. This comes pretty close to what I was trying to do. Actually, my workaround was exactly that (unless that I've put prb outside the subcircuit). So if there's no other way of doing it, I'll stick with that. Thanks.