Tcl SpiceGenTcl package (v0.70)

::SpiceGenTcl::Common::BasicDevicesTop, Main, Index

ClassesTop, Main, Index

C [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

Capacitor

Capacitor [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

C

constructor [::SpiceGenTcl::Common::BasicDevices::Capacitor]Capacitor, Top, Main, Index

Creates object of class Capacitor that describes capacitor.

OBJECT constructor name np nm -c value ?-m value? ?-temp value? ?-tc1 value? ?-tc2 value? ?-ic value?
Details
Parameters
-cCapacitance value.
-icInitial condition, optional.
-mMultiplier value, optional.
-tc1Linear thermal coefficient, optional.
-tc2Quadratic thermal coefficient, optional.
-tempDevice temperature, optional, optional.
nameName of the device without first-letter designator C.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description

Simple capacitor:

CXXXXXXX n+ n- <value> <m=val> <temp=val> <tc1=val> <tc2=val>

Example of class initialization:

::SpiceGenTcl::Common::BasicDevices::Capacitor new 1 netp netm -c 1e3 -tc1 1 -temp {temp_amb -eq}
method constructor {args} {

    # Creates object of class `Capacitor` that describes capacitor.
    #  name - name of the device without first-letter designator C
    #  np - name of node connected to positive pin
    #  nm - name of node connected to negative pin
    #  -c - capacitance value
    #  -m - multiplier value, optional
    #  -temp - device temperature, optional, optional
    #  -tc1 - linear thermal coefficient, optional
    #  -tc2 - quadratic thermal coefficient, optional
    #  -ic - initial condition, optional
    # Simple capacitor:
    # ```
    # CXXXXXXX n+ n- <value> <m=val> <temp=val> <tc1=val> <tc2=val>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Common::BasicDevices::Capacitor new 1 netp netm -c 1e3 -tc1 1 -temp {temp_amb -eq}
    # ```
    # Synopsis: name np nm -c value ?-m value? ?-temp value? ?-tc1 value? ?-tc2 value? ?-ic value?
    set arguments [argparse -inline -pfirst -help {Creates object of class `Capacitor` that describes capacitor.} {
        {-c= -required -help {Capacitance value}}
        {-m= -help {Multiplier value}}
        {-temp= -help {Device temperature}}
        {-tc1= -help {Linear thermal coefficient}}
        {-tc2= -help {Quadratic thermal coefficient}}
        {-ic= -help {Initial condition} }
        {name -help {Name of the device without first-letter designator C}}
        {np -help {Name of node connected to positive pin}}
        {nm -help {Name of node connected to negative pin}}
    }]
    set cVal [dget $arguments c]
    if {([llength $cVal]>1) && ([@ $cVal 1] eq {-eq})} {
        lappend params [list c [@ $cVal 0] -poseq]
    } else {
        lappend params [list c $cVal -pos]
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {c name np nm}} {
            lappend params [list $paramName {*}$value]
        }
    }
    next c[dget $arguments name] [list [list np [dget $arguments np]] [list nm [dget $arguments nm]]] $params
}

CSwitch [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

W, ::SpiceGenTcl::Ngspice::BasicDevices::CSwitch, ::SpiceGenTcl::Xyce::BasicDevices::CSwitch, ::SpiceGenTcl::Ltspice::BasicDevices::CSwitch

constructor [::SpiceGenTcl::Common::BasicDevices::CSwitch]CSwitch, Top, Main, Index

Creates object of class CSwitch that describes current controlled switch device.

OBJECT constructor name np nm -icntrl value -model value ?-on|-off?
Details
Parameters
-icntrlSource of control current.
-modelModel name.
-on/-offInitial state of switch.
nameName of the device without first-letter designator W.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
WYYYYYYY N+ N- VNAM MODEL <ON> <OFF>

Example of class initialization:

::SpiceGenTcl::Ngspice::BasicDevices::CSwitch new 1 net1 0 -icntrl v1 -model sw1 -on
method constructor {args} {

    # Creates object of class `CSwitch` that describes current controlled switch device.
    #  name - name of the device without first-letter designator W
    #  np - name of node connected to positive pin
    #  nm - name of node connected to negative pin
    #  -icntrl - source of control current
    #  -model - model name
    #  -on/-off - initial state of switch
    # ```
    # WYYYYYYY N+ N- VNAM MODEL <ON> <OFF>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::BasicDevices::CSwitch new 1 net1 0 -icntrl v1 -model sw1 -on
    # ```
    # Synopsis: name np nm -icntrl value -model value ?-on|-off?
    set arguments [argparse -inline -pfirst -help {Creates object of class `CSwitch` that describes current controlled switch device} {
        {-icntrl= -required -help {Source of control current}}
        {-model= -required -help {Model name}}
        {-on -forbid {off} -help {Initial on state of switch}}
        {-off -forbid {on} -help {Initial off state of switch}}
        {name -help {Name of the device without first-letter designator W}}
        {np -help {Name of node connected to positive pin}}
        {nm -help {Name of node connected to negative pin}}
    }]
    lappend params [list icntrl [dget $arguments icntrl] -posnocheck]
    lappend params [list model [dget $arguments model] -posnocheck]
    if {[dexist $arguments on]} {
        lappend params {on -sw}
    } elseif {[dexist $arguments off]} {
        lappend params {off -sw}
    }
    next w[dget $arguments name] [list [list np [dget $arguments np]] [list nm [dget $arguments nm]]] $params
}

Inductor [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

L

constructor [::SpiceGenTcl::Common::BasicDevices::Inductor]Inductor, Top, Main, Index

Creates object of class Inductor that describes inductor.

OBJECT constructor name np nm -l value ?-m value? ?-temp value? ?-tc1 value? ?-tc2 value?
Details
Parameters
-lInductance value.
-mMultiplier value, optional.
-tc1Linear thermal coefficient, optional.
-tc2Quadratic thermal coefficient, optional.
-tempDevice temperature, optional, optional.
nameName of the device without first-letter designator L.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description

Simple inductor:

LXXXXXXX n+ n- <value> <m=val> <temp=val> <tc1=val> <tc2=val>

Example of class initialization:

::SpiceGenTcl::Common::BasicDevices::Inductor new 1 netp netm -l 1e3 -tc1 1 -temp {temp_amb -eq}
method constructor {args} {

    # Creates object of class `Inductor` that describes inductor.
    #  name - name of the device without first-letter designator L
    #  np - name of node connected to positive pin
    #  nm - name of node connected to negative pin
    #  -l - inductance value
    #  -m - multiplier value, optional
    #  -temp - device temperature, optional, optional
    #  -tc1 - linear thermal coefficient, optional
    #  -tc2 - quadratic thermal coefficient, optional
    # Simple inductor:
    # ```
    # LXXXXXXX n+ n- <value> <m=val> <temp=val> <tc1=val> <tc2=val>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Common::BasicDevices::Inductor new 1 netp netm -l 1e3 -tc1 1 -temp {temp_amb -eq}
    # ```
    # Synopsis: name np nm -l value ?-m value? ?-temp value? ?-tc1 value? ?-tc2 value?
    set arguments [argparse -inline -pfirst -help {Creates object of class `Inductor` that describes inductor} {
        {-l= -required -help {Inductance value}}
        {-m= -help {Multiplier value}}
        {-temp= -help {Device temperature}}
        {-tc1= -help {Linear thermal coefficient}}
        {-tc2= -help {Quadratic thermal coefficient}}
        {name -help {Name of the device without first-letter designator L}}
        {np -help {Name of node connected to positive pin}}
        {nm -help {Name of node connected to negative pin}}
    }]
    set lVal [dget $arguments l]
    if {([llength $lVal]>1) && ([@ $lVal 1] eq {-eq})} {
        lappend params [list l [@ $lVal 0] -poseq]
    } else {
        lappend params [list l $lVal -pos]
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {l name np nm}} {
            lappend params [list $paramName {*}$value]
        }
    }
    next l[dget $arguments name] [list [list np [dget $arguments np]] [list nm [dget $arguments nm]]] $params
}

L [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

Inductor

R [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

Resistor

Resistor [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
destructorDestructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

R, ::SpiceGenTcl::Ltspice::BasicDevices::Resistor

constructor [::SpiceGenTcl::Common::BasicDevices::Resistor]Resistor, Top, Main, Index

Creates object of class Resistor that describes resistor.

OBJECT constructor name np nm -r value ?-m value? ?-temp value? ?-tc1 value? ?-tc2 value?
Details
Parameters
-mMultiplier value, optional.
-rResistance value.
-tc1Linear thermal coefficient, optional.
-tc2Quadratic thermal coefficient, optional.
-tempDevice temperature, optional.
nameName of the device without first-letter designator R.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description

Simple resistor:

RXXXXXXX n+ n- <value> <m=val> <temp=val> <tc1=val> <tc2=val>

Example of class initialization:

::SpiceGenTcl::Common::BasicDevices::Resistor new 1 netp netm -r 1e3 -tc1 1 -temp {temp_amb -eq}
method constructor {args} {

    # Creates object of class `Resistor` that describes resistor.
    #  name - name of the device without first-letter designator R
    #  np - name of node connected to positive pin
    #  nm - name of node connected to negative pin
    #  -r - resistance value
    #  -m - multiplier value, optional
    #  -temp - device temperature, optional
    #  -tc1 - linear thermal coefficient, optional
    #  -tc2 - quadratic thermal coefficient, optional
    # Simple resistor:
    # ```
    # RXXXXXXX n+ n- <value> <m=val> <temp=val> <tc1=val> <tc2=val>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Common::BasicDevices::Resistor new 1 netp netm -r 1e3 -tc1 1 -temp {temp_amb -eq}
    # ```
    # Synopsis: name np nm -r value ?-m value? ?-temp value? ?-tc1 value? ?-tc2 value?
    set arguments [argparse -inline -pfirst -helplevel 1 -help {Creates object of class `Resistor` that describes resistor} {
        {-r= -required -help {Resistance value}}
        {-m= -help {Multiplier value}}
        {-temp= -help {Device temperature}}
        {-tc1= -help {Linear thermal coefficient}}
        {-tc2= -help {Quadratic thermal coefficient}}
        {name -help {Name of the device without first-letter designator R}}
        {np -help {Name of node connected to positive pin}}
        {nm -help {Name of node connected to negative pin}}
    }]
    set rVal [dget $arguments r]
    if {([llength $rVal]>1) && ([@ $rVal 1] eq {-eq})} {
        lappend params [list r [@ $rVal 0] -poseq]
    } else {
        lappend params [list r $rVal -pos]
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {r name np nm}} {
            lappend params [list $paramName {*}$value]
        }
    }
    next r[dget $arguments name] [list [list np [dget $arguments np]] [list nm [dget $arguments nm]]] $params
}

destructor [::SpiceGenTcl::Common::BasicDevices::Resistor]Resistor, Top, Main, Index

OBJECT destroy
Details
method destructor {} {

    puts 1
}

SubcircuitInstance [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

X

constructor [::SpiceGenTcl::Common::BasicDevices::SubcircuitInstance]SubcircuitInstance, Top, Main, Index

Creates object of class SubcircuitInstance that describes subcircuit instance.

SubcircuitInstance create OBJNAME ?args?
SubcircuitInstance new ?args?
Details
Parameters
nameName of the device without first-letter designator X.
params{{paramName paramValue ?-eq?} {paramName paramValue ?-eq?}}
pinsList of pins {{pinName nodeName} {pinName nodeName} ...}
subNameName of subcircuit definition.
Description
XYYYYYYY N1 <N2 N3 ...> SUBNAM

Example of class initialization:

::SpiceGenTcl::Common::BasicDevices::SubcircuitInstance new 1 {{plus net1} {minus net2}} rcnet {{r 1} {c cpar -eq}}

#nagelfar implicitvarcmd {argparse Creates object of class 'SubcircuitInstance'} name pins subName params

method constructor {args} {

    # Creates object of class `SubcircuitInstance` that describes subcircuit instance.
    #  name - name of the device without first-letter designator X
    #  pins - list of pins {{pinName nodeName} {pinName nodeName} ...}
    #  subName - name of subcircuit definition
    #  params - {{paramName paramValue ?-eq?} {paramName paramValue ?-eq?}}
    # ```
    # XYYYYYYY N1 <N2 N3 ...> SUBNAM
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Common::BasicDevices::SubcircuitInstance new 1 {{plus net1} {minus net2}} rcnet {{r 1} {c cpar -eq}}
    # ```
    ##nagelfar implicitvarcmd {argparse *Creates object of class 'SubcircuitInstance'*} name pins subName params
    argparse -pfirst -help {Creates object of class 'SubcircuitInstance' that describes subcircuit instance} {
        {name -help {Name of the device without first-letter designator}}
        {pins -help {List of pins {{pinName nodeName} {pinName nodeName} ...}}}
        {subName -help {Name of subcircuit definition}}
        {params -help {List of parameters {{paramName paramValue ?-eq?} {paramName paramValue ?-eq?}}}}
    }
    set params [linsert $params 0 [list model $subName -posnocheck]]
    next x$name $pins $params
}

SubcircuitInstanceAuto [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

XAuto

constructor [::SpiceGenTcl::Common::BasicDevices::SubcircuitInstanceAuto]SubcircuitInstanceAuto, Top, Main, Index

Creates object of class SubcircuitInstanceAuto that describes subcircuit instance with already created subcircuit definition object.

OBJECT constructor subcktObj name nodes ?-paramName paramValue ?-eq? ...?
Details
Parameters
subcktObjObject of subcircuit that defines it's pins, subName and parameters.
nameNot documented.
nodesList of nodes connected to pins in the same order as pins in subcircuit definition {nodeName1 nodeName2 ...}
argsParameters as argument in form : -paramName {paramValue ?-eq?} -paramName {paramValue ?-eq?}
Description
XYYYYYYY N1 <N2 N3 ...> SUBNAM

Example of class initialization:

::SpiceGenTcl::Common::BasicDevices::SubcircuitInstanceAuto new $subcktObj 1 {net1 net2} -r 1 -c {cpar -eq}
method constructor {subcktObj name nodes args} {

    # Creates object of class `SubcircuitInstanceAuto` that describes subcircuit instance with already created
    # subcircuit definition object.
    #  subcktObj - object of subcircuit that defines it's pins, subName and parameters
    #  nodes - list of nodes connected to pins in the same order as pins in subcircuit definition
    #   {nodeName1 nodeName2 ...}
    #  args - parameters as argument in form : -paramName {paramValue ?-eq?} -paramName {paramValue ?-eq?}
    # ```
    # XYYYYYYY N1 <N2 N3 ...> SUBNAM
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Common::BasicDevices::SubcircuitInstanceAuto new $subcktObj 1 {net1 net2} -r 1 -c {cpar -eq}
    # ```
    # Synopsis: subcktObj name nodes ?-paramName {paramValue ?-eq?} ...?

    # check that inputs object class is Subcircuit
    if {![info object class $subcktObj "::SpiceGenTcl::Subcircuit"]} {
        set objClass [info object class $subcktObj]
        error "Wrong object class '$objClass' is passed as subcktObj, should be '::SpiceGenTcl::Subcircuit'"
    }
    set subName [$subcktObj configure -name]
    set pinsNames [dict keys [$subcktObj getPins]]
    # check if number of pins in subcircuit definition matchs the number of supplied nodes
    if {[llength $pinsNames]!=[llength $nodes]} {
        return -code error "Wrong number of nodes '[llength $nodes]' in definition, should be '[llength $pinsNames]'"
    }
    set pinsList [lmap pinName $pinsNames node $nodes {join [list $pinName $node]}]
    if {![catch {$subcktObj getParams}]} {
        set paramDefList [lmap paramName [dict keys [$subcktObj getParams]] {subst -${paramName}=}]
    }
    if {[info exists paramDefList]} {
        # create definition for argparse module for passing parameters as optional arguments
        set arguments [argparse -inline "
            [join $paramDefList \n]
        "]
        # create list of parameters and values from which were supplied by args
        dict for {paramName value} $arguments {
            lappend params [list $paramName {*}$value]
        }
    } else {
        set params {}
    }
    set params [linsert $params 0 [list model $subName -posnocheck]]
    next x$name $pinsList $params
}

VSw [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

VSwitch

VSwitch [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
constructorConstructor for the class.
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

VSw, ::SpiceGenTcl::Ngspice::BasicDevices::VSwitch, ::SpiceGenTcl::Xyce::BasicDevices::VSwitch, ::SpiceGenTcl::Ltspice::BasicDevices::VSwitch

constructor [::SpiceGenTcl::Common::BasicDevices::VSwitch]VSwitch, Top, Main, Index

Creates object of class VSwitch that describes voltage controlled switch device.

OBJECT constructor name np nm ncp ncm -model value ?-on|-off?
Details
Parameters
-modelModel name.
-on/-offInitial state of switch.
nameName of the device without first-letter designator S.
ncmName of node connected to negative controlling pin.
ncpName of node connected to positive controlling pin.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
SXXXXXXX N+ N- NC+ NC- MODEL <ON> <OFF>

Example of class initialization:

::SpiceGenTcl::Ngspice::BasicDevices::VSwitch new 1 net1 0 netc 0 -model sw1 -on
method constructor {args} {

    # Creates object of class `VSwitch` that describes voltage controlled switch device.
    #  name - name of the device without first-letter designator S
    #  np - name of node connected to positive pin
    #  nm - name of node connected to negative pin
    #  ncp - name of node connected to positive controlling pin
    #  ncm - name of node connected to negative controlling pin
    #  -model - model name
    #  -on/-off - initial state of switch
    # ```
    # SXXXXXXX N+ N- NC+ NC- MODEL <ON> <OFF>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Ngspice::BasicDevices::VSwitch new 1 net1 0 netc 0 -model sw1 -on
    # ```
    # Synopsis: name np nm ncp ncm -model value ?-on|-off?
    set arguments [argparse -inline -pfirst -help {Creates object of class `VSwitch` that describes voltage controlled switch device} {
        {-model= -required -help {Model name}}
        {-on -forbid {off} -help {Initial on state of switch}}
        {-off -forbid {on} -help {Initial off state of switch}}
        {name -help {Name of the device without first-letter designator}}
        {np -help {Name of node connected to positive pin}}
        {nm -help {Name of node connected to negative pin}}
        {ncp -help {Name of node connected to positive controlling pin}}
        {ncm -help {Name of node connected to negative controlling pin}}
    }]
    lappend params [list model [dget $arguments model] -posnocheck]
    if {[dexist $arguments on]} {
        lappend params {on -sw}
    } elseif {[dexist $arguments off]} {
        lappend params {off -sw}
    }
    next s[dget $arguments name] [list [list np [dget $arguments np]] [list nm [dget $arguments nm]] [list ncp [dget $arguments ncp]] [list ncm [dget $arguments ncm]]] $params
}

W [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

CSwitch

X [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

SubcircuitInstance

XAuto [::SpiceGenTcl::Common::BasicDevices]Top, Main, Index

Method summary
addParamSee ::SpiceGenTcl::Device.addParam
addPinSee ::SpiceGenTcl::Device.addPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
deleteParamSee ::SpiceGenTcl::Device.deleteParam
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

SubcircuitInstanceAuto