New trigger specification

From sigrok
Revision as of 10:51, 6 July 2012 by Bert (talk | contribs) (Created page with "Currently libsigrok supports only a very basic trigger specification. Triggers are expressed as a string, in the format which sigrok-cli supports (it passes it on unchanged to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Currently libsigrok supports only a very basic trigger specification. Triggers are expressed as a string, in the format which sigrok-cli supports (it passes it on unchanged to libsigrok). The format is <probe>=<trigger>, where <probe> is the name of number of the probe and <trigger> can be:

  • 0 or 1: low or high value on the pin. A series of these specifies a sequence of values the probe must match before the trigger is considered to fire.
  • r or f: A rising or falling value on the pin. An r effectively corresponds to 01.
  • c: Any kind of change on a pin (either a rising or a falling edge).

However, there are some problems with this:

  • It's not a very precise specification. For example, there is no way to specify that either this probe should match its trigger, OR another probe should.
  • It's not very expressive, and only allows for very simple triggers to be specified. Some hardware supported by sigrok is capable of much more complex triggering.
  • A text-based specification will only go so far before it becomes more of a problem to parse than the convenience it provides to the CLI frontend.

This page attempts to provide a work document where requirements and design ideas can be gathered before a new trigger specification is implemented in libsigrok.

Requirements

Asix Sigma/Sigma2

The following triggers are supported by the hardware:

  • Defined duration of the condition ("longer than" and/or "shorter than")
  • Sequence of two different conditions
  • 16-bit counter - triggering after N-th occurence of the condition
  • Extensive condition definition options using logical functions (N)AND,(N)OR,(N)XOR
  • Any value or edge on any input condition

Openbench Logic Sniffer