set_pattern_generator

Generate pattern on a single channel

Parameters

integer required
Id of pattern generator to generate pattern on
allowed values:1 to 2
array required
List of pin-pattern mapping, where pin should be a valid pin number and pattern should be a list of Logic high(1) and Logic low(0)
array required
List of pin/bit to override map, where pin should be a valid pin number and override should be a list of Logic high(1) and Logic low(0)
integer
Rate at which the information is transferred.
default: undefined
allowed values:125 to 125e6
integer
Divider to scale down the base frequency of 125 MHz to the tick frequency. For example, a divider of 2 provides a 62.5 MHz tick frequency.
default: undefined
allowed values:1 to 1e6
number
Number of ticks
default: 8
allowed values:1 to 32764
boolean
Repeat forever
default: true
integer
Number of iterations, valid when repeat is set to false
default: 1
allowed values:1 to 8192
boolean
Disable all implicit conversions and coercions.
default: true

NOTE

  • baud_rate and divider are mutually exclusive
  • The pattern is not generated on the Pin unless the state of the pin is set to the corresponding generator, PG1 (or) PG2. Refer set_pin and set_pins.

# Examples

# Sample response

{
    "baud_rate": 10416667,
    "divider": 12,
    "enabled": true,
    "iterations": 1,
    "overrides": ["X", "X", "X", "X", "X", "X", "X", "X",
                  "X", "X", "X", "X", "X", "X", "X", "X"],
    "patterns": "Pin 1, Pin 2, Pin 3, Pin 4, Pin 5, Pin 6, Pin 7, Pin 8, Pin 9, Pin 10, Pin 11, Pin 12, Pin 13, Pin 14, Pin 15, Pin 16\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1\n1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1\n1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n",
    "repeat": true,
    "tick_count": 8
}
1
2
3
4
5
6
7
8
9
10
11