method constructor {args} {
# Creates object of class `Iam` that describes single-frequency FM current source.# name - name of the device without first-letter designator I# np - name of node connected to positive pin# nm - name of node connected to negative pin# -i0 value - initial value# -ia value - pulsed value# -mf value - modulating frequency# -fc value - carrier frequency# -td value - signal delay, optional# -phases value - phase, optional, require `-td`# ```# IYYYYYYY n+ n- AM(VA VO MF FC TD PHASES)# ```# Example of class initialization:# ```# Iam new 1 net1 net2 -i0 0 -ia 2 -mf 1e3 -fc {-eq freq} -td 1e-6 -phases {-eq phase}# ```# Synopsis: name np nm -i0 value -ia value -mf value -fc value ?-td value ?-phases value??next i {*}$args
}
method constructor {args} {
# Creates object of class `Ipulse` that describes pulse current source.# name - name of the device without first-letter designator I# np - name of node connected to positive pin# nm - name of node connected to negative pin# -low value - low value# -high value - high value# -td value - time delay# -tr value - rise time# -tf value - fall time# -pw value - width of pulse# -per value - period time# -npulses value - number of pulses, optional# -dc value - DC value, optional# -ac value - AC value, optional# -acphase value - phase of AC signal, optional, requires `-ac`# ```# IYYYYYYY n+ n- PULSE(V1 V2 TD TR TF PW PER NP)# ```# Example of class initialization:# ```# Ipulse new 1 net1 net2 -low 0 -high 1 -td {-eq td} -tr 1e-9 -tf 1e-9 -pw 10e-6 -per 20e-6 -npulses {-eq np}# ```# Synopsis: name np nm -low value -high value -td value -tr value -tf value -pw value -per value# ?-np value?next i {*}$args
}
method constructor {args} {
# Creates object of class `Isffm` that describes single-frequency FM current source.# name - name of the device without first-letter designator I# np - name of node connected to positive pin# nm - name of node connected to negative pin# -i0 value - initial value, aliases: `-voff`, `-v0`, `-ioff`# -ia value - pulsed value, aliases: `-vamp`, `-va`, `-iamp`# -fc value - carrier frequency, alias `-fcar`# -mdi value - modulation index# -fs value - signal frequency, alias `-fsig`# -phasec value - carrier phase, optional# -phases value - signal phase, optional, require `-phasec`# -dc value - DC value, optional# -ac value - AC value, optional# -acphase value - phase of AC signal, optional, requires `-ac`# ```# IYYYYYYY n+ n- SFFM(VO VA FC MDI FS PHASEC PHASES)# ```# Example of class initialization:# ```# Isin new 1 net1 net2 -i0 0 -ia 1 -fc {-eq freq} -mdi 0 -fs 1e3 -phasec {-eq phase}# ```# Synopsis: name np nm -i0|ioff value -ia|iamp value -fc|fcar value -mdi value -fs|fsig value# ?-phasec value ?-phases value??next i {*}$args
}
method constructor {args} {
# Creates object of class `Vam` that describes single-frequency AM voltage source.# name - name of the device without first-letter designator V# np - name of node connected to positive pin# nm - name of node connected to negative pin# -v0 value - initial value# -va value - pulsed value# -mf value - modulating frequency# -fc value - carrier frequency# -td value - signal delay, optional# -phases value - phase, optional, require `-td`# -dc value - DC value, optional# -ac value - AC value, optional# -acphase value - phase of AC signal, optional, requires `-ac`# ```# VYYYYYYY n+ n- AM(VA VO MF FC TD PHASES)# ```# Example of class initialization:# ```# Vam new 1 net1 net2 -v0 0 -va 2 -mf 1e3 -fc {-eq freq} -td 1e-6 -phases {-eq phase}# ```# Synopsis: name np nm -v0 value -va value -mf value -fc value ?-td value ?-phases value??next v {*}$args
}
method constructor {args} {
# Creates object of class `Vport` that describes simple constant voltage source.# name - name of the device without first-letter designator V# np - name of node connected to positive pin# nm - name of node connected to negative pin# -dc value - DC voltage value# -ac value - AC voltage value# -portnum value - number of port# -z0 value - internal source impedance# ```# VYYYYYYY n+ n- DC 0 AC 1 portnum n1 <z0 n2># ```# Example of class initialization:# ```# Vport new 1 netp netm -dc 1 -ac 1 -portnum 1 -z0 100# ```# Synopsis: name np nm -dc value -ac value -portnum value ?-z0 value?set arguments [argparse -inline -pfirst -help {Creates object of class `Vport` that describes simple constant voltage source} {
{-dc= -required -help {DC voltage value}}
{-ac= -required -help {AC voltage value}}
{-portnum= -required -help {Number of port}}
{-z0= -help {Internal source impedance}}
{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}}
}]
set paramsOrder {dc ac portnum z0}
foreach param $paramsOrder {
if {[dexist $arguments $param]} {
dict append argsOrdered $param [dget $arguments $param]
}
}
dict for {paramName value} $argsOrdered {
lappend params [list -sw $paramName]
if {([llength $value]>1) && ([@ $value 0] eq {-eq})} {
lappend params [list -poseq ${paramName}val [@ $value 1]]
} else {
lappend params [list -pos ${paramName}val $value]
}
}
next v[dget $arguments name] [my FormPinNodeList $arguments {np nm}] $params
}
method constructor {args} {
# Creates object of class `Vpulse` that describes pulse voltage source.# name - name of the device without first-letter designator V# np - name of node connected to positive pin# nm - name of node connected to negative pin# -low value - low value, aliases: `-voff`, `-ioff`# -high value - high value, aliases: `-von`, `-ion`# -td value - time delay# -tr value - rise time# -tf value - fall time# -pw value - width of pulse, alias `-ton`# -per value - period time, alias `-tper`# -npulses value - number of pulses, optional# -dc value - DC value, optional# -ac value - AC value, optional# -acphase value - phase of AC signal, optional, requires `-ac`# ```# VYYYYYYY n+ n- PULSE(V1 V2 TD TR TF PW PER NP)# ```# Example of class initialization:# ```# Vpulse new 1 net1 net2 -low 0 -high 1 -td {-eq td} -tr 1e-9 -tf 1e-9 -pw 10e-6 -per 20e-6 -npulses {-eq np}# ```# Synopsis: name np nm -low|voff value -high|von value -td value -tr value -tf value -pw|ton value# -per|tper value ?-np value?next v {*}$args
}
method constructor {args} {
# Creates object of class `Vsffm` that describes single-frequency FM voltage source.# name - name of the device without first-letter designator V# np - name of node connected to positive pin# nm - name of node connected to negative pin# -v0 value - initial value, aliases: `-voff`, `-i0`, `-ioff`# -va value - pulsed value, aliases: `-vamp`, `-ia`, `-iamp`# -fc value - carrier frequency, alias `-fcar`# -mdi value - modulation index# -fs value - signal frequency, alias `-fsig`# -phasec value - carrier phase, optional# -phases value - signal phase, optional, require `-phasec`# -dc value - DC value, optional# -ac value - AC value, optional# -acphase value - phase of AC signal, optional, requires `-ac`# ```# VYYYYYYY n+ n- SFFM(VO VA FC MDI FS PHASEC PHASES)# ```# Example of class initialization:# ```# Vsin new 1 net1 net2 -v0 0 -va 1 -fc {-eq freq} -mdi 0 -fs 1e3 -phasec {-eq phase}# ```# Synopsis: name np nm -v0|voff value -va|vamp value -fc|fcar value -mdi value -fs|fsig value# ?-phasec value ?-phases value??next v {*}$args
}