Product Documentation
Spectre FX Circuit Simulator User Guide
Product Version 23.1, September 2023

.pat

Vxx n1 n2 PAT (vhigh vlow td tr tf tsample pat_name [RB=val] [R=val])
Ixx n1 n2 PAT (ihigh ilow td tr tf tsample pat_name [RB=val] [R=val])
.PAT pat_name=data [RB=val] [R=val]

Description

Defines a time-varying pattern that can be used in independent voltage or current sources. The patterns are used to specify digital bit strings. The parameter data, which is a string that consists of characters 1, 0, m, and z, must always be specified. For example, data = "1011mz11". The patterns can be embedded within another pattern.

Arguments

Name Description

vhigh

High voltage for pattern voltage sources (unit: Volts).

ihigh

High current for pattern current sources (unit: Amps).

vlow

Low voltage for pattern voltage sources (unit: Volts).

ilow

Low current for pattern current sources (unit: Amps).

td

Delay time of pattern sources (unit: seconds).

tr

Time of rising edge from low value to high value (unit: seconds).

tf

Time of falling edge from high value to low value (unit: seconds).

tsample

Time spent in one bit of pattern. For high value, it contains the tr time. For low value, it contains the tf time. (unit: seconds).

pat_name

The pattern defined in the .pat statement. The following four values are supported in the string:

  • 1: High voltage for voltage sources or high current for current sources.
  • 0: Low voltage for voltage sources or low current for current sources.
  • m: the middle voltage, (vhigh+vlow)/2, or the middle current, (ihigh+ilow)/2.
  • z: HighZ state for the pattern sources.

RB=val

The position of the bit that is used as the starting bit while repeating the string. The string is repeated from the bit specified using this parameter till the last bit present in the string. The parameter should be an integer greater than 1. It can go up to the length of the bit string. The default value is 1.

R=val

The number of times the string is to be repeated. The output maintains the state of the last bit after the last repeat. The parameter should be a non-negative integer. The default value is 0.

Examples

In the following example, pattern p1 is embedded within another pattern p2:

vin in gnd PAT ('vccr' 0 1n 2n 5u 10u p2)
.pat p1=b110m00 rb=3 r=1
.pat p2=[b1z p1 z0] rb=1 r=2

The data of p2 appears as follows:

In the following example, the pattern of voltage source vin_2 is the same as vin in the first example:

vin_2 in_2 gnd PAT ('vccr' 0 1n 2n 5u 10u [b1z p1 z0] rb=1 r=2)
.pat p1=b110m00 rb=3 r=1

Return to top
 ⠀
X