maeGetVar
maeGetVar(t_varname[?typeNamet_typeName] [?typeValuet_typeValue] [?sessiont_sessionName] ) =>t_value/ nil
Description
Returns value of the given variable. Use this function to get the global, test-level, or corner value for the given variable.
Arguments
Value Returned
|
When the given corner, test, or variable is not found in the setup. |
||
Examples
Returns the value of global variable vdd in a cellview:
sess=maeOpenSetup("opamp090" "full_diff_opamp_AC" "maestro" ?mode "a")
=> "session0"
maeGetVar("vdd") => 2.2 maeGetVar("vdd" ?typeName "test" ?typeValue "Global") => "2.2" maeGetVar("vdd" ?typeName "test") => "2.2"
Expands the swept values for a variable and returns a list.
Vdd = 1:2:10
maeGetVar("vdd" ?expanded t)
=> ("1" "3" "5" "7" "9")
Returns a list of values extracted from the given range for a variable.
Vdd = {From/To}Linear:50u:5u:100u{From/To}
maeGetVar("vdd" ?expanded t)
=> ("50u" "55u" "60u" "65u" "70u" "75u" "80u" "85u" "90u" "95u" "100u")
The scalars, sweeps, and VAR returns the resolved results. The function recognizes the type of the variables (global, test design variable, local override) and returns the corresponding values.
Returns local overridden value of nn in test AC.
nn = VAR("mm")
maeGetVar("nn" ?typeName "test" ?typeValue "AC" ?resolved t)
=> "1"
Returns global value of nn in the setup.
maeGetVar("nn" ?typeName "test" ?typeValue "Global" ?resolved t)
=> "2"
Resolves the value assigned through a variable.
nn = VAR("vdd")
vdd = 1.3 1.4 1.5
maeGetVar("nn" ?resolved t) = "1.3 1.4 1.5"
nn = VAR("myExpr")
myExpr = if(VAR("myNum") == 20 then 1 else 0)
maeGetVar("nn" ?resolved t) = "if(VAR(\"myNum\") == 20 then 1 else 0)"
Resolves the basic arithmetic operations in variable values if the related expressions do not depend on design points.
nn = VAR("mm")+2
mm = 8
maeGetVar("nn" ?resolved t)
=> "10"
Returns original expressions if they depend on the design points generated during simulation.
mm = VAR("nn")+2
nn = 8 9 10
maeGetVar("mm" ?resolved t)
=> "VAR(\"nn\") + 2"
mm = calcVal(Voffset, \"AC\")
maeGetVar("mm" ?resolved t)
=> "calcVal(Voffset, \"AC\")"
Return to top