I am trying to optimize the propagation delay of a comparator using ADE GXL. The propagation delay of the comparator is characterized using a transient simulation, but I also need to run a DC analysis to compute the actual threshold voltage when the parameter values of the circuit (e.g. transistor sizes) change.
I thus set up the two simulations (DC and tran) and wrote an expression that uses the result of the DC analysis inside the formula to extract the propagation delay from the transient analysis. The expressions are reported below as a reference.
DC analysis expression: xmax(deriv(v("/out" ?result "dc")))
TRAN analysis expression (the above expression is used within the long formula below):
delay(?wf1 v("/vout" ?result "tran") ?value1 xmax(deriv(v("/out" ?result "dc"))) ?edge1 "falling" ?nth1 1 ?td1 0.0 ?wf2 v("/out" ?result "tran") ?value2 (VAR("vrefval") / 2.0) ?edge2 "falling" ?nth2 1 ?td2r0 0.0 ?stop nil ?multiple nil)
This approach runs fine when I run the two simulations in ADE L, returning the desired value.
When I plug it in ADE GXL though, only the DC expression gets evaluated, and I get an "error eval" message for the transient simulation. My best guess is that the transient expression gets evaluated before the DC simulation is run, thus resulting in an error in the evaluation.
How can I enforce the correct order of simulation to fix the problem? Is there another way to do what I am trying to achieve?
Thank you in advance for your help!
Are both analyses run in the same test? If so, the order of the analyses is based on the order in the test editor - double click on the name of the test, and drag and drop the analyses the way around you want.
That said, since the calculations would not be run until all the analyses in that test have completed, so that's probably not your problem. So maybe you've put the DC and TRAN in separate tests? If so, you'd need to use calcVal() to set up dependencies between the expressions - probably simplest to bring up the help (from a help menu in the tools) or run cdnshelp from the command line, and search for calcVal. Or just put the DC and TRAN in the same test...