la2vcd: Logic Analyzer to VCD File Converter


la2vcd is a utility to translate waveforms captured with HP and Agilent logic analyzers (e.g., 16500B) to a VCD file for use with a waveform viewer application such as GTKWave.


  ./la2vcd [options] signalfile...


  -ta <timefile>     times from file (mutually exclusive with -td)
  -td <time>         set delta time
  -r <radix>         set radix of next input file
  -b <count>         set bit count of next input file
  -s                 split next input file into individual bits
  -sf <bits> <name>  split a field from the next input file
  -ts <time>         set timescale of VCD file (default 1 ns)
  -mn <modulename>   set module name of signals in VCD file
  -o <vcdfile>       write VCD output to file (default stdout)

Argument syntax:

  <radix> ::= 2 | 8 | 16
  <time> ::= <integer><unit>
  <unit> ::= s|ms|us|ns|ps|fs
  <bits> ::= <bitr>|<bitr>,<bits>
  <bitr> ::= <integer>|<integer>-<integer>

Input file format

HP logic analzyers can provide the captured data in either binary or text format. Depending on the logic analyzer, the data can be transferred to a computer via Ethernet, serial, IEEE-488, or floppy disc.

The binary data format seems to be undocumented and analyzer- dependent, so this program only accepts the text format.

In text format, there is one file for each signal, and optionally a file "time_abs.txt" for timestamps and a file "line_num.txt" for sample numbers. There is also a file "1st_line.txt" which we will ignore.

Each file contains a title on its first line, and one data item on each successive line. For the signals, the data items are the actual sample values. For the timestamps, the date items are floating point numbers representing time in seconds.


  la2vcd -ta time_abs.txt -r 16 -b 9 -sf 8-5 f1 -sf 4-0 f2 input.txt -o out.vcd

time_abs.txt is the timestamp file.

input.txt stores 9 bit wide hexadecimal samples. It will be divided into a four-bit and a five-bit vector, f1 and f2, in out.vcd.


la2vcd is made available under the terms of the Free Software Foundation's General Public License, Version 2.

la2vcd is written in C and should be fairly portable.

Source code is available for download.

la2vcd development uses the Subversion revision control system. Instructions for access to the Subversion repository for la2vcd are found at, and there is a web interface to browse the repository at


VCD (Value Change Dump) file format:

Waveform viewers:

Related web pages

Last updated December 28, 2009

Copyright 2005, 2009 Eric Smith

hacker emblem
Best Viewed With Any Browser Valid HTML 4.01! Valid CSS!

check now

check now