Skip to content

Use of parameter without value in Spice3.Internal.MOS2 #4667

Open
@perost

Description

@perost

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    L: Electrical.Spice3Issue addresses Modelica.Electrical.Spice3bugCritical/severe issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions