﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2519	constant evaluation of spice3 functions fails, needed for Inverter example	Peter Aronsson	somebody	"See attached model which is just a set of constant values (records) from the spice3 library.

This example has been constructed to illustrate the need of being able to constant evaluate certain record elements to allow the backend to recognize that certain states must be eliminated. For instance, the Inverter example has the equation (in the Modelica.Electrical.Spice3.Internal.MOS model):

{{{
icBD = cc.cBD * (der(B.v) - der(Dinternal));
}}}

But, cc.cBD will for both transistors of the model be 0, thus completely eliminating Dinternal and B.v as states. The model won't work if this is not detected, and the only way to detect that is to build some analysis based on constant evaluation of functions to figure out that e.g. cc.CBD is constant (depending on parameters). Note that other elements of the cc record are time-varying!


partial failtrace:


{{{
 Ceval.ceval DAE.CALL failed: Modelica.Electrical.Spice3.Internal.Mos.mosCalcDEVqmeyer(int_c.m_vgs, vgd, vgb, /*Modelica.Electrical.Spice3.Internal.Mos.MosCalc*/(int_c))
- CevalFunction.evaluateStatement failed for:
  qm := Modelica.Electrical.Spice3.Internal.Mos.mosCalcDEVqmeyer(int_c.m_vgs, vgd, vgb, /*Modelica.Electrical.Spice3.Internal.Mos.MosCalc*/(int_c));
...
}}}

"	defect	closed	critical	1.9.1	Frontend	trunk	fixed		Adrian Pop Per Östlund
