Sunday, December 22, 2024

GTKWave: Look At Your Waveforms, Openly

- Advertisement -

That opening line aside, this article is less about the pun and more about the information. If you are finding yourself on the search for a waveform viewer, then you are at the right page. In this article we cover a solution for the same.

GTKWave, developed by Tony Bybell, is a cross-platform waveform viewer that reads Verilog VHDL files and displays their forms. Though initially developed for Linux, it now operates on Microsoft Windows as well as Apple Mac OS X. As far as open source alternatives for waveform viewing go, it is the only software that runs on all three major operating systems.

GTKWave has been developed to handle debugging of large systems on chips (SoCs), as it is run on a workstation with sufficient amount of physical memory to handle the task. Commonly-used file formats like LXT2 and VZT have been developed to handle real-world designs, whereas formats like AET2 and FST have been designed to handle extremely-large designs.

- Advertisement -

Components of GTKWave

GTKWave tool has two separate but interlocking tools, that is, gtkwave viewer and rtlbrowse. There are a bunch of applications under the hood that assist in the working while working themselves under independent situations.

gtkwave is the name of the primary tool under use, which helps with all major visualisations. If a full simulation dump is input, then it can help in data visualisation of analogue and digital data, while allowing for search operations, temporal manipulations and save partial results. For hard copies, you can export the results in PostScript and FrameMaker output.

rtlbrowse is used to view and navigate through RTL source code that has been passed and processed into a stems file by vermin—another helper application. It allows for viewing of RTL at file and module levels. To annotate the code at this level, invoke it by gtkwave. Functions like file conversion, RTL parsing and other data-manipulation operations are performed by the aforementioned helper applications.

GTKWave running under Linux
Fig. 1: GTKWave running under Linux

Multiple signal processing

GTKWave is designed to process a host of signals at once. As such, it is home to three different signal-searching modes, namely, signal search, hierarchy and tree.

Signal search.

In this mode, the search requester accepts a search string as a regular expression. If a signal is found matching the string, it is listed in Matches section. These can be controlled and manipulated by either dragging one or more into gtkwave viewer. After selecting, there are options to append, replace or insert, as required.

Hierarchy search.

Hierarchy search, as the name suggests, provides a view of the hierarchy in a format similar to the current working directory. In essence, it is the same as the file explorer for any operating system. It contains the current hierarchy as well as the children box, which contains all signals in the immediate hierarchy below the searched parent term. In this format, in order to append, replace or insert, you need to select individual ones, otherwise the selected parent and children will be acted upon.

Tree search.

This is the most used search requester, as it can be directly embedded onto GTKWave versions 2.4 and above. It has a top tree selection box, signals box and POSIX regular expression filter. The filter allows you to filter a specific sect of signals that you might want to investigate further. If, for example, you are working on a synthesised netlist, then you will find that this tree-searching feature helps you filter signal names at the highest level, saving you a lot of time.

Why you should go for GTKWave

GTKWave has provisions in its code for remote control by other applications. This can be enabled because of the availability of TCL scripting and call-back capability.

GTKWave on Mac OSX
Fig. 2: Demonstrating application integration with Mac OSX/Quartz

Another important feature is called TwinWave, which is a GTKPlug helping you manage two or more sessions of GTKWave in either a single window or in two separate windows. Scrolling and other GUI manipulations can be performed in lockstep across both sessions.

GTKWave running under Windows
Fig. 3: GTKWave running under Windows

Traditionally, in integrated circuit design, waveform viewers are typically used in conjunction with a simulator. Not only does this help in individual assessment of signals but it also shows the effect of signals interacting with each other in the circuit. In the industry, though, operation is not as dynamic, as engineers run batches of simulations including all possible sets before running the waveforms to check for consistency. Value change dump (VCD) is the most preferred format for saving simulation dump files, while some companies have their own proprietary formats that include extra details depending on the developer.

Types of searches in GTKWave
Fig. 4: Types of searches

Techniques like named pipes and shared memory proxies are used to facilitate the same. It allows you to navigate the dump as it is being written to the pipe and watch the simulation in real time. GTKPlug mechanism further allows you to integrate the viewer with other simulators in order to provide an interactive environment, all in one window.

Curiously enough, GTKWave is the only open source waveform viewer that supports post-mortem viewing as well as interactive viewing of VCD files. Presence of this feature allows you to write the output of a simulator and then feed the same to the waveform viewer.


Ashwin Gopinath is an engineer who enjoys following innovators, Arduinos and migratory birds

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics