Tcl SpiceGenTcl package (v)

::SpiceGenTcl::Ngspice::SemiconductorDevicesTop, Main, Index

ClassesTop, Main, Index

Bjt [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

::SpiceGenTcl::Device

Subclasses

Q

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Bjt]Bjt, Top, Main, Index

Creates object of class Bjt that describes semiconductor bipolar junction transistor device.

Bjt create OBJNAME name ncNode nbNode neNode ?args?
Bjt new name ncNode nbNode neNode ?args?
Parameters
nameName of the device without first-letter designator Q.
ncNodeName of node connected to collector pin.
nbNodeName of node connected to base pin.
neNodeName of node connected to emitter pin.
-areaEmitter scale factor, optional.
-areabBase scale factor, optional.
-areacCollector scale factor, optional.
-dtempTemperature offset, optional.
-icInitial conditions for vds and vgs, in form of two element list, optional.
-mMultiplier of area and perimeter, optional.
-modelName of the model.
-nsName of node connected to substrate pin, optional.
-tempDevice temperature, optional.
-tjName of node connected to thermal pin, optional, requires -ns.
Description
QXXXXXXX nc nb ne <ns> <tj> mname <area=val> <areac=val>
+ <areab=val> <m=val> <off> <ic=vbe,vce> <temp=val>
+ <dtemp=val>

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Bjt new 1 netc netb nete -model bjtmod -ns nets -area 1e-3
method constructor {name ncNode nbNode neNode args} {

    # Creates object of class `Bjt` that describes semiconductor bipolar junction transistor device.
    #  name - name of the device without first-letter designator Q
    #  ncNode - name of node connected to collector pin
    #  nbNode - name of node connected to base pin
    #  neNode - name of node connected to emitter pin
    #  -model - name of the model
    #  -area - emitter scale factor, optional
    #  -areac - collector scale factor, optional
    #  -areab - base scale factor, optional
    #  -m - multiplier of area and perimeter, optional
    #  -temp - device temperature, optional
    #  -dtemp - temperature offset, optional
    #  -ic - initial conditions for vds and vgs, in form of two element list, optional
    #  -ns - name of node connected to substrate pin, optional
    #  -tj - name of node connected to thermal pin, optional, requires -ns
    # ```
    # QXXXXXXX nc nb ne <ns> <tj> mname <area=val> <areac=val>
    # + <areab=val> <m=val> <off> <ic=vbe,vce> <temp=val>
    # + <dtemp=val>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Bjt new 1 netc netb nete -model bjtmod -ns nets -area 1e-3
    # ```
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        -areac=
        -areab=
        -m=
        {-ic= -validate {[llength $arg]==2}}
        {-temp= -forbid {dtemp}}
        {-dtemp= -forbid {temp}}
        -ns=
        {-tj= -require {ns}}
    }]
    lappend params "model [dict get $arguments model] -posnocheck"
    if {[dict exists $arguments ic]} {
        lappend params "ic [join [dict get $arguments ic] ,] -nocheck"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model ns tj ic}} {
            lappend params "$paramName $value"
        }
    }
    set pinList [list "nc $ncNode" "nb $nbNode" "ne $neNode"]
    if {[dict exists $arguments ns]} {
        lappend pinList "ns [dict get $arguments ns]"
        if {[dict exists $arguments tj]} {
            lappend pinList "tj [dict get $arguments tj]"
        }
    }
    next q$name $pinList $params
}

BjtGPModel [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Model.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Model.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -Name, -Type

Writable: -Name, -Type

Superclasses

::SpiceGenTcl::Model

Mixins

::SpiceGenTcl::KeyArgsBuilder

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::BjtGPModel]BjtGPModel, Top, Main, Index

Creates object of class BjtGPModel that describes Gummel-Poon model of semiconductor bipolar transistor.

BjtGPModel create OBJNAME name type ?args?
BjtGPModel new name type ?args?
Parameters
nameName of the model.
typeNpn or pnp.
argsKeyword model parameters, for details please see Ngspice manual, chapter 8.
Description

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::DiodeModel new bjtmod npn -is 1e-15 -bf 200 -vaf 100 -cje 1e-10
method constructor {name type args} {

    # Creates object of class `BjtGPModel` that describes Gummel-Poon model of semiconductor bipolar transistor.
    #  name - name of the model
    #  type - npn or pnp
    #  args - keyword model parameters, for details please see Ngspice manual, chapter 8.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::DiodeModel new bjtmod npn -is 1e-15 -bf 200 -vaf 100 -cje 1e-10
    # ```
    set paramsNames [list subs is ibe ibc iss bf nf {vaf va} ikf {nkf nk} ise ne br  nr {var vb} ikr isc nc rb irb rbm re rc cje {vje pe} {mje me} tf xtf  vtf itf ptf cjc {vjc pc} mjc xcjc tr cjs {vjs ps} {mjs ms} xtb eg  xti kf af fc {tnom tref} tlev tlevc tre1 tre2 trc1 trc2 trb1 trb2  trbm1 trbm2 tbf1 tbf2 tbr1 tbr2 tikf1 tikf2 tikr1 tikr2 tirb1 tirb2  tnc1 tnc2 tne1 tne2 tnf1 tnf2 tnr1 tnr2 tvaf1 tvaf2 tvar1 tvar2 ctc  cte cts tvjc tvje titf1 titf2 ttf1 ttf2 ttr1 ttr2 tmje1 tmje2 tmjc1 tmjc2  rco gamma qco vg cn d]
    set params [my argsPreprocess $paramsNames {*}$args]
    next $name $type [linsert $params 0 [list level 1]]
}

D [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

Diode

Diode [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

::SpiceGenTcl::Device

Subclasses

D

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Diode]Diode, Top, Main, Index

Creates object of class Diode that describes semiconductor diode device.

Diode create OBJNAME name npNode nmNode ?args?
Diode new name npNode nmNode ?args?
Parameters
nameName of the device without first-letter designator D.
npNodeName of node connected to positive pin.
nmNodeName of node connected to negative pin.
-areaArea scale factor, optional.
-dtempTemperature offset, optional.
-icInitial condition, optional.
-lmLength of metal capacitor, optional.
-lpLength of polysilicon capacitor, optional.
-mMultiplier of area and perimeter, optional.
-modelName of the model.
-pjPerimeter scale factor, optional.
-tempDevice temperature, optional.
-wmWidth of metal capacitor, optional.
-wpWidth of polysilicon capacitor, optional.
Description
DXXXXXXX n+ n- mname <area=val> <m=val>
+ <ic=vd> <temp=val> <dtemp=val>
+ <lm=val> <wm=val> <lp=val> <wp=val> <pj=val>

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Diode new 1 netp netm -model diomod -l 1e-6 -w 10e-6
method constructor {name npNode nmNode args} {

    # Creates object of class `Diode` that describes semiconductor diode device.
    #  name - name of the device without first-letter designator D
    #  npNode - name of node connected to positive pin
    #  nmNode - name of node connected to negative pin
    #  -model - name of the model
    #  -area - area scale factor, optional
    #  -m - multiplier of area and perimeter, optional
    #  -pj - perimeter scale factor, optional
    #  -ic - initial condition, optional
    #  -temp - device temperature, optional
    #  -dtemp - temperature offset, optional
    #  -lm - length of metal capacitor, optional
    #  -wm - width of metal capacitor, optional
    #  -lp - length of polysilicon capacitor, optional
    #  -wp - width of polysilicon capacitor, optional
    # ```
    # DXXXXXXX n+ n- mname <area=val> <m=val>
    # + <ic=vd> <temp=val> <dtemp=val>
    # + <lm=val> <wm=val> <lp=val> <wp=val> <pj=val>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Diode new 1 netp netm -model diomod -l 1e-6 -w 10e-6
    # ```
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        -pj=
        -ic=
        -m=
        {-temp= -forbid {dtemp}}
        {-dtemp= -forbid {temp}}
        -lm=
        -wm=
        -lp=
        -wp=
    }]
    lappend params "model [dict get $arguments model] -posnocheck"
    dict for {paramName value} $arguments {
        if {$paramName ni {model}} {
            lappend params "$paramName $value"
        }
    }
    next d$name [list "np $npNode" "nm $nmNode"] $params
}

DiodeModel [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Model.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Model.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -Name, -Type

Writable: -Name, -Type

Superclasses

::SpiceGenTcl::Model

Mixins

::SpiceGenTcl::KeyArgsBuilder

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::DiodeModel]DiodeModel, Top, Main, Index

Creates object of class DiodeModel that describes semiconductor diode model.

DiodeModel create OBJNAME name ?args?
DiodeModel new name ?args?
Parameters
nameName of the model.
argsKeyword model parameters, for details please see Ngspice manual, chapter 7.
Description

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::DiodeModel new diodemod -is 1e-14 -n 1.2 -rs 0.01 -cj0 1e-9
method constructor {name args} {

    # Creates object of class `DiodeModel` that describes semiconductor diode model.
    #  name - name of the model
    #  args - keyword model parameters, for details please see Ngspice manual, chapter 7.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::DiodeModel new diodemod -is 1e-14 -n 1.2 -rs 0.01 -cj0 1e-9
    # ```
    set paramsNames [list level jws n rs bv ibv nbv ikr jtun jtunsw ntun xtitun keg isr nr  fc fcs mjsw php tt lm lp wm wp xom xoi xm xp eg trs2 tm1 tm2 ttt1 ttt2  xti tlev tlevc ctp tcv {is js} {ikf ik} {cjo cj0} {cjp cjsw} {m mj} {vj pb}  {tnom tref} {trs1 trs} {cta ctc}]
    next $name d [my argsPreprocess $paramsNames {*}$args]
}

J [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

Jfet

Jfet [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

::SpiceGenTcl::Device

Subclasses

J

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet]Jfet, Top, Main, Index

Creates object of class Jfet that describes semiconductor junction FET device.

Jfet create OBJNAME name ndNode ngNode nsNode ?args?
Jfet new name ndNode ngNode nsNode ?args?
Parameters
nameName of the device without first-letter designator J.
ndNodeName of node connected to drain pin.
ngNodeName of node connected to gate pin.
nsNodeName of node connected to source pin.
-areaEmitter scale factor, optional.
-icInitial conditions for vds and vgs, in form of two element list, optional.
-modelName of the model.
-offInitial state, optional.
-tempDevice temperature, optional.
Description
JXXXXXXX nd ng ns mname  <area> <off> <ic=vds,vgs> <temp =t>

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet new 1 netd netg nets -model jfetmod -area {area*2 -eq} -temp 25
method constructor {name ndNode ngNode nsNode args} {

    # Creates object of class `Jfet` that describes semiconductor junction FET device.
    #  name - name of the device without first-letter designator J
    #  ndNode - name of node connected to drain pin
    #  ngNode - name of node connected to gate pin
    #  nsNode - name of node connected to source pin
    #  -model - name of the model
    #  -area - emitter scale factor, optional
    #  -temp - device temperature, optional
    #  -ic - initial conditions for vds and vgs, in form of two element list, optional
    #  -off - initial state, optional
    # ```
    # JXXXXXXX nd ng ns mname  <area> <off> <ic=vds,vgs> <temp =t>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet new 1 netd netg nets -model jfetmod -area {area*2 -eq} -temp 25
    # ```
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        {-off -boolean}
        {-ic= -validate {[llength $arg]==2}}
        -temp=
    }]
    lappend params "model [dict get $arguments model] -posnocheck"
    if {[dict exists $arguments area]} {
        set areaVal [dict get $arguments area]
        if {([llength $areaVal]>1) && ([lindex $areaVal 1]=="-eq")} {
            lappend params "area [lindex $areaVal 0] -poseq"
        } else {
            lappend params "area $areaVal -pos"
        }
    }
    if {[dict get $arguments off]==1} {
        lappend params "off -sw"
    }
    if {[dict exists $arguments ic]} {
        lappend params "ic [join [dict get $arguments ic] ,] -nocheck"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model area off ic}} {
            lappend params "$paramName $value"
        }
    }
    next j$name [list "nd $ndNode" "ng $ngNode" "ns $nsNode"] $params
}

Jfet1Model [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Model.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Model.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -Name, -Type

Writable: -Name, -Type

Superclasses

::SpiceGenTcl::Model

Mixins

::SpiceGenTcl::KeyArgsBuilder

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet1Model]Jfet1Model, Top, Main, Index

Creates object of class Jfet1Model that describes JFET level 1 model with Parker Skellern modification.

Jfet1Model create OBJNAME name type ?args?
Jfet1Model new name type ?args?
Parameters
nameName of the model.
typeNjf or pjf.
argsKeyword model parameters, for details please see Ngspice manual, chapter 9.
Description

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet1Model new jfetmod njf -vto 2 -beta 1e-3 -lambda 1e-4 -cgd 1e-12
method constructor {name type args} {

    # Creates object of class `Jfet1Model` that describes JFET level 1 model with Parker Skellern modification.
    #  name - name of the model
    #  type - njf or pjf
    #  args - keyword model parameters, for details please see Ngspice manual, chapter 9.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet1Model new jfetmod njf -vto 2 -beta 1e-3 -lambda 1e-4 -cgd 1e-12
    # ```
    set paramsNames [list vto beta lambda rd rs cgs cgd pb is b kf af nlev gdsnoi fc tnom  tcv vtotc bex betatce xti eg]
    set params [my argsPreprocess $paramsNames {*}$args]
    next $name $type [linsert $params 0 [list level 1]]
}

Jfet2Model [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Model.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Model.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -Name, -Type

Writable: -Name, -Type

Superclasses

::SpiceGenTcl::Model

Mixins

::SpiceGenTcl::KeyArgsBuilder

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet2Model]Jfet2Model, Top, Main, Index

Creates object of class Jfet2Model that describes JFET level 2 model with Parker Skellern modification.

Jfet2Model create OBJNAME name type ?args?
Jfet2Model new name type ?args?
Parameters
nameName of the model.
typeNjf or pjf.
argsKeyword model parameters, for details please see Ngspice manual, chapter 9.
Description

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet2Model new jfetmod njf -vto -2 -beta 10e-4 -rs 1e-4 -vbi 1.2
method constructor {name type args} {

    # Creates object of class `Jfet2Model` that describes JFET level 2 model with Parker Skellern modification.
    #  name - name of the model
    #  type - njf or pjf
    #  args - keyword model parameters, for details please see Ngspice manual, chapter 9.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet2Model new jfetmod njf -vto -2 -beta 10e-4 -rs 1e-4 -vbi 1.2
    # ```
    set paramsNames [list acgam beta cgd cgs delta fc hfeta hfe1 hfe2 hfgam  hfg1 hfg2 ibd is lfgam lfg1 lfg2 mvst n p q rs rd  taud taug vbd  vbi vst vto xc xi z rg lg ls ld cdss afac nfing tnom temp]
    set params [my argsPreprocess $paramsNames {*}$args]
    next $name $type [linsert $params 0 [list level 2]]
}

M [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

Mosfet

Mesfet [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

::SpiceGenTcl::Device

Subclasses

Z

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Mesfet]Mesfet, Top, Main, Index

Creates object of class Mesfet that describes semiconductor MESFET device.

Mesfet create OBJNAME name ndNode ngNode nsNode ?args?
Mesfet new name ndNode ngNode nsNode ?args?
Parameters
nameName of the device without first-letter designator Z.
ndNodeName of node connected to drain pin.
ngNodeName of node connected to gate pin.
nsNodeName of node connected to source pin.
-areaEmitter scale factor, optional.
-icInitial conditions for vds and vgs, in form of two element list, optional.
-modelName of the model.
-offInitial state, optional.
Description
ZXXXXXXX ND NG NS MNAME <AREA> <OFF> <IC=VDS,VGS >

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Mesfet new 1 netd netg nets -model mesfetmod -area {area*2 -eq}
method constructor {name ndNode ngNode nsNode args} {

    # Creates object of class `Mesfet` that describes semiconductor MESFET device.
    #  name - name of the device without first-letter designator Z
    #  ndNode - name of node connected to drain pin
    #  ngNode - name of node connected to gate pin
    #  nsNode - name of node connected to source pin
    #  -model - name of the model
    #  -area - emitter scale factor, optional
    #  -ic - initial conditions for vds and vgs, in form of two element list, optional
    #  -off - initial state, optional
    # ```
    # ZXXXXXXX ND NG NS MNAME <AREA> <OFF> <IC=VDS,VGS >
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Mesfet new 1 netd netg nets -model mesfetmod -area {area*2 -eq}
    # ```
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        {-off -boolean}
        {-ic= -validate {[llength $arg]==2}}
    }]
    lappend params "model [dict get $arguments model] -posnocheck"
    if {[dict exists $arguments area]} {
        set areaVal [dict get $arguments area]
        if {([llength $areaVal]>1) && ([lindex $areaVal 1]=="-eq")} {
            lappend params "area [lindex $areaVal 0] -poseq"
        } else {
            lappend params "area $areaVal -pos"
        }
    }
    if {[dict get $arguments off]==1} {
        lappend params "off -sw"
    }
    if {[dict exists $arguments ic]} {
        lappend params "ic [join [dict get $arguments ic] ,] -nocheck"
    }
    next z$name [list "nd $ndNode" "ng $ngNode" "ns $nsNode"] $params
}

Mesfet1Model [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Model.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Model.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -Name, -Type

Writable: -Name, -Type

Superclasses

::SpiceGenTcl::Model

Mixins

::SpiceGenTcl::KeyArgsBuilder

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Mesfet1Model]Mesfet1Model, Top, Main, Index

Creates object of class Mesfet1Model that describes MESFET model by Statz e.a..

Mesfet1Model create OBJNAME name type ?args?
Mesfet1Model new name type ?args?
Parameters
nameName of the model.
typeNmf or pmf.
argsKeyword model parameters, for details please see Ngspice manual, chapter 10.
Description

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet2Model new jfetmod njf -vto -2 -beta 10e-4 -rs 1e-4 -vbi 1.2
method constructor {name type args} {

    # Creates object of class `Mesfet1Model` that describes MESFET model by Statz e.a..
    #  name - name of the model
    #  type - nmf or pmf
    #  args - keyword model parameters, for details please see Ngspice manual, chapter 10.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet2Model new jfetmod njf -vto -2 -beta 10e-4 -rs 1e-4 -vbi 1.2
    # ```
    set paramsNames [list vto beta b alpha lambda rd rs cgs cgd pb kf af fc]
    set params [my argsPreprocess $paramsNames {*}$args]
    next $name $type [linsert $params 0 [list level 1]]
}

Mosfet [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

::SpiceGenTcl::Device

Subclasses

M

constructor [::SpiceGenTcl::Ngspice::SemiconductorDevices::Mosfet]Mosfet, Top, Main, Index

Creates object of class Mosfet that describes semiconductor MOSFET device.

Mosfet create OBJNAME name ndNode ngNode nsNode ?args?
Mosfet new name ndNode ngNode nsNode ?args?
Parameters
nameName of the device without first-letter designator M.
ndNodeName of node connected to drain pin.
ngNodeName of node connected to gate pin.
nsNodeName of node connected to source pin.
-adDiffusion area of drain, optional, forbid -nrd.
-asDiffusion area of source, optional,forbid -nrs.
-custparamsKey that collects all arguments at the end of device definition, to provide an ability to add custom parameters in form -custparams param1 param1Val param2 {param2eq -eq} param3 param3Val ... Must be specified after all others options. Optional.
-icInitial conditions for vds, vgs and vbs, in form of two element list, optional, require 4th node.
-lLength of channel, optional.
-mMultiplier, optional.
-modelName of the model.
-n4Name of 4th node;
-n5Name of 5th node, require -n4, optional.
-n7Name of 7th node, require -n6, optional.
-nrdEquivalent number of squares of the drain diffusions.
-nrsEquivalent number of squares of the source diffusions.
-offInitial state, optional.
-pdPerimeter area of drain, optional.
-psPerimeter area of source, optional.
-tempDevice temperature.
-wWidth of channel, optional.
n6Name of 6th node, require -n5, optional.
Description
MXXXXXXX nd ng ns nb mname <m=val> <l=val> <w=val>
+ <ad=val> <as=val> <pd=val> <ps=val> <nrd=val>
+ <nrs=val> <off> <ic=vds,vgs,vbs> <temp=t>

Example of class initialization:

::SpiceGenTcl::Ngspice::Mosfet new 1 netd netg nets -model mosfetmod -l 1e-6 -w 10e-3 -n4 netsub -n5 net5
method constructor {name ndNode ngNode nsNode args} {

    # Creates object of class `Mosfet` that describes semiconductor MOSFET device.
    #  name - name of the device without first-letter designator M
    #  ndNode - name of node connected to drain pin
    #  ngNode - name of node connected to gate pin
    #  nsNode - name of node connected to source pin
    #  -model - name of the model
    #  -m - multiplier, optional
    #  -l - length of channel, optional
    #  -w - width of channel, optional
    #  -ad - diffusion area of drain, optional, forbid -nrd
    #  -as - diffusion area of source, optional,forbid -nrs
    #  -pd - perimeter area of drain, optional
    #  -ps - perimeter area of source, optional
    #  -nrd - equivalent number of squares of the drain diffusions
    #  -nrs - equivalent number of squares of the source diffusions
    #  -temp - device temperature
    #  -ic - initial conditions for vds, vgs and vbs, in form of two element list, optional, require 4th node
    #  -off - initial state, optional
    #  -n4 - name of 4th node;
    #  -n5 - name of 5th node, require -n4, optional
    #  n6 - name of 6th node, require -n5, optional
    #  -n7 - name of 7th node, require -n6, optional
    #  -custparams - key that collects all arguments at the end of device definition, to provide an ability
    #  to add custom parameters in form `-custparams param1 param1Val param2 {param2eq -eq} param3 param3Val ...`
    #  Must be specified after all others options. Optional.
    # ```
    # MXXXXXXX nd ng ns nb mname <m=val> <l=val> <w=val>
    # + <ad=val> <as=val> <pd=val> <ps=val> <nrd=val>
    # + <nrs=val> <off> <ic=vds,vgs,vbs> <temp=t>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::Mosfet new 1 netd netg nets -model mosfetmod -l 1e-6 -w 10e-3 -n4 netsub -n5 net5
    # ```
    set arguments [argparse -inline {
        {-model= -required}
        -m=
        -l=
        -w=
        {-ad= -forbid {nrd}}
        {-as= -forbid {nrs}}
        -pd=
        -ps=
        {-nrd= -forbid {ad}}
        {-nrs= -forbid {as}}
        -temp=
        {-off -boolean}
        {-ic= -validate {[llength $arg]==3}}
        -n4=
        {-n5= -require {n4}}
        {-n6= -require {n5}}
        {-n7= -require {n7}}
        {-custparams -catchall}
    }]
    lappend params "model [dict get $arguments model] -posnocheck"
    if {[dict get $arguments off]==1} {
        lappend params "off -sw"
    }
    if {[dict exists $arguments ic]} {
        lappend params "ic [join [dict get $arguments ic] ,] -nocheck"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model off ic n4 n5 n6 n7 custparams}} {
            lappend params "$paramName $value"
        }
    }
    if {[dict get $arguments custparams]!=""} {
        if {[llength [dict get $arguments custparams]]%2!=0} {
            error "Custom parameters list must be even length"
        }
        set custParamDict [dict create {*}[dict get $arguments custparams]]
        dict for {paramName value} $custParamDict {
            lappend params "$paramName $value"
        }
    }
    set pinList [list "nd $ndNode" "ng $ngNode" "ns $nsNode"]
    if {[dict exists $arguments n4]} {
        lappend pinList "n4 [dict get $arguments n4]"
        if {[dict exists $arguments n5]} {
            lappend pinList "n5 [dict get $arguments n5]"
            if {[dict exists $arguments n6]} {
                lappend pinList "n6 [dict get $arguments n6]"
                if {[dict exists $arguments n7]} {
                    lappend pinList "n7 [dict get $arguments n7]"
                }
            }
        }
    }
    next m$name $pinList $params
}

Q [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

Bjt

Z [::SpiceGenTcl::Ngspice::SemiconductorDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
getParamsSee ::SpiceGenTcl::Device.getParams
getPinsSee ::SpiceGenTcl::Device.getPins
setParamValueSee ::SpiceGenTcl::Device.setParamValue
setPinNodeNameSee ::SpiceGenTcl::Device.setPinNodeName
Properties

Readable: -Name

Writable: -Name

Superclasses

Mesfet