Escapement Project

tickwave

Web viewer for mixed-signal captures

tickwave shows a logic or mixed-signal capture inside a web page, beside the text that cites it.

It draws digital channels from their edges and analog channels from their samples, on one time axis. A phrase in the text can name a stretch of the capture: point at it to see that stretch, or click it to open the whole capture there. The Escapement Project's pages show their bench's recordings with it.

Open a recordingSee it in a pageAll docs

A debug probe's first read over SWD. The probe drives the request; the target drives the acknowledge and the data. The clock rate under the trace comes from the capture's own edges. Point at a part to read it. Zoom in with Ctrl or Cmd and the wheel, or a pinch, and drag to move along. Click to open the capture there.

Open the whole capture

Reading a capture

Zoom, measure and place cursors, on one time axis

  • Move and zoom

    Ctrl or Cmd with the wheel, or a pinch, zooms about the pointer. A drag or a sideways swipe moves along the capture. Over an analog channel's scale, the same zooms and moves its values.

  • Read a pulse

    Point at a digital channel for the pulse's width, period, duty and frequency, or at an analog channel for its value.

  • Cursors and spans

    Two clicks place cursors and give the interval between them. A drag selects a span and measures a channel's clock in it.

  • Annotations

    A sidecar names spans and points, shown above the channels. Step through one kind of them, such as every WAIT.

Try them on this capture of an SWD bus, from a mixed-signal analyser's two analog inputs at a billion samples a second. The analyser read each sample as an integer code, and the recording stores those codes. One code step is about 2.5 mV, so a readout stops at the millivolt.

Open the capture in the viewer

Convert

From a Saleae Logic 2 export, a sigrok session or a VCD file

  1. Get the converter

    cargo build --release -p escapement-tickwave-cli

    From tickwave's repository, with a current Rust toolchain. Or convert on the Open page, in your browser, on the same code.

  2. Convert

    tickwave convert sigrok session.sr -o session.tickwave

    A Saleae export and a VCD file convert the same way. It checks what it wrote against the capture, edge by edge.

  3. Describe

    tickwave info session.tickwave

    The recording's length and resolution, its channels and their edges.

Each time is counted in the capture's own ticks, so a recording never shows more resolution than its source had. The converter's doc has every option.

In your page

A capture cited the way a page cites a figure

Each underlined phrase below names a stretch of a real capture. Point at one, or reach it with Tab, to see that stretch. Click it to open the whole capture there.

A logic analyser recorded a debug probe opening an SWD session, at a billion samples a second, so one tick is one nanosecond. The probe starts with a line reset: it holds SWDIO high for 51 clocks. Then it sends the JTAG-to-SWD select sequence and resets the line again.

Its first transfer reads the debug port's ID register. The probe drives the request. The target drives the acknowledge and the data. Later on, the target answers WAIT to a read it isn't ready for.

Here is the whole capture, closed. It says what it holds before any of its data downloads.

identify-swd.tickwave524 ms; 2 channels: SWCLK, SWDIO; 4.6 KiB

How this page does it

The page includes one script, and a stylesheet that lays out the closed capture before the script has loaded. The capture and its sidecar of annotations sit beside them as files.

<script type="module" src="tickwave.js">
</script>
<link rel="stylesheet" href="tickwave.css">

<p>Its first transfer
  <tickwave-ref for="capture"
    annotation="dpidr-read">reads
  the ID register</tickwave-ref>.</p>

<tickwave-view id="capture"
  src="identify-swd.tickwave"
  annotations="identify-swd.annotations.toml">
  <span slot="title">identify-swd.tickwave</span>
  <span slot="facts">524 ms; 2 channels:
    SWCLK, SWDIO; 4.6 KiB</span>
</tickwave-view>

The sidecar is a short TOML file. This entry names a transfer an SWD decoder found, and asks for the clock's rate over it:

[[annotation]]
id = "dpidr-read"
ref = "swd/read/377094557"
label = "Reading the debug port's ID register"
measure = { channel = "SWCLK", what = "rate" }
tickwave-view
A whole recording, shown as its title and a summary until the reader opens it.
tickwave-inset
One annotation's span, magnified, with a reading under it. Point at a part to read it.
tickwave-ref
A phrase that cites an annotation. Pointing at it opens an inset.
tickwave-chart
Measurements against a setting. A point can open the recording behind it.

A reference loads nothing until it scrolls into view. Then it fetches the recording's head and the sidecar, and the data for a stretch arrives when someone points at it. The sidecar's doc lists its fields.

Docs

Written beside the code, in tickwave's repository

Using it
Reading a recording in the viewer, and converting a capture into one, in the browser or on the command line.
In your page
The elements that put a capture in a page's text, and the charts that draw measurements.
The files
The recording format, and the sidecar of annotations that sits beside a recording.