Difference between revisions of "TODO"

From sigrok
Jump to navigation Jump to search
(manpages are added, need some more work though. Random other fixes.)
m
 
(295 intermediate revisions by 15 users not shown)
Line 1: Line 1:
This is a random list of TODO items for the code and/or ideas for improvements.
== General ==
* Remove dependency on glib and gmodule (various reasons), at least in libsigrok, probably also in sigrok-cli.
** A new linked list implementation must be found, or written, that duplicates the important parts of glib's GSList (singly-linked list).
== libsigrok ==
== libsigrok ==


* Test whether the libusb 1.0 [[Windows]] port works (seems to build fine using MinGW).
=== Hardware support ===
* Merge all header files in a single '''sigrok.h''' (possibly another '''sigrok-internal.h''' which is not visible to the lib users).
* Session loading from file.
* sigrok_errno:
** Most backend functions return status as an integer, which is SIGROK_OK if all went well, or SIGROK_NOK and similar 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.
** Both the cmdline and GUI interfaces need this, really, so it should be a backend library thing.


== libsigrokdecode ==
* 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).


* Keep this independent of libsigrok and any logic analyzer hardware. It should work purely on streams / buffers of bytes to be usable by other projects.
=== Input modules ===


== Hardware drivers ==
* Add OLS input module support.
* Add gnuplot input module support ([[User:Uwe Hermann|Uwe Hermann]]).


* Bus/driver-independent device instance struct, to replace usb_device_instance and serial_device_instance. Once this is done, device instance-specific information can be cleanly separated and tacked on to the generic device instance:
=== Miscellaneous ===
** Clean up device-specific globals in hardware drivers, to properly permit multiple devices per driver.
** Vendor/model/version scheme in hardware drivers.


==== Demo driver ====
* 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.


It would be good if sigrok would ship with a built-in driver that always works, regardless of hardware connected. This driver would be configurable to provide a clock on a virtual pin, with configurable frequency. It could support multiple of these, at different frequencies.
== 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)


In addition to giving anyone something to do with sigrok to try it out, this may also have some use cases outside of this: perhaps as a reference clock, next to a live capture.
==== 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().


Since this driver only needs to change to 0/1 at a configurable interval, and the interval is exactly the same as the count of the samples in the datafeed it outputs, the signal it generates would thus be 100% perfect, making it an interesting reference.
== sigrok-cli ==
 
==== Open-source firmware for the FX2 devices ====
 
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.


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


* [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.
* Analog sampling: 1-channel, 2-channel, voltage meter
* [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.
* Trigger pin
* [http://gnuradio.org/ GNU Radio]'s USRP2 board has an FX2 on it, and GNU Radio has extensive custom firmware for it.
* Clock input
 
* Clock output
== sigrok-cli ==
* 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.


== sigrok-gui ==
== PulseView ==


== Decoders ==
* 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


== Code quality and build ==
== sigrok-meter ==


* Consistently use 'samplerate' instead of 'rate'.
* Make the list of measurements look nicer without using too much additional space.
* Consistently use uint64_t for large data types such as samplerate, number of samples, etc.
* 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 13: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.