Tcl SpiceGenTcl package (v0.65)

::SpiceGenTcl::Ltspice::SemiconductorDevicesTop, Main, Index

ClassesTop, Main, Index

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

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices::Bjt]Bjt, Top, Main, Index

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

OBJECT constructor name ncNode nbNode neNode -model value ?-ns value? ?-area value? ?-m value? ?-temp value?
Details
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.
-areaScale factor, optional.
-mMultiplier of area and perimeter, optional.
-modelName of the model.
-nsName of node connected to substrate pin, optional.
-tempDevice temperature, optional.
Description
Qxxx Collector Base Emitter [Substrate Node] model [area] [off] [temp=<T>]

Example of class initialization:

::SpiceGenTcl::Ltspice::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 - scale factor, optional
    #  -m - multiplier of area and perimeter, optional
    #  -temp - device temperature, optional
    #  -ns - name of node connected to substrate pin, optional
    # ```
    # Qxxx Collector Base Emitter [Substrate Node] model [area] [off] [temp=<T>]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::SemiconductorDevices::Bjt new 1 netc netb nete -model bjtmod -ns nets -area 1e-3
    # ```
    # Synopsis: name ncNode nbNode neNode -model value ?-ns value? ?-area value? ?-m value?  ?-temp value?
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        {-off -boolean}
        -m=
        -temp=
        -ns=
    }]
    lappend params "model [dget $arguments model] -posnocheck"
    if {[dexist $arguments area]} {
        set areaVal [dget $arguments area]
        if {([llength $areaVal]>1) && ([@ $areaVal 1] eq "-eq")} {
            lappend params "area [@ $areaVal 0] -poseq"
        } else {
            lappend params "area $areaVal -pos"
        }
    }
    if {[dget $arguments off]==1} {
        lappend params "off -sw"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model area off ns}} {
            lappend params "$paramName $value"
        }
    }
    set pinList [list "nc $ncNode" "nb $nbNode" "ne $neNode"]
    if {[dexist $arguments ns]} {
        lappend pinList "ns [dget $arguments ns]"
    }
    next q$name $pinList $params
}

BjtGPModel [::SpiceGenTcl::Ltspice::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
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -name, -type

Writable: -name, -type

Superclasses

::SpiceGenTcl::Model

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

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

OBJECT constructor name type ?-option value ...?
Details
Parameters
nameName of the model.
typeNpn or pnp.
argsKeyword model parameters, for details please see LTspice manual.
Description

Example of class initialization:

::SpiceGenTcl::Ltspice::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 LTspice manual.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::SemiconductorDevices::DiodeModel new bjtmod npn -is 1e-15 -bf 200 -vaf 100 -cje 1e-10
    # ```
    # Synopsis: name type ?-option value ...?
    set paramsNames [list is ibc ibe bf nf vaf ikf nk ise ne br nr var ikr isc nc rb irb rbm re rc cje vje mje tf xtf vtf itf ptf cjc vjc mjc xcjc xcjc2 extsub tr cjs xcjs vjs mjs xtb eg xti kf af fc subs bvcbo nbvcbo bvbe ibvbe nbvbe tnom cn d gamma qco quasimod rco vg vo tre1 tre2 trb1 trb2 trc1 trc2 trm1 trm2 iss ns tvaf1 tvaf2 tvar1 tvar2 tikf1 tikf2 trbm1 trbm2 tbvcbo1 tbvcbo2]
    set params [my argsPreprocess $paramsNames {*}$args]
    next $name $type $params
}

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

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices::Diode]Diode, Top, Main, Index

Creates object of class Diode that describes semiconductor diode device.

OBJECT constructor name npNode nmNode -model value ?-area value? ?-off? ?-m value? ?-n value? ?-temp value?
Details
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.
-mNumber of parallel devices, optional.
-modelName of the model.
-nNumber of series devices, optional.
-offInitial state, optional.
-tempDevice temperature, optional.
Description
Dnnn anode cathode <model> [area] [off] [m=<val>] [n=<val>] [temp=<value>]

Example of class initialization:

::SpiceGenTcl::Ngspice::SemiconductorDevices::Diode new 1 netp netm -model diomod -area 1e-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 - number of parallel devices, optional
    #  -n - number of series devices, optional
    #  -temp - device temperature, optional
    #  -off - initial state, optional
    # ```
    # Dnnn anode cathode <model> [area] [off] [m=<val>] [n=<val>] [temp=<value>]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Diode new 1 netp netm -model diomod -area 1e-6
    # ```
    # Synopsis: name npNode nmNode -model value ?-area value? ?-off? ?-m value? ?-n value? ?-temp value?
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        {-off -boolean}
        -m=
        -n=
        -temp=
    }]
    lappend params "model [dget $arguments model] -posnocheck"
    if {[dexist $arguments area]} {
        set areaVal [dget $arguments area]
        if {([llength $areaVal]>1) && ([@ $areaVal 1] eq "-eq")} {
            lappend params "area [@ $areaVal 0] -poseq"
        } else {
            lappend params "area $areaVal -pos"
        }
    }
    if {[dget $arguments off]==1} {
        lappend params "off -sw"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model area off}} {
            lappend params "$paramName $value"
        }
    }
    next d$name [list "np $npNode" "nm $nmNode"] $params
}

DiodeIdealModel [::SpiceGenTcl::Ltspice::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
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -name, -type

Writable: -name, -type

Superclasses

::SpiceGenTcl::Model

constructor [::SpiceGenTcl::Ltspice::SemiconductorDevices::DiodeIdealModel]DiodeIdealModel, Top, Main, Index

Creates object of class DiodeIdealModel that describes semiconductor diode model.

OBJECT constructor name ?-option value ...?
Details
Parameters
nameName of the model.
argsKeyword model parameters, for details please see LTspice manual.
Description

Example of class initialization:

::SpiceGenTcl::Ltspice::SemiconductorDevices::DiodeIdealModel new diodemod -ron 1e-2 -roff 1e8
method constructor {name args} {

    # Creates object of class `DiodeIdealModel` that describes semiconductor diode model.
    #  name - name of the model
    #  args - keyword model parameters, for details please see LTspice manual.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::SemiconductorDevices::DiodeIdealModel new diodemod -ron 1e-2 -roff 1e8
    # ```
    # Synopsis: name ?-option value ...?
    set paramsNames [list ron roff vfwd vrev rrev ilimit revilimit epsilon revepsilon]
    next $name d [my argsPreprocess $paramsNames {*}$args]
}

DiodeModel [::SpiceGenTcl::Ltspice::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
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -name, -type

Writable: -name, -type

Superclasses

::SpiceGenTcl::Model

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

Creates object of class DiodeModel that describes semiconductor diode model.

OBJECT constructor name ?-option value ...?
Details
Parameters
nameName of the model.
argsKeyword model parameters, for details please see LTspice manual.
Description

Example of class initialization:

::SpiceGenTcl::Ltspice::SemiconductorDevices::DiodeModel new diodemod -is 1e-14 -n 1.2 -rs 0.01 -cjo 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 LTspice manual.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::SemiconductorDevices::DiodeModel new diodemod -is 1e-14 -n 1.2 -rs 0.01 -cjo 1e-9
    # ```
    # Synopsis: name ?-option value ...?
    set paramsNames [list is rs n tt cjo vj m eg xti kf af fc bv nbv ibv ibvl nbvl tnom isr nr ikf tikf trs1 trs2 tbv1 tbv2 perim isw ns rsw cjsw vjsw mjsw fcs vp]
    next $name d [my argsPreprocess $paramsNames {*}$args]
}

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

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices::Jfet]Jfet, Top, Main, Index

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

OBJECT constructor name ndNode ngNode nsNode -model value ?-area value? ?-off? ?-temp value?
Details
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.
-mParallel device multiplier, optional.
-modelName of the model.
-offInitial state, optional.
-tempDevice temperature, optional.
Description
JXXXXXXX nd ng ns mname  <area> <off> <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
    #  -m - parallel device multiplier, optional
    #  -off - initial state, optional
    # ```
    # JXXXXXXX nd ng ns mname  <area> <off> <temp =t>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::SemiconductorDevices::Jfet new 1 netd netg nets -model jfetmod -area {area*2 -eq} -temp 25
    # ```
    # Synopsis: name ndNode ngNode nsNode -model value ?-area value? ?-off? ?-temp value?
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        -m=
        {-off -boolean}
        -temp=
    }]
    lappend params "model [dget $arguments model] -posnocheck"
    if {[dexist $arguments area]} {
        set areaVal [dget $arguments area]
        if {([llength $areaVal]>1) && ([@ $areaVal 1] eq "-eq")} {
            lappend params "area [@ $areaVal 0] -poseq"
        } else {
            lappend params "area $areaVal -pos"
        }
    }
    if {[dget $arguments off]==1} {
        lappend params "off -sw"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model area off}} {
            lappend params "$paramName $value"
        }
    }
    next j$name [list "nd $ndNode" "ng $ngNode" "ns $nsNode"] $params
}

JfetModel [::SpiceGenTcl::Ltspice::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
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -name, -type

Writable: -name, -type

Superclasses

::SpiceGenTcl::Model

constructor [::SpiceGenTcl::Ltspice::SemiconductorDevices::JfetModel]JfetModel, Top, Main, Index

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

OBJECT constructor name type ?-option value ...?
Details
Parameters
nameName of the model.
typeNjf or pjf.
argsKeyword model parameters, for details please see LTspice manual.
Description

Example of class initialization:

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

    # Creates object of class `JfetModel` 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 LTspice manual.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::SemiconductorDevices::JfetModel new jfetmod njf -vto 2 -beta 1e-3 -lambda 1e-4 -cgd 1e-12
    # ```
    # Synopsis: name type ?-option value ...?
    set paramsNames [list vto beta lambda rd rs cgs cgd pb m is b kf af nlev gdsnoi fc tnom vtotc n isr nr alpha vk xti mfg]
    next $name $type [my argsPreprocess $paramsNames {*}$args]
}

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

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices::Mesfet]Mesfet, Top, Main, Index

Creates object of class Mesfet that describes semiconductor MESFET device.

OBJECT constructor name ndNode ngNode nsNode -model value ?-area value? ?-off? ?-ic {value value} ?
Details
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.
-mParallel device multiplier, optional.
-modelName of the model.
-offInitial state, optional.
-tempDevice temperature, 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
    #  -m - parallel device multiplier, optional
    #  -temp - device temperature, 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}
    # ```
    # Synopsis: name ndNode ngNode nsNode -model value ?-area value? ?-off? ?-ic \{value value\} ?
    set arguments [argparse -inline {
        {-model= -required}
        -area=
        -m=
        {-off -boolean}
        -temp=
    }]
    lappend params "model [dget $arguments model] -posnocheck"
    if {[dexist $arguments area]} {
        set areaVal [dget $arguments area]
        if {([llength $areaVal]>1) && ([@ $areaVal 1] eq "-eq")} {
            lappend params "area [@ $areaVal 0] -poseq"
        } else {
            lappend params "area $areaVal -pos"
        }
    }
    if {[dget $arguments off]==1} {
        lappend params "off -sw"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model area off}} {
            lappend params "$paramName $value"
        }
    }
    next z$name [list "nd $ndNode" "ng $ngNode" "ns $nsNode"] $params
}

MesfetModel [::SpiceGenTcl::Ltspice::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
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
genSPICEStringSee ::SpiceGenTcl::Model.genSPICEString
getParamsSee ::SpiceGenTcl::Model.getParams
setParamValueSee ::SpiceGenTcl::Model.setParamValue
Properties

Readable: -name, -type

Writable: -name, -type

Superclasses

::SpiceGenTcl::Model

constructor [::SpiceGenTcl::Ltspice::SemiconductorDevices::MesfetModel]MesfetModel, Top, Main, Index

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

OBJECT constructor name type ?-option value ...?
Details
Parameters
nameName of the model.
typeNmf or pmf.
argsKeyword model parameters, for details please see LTspice manual, chapter 10.
Description

Example of class initialization:

::SpiceGenTcl::Ltspice::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 `MesfetModel` 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 LTspice manual, chapter 10.
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::SemiconductorDevices::Jfet2Model new jfetmod njf -vto -2 -beta 10e-4 -rs 1e-4 -vbi 1.2
    # ```
    # Synopsis: name type ?-option value ...?
    set params [my argsPreprocess [list vto beta b alpha lambda rd rs cgs cgd pb kf af fc is] {*}$args]
    next $name $type $params
}

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

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices::Mosfet]Mosfet, Top, Main, Index

Creates object of class Mosfet that describes semiconductor MOSFET device.

OBJECT constructor name ndNode ngNode nsNode -model value -n4|nb value ?-n5 value ?-n6 value ?-n7 value??? ?-m value? ?-l value? ?-w value? ?-ad value|-nrd value? ?-as value|-nrs value? ?-temp value? ?-off? ?-pd value? ?-ps value? ?-ic {value value value}? ?-custparams param1 {param1Val ?-eq|-poseq|-posnocheck|-pos|-nocheck?} ...?
OBJECT constructor name ndNode ngNode nsNode -model value ?-m value? ?-l value? ?-w value? ?-temp value? ?-off? ?-custparams param1 {param1Val ?-eq|-poseq|-posnocheck|-pos|-nocheck?} ...?
Details
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, require -n4.
-areaArea of VDMOS device, optional.
-asDiffusion area of source, optional, forbid -nrs, require -n4.
-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 three element list, optional, require -n4.
-lLength of channel, optional.
-mMultiplier, optional.
-modelName of the model.
-n4Name of substrate node.
-n5Name of 5th node, require -n4, optional.
-n6Name of 6th node, require -n5, optional.
-n7Name of 7th node, require -n6, optional.
-nrdEquivalent number of squares of the drain diffusions, forbid -ad, require -n4.
-nrsEquivalent number of squares of the source diffusions, forbid -as, require -n4.
-offInitial state, optional.
-pdPerimeter area of drain, optional, require -n4.
-psPerimeter area of source, optional, require -n4.
-tempDevice temperature.
-wWidth of channel, optional.
Description
Mxxx Nd Ng Ns Nb <model> [m=<value>] [L=<len>]
+ [W=<width>] [AD=<area>] [AS=<area>]
+ [PD=<perim>] [PS=<perim>] [NRD=<value>]
+ [NRS=<value>] [off] [IC=<Vds, Vgs, Vbs>]
+ [temp=<T>]
Mxxx Nd Ng Ns <model> [L=<len>] [W=<width>]
+ [area=<value>] [m=<value>] [off]
+ [temp=<T>]

Example of class initialization:

::SpiceGenTcl::Ltspice::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
    #  -area - area of VDMOS device, optional
    #  -ad - diffusion area of drain, optional, forbid -nrd, require -n4
    #  -as - diffusion area of source, optional, forbid -nrs, require -n4
    #  -pd - perimeter area of drain, optional, require -n4
    #  -ps - perimeter area of source, optional, require -n4
    #  -nrd - equivalent number of squares of the drain diffusions, forbid -ad, require -n4
    #  -nrs - equivalent number of squares of the source diffusions, forbid -as, require -n4
    #  -temp - device temperature
    #  -ic - initial conditions for vds, vgs and vbs, in form of three element list, optional, require -n4
    #  -off - initial state, optional
    #  -n4 - name of substrate 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.
    # ```
    # Mxxx Nd Ng Ns Nb <model> [m=<value>] [L=<len>]
    # + [W=<width>] [AD=<area>] [AS=<area>]
    # + [PD=<perim>] [PS=<perim>] [NRD=<value>]
    # + [NRS=<value>] [off] [IC=<Vds, Vgs, Vbs>]
    # + [temp=<T>]
    # ```
    # ```
    # Mxxx Nd Ng Ns <model> [L=<len>] [W=<width>]
    # + [area=<value>] [m=<value>] [off]
    # + [temp=<T>]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ltspice::Mosfet new 1 netd netg nets -model mosfetmod -l 1e-6 -w 10e-3 -n4 netsub -n5 net5
    # ```
    # Synopsis: name ndNode ngNode nsNode -model value -n4|nb value ?-n5 value ?-n6 value ?-n7 value???
    #   ?-m value? ?-l value? ?-w value? ?-ad value|-nrd value? ?-as value|-nrs value? ?-temp value? ?-off?
    #   ?-pd value? ?-ps value? ?-ic \{value value value\}?
    #   ?-custparams param1 \{param1Val ?-eq|-poseq|-posnocheck|-pos|-nocheck?\} ...?
    # Synopsis: name ndNode ngNode nsNode -model value ?-m value? ?-l value? ?-w value?
    #    ?-temp value? ?-off? ?-custparams param1 \{param1Val ?-eq|-poseq|-posnocheck|-pos|-nocheck?\} ...?
    set arguments [argparse -inline {
        {-model= -required}
        -m=
        {-area= -forbid n4}
        -l=
        -w=
        {-ad= -forbid nrd -require n4}
        {-as= -forbid nrs -require n4}
        {-pd= -require n4}
        {-ps= -require n4}
        {-nrd= -forbid ad}
        {-nrs= -forbid as}
        -temp=
        {-off -boolean}
        {-ic= -require n4 -validate {[llength $arg]==3}}
        -n4=
        {-n5= -require n4}
        {-n6= -require n5}
        {-n7= -require n7}
        {-custparams -catchall}
    }]
    lappend params "model [dget $arguments model] -posnocheck"
    if {[dget $arguments off]==1} {
        lappend params "off -sw"
    }
    if {[dexist $arguments ic]} {
        lappend params "ic [join [dget $arguments ic] ,] -nocheck"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {model off ic n4 n5 n6 n7 custparams}} {
            lappend params "$paramName $value"
        }
    }
    if {[dget $arguments custparams] ne ""} {
        if {[llength [dget $arguments custparams]]%2!=0} {
            return -code error "Custom parameters list must be even length"
        }
        set custParamDict [dcreate {*}[dget $arguments custparams]]
        dict for {paramName value} $custParamDict {
            lappend params "$paramName $value"
        }
    }
    set pinList [list "nd $ndNode" "ng $ngNode" "ns $nsNode"]
    if {[dexist $arguments n4]} {
        lappend pinList "n4 [dget $arguments n4]"
        if {[dexist $arguments n5]} {
            lappend pinList "n5 [dget $arguments n5]"
            if {[dexist $arguments n6]} {
                lappend pinList "n6 [dget $arguments n6]"
                if {[dexist $arguments n7]} {
                    lappend pinList "n7 [dget $arguments n7]"
                }
            }
        }
    }
    next m$name $pinList $params
}

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

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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::Ltspice::SemiconductorDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
argsPreprocessSee ::SpiceGenTcl::KeyArgsBuilder.argsPreprocess
buildArgStrSee ::SpiceGenTcl::KeyArgsBuilder.buildArgStr
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
duplListCheckSee ::SpiceGenTcl::DuplChecker.duplListCheck
duplListCheckRetSee ::SpiceGenTcl::DuplChecker.duplListCheckRet
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