Difference between revisions of "TODO"

From sigrok
Jump to navigation Jump to search
m
 
(257 intermediate revisions by 12 users not shown)
Line 1: Line 1:
== sigrok 0.1 release-critical issues ==
== libsigrok ==


sigrok 0.1 comprises only sigrok-cli, i.e. GUI and protocol decoders are '''not''' part of the release.
=== Hardware support ===


* Ensure that segfaults are rare / non-existing in CLI. Use code reviews and valgrind or similar to check.
* Clean up device-specific globals in hardware drivers, to properly permit multiple devices per driver: fx2lafw, zeroplus-logic-cube, others(?)
* Windows port
* Chronovu LA8/LA16 driver: support multiple devices properly (currently only one is supported).
** At least a working sigrok-cli with the demo driver is required.
** Implement anykey.c replacement.
* <s>Update sigrok-cli man page.</s>
** <s>Document --continuous option.</s>
** <s>Document --input-file option.</s>
** <s>Add examples of basic usage with -o samplerate.</s>
* <s>Make sure all output modules handle unknown DF types gracefully (problem in event handlers)</s>
* Temporarily remove non-functional options from CLI
** PDs
** session saving/loading
* <s>cli: pack list of drivers, modules etc into one option which displays all of those. Update manpage accordingly.</s>
* libsigrok, libsigrokdecode: Proper shared libs setup and version numbers to be able to handle API/ABI compatibility issues sanely later.
* Ensure that "make distcheck" works fine, and that you can build sigrok using that generated tarball (i.e. no missing files etc).
* Make sure all output formats work OK and there are no segfaults.
** Test that they're not corrupted by stray errors printed on stdout instead of stderr.
** Test all of the above without SIGROK_DEBUG, with SIGROK_DEBUG=1, and SIGROK_DEBUG=2.
* Make sure all combinations of --enable-*/--disable-* options works for configure.
** There are possible issues if no libusb-device is enabled (e.g. only OLS or only demo).
** There may be issue if none of the drivers is enabled, print useful error in that case(?)
* libsigrok.h/libsigrokdecode.h: Only list public API functions.
** Prefix all public functions with sigrok_ or sigrokdecode_.
** Most functions should return SIGROK_OK or SIGROK_ERR_* (same for LIBSIGROK_OK etc). Some may return a string or NULL upon error, etc.


== sigrok 0.2 features ==
=== Input modules ===


* support OLS file format input and output (https://github.com/jawi/ols/wiki/OLS-data-file-format)
* Add OLS input module support.
* cli: fix save session, implement load session
* Add gnuplot input module support ([[User:Uwe Hermann|Uwe Hermann]]).


== General ==
=== Miscellaneous ===


* sigrok uses uint64_t as an internal datatype to represent a sample, limiting the number of probes on supported hardware to 64. But high-end logic analyzers can have hundreds of probes. A solution would be to switch to either a roll-our-own byte array type, or use [http://gmplib.org/ GMP]. In any case, the overhead of switching over shouldn't be too bad: the filter code and frontend datafeed callback functions will need to use it, but hardware drivers should have enough with a couple of lightweight wrappers.
* Check all public API calls to see whether they need an sr_context parameter.
* sr_errno:
** Most functions should return SR_OK or SR_ERR_* (same for SRD_OK etc).
** Most backend functions return status as an integer, which is SR_OK if all went well, or SR_ERR_* if an error occurred.
** However, there is no way to pass any information back as to what went wrong &mdash; and this is important for user-friendliness.
** Perhaps an error code is not enough; maybe something like sigrok_errno(errorcode, "unsupported device") is better.
* Support specifying the firmware directory at runtime.


== libsigrok ==
== libsigrokdecode ==
 
==== Major features ====
* Fix/workaround libusb 1.0 [[Windows]] port issues:
* Add high-precision timer to runtc
** Device renumeration not yet supported (needed for FX2 based LAs)
* Add annotation mime types
** File descriptor / socket based polling not supported in Windows. Workaround (short-term): Use a thread in sigrok.
* Add annotation metadata (type/value/unit) to allow clients to format the value as the user desires (ASCII/dec/hex/bin/whatever)
* Session loading from file.
* sigrok_errno:
** Most backend functions return status as an integer, which is SIGROK_OK if all went well, or SIGROK_ERR_* and similar if an error occurred.
** However there is no way to pass any information back as to what went wrong &mdash; and this is important for user-friendliness.
** Perhaps an error code is not enough; maybe something like sigrok_errno(errorcode, "unsupported device") is better.
** Both the cmdline and GUI interfaces need this, really, so it should be a backend library thing.
* Make sure all optional components are really optional in the build system:
** Only require Python if the users wants protocol decoders, the rest should also build/compile/run fine without Python installed.
** ...
* Add output for latex package [http://www.ctan.org/tex-archive/graphics/pgf/contrib/tikz-timing tikz-timing]


== Hardware drivers ==
==== Other ====
* Test/implement support for multiple outputs of one PD, and stacking different additional PDs on those outputs.
* Test/implement multiple inputs support.
* Python exception handling in libsrd: add full traceback support with srd_dbg().


* Clean up device-specific globals in hardware drivers, to properly permit multiple devices per driver.
== sigrok-cli ==
**asix-sigma
**demo
**<s>link-mso19</s>
**openbench-logic-sniffer
**saleae-logic
**zeroplus-logic-cube


==== Open-source firmware for the FX2 devices ====
== fx2lafw ==


The Cypress FX2-based devices, such as the Saleae Logic and the USBee SX, use only a minimal vendor-provided firmware. The only thing it really does is set the sample rate and turn on the chip's auto-mode. Nevertheless, the vendors provide the firmware as a binary blob, with no source.
* Analog sampling: 1-channel, 2-channel, voltage meter
* Trigger pin
* Clock input
* Clock output
* Frequency/pulse counter
* Signal generator
* Fix power consumption during enumeration.
** Non-LP FX2's consume more than 100mA during enumeration. This is outside of the USB specification
** Official workaround is to enumerate first as full-speed, then as high-speed. This is overkill for sigrok.
** Investigate putting the CPU to sleep (except for processing interrupts) until enumerated.


It would be great if sigrok could ship with an own firmware implementation for these devices. Some links:
== PulseView ==


* [http://sdcc.sourceforge.net/ SDCC], the Small Devices C Compiler, is a compiler specifically suited to small MCUs, and has support for the 8051 core in the FX2.
* Deduplicate property setting functionality between SamplingBar and DeviceOptions - make SamplingBar a properties container
* [http://allmybrain.com/2008/12/05/an-open-source-library-for-writing-firmware-on-the-cypress-fx2-with-sdcc/ fx2lib] is an open-source library for writing firmware on the FX2. It has a number of interesting functions, including implementing custom USB vendor commands.
* Analog interpolation (cosine? sinc? some kind of interpolation filter?)
* [http://gnuradio.org/ GNU Radio]'s USRP2 board has an FX2 on it, and GNU Radio has extensive custom firmware for it.
* Signal overview
* Transition coding


== Windows installer ==
== sigrok-meter ==


* Add support for downloading/installing the Python Windows installer.
* Make the list of measurements look nicer without using too much additional space.
* Add graphs.
** [http://www.pyqtgraph.org/ PyQtGraph] looks like a nice graphing library.
*** Works with PyQt and PySide.
*** Pure python, easy to install.
*** Few dependencies: '''scipy''' is not required any more in the upcoming version 0.9.9, '''numpy''' is already a dependency of the python bindings.
*** From looking at the examples, it seems more than fast enough for our requirements.
** Pass all samples (not only the most recent one) to the GUI thread and store them there.
*** The packet payload object is currently not thread save.

Latest revision as of 14:11, 19 July 2020

libsigrok

Hardware support

  • Clean up device-specific globals in hardware drivers, to properly permit multiple devices per driver: fx2lafw, zeroplus-logic-cube, others(?)
  • Chronovu LA8/LA16 driver: support multiple devices properly (currently only one is supported).

Input modules

  • Add OLS input module support.
  • Add gnuplot input module support (Uwe Hermann).

Miscellaneous

  • Check all public API calls to see whether they need an sr_context parameter.
  • sr_errno:
    • Most functions should return SR_OK or SR_ERR_* (same for SRD_OK etc).
    • Most backend functions return status as an integer, which is SR_OK if all went well, or SR_ERR_* if an error occurred.
    • However, there is no way to pass any information back as to what went wrong — and this is important for user-friendliness.
    • Perhaps an error code is not enough; maybe something like sigrok_errno(errorcode, "unsupported device") is better.
  • Support specifying the firmware directory at runtime.

libsigrokdecode

Major features

  • Add high-precision timer to runtc
  • Add annotation mime types
  • Add annotation metadata (type/value/unit) to allow clients to format the value as the user desires (ASCII/dec/hex/bin/whatever)

Other

  • Test/implement support for multiple outputs of one PD, and stacking different additional PDs on those outputs.
  • Test/implement multiple inputs support.
  • Python exception handling in libsrd: add full traceback support with srd_dbg().

sigrok-cli

fx2lafw

  • Analog sampling: 1-channel, 2-channel, voltage meter
  • Trigger pin
  • Clock input
  • Clock output
  • Frequency/pulse counter
  • Signal generator
  • Fix power consumption during enumeration.
    • Non-LP FX2's consume more than 100mA during enumeration. This is outside of the USB specification
    • Official workaround is to enumerate first as full-speed, then as high-speed. This is overkill for sigrok.
    • Investigate putting the CPU to sleep (except for processing interrupts) until enumerated.

PulseView

  • Deduplicate property setting functionality between SamplingBar and DeviceOptions - make SamplingBar a properties container
  • Analog interpolation (cosine? sinc? some kind of interpolation filter?)
  • Signal overview
  • Transition coding

sigrok-meter

  • Make the list of measurements look nicer without using too much additional space.
  • Add graphs.
    • PyQtGraph looks like a nice graphing library.
      • Works with PyQt and PySide.
      • Pure python, easy to install.
      • Few dependencies: scipy is not required any more in the upcoming version 0.9.9, numpy is already a dependency of the python bindings.
      • From looking at the examples, it seems more than fast enough for our requirements.
    • Pass all samples (not only the most recent one) to the GUI thread and store them there.
      • The packet payload object is currently not thread save.