This package Rsemiconductor contains functions and records with data of the semiconductor resistor model.
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
ResistorParams | Resistor device parameters |
ResistorModelLineParams | Record for Diode model line parameters |
ResistorVariables | Variables for the diode model |
resistorRenameParameters | Technology parameter renaming |
resistorRenameParametersDev | Device parameter renaming |
resistorInitEquations | Initial calculation |
This record contains the device parameters that are used for the resistor model in SPICE3.
record ResistorParams "Resistor device parameters" Modelica.SIunits.Resistance m_dResist( start=1000) "Device is a resistor model"; Real m_dResIsGiven "Resistance is given value"; Modelica.SIunits.Length m_dWidth( start=0) "Width"; Real m_dWidthIsGiven "Width is given value"; Modelica.SIunits.Length m_dLength "Length"; Real m_dLengthIsGiven "Length is given value"; Boolean m_bSensResist( start = false) "flag to request sensitivity WRT resistance"; Modelica.SIunits.Temp_C m_dTemp(start = 27) "Resistor device temperature";end ResistorParams;
This record contains the model line (also called model card) parameters that are used for the resistor model in SPICE3.
record ResistorModelLineParams "Record for Diode model line parameters" Modelica.SIunits.Conversions.NonSIunits.FirstOrderTemperaturCoefficient m_dTC1 "First order temp, coefficient"; Modelica.SIunits.Conversions.NonSIunits.SecondOrderTemperaturCoefficient m_dTC2 "Second order temp, coefficient"; Modelica.SIunits.Resistance m_dRsh "Sheet resistance"; Real m_dRshIsGiven; Modelica.SIunits.Length m_dDefW "Default device width"; Modelica.SIunits.Length m_dNarrow "Narrowing of resistor"; Modelica.SIunits.Temp_C m_dTnom "Parameter measurement temperature";end ResistorModelLineParams;
This record contains the model variables that are used for the resistor model in SPICE3.
record ResistorVariables "Variables for the diode model" Modelica.SIunits.Length m_dWidth; Modelica.SIunits.Length m_dLength; Modelica.SIunits.Resistance m_dResist; Modelica.SIunits.Conductance m_dConduct; Modelica.SIunits.Temp_C m_dCond_dTemp;end ResistorVariables;
This function assigns the external (given by the user, e.g., N) technology parameters to the internal parameters (e.g., m_emissionCoeff). It also does the analysis of the IsGiven values.
Type | Name | Default | Description |
---|---|---|---|
ModelcardR | ex | Modelcard with technologie parameters | |
SpiceConstants | con | Spice constants |
Type | Name | Description |
---|---|---|
ResistorModelLineParams | intern | Output record with resistor model line parameters |
function resistorRenameParameters "Technology parameter renaming" input ModelcardR ex "Modelcard with technologie parameters"; input SpiceConstants con "Spice constants"; output ResistorModelLineParams intern "Output record with resistor model line parameters"; algorithm intern.m_dTC1 := ex.TC1; intern.m_dTC2 := ex.TC2; intern.m_dRshIsGiven := if (ex.RSH > -1e40) then 1 else 0; intern.m_dRsh := if (ex.RSH > -1e40) then ex.RSH else 0; intern.m_dDefW := ex.DEFW; intern.m_dNarrow := ex.NARROW; intern.m_dTnom := if (ex.TNOM > -1e40) then ex.TNOM + SpiceConstants.CONSTCtoK else 300.15;end resistorRenameParameters;
This function assigns the external (given by the user, e.g., AREA) device parameters to the internal parameters (e.g., m_area). It also does the analysis of the IsGiven values.
Type | Name | Default | Description |
---|---|---|---|
Resistance | R | Resistance [Ohm] | |
Length | W | Width [m] | |
Length | L | Length [m] | |
Temp_C | TEMP | Temperature [degC] | |
Boolean | SENS_AREA | Parameter for sensitivity analyses, not implemented yet | |
SpiceConstants | con | Spice constants |
Type | Name | Description |
---|---|---|
ResistorParams | intern | Output record with resistor parameters |
function resistorRenameParametersDev "Device parameter renaming" input Modelica.SIunits.Resistance R "Resistance"; input Modelica.SIunits.Length W "Width"; input Modelica.SIunits.Length L "Length"; input Modelica.SIunits.Temp_C TEMP "Temperature"; input Boolean SENS_AREA "Parameter for sensitivity analyses, not implemented yet"; input SpiceConstants con "Spice constants"; output ResistorParams intern "Output record with resistor parameters"; algorithm intern.m_dResIsGiven := if (R > -1e40) then 1 else 0; intern.m_dResist := if (R > -1e40) then R else 0; intern.m_dWidthIsGiven := if (W >-1e40) then 1 else 0; intern.m_dWidth := if (W > -1e40) then W else 0; intern.m_dLengthIsGiven := if (L >-1e40) then 1 else 0; intern.m_dLength := if (L > -1e40) then L else 0; intern.m_bSensResist := SENS_AREA; intern.m_dTemp := if (TEMP > -1e40) then TEMP + SpiceConstants.CONSTCtoK else 300.15;end resistorRenameParametersDev;
In this function some initial calculations for the resistor model are done, especially concerning the handling of the breakthrough voltage.
Type | Name | Default | Description |
---|---|---|---|
ResistorParams | in_p | Input record with resistor parameters | |
ResistorModelLineParams | in_p2 | Input record with resistor model line parameters |
Type | Name | Description |
---|---|---|
ResistorVariables | out | Output record with resistor variables |
function resistorInitEquations "Initial calculation" input ResistorParams in_p "Input record with resistor parameters"; input ResistorModelLineParams in_p2 "Input record with resistor model line parameters"; output ResistorVariables out "Output record with resistor variables"; algorithm out.m_dWidth := in_p.m_dWidth; if ( in_p.m_dResIsGiven < 0.5) then if (abs(in_p.m_dLength)>1e-8) and (abs(in_p2.m_dRsh)>1e-25) then if (not (in_p.m_dWidthIsGiven > 0.5)) then out.m_dWidth :=in_p2.m_dDefW; end if; (out.m_dResist) := Modelica.Electrical.Spice3.Internal.Functions.resDepGeom( in_p2.m_dRsh, out.m_dWidth, in_p.m_dLength, in_p2.m_dNarrow); else out.m_dResist :=1000; end if; end if; if (in_p.m_dResist < 1e-12) and (in_p.m_dResIsGiven > 0.5) then out.m_dResist :=1e-12; end if; if (in_p.m_dResist > 1e-12) and (in_p.m_dResIsGiven > 0.5) then out.m_dResist := in_p.m_dResist; end if;end resistorInitEquations;