项目作者: psurply

项目描述 :
A simple digital waveform viewer with vi-like key bindings.
高级语言: Rust
项目地址: git://github.com/psurply/dwfv.git
创建时间: 2018-04-02T13:07:19Z
项目社区:https://github.com/psurply/dwfv

开源协议:MIT License

下载


DWFV

CI
Crates.io
Docs Status

A simple digital waveform viewer with vi-like key bindings.

  1. $ dwfv sample.vcd

screenshot

The tool takes a Value Change Dump (VCD) file (as defined by IEEE Standard
1364-1995) as input and displays the waveforms using
tui-rs.

The backend API which facilitates the manipulation of digital signals in Rust
is also exposed and can be used independently of the TUI.

Installation

  1. $ cargo install dwfv

From sources:

  1. $ cargo install --path .

Key Bindings

Global

  • q: quit

Cursor movement

  • h/Left: move cursor left
  • j/Down: move cursor down
  • k/Up: move cursor up
  • l/Right: move cursor right
  • w: jump forward to the next rising edge
  • e: jump forward to the next falling edge
  • b: jump backward to the previous rising edge
  • 0: jump to timestamp 0
  • ^/Home: jump to the first event
  • $/End: jump to the last event
  • gg: jump to first signal
  • G: jump to last signal

Frame

  • zi/+: zoom in
  • zo/-: zoom out
  • zc/=: zoom fit
  • zz: center cursor on screen

Editing

  • o: edit layout
  • dd/Delete: delete the selected signal
  • yy: copy the selected signal
  • p: paste the clipboard after cursor
  • P: paste the clipboard before cursor
  • u: undo
  • r: redo
  • c: show clipboard
  • f: search for event in the selected signal
  • /: search for pattern in the signal’s names
  • n: repeat search forward
  • N: repeat search backward

Visual mode

  • v: start visual mode
  • <enter>: zoom fit the selected time frame

Mouse

  • Left click: move cursor
  • Right click: zoom out
  • Wheel up: zoom in
  • Wheel down: zoom out
  • Hold/release left click: zoom fit the selected time frame

Command-Line Interface

Show some stats about the VCD file

  1. $ dwfv examples/sample.vcd --stats
  2. test
  3. ! (value) - width: 8, edges: 37, from: 0s, to: 1010s
  4. " (clk) - width: 1, edges: 102, from: 0s, to: 1010s
  5. # (reset) - width: 1, edges: 5, from: 0s, to: 620s
  6. c1
  7. " (clk) - width: 1, edges: 102, from: 0s, to: 1010s
  8. # (reset) - width: 1, edges: 5, from: 0s, to: 620s
  9. $ (out) - width: 8, edges: 37, from: 0s, to: 1010s

Display values of the signals at a given time

  1. $ dwfv sample.vcd --at 1337
  2. test
  3. ! (value) = h14
  4. " (clk) -> h1
  5. # (reset) = h0
  6. c1
  7. " (clk) -> h1
  8. # (reset) = h0
  9. $ (out) = h14

Search in the waveforms

Events in the waveforms can be searched using the ‘—when’ option. Examples:

  • Searching when the value signal is equal to 2:
  1. $ dwfv sample.vcd --when '$! = 2'
  2. 310s-330s
  3. 650s-670s
  4. $ dwfv sample.vcd --when '$! equals h2'
  5. 310s-330s
  6. 650s-670s
  • Searching when the value signal transitions to 4:
  1. $ dwfv sample.vcd --when '$! <- 4'
  2. 350s
  3. 690s
  4. $ dwfv sample.vcd --when '$! becomes b100'
  5. 350s
  6. 690s
  • Searching when the value signal transitions to 4 after 400s:
  1. $ dwfv sample.vcd --when '$! <- 4 and after 400'
  2. 690s
  • Searching when the value signal transitions to 4 before 400s:
  1. $ dwfv sample.vcd --when '$! <- 4 and before 400'
  2. 350s

LICENSE

MIT