summaryrefslogtreecommitdiff
path: root/decoders/timing/pd.py
AgeCommit message (Collapse)Author
2020-07-07timing: user selected scale and sample count for terse displayGerhard Sittig
Optionally let users pick the scale for terse timing annotation text. Which potentially makes numbers show up earlier (at zoom levels of a further distance). And drops the unit to present mere numbers, which could speed up navigation during inspection. Keep providing automatic scaling which then includes the unit text, as it did before. Extend the automatic scaling to include picoseconds. Which avoids the fallback to unit-less floating point with uncertain decimals when the samplerate was 1GHz or higher. Optionally present distances in terms of sample counts. This supports decoder development, and can help users spot and judge glitches. All "terse" presentation so far exclusively affects the 'time' row. It remains an option for later to migrate averages and deltas as well. For now it's assumed that high(er) precision and fine grained details are more important for these rows.
2020-07-07timing: break long options lines, rename samples identifierGerhard Sittig
Break text lines in the options declarations which have become rather long. Rename 'samples' in the main loop to just 'sa', which better matches the other 'ss', 'es', 't', etc identifers. Separate the code for unconditional 'time' classes from optional averaging and deltas.
2020-07-07timing: only queue when averaging, rephrase put callsGerhard Sittig
Reduce the amount of work which the timing decoder needs to do. Only keep the deque() filled when averaging is active. Rephrase .put() calls to reduce text line lengths (and for consistency with a pending change). Move another options lookup for deltas out of the main loop.
2020-07-07timing: optional terse format for timing annoationsGerhard Sittig
In some situations (inspecting a dense run of pulses in a burst of data communication) it takes a lot of zooming before the 'timing' decoder's 'time' annotations start revealing numbers. Which limits the number of pulses which can fit in the visible trace area. This is a stab at improving the usability of the timing decoder for similar "crowded pulses" scenarios. Try to come up with an annotation text that is shorter yet communicates the very details which the user needs in this situation. Drop the frequency, avoid umlauts in the unit text, don't use decimal places (use all integers within a scale). Even offer to drop the unit text, assuming that a dense run of pulses results in all times sharing their scale. Make the terse presentation optional and off by default, and use a separate annotation class for maximum backwards compatibility.
2020-07-07timing: use ss/es for consistencyGerhard Sittig
Consistently use ss and es identifiers for annotation emission to match other decoders, as well as counting distances between sample points to increase readability. This also dramatically reduces text line length.
2020-07-07timing: reduce "state", most action is local to .decode()Gerhard Sittig
Reduce the number of self members, use local variables instead for data which is strictly kept within a method and need not remain across calls. Move options dictionary lookups out of the main loop, as the previous implementation already did with 'edge'.
2020-07-07timing: eliminate magic numbers, remove unused variablesGerhard Sittig
Use symbolic identifiers for pin numbers and annotation classes. Remove unused variables.
2020-01-01All PDs: Consistently use singular/plural for annotation classes/rows.Uwe Hermann
2019-04-02decoders: Fix incorrect 'outputs' fields.Uwe Hermann
Only add items to 'outputs' if the respective PD actually has OUTPUT_PYTHON support implemented as of right now. Various decoders might get OUTPUT_PYTHON support later, but the 'outputs' field should reflect the current status.
2019-03-15decoders: Add/update tags for each PD.Uwe Hermann
2019-03-13Add PD tags handling and some tagsSoeren Apel
2017-12-22all decoders: introduce a reset() methodGerhard Sittig
Move initialization code of protocol decoders from the constructor to a new reset() helper method. The libsigrokdecode backend could run this method several times to clear the decoder's internal state, before new data from another acquisition gets fed to decode() calls.
2017-06-05Add srd_inst_initial_pins_set_all() and support code.Uwe Hermann
This allows frontends to set the assumed initial pins (i.e., the assumed state of the pins before the first sample of a capture) to user-specified values. The assumed initial pins can be either low, or high, or "use same value as the first sample of the capture". The special self.initial_pins decoder attribute is now removed.
2017-05-13timing: Drop obsolete self.oldpin variable.Uwe Hermann
2017-05-13timing: "normalize" negative times tooKarl Palsson
Use the same scale. Signed-off-by: Karl Palsson <karlp@etactica.com>
2017-05-13timing: add edge-edge mode and delta calculationKarl Palsson
Instead of only measuring the timing from any edge to any edge, provide a mode to measure the times from falling->falling and rising->rising edges. This works better to monitor timing of an IRQ pin for instance, that drives one direction under hardware, and is only cleared by software reading a value. Include time delta measurements as an optional annotation to help track jitter in measurements. Signed-off-by: Karl Palsson <karlp@etactica.com>
2017-05-13timing: disable averaging if set to zeroKarl Palsson
The extra row of the average isn't always useful. Allow it to be disabled by setting the average window to zero. Signed-off-by: Karl Palsson <karlp@etactica.com>
2017-01-07license: remove FSF postal address from boiler plate license textGerhard Sittig
Remove the FSF postal address as it might change (it did in the past). Reference the gnu.org website instead which is more stable.
2016-12-07timing: Convert to PD API version 3.Uwe Hermann
2016-06-28timing: Add frequency and averaging support.Uwe Hermann
This patch was contributed by James Sleeman <james@gogo.co.nz>, thanks!
2016-05-15Use consistent __init__() format across all PDs.Uwe Hermann
The previous **kwargs some PDs had is not actually ever used, so drop it.
2016-04-20timing: Use self.samplenum for consistency across PDs.Uwe Hermann
2015-04-26timing: Shorten annotations (time units).Uwe Hermann
2015-04-26Add a decoder that calculates timings between transitions.Baruch Even