::SpiceGenTcl::Ltspice::BasicDevicesTop, Main, Index
ClassesTop, Main, Index
C [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
Capacitor [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
constructor | Constructor for the class. |
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
Subclasses
constructor [::SpiceGenTcl::Ltspice::BasicDevices::Capacitor]Capacitor, Top, Main, Index
Creates object of class Capacitor
that describes capacitor.
OBJECT constructor name npNode nmNode -q value ?-m value? ?-ic value? ?-rser value? ?-lser value? ?-rpar value? ?-cpar value? ?-rlshunt value?
Details
Parameters
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. |
Description
Capacitor type could be specified with additional switch -q
if we want to model circuit's variable dependent capacitor. Simple capacitor:
Cnnn n1 n2 <capacitance> [ic=<value>] + [Rser=<value>] [Lser=<value>] [Rpar=<value>] + [Cpar=<value>] [m=<value>] + [RLshunt=<value>] [temp=<value>]
Example of class initialization as a simple capacitor:
::SpiceGenTcl::Ltspice::BasicDevices::Capacitor new 1 netp netm -r 1e-6 -temp {temp -eq}
Behavioral capacitor with Q expression:
Cnnn n1 n2 Q=<expression> [ic=<value>] [m=<value>]
Example of class initialization:
::SpiceGenTcl::Ltspice::BasicDevices::Capacitor new 1 netp netm -q "V(a)+V(b)+pow(V(c),2)"
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 switch `-q` if we # want to model circuit's variable dependent capacitor. # Simple capacitor: # ``` # Cnnn n1 n2 <capacitance> [ic=<value>] # + [Rser=<value>] [Lser=<value>] [Rpar=<value>] # + [Cpar=<value>] [m=<value>] # + [RLshunt=<value>] [temp=<value>] # ``` # Example of class initialization as a simple capacitor: # ``` # ::SpiceGenTcl::Ltspice::BasicDevices::Capacitor new 1 netp netm -r 1e-6 -temp {temp -eq} # ``` # Behavioral capacitor with Q expression: # ``` # Cnnn n1 n2 Q=<expression> [ic=<value>] [m=<value>] # ``` # Example of class initialization: # ``` # ::SpiceGenTcl::Ltspice::BasicDevices::Capacitor new 1 netp netm -q "V(a)+V(b)+pow(V(c),2)" # ``` # Synopsis: name npNode nmNode -c value ?-m value? ?-temp value? ?-ic value? ?-rser value? ?-lser value? # ?-rpar value? ?-cpar value? ?-rlshunt value? # Synopsis: name npNode nmNode -q value ?-m value? ?-ic value? ?-rser value? ?-lser value? ?-rpar value? # ?-cpar value? ?-rlshunt value? set arguments [argparse -inline { {-c= -forbid q} {-q= -forbid c} -m= {-temp= -forbid q} -ic= -rser= -lser= -rpar= -cpar= -rlshunt= }] set params {} if {[dexist $arguments c]} { 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] } } elseif {![dexist $arguments q]} { return -code error "Capacitor value must be specified with '-c value'" } if {[dexist $arguments q]} { set qVal [dget $arguments q] lappend params [list q $qVal -eq] } dict for {paramName value} $arguments { if {$paramName ni {c q}} { lappend params [list $paramName {*}$value] } } next c$name [list [list np $npNode] [list nm $nmNode]] $params }
CSwitch [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
::SpiceGenTcl::Common::BasicDevices::CSwitch
Subclasses
CSwitchModel [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
constructor | Constructor for the class. |
addParam | See ::SpiceGenTcl::Model.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Model.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Model.genSPICEString |
getParams | See ::SpiceGenTcl::Model.getParams |
setParamValue | See ::SpiceGenTcl::Model.setParamValue |
Properties
Readable: -name
, -type
Writable: -name
, -type
Superclasses
constructor [::SpiceGenTcl::Ltspice::BasicDevices::CSwitchModel]CSwitchModel, Top, Main, Index
Creates object of class CSwitchModel
that describes current switch model.
Details
Parameters
name | Name of the model. |
args | Keyword instance parameters. |
Description
Example of class initialization:
::SpiceGenTcl::Ltspice::BasicDevices::CSwitchModel new cswmod -it 1 -ih 0.5 -ron 1 -roff 1e6
method constructor {name args} { # Creates object of class `CSwitchModel` that describes current switch model. # name - name of the model # args - keyword instance parameters # Example of class initialization: # ``` # ::SpiceGenTcl::Ltspice::BasicDevices::CSwitchModel new cswmod -it 1 -ih 0.5 -ron 1 -roff 1e6 # ``` # Synopsis: name ?-option value ...? next $name csw [my argsPreprocess {it ih ron roff} {*}$args] }
Inductor [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
constructor | Constructor for the class. |
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
Subclasses
constructor [::SpiceGenTcl::Ltspice::BasicDevices::Inductor]Inductor, Top, Main, Index
Creates object of class Inductor
that describes inductor.
OBJECT constructor name npNode nmNode -beh -l value ?-tc1 value? ?-tc2 value?
OBJECT constructor name npNode nmNode -model value ?-l value? ?-temp value|-dtemp value? ?-m value? ?scale value? ?-ic value? ?-nt value? ?-tc1 value? ?-tc2 value?
Details
Parameters
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. |
Description
Inductor type could be specified with additional switches: -beh
if we want to model circuit's variable dependent inductor, or -model modelName
if we want to simulate inductor with model card. Simple inductor:
LYYYYYYY n+ n- <value> <m=val> + <scale=val> <temp=val> <dtemp=val> <tc1=val> + <tc2=val> <ic=init_condition>
Example of class initialization as a simple inductor:
::SpiceGenTcl::Ngspice::BasicDevices::Inductor new 1 netp netm -l 1e-6 -tc1 1 -temp {temp -eq}
Behavioral inductor:
LYYYYYYY n+ n- L={expression} <tc1=val> <tc2=val>
Example of class initialization:
::SpiceGenTcl::Ngspice::BasicDevices::Inductor new 1 netp netm -l "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1
Inductor with model card:
LYYYYYYY n+ n- <value> <mname> <nt=val> <m=val> + <scale=val> <temp=val> <dtemp=val> <tc1=val> + <tc2=val> <ic=init_condition>
Example of class initialization:
::SpiceGenTcl::Ngspice::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 switches: `-beh` if we # want to model circuit's variable dependent inductor, or `-model modelName` # if we want to simulate inductor with model card. # Simple inductor: # ``` # LYYYYYYY n+ n- <value> <m=val> # + <scale=val> <temp=val> <dtemp=val> <tc1=val> # + <tc2=val> <ic=init_condition> # ``` # Example of class initialization as a simple inductor: # ``` # ::SpiceGenTcl::Ngspice::BasicDevices::Inductor new 1 netp netm -l 1e-6 -tc1 1 -temp {temp -eq} # ``` # Behavioral inductor: # ``` # LYYYYYYY n+ n- L={expression} <tc1=val> <tc2=val> # ``` # Example of class initialization: # ``` # ::SpiceGenTcl::Ngspice::BasicDevices::Inductor new 1 netp netm -l "V(a)+V(b)+pow(V(c),2)" -beh -tc1 1 # ``` # Inductor with model card: # ``` # LYYYYYYY n+ n- <value> <mname> <nt=val> <m=val> # + <scale=val> <temp=val> <dtemp=val> <tc1=val> # + <tc2=val> <ic=init_condition> # ``` # Example of class initialization: # ``` # ::SpiceGenTcl::Ngspice::BasicDevices::Inductor new 1 netp netm -l 1e-6 -model indm # ``` # Synopsis: name npNode nmNode -l value ?-tc1 value? ?-tc2 value? ?-m value? ?-temp value|-dtemp value? # ?-scale value? ?-ic value? # Synopsis: name npNode nmNode -beh -l value ?-tc1 value? ?-tc2 value? # Synopsis: name npNode nmNode -model value ?-l value? ?-temp value|-dtemp value? ?-m value? ?scale value? # ?-ic value? ?-nt value? ?-tc1 value? ?-tc2 value? set arguments [argparse -inline { {-l= -forbid {flux hyst}} {-flux= -forbid {l hyst}} {-hyst -forbid {l flux} -reciprocal -require {hc br bs lm lg a n}} -m= -ic= -temp= -tc1= -tc2= -rser= -rpar= -cpar= -hc= -br= -bs= -lm= -lg= -a= -n= }] set params {} if {[dexist $arguments l]} { 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] } } elseif {![dexist $arguments flux] && ![dexist $arguments hyst]} { return -code error "Inductor value must be specified with '-l value'" } if {[dexist $arguments flux]} { set fluxVal [dget $arguments flux] lappend params [list flux [dget $arguments flux] -eq] } dict for {paramName value} $arguments { if {$paramName ni {l flux hyst}} { lappend params [list $paramName {*}$value] } } next l$name [list [list np $npNode] [list nm $nmNode]] $params }
L [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
R [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
Resistor [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
::SpiceGenTcl::Common::BasicDevices::Resistor
Subclasses
SubcircuitInstance [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
constructor | Constructor for the class. |
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
Subclasses
constructor [::SpiceGenTcl::Ltspice::BasicDevices::SubcircuitInstance]SubcircuitInstance, Top, Main, Index
Creates object of class SubcircuitInstance
that describes subcircuit instance.
SubcircuitInstance new name pins subName params
Details
Parameters
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?}} |
Description
Xxxx n1 n2 n3... <subckt name> [<parameter>=<expression>]
Example of class initialization:
::SpiceGenTcl::Ltspice::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?}} # ``` # Xxxx n1 n2 n3... <subckt name> [<parameter>=<expression>] # ``` # Example of class initialization: # ``` # ::SpiceGenTcl::Ltspice::BasicDevices::SubcircuitInstance new 1 {{plus net1} {minus net2}} rcnet {{r 1} {c cpar -eq}} # ``` set params [linsert $params 0 [list model $subName -posnocheck]] next x$name $pins $params }
SubcircuitInstanceAuto [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
constructor | Constructor for the class. |
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
Subclasses
constructor [::SpiceGenTcl::Ltspice::BasicDevices::SubcircuitInstanceAuto]SubcircuitInstanceAuto, Top, Main, Index
Creates object of class SubcircuitInstanceAuto
that describes subcircuit instance with already created subcircuit definition object.
Details
Parameters
subcktObj | Object of subcircuit that defines it's pins, subName and parameters. |
name | Not documented. |
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?} |
Description
Xxxx n1 n2 n3... <subckt name> [<parameter>=<expression>]
Example of class initialization:
::SpiceGenTcl::Ltspice::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?} # ``` # Xxxx n1 n2 n3... <subckt name> [<parameter>=<expression>] # ``` # Example of class initialization: # ``` # ::SpiceGenTcl::Ltspice::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] return -code 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]} { return -code 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 [list $pinName $node] } # get parameters names of subcircuit if {![catch {$subcktObj getParams}]} { 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 [list $paramName {*}$value] } } else { set params {} } set params [linsert $params 0 [list model $subName -posnocheck]] next x$name $pinsList $params }
VSw [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
VSwitch [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
::SpiceGenTcl::Common::BasicDevices::VSwitch
Subclasses
VSwitchModel [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
constructor | Constructor for the class. |
addParam | See ::SpiceGenTcl::Model.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Model.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Model.genSPICEString |
getParams | See ::SpiceGenTcl::Model.getParams |
setParamValue | See ::SpiceGenTcl::Model.setParamValue |
Properties
Readable: -name
, -type
Writable: -name
, -type
Superclasses
constructor [::SpiceGenTcl::Ltspice::BasicDevices::VSwitchModel]VSwitchModel, Top, Main, Index
Creates object of class VSwitchModel
that describes voltage switch model.
Details
Parameters
name | Name of the model. |
args | Keyword instance parameters. |
Description
Example of class initialization:
::SpiceGenTcl::Ltspice::BasicDevices::VSwitchModel new swmod -vt 1 -vh 0.5 -ron 1 -roff 1e6
method constructor {name args} { # Creates object of class `VSwitchModel` that describes voltage switch model. # name - name of the model # args - keyword instance parameters # Example of class initialization: # ``` # ::SpiceGenTcl::Ltspice::BasicDevices::VSwitchModel new swmod -vt 1 -vh 0.5 -ron 1 -roff 1e6 # ``` # Synopsis: name ?-option value ...? next $name sw [my argsPreprocess {vt vh ron roff lser vser ilimit} {*}$args] }
W [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
X [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name
Superclasses
XAuto [::SpiceGenTcl::Ltspice::BasicDevices]Top, Main, Index
Method summary
addParam | See ::SpiceGenTcl::Device.addParam |
argsPreprocess | See ::SpiceGenTcl::Utility.argsPreprocess |
buildArgStr | See ::SpiceGenTcl::Utility.buildArgStr |
buildSwArgStr | See ::SpiceGenTcl::Utility.buildSwArgStr |
checkFloatingPins | See ::SpiceGenTcl::Device.checkFloatingPins |
configure | Configure properties. |
deleteParam | See ::SpiceGenTcl::Device.deleteParam |
duplListCheck | See ::SpiceGenTcl::Utility.duplListCheck |
duplListCheckRet | See ::SpiceGenTcl::Utility.duplListCheckRet |
genSPICEString | See ::SpiceGenTcl::Device.genSPICEString |
getParams | See ::SpiceGenTcl::Device.getParams |
getPins | See ::SpiceGenTcl::Device.getPins |
setParamValue | See ::SpiceGenTcl::Device.setParamValue |
setPinNodeName | See ::SpiceGenTcl::Device.setPinNodeName |
Properties
Readable: -name
Writable: -name