Difference between revisions of "TODO"
Jump to navigation
Jump to search
Uwe Hermann (talk | contribs) m (→at 28c3) |
Uwe Hermann (talk | contribs) m |
||
Line 15: | Line 15: | ||
** Processing raw logic vs. everything else up the stack | ** Processing raw logic vs. everything else up the stack | ||
** (Optionally) deliver pre-sampled by clock or rate? Filter? Or provide a method (written in C) in the sigrok Python class which does this for a decoder, if it wants? | ** (Optionally) deliver pre-sampled by clock or rate? Filter? Or provide a method (written in C) in the sigrok Python class which does this for a decoder, if it wants? | ||
* Other PD issues: | |||
** Many decoders can output data in various formats (ASCII, hex, BCD, MSB-first vs. LSB-first and many more). In addition, in some decoders there can be various fields which contain data of various lengths (6bits, 8bits, 9bits, 32bits, other). Each of these fields can have a different "sane" default display format (BCD for e.g. "minutes" data coming from an RTC, hex for device ID of an SPI flash chip, ASCII for UART data that is human-readable, and many many more). Should the decoder data output format(s) be decoder options or a GUI/frontend features? | |||
*** Decoder option: | |||
**** Pro: Only the decoder itself knows which fields mean what, which "sane"/"native" display format makes sense for each field of data. | |||
**** Con: Requires a full (or partial) re-decode if the GUI wants to switch from ASCII to hex for example. | |||
*** Frontend feature: | |||
**** Con: Every frontend needs to re-implement this feature. | |||
**** Con: GUI needs inside knowlegde and special-casing for every PD (very bad!). | |||
*** Both: | |||
**** Every decoder has its own options to control the display format of data; additionally, the GUI can | |||
*** Other: | |||
**** Always pass the raw data as integer value (up to 64 bits, but what if a decoder needs bigger structures? pass a list? tuples? other?); In addition the decoder also passes another data field for each integer value, which is a string containing the same value in the user-configured output format. | |||
== sigrok 0.3 == | == sigrok 0.3 == |
Revision as of 12:12, 18 December 2011
At 28C3
- The great time/duration vs. range argument:
- Specify ranges as (start, stop) or (start, length)?
- Specify ranges in number of samples or in picoseconds, or both?
- PD API: finalize naming convention
- ANT8/18e unified driver
- libsigrokdecode logging framework
- PD performance:
- How to pass (and what exactly, and in which format) samples and already decoded protocol packets
- From C to Python (i.e. from libsigrokdecode/controller to the lowest-level decoder)
- From Python to Python (i.e., from one decoder to the next in the stack)
- From Python to C (i.e., from a decoder back to libsigrokdecode, which then hands it over to the CLI/GUI, which write it to file or display it in the GUI).
- Various options: TODO
- Processing raw logic vs. everything else up the stack
- (Optionally) deliver pre-sampled by clock or rate? Filter? Or provide a method (written in C) in the sigrok Python class which does this for a decoder, if it wants?
- How to pass (and what exactly, and in which format) samples and already decoded protocol packets
- Other PD issues:
- Many decoders can output data in various formats (ASCII, hex, BCD, MSB-first vs. LSB-first and many more). In addition, in some decoders there can be various fields which contain data of various lengths (6bits, 8bits, 9bits, 32bits, other). Each of these fields can have a different "sane" default display format (BCD for e.g. "minutes" data coming from an RTC, hex for device ID of an SPI flash chip, ASCII for UART data that is human-readable, and many many more). Should the decoder data output format(s) be decoder options or a GUI/frontend features?
- Decoder option:
- Pro: Only the decoder itself knows which fields mean what, which "sane"/"native" display format makes sense for each field of data.
- Con: Requires a full (or partial) re-decode if the GUI wants to switch from ASCII to hex for example.
- Frontend feature:
- Con: Every frontend needs to re-implement this feature.
- Con: GUI needs inside knowlegde and special-casing for every PD (very bad!).
- Both:
- Every decoder has its own options to control the display format of data; additionally, the GUI can
- Other:
- Always pass the raw data as integer value (up to 64 bits, but what if a decoder needs bigger structures? pass a list? tuples? other?); In addition the decoder also passes another data field for each integer value, which is a string containing the same value in the user-configured output format.
- Decoder option:
- Many decoders can output data in various formats (ASCII, hex, BCD, MSB-first vs. LSB-first and many more). In addition, in some decoders there can be various fields which contain data of various lengths (6bits, 8bits, 9bits, 32bits, other). Each of these fields can have a different "sane" default display format (BCD for e.g. "minutes" data coming from an RTC, hex for device ID of an SPI flash chip, ASCII for UART data that is human-readable, and many many more). Should the decoder data output format(s) be decoder options or a GUI/frontend features?
sigrok 0.3
- Get rid of the use of manual polling of FDs, which is not portable (doesn't work on Windows). Use g_poll() instead (which spawns a new thread on Windows).
Mac OS X: B460800 is not available it seems. Find the correct header (if any) and/or find a (possibly platform-specific) workaround, or drop this on Mac OS X.- Add a --start-sampling (TODO: Better name?) option, which just starts sampling with the supplied or default samplerate. Contrary to --time or --samples you don't need to explicitly specify a duration or number of samples here, that's automatically determined by the available memory of the logic analyzer and the selected samplerate.
- TODO: Similar to --continuous? Merge both?
Make sure all combinations of --enable-*/--disable-* options works for configure.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.
- Windows port:
- Implement anykey.c replacement.
- hex output: Not all lines/columns are of the same length (as they are with real LAs).
- VCD: All samplenumbers are 0 (instead of the proper samplecount).
- OLS, gnuplot: Hangs on MinGW for some reasons (not sure if related).
Finish protocol decoder API design.- CLI/libsigrok: Eliminate all printing to stdout, only sample data or decoder output should end up there. Error/debug messages should go to stderr always.
- Also, libsigrok should never print anything directly via (f)printf or similar, only via sr_info()/sr_err()/sr_dbg().
- MinGW: Fix Python path decoder issues due to Windows vs. Linux path specification.
- Run the code receiving the samples as quickly as possible, run output format code and other non-timing-critical stuff (protocol decoders) in an extra thread. The problem is nicely visible with FX2-based logic analyzers, the longer an output format takes to produce its output, the better your chances to get "oops, I just lost samples" errors.
- Hardware drivers: Make specification of triggering capabilities more detailed, so that frontends/GUIs can auto-generate GUI forms out of that metadata.
sigrok 0.4
- stackable protocol decoder implementation
- modular filter system
- take arguments in the regular thing:key=value format
- integrate current probe compression filter
- resampling module: sample up/down based on factor argument
- noise filter: filter out pulses shorter than the samplerate's period
Before 1.0
- all output modules should use GString API instead of estimating output size
- VCD input modules
- OLS format input module
Future
- udev:
- Make udev optional, only build MSO driver if it's available
- have OLS driver use udev if available, fall back to serial port probing otherwise
- Find alternative to udev for windows and macos
- Fix/workaround libusb 1.0 Windows port issues:
- Device renumeration not yet supported (needed for FX2 based LAs)
- File descriptor / socket based polling not supported in Windows. Workaround (short-term): Use a thread in sigrok.
- 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.
- 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 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.
- 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_* 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.
- Clean up device-specific globals in hardware drivers, to properly permit multiple devices per driver:
asix-sigma,demo(not relevant),link-mso19,openbench-logic-sniffer, saleae-logic, zeroplus-logic-cube - Python bindings for libsigrok and libsigrokdecode.
Contributors wanted
- Add output for latex package tikz-timing.
- Add output for browser waveform viewer/editor written in javascript/JSON called WaveDrom.
- Linux distro packages for non-Debian distros.
- FreeBSD packages/ports.
- 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:
- SDCC, the Small Devices C Compiler, is a compiler specifically suited to small MCUs, and has support for the 8051 core in the FX2.
- 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.
- GNU Radio's USRP2 board has an FX2 on it, and GNU Radio has extensive custom firmware for it.