Difference between revisions of "Protocol decoders"
(Created page with '* Plugin system for protocol decoding: ** Should support SPI, I2C, RS232/UART, CAN, USB, JTAG, LPC, FWH, various parallel protocols, and many many more. ** Should be easy to add …') |
Uwe Hermann (talk | contribs) (Start a list of specific protocol decoders we (or our users) might want to write later. This list is nowhere near complete.) |
||
Line 1: | Line 1: | ||
== Ideas == | |||
* Plugin system for protocol decoding: | * Plugin system for protocol decoding: | ||
** Should support SPI, I2C, RS232/UART | ** Should support SPI, I2C, RS232/UART and many many more protocols, see below. | ||
** Should be easy to add support for additional/custom protocols, e.g. AT93C46: | ** Should be easy to add support for additional/custom protocols, e.g. AT93C46: | ||
*** CS (chip select) | *** CS (chip select) | ||
Line 20: | Line 22: | ||
**** Results can overlap, as in e.g. "READ address 0x08" and "opcode 10" | **** Results can overlap, as in e.g. "READ address 0x08" and "opcode 10" | ||
* This also opens up the possibility of producing e.g. a protocol analysis report from the main code. | * This also opens up the possibility of producing e.g. a protocol analysis report from the main code. | ||
* All PD plugins written in Python. | * All PD plugins are written in Python. | ||
** We embed a scripting language (Python) for very simple transforms and/or additional display; e.g. 4-bit interface to HD44780 LCD, take two nibbles in sequence, based on clock line, and assemble them into a whole byte. Scripted plugin could do this, then pass the data back to the UI for display. | ** We embed a scripting language (Python) for very simple transforms and/or additional display; e.g. 4-bit interface to HD44780 LCD, take two nibbles in sequence, based on clock line, and assemble them into a whole byte. Scripted plugin could do this, then pass the data back to the UI for display. | ||
Line 26: | Line 28: | ||
The core backend takes a streaming feed from a live aquisition source (or from a saved session). If any PA plugins are configured to act on this source, a pipe is set up to feed this raw data to the embedded Python plugin dispatcher. The dispatcher configures the PD plugins, in order, to write to/read from each other's input and output queues. The dispatcher then starts feeding raw data into the bottom plugin's input queue, and takes output from the top plugin's output queue, which it feeds back to the backend. | The core backend takes a streaming feed from a live aquisition source (or from a saved session). If any PA plugins are configured to act on this source, a pipe is set up to feed this raw data to the embedded Python plugin dispatcher. The dispatcher configures the PD plugins, in order, to write to/read from each other's input and output queues. The dispatcher then starts feeding raw data into the bottom plugin's input queue, and takes output from the top plugin's output queue, which it feeds back to the backend. | ||
== Protocol decoders == | |||
This is a list of ideas for specific protocol decoders we might want to write in the future (or users might want to contribute). | |||
=== Low-level decoders === | |||
Standard protocols that have raw signals/samples as input: | |||
* SPI | |||
* I2C | |||
* USART / RS232 | |||
* CAN | |||
* USB | |||
* JTAG | |||
* LPC | |||
* FWH | |||
* ISA | |||
* PCI | |||
* SMBus | |||
* [http://en.wikipedia.org/wiki/Consumer_IR Consumer IR]: | |||
** Nokia NRC17 | |||
** Sony SIRC | |||
** Philips RC-5 | |||
** Philips RC-6 | |||
** Philips RC-MM | |||
** Philips RECS80 | |||
** ... | |||
* [http://en.wikipedia.org/wiki/Infrared_Data_Association IrDA] | |||
* ... | |||
Custom / application-specific protocols that have raw signals/samples as input: | |||
* Atmel AT93C46 serial EEPROM protocols | |||
* [http://en.wikipedia.org/wiki/HD44780_Character_LCD HD44780 character LCD] protocol | |||
* ... | |||
Non-protocol data analysis decoders / analyzers that have raw signals/samples as input: | |||
* Number of clock cycles / rising-edges / falling-edges / transitions / etc. (total or per-signal) | |||
* Min/Max/Avg distance between two events (rising edge, falling edge, signal lenths, etc.) | |||
* ... | |||
=== High-level decoders === | |||
Protocols that do not have raw signals/samples as input, but rather an already-preprocessed bytestream generated by one of the low-level decoders. | |||
* LCD display protocols over I2C (e.g. [http://www.lcd-module.de/pdf/grafik/ediptft43-a.pdf EA eDIPTFT43-A]) | |||
* LCD display protocols over SPI (e.g. [http://pdf1.alldatasheet.com/datasheet-pdf/view/36922/SAMES/SA8807A.html Sames SA8807A]) | |||
* LCD display protocols over RS232/USART (e.g. TODO) | |||
* I2C-attached ADC control protocol ([http://pdf1.alldatasheet.com/datasheet-pdf/view/318172/AD/AD7291.html Analog Devices AD7291]) | |||
* SPI-attached serial EEPROMs | |||
* ... | |||
Non-protocol data analysis decoders / analyzers: | |||
* How many data bytes are in the data stream? | |||
* What's the min/max/avg data value? | |||
* ... |
Revision as of 16:51, 31 March 2010
Ideas
- Plugin system for protocol decoding:
- Should support SPI, I2C, RS232/UART and many many more protocols, see below.
- Should be easy to add support for additional/custom protocols, e.g. AT93C46:
- CS (chip select)
- SK (clock)
- DI (data from chip to outside)
- DO (data from outside into chip)
- Has start bit, opcodes, data following transmission
- A protocol as simple as this should be doable to implement without code, only the description of the meaning of the various pins.
- PD plugins must be GUI-independent: they must always work on any GUI present in sigrok. The plugin interface must therefore provide hooks for:
- Providing data from core to plugin - stream or dump.
- Sending analysis results back from the plugin, e.g. timestamps or sample IDs with structured results:
- Type:
- Protocol overhead e.g. start bits
- Commands e.g. opcodes
- Command parameters e.g. address following a READ command
- Extracted data
- String to display over the data ("opcode READ")
- Data (e.g. 10) + length in bits (e.g. 2)
- Results can overlap, as in e.g. "READ address 0x08" and "opcode 10"
- Type:
- This also opens up the possibility of producing e.g. a protocol analysis report from the main code.
- All PD plugins are written in Python.
- We embed a scripting language (Python) for very simple transforms and/or additional display; e.g. 4-bit interface to HD44780 LCD, take two nibbles in sequence, based on clock line, and assemble them into a whole byte. Scripted plugin could do this, then pass the data back to the UI for display.
PD plugin infrastructure
The core backend takes a streaming feed from a live aquisition source (or from a saved session). If any PA plugins are configured to act on this source, a pipe is set up to feed this raw data to the embedded Python plugin dispatcher. The dispatcher configures the PD plugins, in order, to write to/read from each other's input and output queues. The dispatcher then starts feeding raw data into the bottom plugin's input queue, and takes output from the top plugin's output queue, which it feeds back to the backend.
Protocol decoders
This is a list of ideas for specific protocol decoders we might want to write in the future (or users might want to contribute).
Low-level decoders
Standard protocols that have raw signals/samples as input:
- SPI
- I2C
- USART / RS232
- CAN
- USB
- JTAG
- LPC
- FWH
- ISA
- PCI
- SMBus
- Consumer IR:
- Nokia NRC17
- Sony SIRC
- Philips RC-5
- Philips RC-6
- Philips RC-MM
- Philips RECS80
- ...
- IrDA
- ...
Custom / application-specific protocols that have raw signals/samples as input:
- Atmel AT93C46 serial EEPROM protocols
- HD44780 character LCD protocol
- ...
Non-protocol data analysis decoders / analyzers that have raw signals/samples as input:
- Number of clock cycles / rising-edges / falling-edges / transitions / etc. (total or per-signal)
- Min/Max/Avg distance between two events (rising edge, falling edge, signal lenths, etc.)
- ...
High-level decoders
Protocols that do not have raw signals/samples as input, but rather an already-preprocessed bytestream generated by one of the low-level decoders.
- LCD display protocols over I2C (e.g. EA eDIPTFT43-A)
- LCD display protocols over SPI (e.g. Sames SA8807A)
- LCD display protocols over RS232/USART (e.g. TODO)
- I2C-attached ADC control protocol (Analog Devices AD7291)
- SPI-attached serial EEPROMs
- ...
Non-protocol data analysis decoders / analyzers:
- How many data bytes are in the data stream?
- What's the min/max/avg data value?
- ...