Tcl SpiceGenTcl package (v)

::SpiceGenTcl::Xyce::BasicDevicesTop, Main, Index

ClassesTop, Main, Index

C [::SpiceGenTcl::Xyce::BasicDevices]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
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::Xyce::BasicDevices]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
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

Mixins

::SpiceGenTcl::KeyArgsBuilder

Subclasses

C

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

Creates object of class Capacitor that describes capacitor.

Capacitor create OBJNAME name npNode nmNode ?args?
Capacitor new name npNode nmNode ?args?
Parameters
nameName of the device without first-letter designator C.
npNodeName of node connected to positive pin.
nmNodeName of node connected to negative pin.
argsKeyword instance parameters.
Description

Capacitor type could be specified with additional switches: -beh if we want to model circuit's variable dependent capacitor, or -model modelName if we want to simulate capacitor with model card. Simple capacitor:

C<device name> <(+) node> <(-) node> <value> [device parameters]

Example of class initialization as a simple capacitor:

::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm 1e-6 -tc1 1 -temp {temp -eq}

Behavioral capacitor with C expression:

C<device name> <(+) node> <(-) node> C={expression} [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm -c "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1

Behavioral capacitor with Q expression:

C<device name> <(+) node> <(-) node> Q={expression} [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm -q "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1

Capacitor with model card:

C<device name> <(+) node> <(-) node> <model name> [value] [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm -model capm -l 1e-6 -w 10e-6
method constructor {name npNode nmNode args} {

    # Creates object of class `Capacitor` that describes capacitor.
    #  name - name of the device without first-letter designator C
    #  npNode - name of node connected to positive pin
    #  nmNode - name of node connected to negative pin
    #  args - keyword instance parameters
    # Capacitor type could be specified with additional switches: `-beh` if we
    # want to model circuit's variable dependent capacitor, or `-model modelName`
    # if we want to simulate capacitor with model card.
    # Simple capacitor:
    # ```
    # C<device name> <(+) node> <(-) node> <value> [device parameters]
    # ```
    # Example of class initialization as a simple capacitor:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm 1e-6 -tc1 1 -temp {temp -eq}
    # ```
    # Behavioral capacitor with C expression:
    # ```
    # C<device name> <(+) node> <(-) node> C={expression} [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm -c "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1
    # ```
    # Behavioral capacitor with Q expression:
    # ```
    # C<device name> <(+) node> <(-) node> Q={expression} [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm -q "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1
    # ```
    # Capacitor with model card:
    # ```
    # C<device name> <(+) node> <(-) node> <model name> [value] [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Capacitor new 1 netp netm -model capm -l 1e-6 -w 10e-6
    # ```
    set arguments [argparse -inline {
        {-c= -forbid {q}}
        {-q= -require {beh} -forbid {c model}}
        {-beh -forbid {model}}
        {-model= -forbid {beh}}
        -m=
        -temp=
        -tc1=
        -tc2=
        -ic=
        -age=
        -d=
        {-l= -require {model}}
        {-w= -require {model}}
    }]
    if {[dict exists $arguments model]} {
        lappend params "model [dict get $arguments model] -posnocheck"
    }
    if {[dict exists $arguments c]} {
        set cVal [dict get $arguments c]
        if {[dict exists $arguments beh]} {
            lappend params "c $cVal -eq"
        } elseif {([llength $cVal]>1) && ([lindex $cVal 1]=="-eq")} {
            lappend params "c [lindex $cVal 0] -poseq"
        } else {
            lappend params "c $cVal -pos"
        }
    } elseif {([dict exists $arguments model]==0) && ([dict exists $arguments q]==0)} {
        error "Capacitor value must be specified with '-c value'"
    }
    if {[dict exists $arguments q]} {
        set qVal [dict get $arguments q]
        if {[dict exists $arguments beh]} {
            lappend params "q $qVal -eq"
        } else {
            error "Charge of capacitor can't be specified without '-beh' switch"
        }
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {c q beh model}} {
            lappend params "$paramName $value"
        }
    }
    next c$name [list "np $npNode" "nm $nmNode"] $params
}

CSwitch [::SpiceGenTcl::Xyce::BasicDevices]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

::SpiceGenTcl::Common::BasicDevices::CSwitch

Subclasses

W

GenS [::SpiceGenTcl::Xyce::BasicDevices]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

GenSwitch

GenSwitch [::SpiceGenTcl::Xyce::BasicDevices]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

GenS

constructor [::SpiceGenTcl::Xyce::BasicDevices::GenSwitch]GenSwitch, Top, Main, Index

Creates object of class GenSwitch that describes generic switch device.

GenSwitch create OBJNAME name npNode nmNode ?args?
GenSwitch new name npNode nmNode ?args?
Parameters
nameName of the device without first-letter designator S.
npNodeName of node connected to positive pin.
nmNodeName of node connected to negative pin.
-controlControl equation.
-modelModel name.
-on/-offInitial state of switch.
Description
S<name> <(+) switch node> <(-) switch node> <model name> [ON] [OFF] <control = expression>

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::GenSwitch new 1 net1 0 -model sw1 -control {I(VMON)}
method constructor {name npNode nmNode args} {

    # Creates object of class `GenSwitch` that describes generic switch device.
    #  name - name of the device without first-letter designator S
    #  npNode - name of node connected to positive pin
    #  nmNode - name of node connected to negative pin
    #  -model - model name
    #  -control - control equation
    #  -on/-off - initial state of switch
    # ```
    # S<name> <(+) switch node> <(-) switch node> <model name> [ON] [OFF] <control = expression>
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::GenSwitch new 1 net1 0 -model sw1 -control {I(VMON)}
    # ```
    set arguments [argparse -inline {
        {-model= -required}
        {-control= -required}
        {-on -forbid {off}}
        {-off -forbid {on}}
    }]
    lappend params "model [dict get $arguments model] -posnocheck"
    if {[dict exists $arguments on]} {
        lappend params {on -sw}
    } elseif {[dict exists $arguments off]} {
        lappend params {off -sw}
    }
    lappend params "control [dict get $arguments control] -eq"
    next s$name [list "np $npNode" "nm $nmNode"] $params
}

Inductor [::SpiceGenTcl::Xyce::BasicDevices]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
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

Mixins

::SpiceGenTcl::KeyArgsBuilder

Subclasses

L

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

Creates object of class Inductor that describes inductor.

Inductor create OBJNAME name npNode nmNode ?args?
Inductor new name npNode nmNode ?args?
Parameters
nameName of the device without first-letter designator L.
npNodeName of node connected to positive pin.
nmNodeName of node connected to negative pin.
argsKeyword instance parameters.
Description

Inductor type could be specified with additional switch -model modelName if we want to simulate inductor with model card. Simple inductor:

L<name> <(+) node> <(-) node> <value> [device parameters]

Example of class initialization as a simple inductor:

::SpiceGenTcl::Xyce::BasicDevices::Inductor new 1 netp netm -l 1e-6 -tc1 1 -temp {temp -eq}

Behavioral inductor:

L<name> <(+) node> <(-) node> [model] <value> [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Inductor new 1 netp netm -l "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1

Inductor with model card:

L<name> <(+) node> <(-) node> [model] <value> [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Inductor new 1 netp netm -l 1e-6 -model indm
method constructor {name npNode nmNode args} {

    # Creates object of class `Inductor` that describes inductor.
    #  name - name of the device without first-letter designator L
    #  npNode - name of node connected to positive pin
    #  nmNode - name of node connected to negative pin
    #  args - keyword instance parameters
    # Inductor type could be specified with additional switch `-model modelName`
    # if we want to simulate inductor with model card.
    # Simple inductor:
    # ```
    # L<name> <(+) node> <(-) node> <value> [device parameters]
    # ```
    # Example of class initialization as a simple inductor:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Inductor new 1 netp netm -l 1e-6 -tc1 1 -temp {temp -eq}
    # ```
    # Behavioral inductor:
    # ```
    # L<name> <(+) node> <(-) node> [model] <value> [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Inductor new 1 netp netm -l "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1
    # ```
    # Inductor with model card:
    # ```
    # L<name> <(+) node> <(-) node> [model] <value> [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Inductor new 1 netp netm -l 1e-6 -model indm
    # ```
    set arguments [argparse -inline {
        {-l= -required}
        -model=
        -m=
        -temp=
        -tc1=
        -tc2=
        -ic=
    }]
    if {[dict exists $arguments model]} {
        lappend params "model [dict get $arguments model] -posnocheck"
    }
    set lVal [dict get $arguments l]
    if {([llength $lVal]>1) && ([lindex $lVal 1]=="-eq")} {
        lappend params "l [lindex $lVal 0] -poseq"
    } else {
        lappend params "l $lVal -pos"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {l model}} {
            lappend params "$paramName $value"
        }
    }
    next l$name [list "np $npNode" "nm $nmNode"] $params
}

L [::SpiceGenTcl::Xyce::BasicDevices]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
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::Xyce::BasicDevices]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
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::Xyce::BasicDevices]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
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

Mixins

::SpiceGenTcl::KeyArgsBuilder

Subclasses

R

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

Creates object of class Resistor that describes resistor.

Resistor create OBJNAME name npNode nmNode ?args?
Resistor new name npNode nmNode ?args?
Parameters
nameName of the device without first-letter designator R.
npNodeName of node connected to positive pin.
nmNodeName of node connected to negative pin.
argsKeyword instance parameters.
Description

Resistor type could be specified with additional switches: -beh if we want to model circuit's variable dependent resistor, or -model modelName if we want to simulate resistor with model card. Simple resistor:

R<name> <(+) node> <(-) node> <value> [device parameters]

Example of class initialization as a simple resistor:

::SpiceGenTcl::Xyce::BasicDevices::Resistor new 1 netp netm -r 1e3 -tc1 1 -temp {temp_amb -eq}

Behavioral resistor:

R<name> <(+) node> <(-) node> R ={expression} [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Resistor new 1 netp netm -r "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1

Resistor with model card:

R<name> <(+) node> <(-) node> <model name> [value] [device parameters]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::Resistor new 1 netp netm -model resm -l 1e-6 -w 10e-6
method constructor {name npNode nmNode args} {

    # Creates object of class `Resistor` that describes resistor.
    #  name - name of the device without first-letter designator R
    #  npNode - name of node connected to positive pin
    #  nmNode - name of node connected to negative pin
    #  args - keyword instance parameters
    # Resistor type could be specified with additional switches: `-beh` if we
    # want to model circuit's variable dependent resistor, or `-model modelName`
    # if we want to simulate resistor with model card.
    # Simple resistor:
    # ```
    # R<name> <(+) node> <(-) node> <value> [device parameters]
    # ```
    # Example of class initialization as a simple resistor:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Resistor new 1 netp netm -r 1e3 -tc1 1 -temp {temp_amb -eq}
    # ```
    # Behavioral resistor:
    # ```
    # R<name> <(+) node> <(-) node> R ={expression} [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Resistor new 1 netp netm -r "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1
    # ```
    # Resistor with model card:
    # ```
    # R<name> <(+) node> <(-) node> <model name> [value] [device parameters]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::Resistor new 1 netp netm -model resm -l 1e-6 -w 10e-6
    # ```
    set arguments [argparse -inline {
        -r=
        {-beh -forbid {model} -require {r}}
        {-model= -forbid {beh}}
        -m=
        -temp=
        -tc1=
        -tc2=
        -tce=
        {-l= -require {model}}
        {-w= -require {model}}
    }]
    if {[dict exists $arguments model]} {
        lappend params "model [dict get $arguments model] -posnocheck"
    }
    if {[dict exists $arguments r]} {
        set rVal [dict get $arguments r]
        if {[dict exists $arguments beh]} {
            lappend params "r $rVal -eq"
        } elseif {([llength $rVal]>1) && ([lindex $rVal 1]=="-eq")} {
            lappend params "r [lindex $rVal 0] -poseq"
        } else {
            lappend params "r $rVal -pos"
        }
    } elseif {[dict exists $arguments model]==0} {
        error "Resistor value must be specified with '-r value'"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {r beh model}} {
            lappend params "$paramName $value"
        }
    }
    next r$name [list "np $npNode" "nm $nmNode"] $params
}

SubcircuitInstance [::SpiceGenTcl::Xyce::BasicDevices]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

X

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

Creates object of class SubcircuitInstance that describes subcircuit instance.

SubcircuitInstance create OBJNAME name pins subName params
SubcircuitInstance new name pins subName params
Parameters
nameName of the device without first-letter designator X.
pinsList of pins {{pinName nodeName} {pinName nodeName} ...}
subNameName of subcircuit definition.
params{{paramName paramValue ?-eq?} {paramName paramValue ?-eq?}}
Description
X<name> [nodes] <subcircuit name> [PARAMS: [<name> = <value>] ...]

Example of class initialization:

::SpiceGenTcl::Xyce::BasicDevices::SubcircuitInstance new 1 {{plus net1} {minus net2}} rcnet {{r 1} {c cpar -eq}}
method constructor {name pins subName params} {

    # 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?}}
    # ```
    # X<name> [nodes] <subcircuit name> [PARAMS: [<name> = <value>] ...]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::SubcircuitInstance new 1 {{plus net1} {minus net2}} rcnet {{r 1} {c cpar -eq}}
    # ```
    set params [linsert $params 0 "model $subName -posnocheck"]
    set params [linsert $params 1 "params PARAMS: -posnocheck"]
    next x$name $pins $params
}

SubcircuitInstanceAuto [::SpiceGenTcl::Xyce::BasicDevices]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

XAuto

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

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

SubcircuitInstanceAuto create OBJNAME subcktObj name nodes ?args?
SubcircuitInstanceAuto new subcktObj name nodes ?args?
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
X<name> [nodes] <subcircuit name> [PARAMS: [<name> = <value>] ...]

Example of class initialization:

::SpiceGenTcl::Xyce::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?}
    # ```
    # X<name> [nodes] <subcircuit name> [PARAMS: [<name> = <value>] ...]
    # ```
    # Example of class initialization:
    # ```
    # ::SpiceGenTcl::Xyce::BasicDevices::SubcircuitInstanceAuto new $subcktObj 1 {net1 net2} -r 1 -c {cpar -eq}
    # ```

    # check that inputs object class is Subcircuit
    if {[info object class $subcktObj "::SpiceGenTcl::Subcircuit"]!=1} {
        set objClass [info object class $subcktObj]
        error "Wrong object class '$objClass' is passed as subcktObj, should be '::SpiceGenTcl::Subcircuit'"
    }
    # get name of subcircuit
    set subName [$subcktObj configure -Name]
    # get pins names of subcircuit
    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]} {
        error "Wrong number of nodes '[llength $nodes]' in definition, should be '[llength $pinsNames]'"
    }
    # create list of pins and connected nodes
    foreach pinName $pinsNames node $nodes {
        lappend pinsList "$pinName $node"
    }
    # get parameters names of subcircuit
    set paramsNames [dict keys [$subcktObj getParams]]
    foreach paramName $paramsNames {
        lappend paramDefList "-${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 "$paramName $value"
        }
    } else {
        set params ""
    }
    set params [linsert $params 0 "model $subName -posnocheck"]
    set params [linsert $params 1 "params PARAMS: -posnocheck"]
    next x$name $pinsList $params
}

VSw [::SpiceGenTcl::Xyce::BasicDevices]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

VSwitch

VSwitch [::SpiceGenTcl::Xyce::BasicDevices]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

::SpiceGenTcl::Common::BasicDevices::VSwitch

Subclasses

VSw

W [::SpiceGenTcl::Xyce::BasicDevices]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

CSwitch

X [::SpiceGenTcl::Xyce::BasicDevices]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

SubcircuitInstance

XAuto [::SpiceGenTcl::Xyce::BasicDevices]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

SubcircuitInstanceAuto