brainstorm / rigolcsv2vcd

Transforms Rigol's PLA2216 logic analyser probe CSV to VCD format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rigol CSV to VCD converter

This (WIP) crate intends to transform the CSV output from a Rigol PLA2216 logic analyser probe to VCD format.

Quickstart

cargo run --release < data/test1.csv

Data inputs/outputs

From Rigol support:

The instrument is combining LA channels D0-D7 together, so that channel 0 is bit 0 and channel 7 is bit 7, this would be the same for LA channels D8-D15.

So the goal is to convert this string data:

Time(s),D7-D0,D15-D8,t0 = -0.01s, tInc = 1e-09,
-9.999999E-03,0.000000E+00,0.000000E+00,,
-9.999998E-03,0.000000E+00,0.000000E+00,,
(...)

To vectors on the VCD output (not necessarily equivalent to the above CSV, just illustrative):

$timescale 1 ns $end
$scope module top $end
$var wire 16 # data $end
$upscope $end
$enddefinitions $end
$dumpvars
b0000000000000000 #
$end
#9999995
b0000000000000001 #
#9999996
b0000000000000010 #
#9999997
b0000000000000011 #
#9999998
b0000000000000000 #
#9999999

Current status

How it started (Rigol oscilloscope screenshot):

Rigol oscilloscope 100Hz/200Hz baseline signal gen

Hot it's going (VCDs converted from CSV at different timescales):

Gtkwave reading VCD output 1 Gtkwave reading VCD output 2

As one can see, there's still some bugs to iron out (or report upstream).

About

Transforms Rigol's PLA2216 logic analyser probe CSV to VCD format


Languages

Language:Rust 100.0%