agentsclimarketplace

Agent dsviewer logic analyzer

Skill felixfinal/agent-dsviewer-logic-analyzer

Agent-facing MCP and skills for DSView/sigrok logic analyzer workflows

Install
npx -y skills add felixfinal/agent-dsviewer-logic-analyzer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Top-level agent for USB logic analyzer work using the verified dslogic-cli/libsigrok4DSL native backend. Use for DSLogic/DSView environment setup, device connection, capture (stream+buffer), protocol decode (UART/SPI/I2C), and data interpretation. Use the dsview-logic MCP for hardware operations.

SKILL.md

6.4 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it

Logic Analyzer Agent

Architecture

  • This skill is the single domain entry for local logic analyzer work.
  • Hardware operations go through the dsview-logic MCP (10 tools, all native dslogic-cli → libsigrok4DSL, zero sigrok-cli).
  • Keep judgment here: channel mapping, sample rate adequacy, signal interpretation, capture sufficiency, next-measurement decisions.

MCP Tool Reference

ToolPurpose
logic_analyzer_statusCheck dslogic-cli + libsigrok4DSL readiness (native_ok gate)
logic_analyzer_scanDISABLED — returns error. Use capture directly.
logic_analyzer_list_decodersBuilt-in decoders: uart, spi, i2c
logic_analyzer_captureNative capture to raw .bin (stream + buffer modes)
logic_analyzer_decode_fileDecode raw .bin with built-in SPI/UART/I2C
logic_analyzer_uart_decode_fileUART-specific decode helper
logic_analyzer_dsview_infoDSView GUI version info (GUI-first, not for capture)

Pre-capture checklist

  1. logic_analyzer_status → confirm native_ok is true.
  2. Stop DSView GUI and any stale dslogic-cli process before capture.
  3. Run logic_analyzer_capture directly — open does device init.
  4. No scan step. Never run dslogic-cli scan.

Capture modes

ModeStreamShapeSamplesDurationPayload
Stream 3stream100MHz ×3ch89.5M0.90s{"stream":1,"channel_mode":3,"samplerate":100000000,"channels":3}
Buffer 20buffer100MHz ×16ch16.8M0.17s{"stream":0,"channel_mode":20,"samplerate":100000000,"channels":3}
Buffer 22buffer400MHz ×4ch67.1M0.17s{"stream":0,"channel_mode":22,"samplerate":400000000,"channels":[0,1,2,3]}
Stream 0stream20MHz ×16ch16.8M0.84s{"stream":1,"channel_mode":0,"samplerate":20000000}
Stream 1stream25MHz ×12ch16.8M0.67s{"stream":1,"channel_mode":1,"samplerate":25000000}
Stream 2stream50MHz ×6ch16.8M0.34s{"stream":1,"channel_mode":2,"samplerate":50000000}
Buffer 21buffer200MHz ×8ch16.8M0.08s{"stream":0,"channel_mode":21,"samplerate":200000000}

All output: raw .bin under deliverables/logic-analyzer/.

Backend rules

  • Use native dslogic-clilibsigrok4DSL for all operations.
  • native_ok is the readiness gate.
  • Never mix sigrok-cli and dslogic-cli on the same device.
  • Never run dslogic-cli scan — it bricks the device via firmware upload.
  • Arm FPGA failed → re-run capture, don't touch USB subsystem.
  • Physical replug is absolute last resort only.

Red lines (DO NOT)

  • Run dslogic-cli scan as a standalone CLI command.
  • Create symlinks from FPGA .bin to Cypress .fw.
  • Mix sigrok-cli and dslogic-cli on the same device.
  • Unbind/rebind USB as a routine recovery step.

Capture pitfalls

  • Enable channels BEFORE capture. Without enable <ch> 1, all channels default to disabled, producing all-zero output even with signals connected.
  • Set channel_mode after stream; default stream mode is 0 (20MHz x16ch).
  • Use numeric channel indices: enable 0 1, not enable D0 1.
  • For 3.3V logic, use vth 1.8; vth 3.3 sets threshold at signal rail.
  • The 3ch packing (mode 3) produces samples / 8 × 3 bytes.
  • Stop DSView GUI before CLI capture; only one process owns the USB device.
  • If target MCU is halted by a debugger, resume it before capturing.

Raw 3ch packed binary format

8 samples packed across 3 bytes: Byte0=D0[0..7], Byte1=D1[0..7], Byte2=D2[0..7]. Total bytes = samples × 3 / 8. Native decoder treats 1 byte = 1 sample, so decoded indices are offset. Unpack before precise protocol decode.

Interpretation rules

  • Adjacent edge spacing is half the full period for 50% square waves.
  • Treat captures as snapshots of current wiring only.
  • Prefer a known-good channel as roaming probe when pin labels are ambiguous.
  • For protocol validation: report baud/channel/options, file path, decode results.
  • Report sample rate, mode, byte count, output path for every capture.

Building and installing (one-time setup)

libsigrok4DSL.so

cd /path/to/DSView
SRC="libsigrok4DSL/version.c libsigrok4DSL/strutil.c ..."
COMMON_SRC="common/minizip/zip.c common/minizip/unzip.c common/minizip/ioapi.c common/log/xlog.c"
gcc -shared -fPIC -O2 -std=c99 -I. -Ilibsigrok4DSL -Icommon \
    -DHAVE_CONFIG_H -D_DEFAULT_SOURCE \
    $(pkg-config --cflags glib-2.0) $(pkg-config --cflags libusb-1.0) -I/usr/include/python3.13 \
    -o libsigrok4DSL.so $SRC $COMMON_SRC \
    $(pkg-config --libs glib-2.0) $(pkg-config --libs libusb-1.0) -lz -lpthread -lpython3.13
sudo cp libsigrok4DSL.so /usr/local/lib/ && sudo ldconfig

dslogic-cli + firmware

# Build dslogic-cli from source package
# Install to /usr/local/bin/dslogic-cli

# Copy firmware resources
sudo mkdir -p /opt/dslogic/res
sudo cp /path/to/DSView/DSView/res/* /opt/dslogic/res/

Typical workflows

GPIO validation

  1. logic_analyzer_status → check native_ok
  2. logic_analyzer_capture at conservative rate (e.g. 1MHz, 1k samples)
  3. scripts/capture_verify.py on output

Protocol decode

  1. Capture to raw .bin
  2. logic_analyzer_decode_file with correct decoder + channel mapping
  3. For SPI: verify CLK/MOSI/CS channel assignments
  4. Report decoder, file path, word count, sample decoded words

Wiring reference

DSLogicTargetSignal
GNDGNDcommon ground
D0target outputchannel 0
D1target outputchannel 1
D2target outputchannel 2
D3target outputchannel 3

References

  • references/channel-modes.md — DSLogic Plus mode table, USB bandwidth math
  • references/dsl-driver-internals.md — libsigrok4DSL stream stop, buffer sizing
  • references/stream-overflow-analysis.md — buffer overflow root cause
  • references/dsl-format.md — DSView .dsl archive vs CLI raw binary
  • references/pure-c-decoders.md — native UART/SPI/I2C decoder behavior
  • scripts/capture_verify.py — raw .bin sanity checker

What ships with it: 35 files

197.1 KB alongside SKILL.md, 7 of them executable

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.