Use of parameter without value in Spice3.Internal.MOS2
Modelica.Electrical.Spice3.Internal.MOS2 contains these parameter declarations:
final parameter Spice3.Internal.Mos2.Mos2ModelLineParams p=
Spice3.Internal.Mos2.mos2RenameParametersRevised(modelcard) annotation(Evaluate=true);
final parameter Spice3.Internal.Mos2.Mos2ModelLineParams p1=
Spice3.Internal.Mos2.mos2ModelLineParamsInitEquationsRevised(p, m_type);
p is initialized by a call to mos2RenameParametersRevised, which does not assign a value to p.m_bulkCapFactorIsGiven (nor does that parameter have a start value). p is then used as argument to mos2ModelLineParamsInitEquationsRevised, which at the end of the function has an if-statement using m_bulkCapFactorIsGiven in the condition.
Unless I'm missing something this looks like p.m_bulkCapFactorIsGiven will always be used uninitialized in this model. This model is only used by Spice3.Semiconductors.M_NMOS2 and Spice3.Semiconductors.M_PMOS2, neither of which seems to be part of any example models (or anything else).
One possibility is that:
m_bulkCapFactorIsGivenshould have a start-value of 0 similarly asm_bulkCapFactor;mos2RenameParametersRevisedshould use similar logic for it as preceding declarations (as inmos1RenameParameters)
However, CJ has a default of zero - whereas CBS has a default of -1e40.
How should I fix the problem in the gui? From the discussion I can't follow.
Apologies to not to follow
@kmerbcn the problem is not with the GUI, it is with the component model in the Modelica Standard Library. We need to fix that upstream.
Apparently, the diode model can potentially consider a bulk capacitance factor or not. Do you know how this is handled in the original Spice model?
It is a voltage depending formula relating other spice parameters.
Hello Francesco
Is this the right place to contribute for the standard modelica library?