Pattern Generation

The transient `pulse` and `gpulse` functions support a
pattern-specification language borrowed from the pattern source of
HSPICE. This applies only when a period is given so that the source
would provide periodic output. The *pattern_spec* must appear
after the additional delay numbers, if any. The patterning enables
the user to select in which periods a pulse is actually generated, and
applies to all periodic trains if additional delays are given.

The *pattern_spec* consists of one or more ``bstrings'', each of
which can have modifying options.

bdata[r[=rpt]] [rb=bit] ...

The first token is the bstring, which must start with the letter ``b`' (case insensitive) and continues for arbitrary length with 0 and 1
to indicate the presence or absence of a pulse in each period frame,
traversing left to right. Actually, the characters `0,f,F,n,N`
are taken as ``0`', anything else is taken as '`1`'. Note
that the HSPICE `m` (intermediate value) and `z`
(disconnected) are not currently supported.

A bstring can be followed by up to one each of two case-insensitive options.

`r`[`=`*rpt*]

This provides a repetition count. If an integer follows the literal ``r`', it is taken as the repetition count. White space and an equal sign can be included, and will be ignored. If no number is given, 1 is assumed, i.e., the pattern will repeat once. If`r`is not given, there will be no repetition. If the number given is negative, the pattern will continue repeating indefinitely.- rb
`=`*bit*

The*bit*is an integer ranging from 1 to the length of the bstring pattern, and indicates the start point for repetitions, if any. If not given, the effective value is 1, indicating that the entire pattern repeats. An integer must follow`rb`, white space and an equal sign will be ignored. `bprbs`[*N*]

In, the bstring can also specify pseudo-random sequences through the syntax*WRspice*`bprbs`[*N*]. The*N*is an unsigned integer, defaulting to 6 if not given, and clipped to the range 6-12 if not in this range. This is the degree of the pseudo-random sequence, i.e., the sequence length is 2^{N}- 1 . This will accept the`r`and`rb`modifiers, however`rb`is treated a little differently. With this form, it rotates the bit sequence, giving rotated output starting with the first pass. The same degree with different`rb`values produces uncorrelated sequences.

An arbitrary number of bstrings with options can appear in the specification, the result from each bstring with options will be concatenated. If indefinite repetition is specified for a bstring, any bstrings that follow will be ignored.

Example:
`b101101 r=1 rb=2 b000111`

- emit 101101
- repeat once starting at bit 2: 01101
- emit 000111