I have a schematic that contains a "smart note" that evaluates a SKILL expression and displays the result on the schematic. The basis of this comes from Andrew Beckett's code that uses dynamic scoping to temporarily set ilInstPath which allows me to access information about instances via their cdsParams.
My schematic depicts a simple resistively loaded, differential amplifier whose gain is just gm*R and I want the smart note to display that gain after a transient sim completes. At the completion of the sim the skill code in the note interrogates the transistor and extracts it's gm (via transient operating point annotations) but I can't similarly extract the value of the resistor because TSMC annoyingly didn't provide transient operating point capability for resistors (or capacitors, but they did for transistors). The actual resistor value is a function of temperature and what process corner I'm in, but I don't know how to get the actual value so that I can calculate gm*R. I know R=V/I but the resistors don't appear to be enabled to provide transient current annotations either. Is there an alternative way access the value of a resistor used in a transient simulation?
The issue is (probably) that it's not specifically a resistor but a subckt model - and so something needs to be done to compute the effective resistance with knowledge of what's inside it.
Without seeing the specifics, I'm not sure I can advise more. Perhaps you could contact customer support and reference this post - I'd be happy to take a look with you on this (in other words, when they see this, they'll know it's OK to assign the case to me). By the way, that's not an open invitation to everyone on the forums to ask to assign their cases to me!
I'm on the road for a little while so I'll close the loop on this shortly. In the meantime, I'll look into your (correct) point about the resistor being a subckt - that may be enough of a clue for me to fix this. Thanks.
Some random thoughts until I get back:
One thing I forgot to mention was that if I run a DC operating point sim and enable DC operating point annotations then the final resistance value I'm after is annotated on the resistor - my original post was because when I ran a transient sim and enabled transient operating point annotations the resistors didn't show any annotations at all. Because DC annotations do the right thing I'm now thinking this might not be a TSMC issue but rather a Cadence issue.
A coworker got back to me and confirmed that the resistor I'm using is a indeed a subcircuit (it contains a 2 resistors in series - rmain and rend).
The coworker was also running a transient simulation and within the environment he was using (I just make and run Ocean scripts) and was able to ask the tool to get the transient operating point information for the resistor e.g. value(OPT("stage1.ampm.rp.rmain" "res") 500n) -> 3798.053 value(OPT("stage1.ampm.rp.rend" "res") 500n) -> 58.88665
My "smart note" (which obviously shouldn't need to know the hierarchical level of the schematic that contains it) currently receives the ilInst of the resistor but I don't know how to get the final resistance from that.
The way this would usually work is for the device which is implemented as a subckt to have opParamExprList defined in the CDF which then gives the expression needed to compute the effective resistance of the underlying components. Then you would be able to annotate that computed parameter on the instance, and your smart note ought to be able to access it to via the ilInstPath magic approach.
That way your smart note doesn't need to know there's anything special - only the device itself needs to know that itself is special, which is the right place for it's awareness of how special it is to be stored.
There are a few articles about setting this up (a bit in the documentation too), but the reason why transient operating points are not working is probably because the PDK also would need optParamExprList (as well as opParamExprList) to be defined. See ADE Transient operating points are not printed for devices defined within subcircuits
Thanks Andrew - I'll bet I now have enough information to get this working. You're the best!