Tcl SpiceGenTcl package (v0.71)

::SpiceGenTcl::Ngspice::SourcesTop, Main, Index

ClassesTop, Main, Index

am [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Device

Mixins

::SpiceGenTcl::Utility

Subclasses

Vam, Iam

constructor [::SpiceGenTcl::Ngspice::Sources::am]am, Top, Main, Index

am create OBJNAME type ?args?
am new type ?args?
Parameters
typeNot documented.
method constructor {type args} {

    if {$type eq {v}} {
        set typeName voltage
    } else {
        set typeName current
    }
    set arguments [argparse -inline -pfirst -help "Creates object of class '[string totitle ${type}am]' that describes single-frequency FM $typeName source" {
        {-dc= -help {DC value}}
        {-ac= -help {AC value}}
        {-acphase= -require ac -help {Phase of AC signal}}
        {-i0|v0= -required -help {Initial value}}
        {-ia|va= -required -help {Pulsed value}}
        {-mf= -required -help {Modulating frequency}}
        {-fc= -required -help {Carrier frequency}}
        {-td= -required -help {Signal delay}}
        {-phases= -help {Phase value}}
        {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}}
    }]
    if {[dexist $arguments dc]} {
        lappend params {-sw dc}
        set dcVal [dget $arguments dc]
        if {([llength $dcVal]>1) && ([@ $dcVal 0] eq {-eq})} {
            lappend params [list -poseq dcval [@ $dcVal 1]]
        } else {
            lappend params [list -pos dcval $dcVal]
        }
    }
    if {[dexist $arguments ac]} {
        lappend params {-posnocheck acsw ac}
        set acVal [dget $arguments ac]
        if {([llength $acVal]>1) && ([@ $acVal 0] eq {-eq})} {
            lappend params [list -poseq ac [@ $acVal 1]]
        } else {
            lappend params [list -pos ac $acVal]
        }
        if {[dexist $arguments acphase]} {
            set acphaseVal [dget $arguments acphase]
            if {([llength $acphaseVal]>1) && ([@ $acphaseVal 0] eq {-eq})} {
                lappend params [list -poseq acphase [@ $acphaseVal 1]]
            } else {
                lappend params [list -pos acphase $acphaseVal]
            }
        }
    }
    set paramsOrder {v0 va mf fc td phases}
    lappend params {-posnocheck model am}
    my ParamsProcess $paramsOrder $arguments params
    next $type[dget $arguments name] [my FormPinNodeList $arguments {np nm}] $params
}

B [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

BehaviouralSource

BehaviouralSource [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Device

Subclasses

B

constructor [::SpiceGenTcl::Ngspice::Sources::BehaviouralSource]BehaviouralSource, Top, Main, Index

Creates object of class BehaviouralSource that describes behavioural source.

OBJECT constructor name np nm -i value ?-tc1 value? ?-tc2 value? ?-noisy 0|1? ?-temp value|-dtemp value?
OBJECT constructor name np nm -v value ?-tc1 value? ?-tc2 value? ?-noisy 0|1? ?-temp value|-dtemp value?
Parameters
-dtemp valueTemperature offset, optional.
-i valueCurrent expression.
-noisySelects noise behaviour.
-tc1 valueLinear thermal coefficient, optional.
-tc2 valueQuadratic thermal coefficient, optional.
-temp valueDevice temperature, optional.
-v valueVoltage expression.
nameName of the device without first-letter designator B.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
BXXXXXXX n+ n- <i=expr> <v=expr> <tc1=value> <tc2=value> <dtemp=value> <temp=value>

Example of class initialization:

BehaviouralSource new 1 netp netm -v "V(a)+V(b)+pow(V(c),2)" -tc1 1
method constructor {args} {

    # Creates object of class `BehaviouralSource` that describes behavioural source.
    #  name - name of the device without first-letter designator B
    #  np - name of node connected to positive pin
    #  nm - name of node connected to negative pin
    #  -i value - current expression
    #  -v value - voltage expression
    #  -temp value - device temperature, optional
    #  -dtemp value - temperature offset, optional
    #  -tc1 value - linear thermal coefficient, optional
    #  -tc2 value - quadratic thermal coefficient, optional
    #  -noisy - selects noise behaviour
    # ```
    # BXXXXXXX n+ n- <i=expr> <v=expr> <tc1=value> <tc2=value> <dtemp=value> <temp=value>
    # ```
    # Example of class initialization:
    # ```
    # BehaviouralSource new 1 netp netm -v "V(a)+V(b)+pow(V(c),2)" -tc1 1
    # ```
    # Synopsis: name np nm -i value ?-tc1 value? ?-tc2 value? ?-noisy 0|1? ?-temp value|-dtemp value?
    # Synopsis: name np nm -v value ?-tc1 value? ?-tc2 value? ?-noisy 0|1? ?-temp value|-dtemp value?
    set arguments [argparse -inline -pfirst -help {Creates object of class 'BehaviouralSource' that describes behavioural source} {
        {-i= -forbid {v} -help {Current expression}}
        {-v= -forbid {i} -help {Voltage expression}}
        {-tc1=  -help {Linear thermal coefficient}}
        {-tc2=  -help {Quadratic thermal coefficient}}
        {-noisy= -enum {0 1} -help {Selects noise behaviour}}
        {-temp= -forbid {dtemp} -help {Device temperature}}
        {-dtemp= -forbid {temp} -help {Temperature offset}}
        {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}}
    }]
    if {[dexist $arguments i]} {
        lappend params [list -eq i [dget $arguments i]]
    } elseif {[dexist $arguments v]} {
        lappend params [list -eq v [dget $arguments v]]
    } else {
        return -code error "Equation must be specified as argument to -i or -v"
    }
    dict for {paramName value} $arguments {
        if {$paramName ni {i v name np nm}} {
            if {[@ $value 0] eq {-eq}} {
                lappend params [list -eq $paramName [@ $value 1]]
            } else {
                lappend params [list $paramName $value]
            }
        }
    }
    next b[dget $arguments name] [my FormPinNodeList $arguments {np nm}] $params
}

Cccs [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Cccs

Subclasses

F

Ccvs [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Ccvs

Subclasses

H

E [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

Vcvs

F [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

Cccs

G [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

Vccs

H [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

Ccvs

Iac [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Iac

Iam [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

am

constructor [::SpiceGenTcl::Ngspice::Sources::Iam]Iam, Top, Main, Index

Creates object of class Iam that describes single-frequency FM current source.

OBJECT constructor name np nm -i0 value -ia value -mf value -fc value ?-td value ?-phases value??
Parameters
-fc valueCarrier frequency.
-i0 valueInitial value.
-ia valuePulsed value.
-mf valueModulating frequency.
-phases valuePhase, optional, require -td
-td valueSignal delay, optional.
nameName of the device without first-letter designator I.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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}
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
}

Idc [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Idc

Iexp [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Iexp

Ipulse [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

pulse

constructor [::SpiceGenTcl::Ngspice::Sources::Ipulse]Ipulse, Top, Main, Index

Creates object of class Ipulse that describes pulse current source.

OBJECT constructor name np nm -low value -high value -td value -tr value -tf value -pw value -per value ?-np value?
Parameters
-ac valueAC value, optional.
-acphase valuePhase of AC signal, optional, requires -ac
-dc valueDC value, optional.
-high valueHigh value.
-low valueLow value.
-npulses valueNumber of pulses, optional.
-per valuePeriod time.
-pw valueWidth of pulse.
-td valueTime delay.
-tf valueFall time.
-tr valueRise time.
nameName of the device without first-letter designator I.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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}
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
}

Ipwl [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Ipwl

Isffm [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

sffm

constructor [::SpiceGenTcl::Ngspice::Sources::Isffm]Isffm, Top, Main, Index

Creates object of class Isffm that describes single-frequency FM current source.

OBJECT constructor name np nm -i0|ioff value -ia|iamp value -fc|fcar value -mdi value -fs|fsig value ?-phasec value ?-phases value??
Parameters
-ac valueAC value, optional.
-acphase valuePhase of AC signal, optional, requires -ac
-dc valueDC value, optional.
-fc valueCarrier frequency, alias -fcar
-fs valueSignal frequency, alias -fsig
-i0 valueInitial value, aliases: -voff, -v0, -ioff
-ia valuePulsed value, aliases: -vamp, -va, -iamp
-mdi valueModulation index.
-phasec valueCarrier phase, optional.
-phases valueSignal phase, optional, require -phasec
nameName of the device without first-letter designator I.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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}
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
}

Isin [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Isin

pulse [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Device

Mixins

::SpiceGenTcl::Utility

Subclasses

Vpulse, Ipulse

constructor [::SpiceGenTcl::Ngspice::Sources::pulse]pulse, Top, Main, Index

pulse create OBJNAME type ?args?
pulse new type ?args?
Parameters
typeNot documented.
method constructor {type args} {

    if {$type eq {v}} {
        set typeName voltage
    } else {
        set typeName current
    }
    set arguments [argparse -inline -pfirst -help "Creates object of class '[string totitle ${type}pulse]' that describes pulse $typeName source" {
        {-dc= -help {DC value}}
        {-ac= -help {AC value}}
        {-acphase= -require ac -help {}}
        {-voff|ioff|low= -required -help {Low value}}
        {-von|ion|high= -required -help {High value}}
        {-td= -required -help {Delay time}}
        {-tr= -required -help {Rise time}}
        {-tf= -required -help {Fall time}}
        {-pw|ton= -required -help {Width of pulse}}
        {-per|tper= -required -help {Period time}}
        {-ncycles|npulses= -help {Number of pulses}}
        {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}}
    }]
    if {[dexist $arguments dc]} {
        lappend params {-sw dc}
        set dcVal [dget $arguments dc]
        if {([llength $dcVal]>1) && ([@ $dcVal 0] eq {-eq})} {
            lappend params [list -poseq dcval [@ $dcVal 1]]
        } else {
            lappend params [list -pos dcval $dcVal]
        }
    }
    if {[dexist $arguments ac]} {
        lappend params {-posnocheck acsw ac}
        set acVal [dget $arguments ac]
        if {([llength $acVal]>1) && ([@ $acVal 0] eq {-eq})} {
            lappend params [list -poseq ac [@ $acVal 1]]
        } else {
            lappend params [list -pos ac $acVal]
        }
        if {[dexist $arguments acphase]} {
            set acphaseVal [dget $arguments acphase]
            if {([llength $acphaseVal]>1) && ([@ $acphaseVal 0] eq {-eq})} {
                lappend params [list -poseq acphase [@ $acphaseVal 1]]
            } else {
                lappend params [list -pos acphase $acphaseVal]
            }
        }
    }
    set paramsOrder {low high td tr tf ton tper npulses}
    lappend params {-posnocheck model pulse}
    my ParamsProcess $paramsOrder $arguments params
    next $type[dget $arguments name] [my FormPinNodeList $arguments {np nm}] $params
}

sffm [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Device

Mixins

::SpiceGenTcl::Utility

Subclasses

Vsffm, Isffm

constructor [::SpiceGenTcl::Ngspice::Sources::sffm]sffm, Top, Main, Index

sffm create OBJNAME type ?args?
sffm new type ?args?
Parameters
typeNot documented.
method constructor {type args} {

    if {$type eq {v}} {
        set typeName voltage
    } else {
        set typeName current
    }
    set arguments [argparse -inline -pfirst -help "Creates object of class '[string totitle ${type}sffm]' that describes single-frequency FM $typeName source" {
        {-dc= -help {DC value}}
        {-ac= -help {AC value}}
        {-acphase= -require ac -help {Phase of AC signal}}
        {-i0|voff|ioff|v0= -required -help {Initial value}}
        {-ia|vamp|iamp|va= -required -help {Pulsed value}}
        {-fcar|fc= -required -help {Carrier frequency}}
        {-mdi= -required -help {Modulation index}}
        {-fsig|fs= -required -help {Signal frequency}}
        {-phasec= -help {Modulation signal phase}}
        {-phases= -require {phasec} -help {Carrier signal phase}}
        {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}}
    }]
    if {[dexist $arguments dc]} {
        lappend params {-sw dc}
        set dcVal [dget $arguments dc]
        if {([llength $dcVal]>1) && ([@ $dcVal 0] eq {-eq})} {
            lappend params [list -poseq dcval [@ $dcVal 1]]
        } else {
            lappend params [list -pos dcval $dcVal]
        }
    }
    if {[dexist $arguments ac]} {
        lappend params {-posnocheck acsw ac}
        set acVal [dget $arguments ac]
        if {([llength $acVal]>1) && ([@ $acVal 0] eq {-eq})} {
            lappend params [list -poseq ac [@ $acVal 1]]
        } else {
            lappend params [list -pos ac $acVal]
        }
        if {[dexist $arguments acphase]} {
            set acphaseVal [dget $arguments acphase]
            if {([llength $acphaseVal]>1) && ([@ $acphaseVal 0] eq {-eq})} {
                lappend params [list -poseq acphase [@ $acphaseVal 1]]
            } else {
                lappend params [list -pos acphase $acphaseVal]
            }
        }
    }
    set paramsOrder {v0 va fc mdi fs phasec phases}
    lappend params {-posnocheck model sffm}
    my ParamsProcess $paramsOrder $arguments params
    next $type[dget $arguments name] [my FormPinNodeList $arguments {np nm}] $params
}

Vac [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vac

Vam [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

am

constructor [::SpiceGenTcl::Ngspice::Sources::Vam]Vam, Top, Main, Index

Creates object of class Vam that describes single-frequency AM voltage source.

OBJECT constructor name np nm -v0 value -va value -mf value -fc value ?-td value ?-phases value??
Parameters
-ac valueAC value, optional.
-acphase valuePhase of AC signal, optional, requires -ac
-dc valueDC value, optional.
-fc valueCarrier frequency.
-mf valueModulating frequency.
-phases valuePhase, optional, require -td
-td valueSignal delay, optional.
-v0 valueInitial value.
-va valuePulsed value.
nameName of the device without first-letter designator V.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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}
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
}

Vccs [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vccs

Subclasses

G

Vcvs [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vcvs

Subclasses

E

Vdc [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vdc

Vexp [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vexp

Vport [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Device

constructor [::SpiceGenTcl::Ngspice::Sources::Vport]Vport, Top, Main, Index

Creates object of class Vport that describes simple constant voltage source.

OBJECT constructor name np nm -dc value -ac value -portnum value ?-z0 value?
Parameters
-ac valueAC voltage value.
-dc valueDC voltage value.
-portnum valueNumber of port.
-z0 valueInternal source impedance.
nameName of the device without first-letter designator V.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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
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
}

Vpulse [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

pulse

constructor [::SpiceGenTcl::Ngspice::Sources::Vpulse]Vpulse, Top, Main, Index

Creates object of class Vpulse that describes pulse voltage source.

OBJECT constructor name np nm -low|voff value -high|von value -td value -tr value -tf value -pw|ton value -per|tper value ?-np value?
Parameters
-ac valueAC value, optional.
-acphase valuePhase of AC signal, optional, requires -ac
-dc valueDC value, optional.
-high valueHigh value, aliases: -von, -ion
-low valueLow value, aliases: -voff, -ioff
-npulses valueNumber of pulses, optional.
-per valuePeriod time, alias -tper
-pw valueWidth of pulse, alias -ton
-td valueTime delay.
-tf valueFall time.
-tr valueRise time.
nameName of the device without first-letter designator V.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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}
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
}

Vpwl [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vpwl

Vsffm [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
constructorConstructor for the class.
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

sffm

constructor [::SpiceGenTcl::Ngspice::Sources::Vsffm]Vsffm, Top, Main, Index

Creates object of class Vsffm that describes single-frequency FM voltage source.

OBJECT constructor name np nm -v0|voff value -va|vamp value -fc|fcar value -mdi value -fs|fsig value ?-phasec value ?-phases value??
Parameters
-ac valueAC value, optional.
-acphase valuePhase of AC signal, optional, requires -ac
-dc valueDC value, optional.
-fc valueCarrier frequency, alias -fcar
-fs valueSignal frequency, alias -fsig
-mdi valueModulation index.
-phasec valueCarrier phase, optional.
-phases valueSignal phase, optional, require -phasec
-v0 valueInitial value, aliases: -voff, -i0, -ioff
-va valuePulsed value, aliases: -vamp, -ia, -iamp
nameName of the device without first-letter designator V.
nmName of node connected to negative pin.
npName of node connected to positive pin.
Description
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}
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
}

Vsin [::SpiceGenTcl::Ngspice::Sources]Top, Main, Index

Method summary
actOnParamSee ::SpiceGenTcl::Device.actOnParam
actOnPinSee ::SpiceGenTcl::Device.actOnPin
checkFloatingPinsSee ::SpiceGenTcl::Device.checkFloatingPins
configureConfigure properties.
genSPICEStringSee ::SpiceGenTcl::Device.genSPICEString
Properties
-nameReadable, writable.
Superclasses

::SpiceGenTcl::Common::Sources::Vsin