This function applies only to transient analysis, where time is the running variable. When referring to default values, tstep is the printing increment and tstop is the final time in transient analysis.
The following are the numerical parameters, the pattern_spec is used to specify a patterned pulse train and the syntax will be described separately below.
parameter description default value units v1 initial value volts or amps v2 pulsed value volts or amps td delay time 0.0 seconds tr rise time tstep seconds tf fall time tstep seconds pw pulse width tstep seconds per period tstop seconds
The signal starts at value v1 at time=0. At time td, the pulse begins, the value arriving linearly at v2 after the rise time tr. The value v2 is maintained for the pulse width time pw, then reverts linearly to value v1 over the fall time tf. If a period per is given and nonzero, a periodic train of pulses is produced, starting at td, with the second pulse starting at td+per, etc. The minimum value for per is tr+tf+pw, which is silently enforced.
Numbers td1, td2, etc. following per are taken as additional delay values (similar to td) and a pulse will start at each given value. These will actually be superposed periodic pulse trains if per is nonzero (it must be given in any case when using the additional delays).
A single pulse so specified is described by the following table:
time value 0 v1 td v1 td+tr v2 td+tr+pw v2 td+tr+pw+tf v1 tstop v1
Intermediate points are determined by linear interpolation. It is not an error to omit unused parameters, for example the specification
vxx 3 0 pulse(0 1 2n 2n)describes a voltage which, starting from 0, begins rising at 2 nanoseconds, reaching 1 volt at 4 nanoseconds, and remains at that value.
If this function is used bare and not part of an expression in a voltage or current source, then the general source instance parameters prm1 etc. map as below. It is possible to read and alter these values using the special vector @device[param] construct, or with the alter and sweep commands. However, there is no sanity checking so bad numbers can cause wild behavior or worse.
prm1 v1 prm2 v2 prm3 td prm4 tr prm5 tf prm6 pw prm7 per