This file documents the Dinotrace package for viewing signal waveforms.

Copyright 1998-2011 by Wilson Snyder. wsnyder@wsnyder.org

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the author.

This file documents the Dinotrace package for signal waveform tracing. This is edition 9.4c, for Dinotrace version 9.4c.

For the latest version, please see http://www.veripool.org/dinotrace

Please feel free to send comments and suggestions to wsnyder@wsnyder.org.  If you install this tool, please also send mail so that I can inform you of new releases.

Summary
*******

Dinotrace is a tool designed to aid in viewing Verilog Value Change Dump, ASCII, Verilator, Tempest CCLI, COSMOS, Chango and Decsim Binary simulation traces.  It is optimized for rapid design debugging using X-Windows Mosaic.  A special interface allows signal information to be annotated into source code using Emacs.

Please see the file INSTALL in the distribution directory for installation instructions.

Copying
=======

Dinotrace is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Dinotrace is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Dinotrace; see the file COPYING.  If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

History
*******

Dinotrace was conceived in the early 1980's by Allen Gallotta at Digital Equipment Corporation, who wrote the code and supported it through version 4.2.  When created, it was the first graphical display tool for the simulators being designed at Digital.

In 1992 I joined Digital Semiconductor (a division of Digital Equipment Corporation) and took over the support of Dinotrace.  I converted it from Digital's X toolkit to Motif, added color, highlighting, searching, and other features.  Several formats were added to Dinotrace to support Verilator, our group's own Verilog to C translator, written by Paul Wasson.  As the years went on, other groups started using the typical industry standard Verilog simulators.  Although programs like vwaves were available, they had some silly limitations.  Besides, we were hooked on Dinotrace, so I added Verilog format, and Dinotrace lived on.

In 1998 I moved to Maker Communications, where I am currently employed. Life, however, was sad and incomplete without Dinotrace.  Through the efforts of existing DECies, mainly Duane Galbi, Digital graciously agreed to release the source code.  (Subject to the code not being resold, which is compatible with the GNU Public License.)

Still at Maker Communications, life is now complete as Dinotrace can be shared by all.  This release is based upon the Digital version, with many enhancements, most notably portability improvements and true 4-state signal support.

Contributors
============

Many people have provided ideas and other assistance with Dinotrace.

The major corporate sponsors of Dinotrace, by providing funds or equipment grants, are Compaq Corporation, Digital Equipment Corporation, Intel Corporation, and Maker Communications.

The people who have contributed code or other major functionality are Allen Gallotta, Steve Hoover, Nathan Hughes, and Craig Ziegler.

Some of the people who have provided ideas and feedback for Dinotrace include Edward Arthur, Sally Barry, Josh Belkin, Yifat Ben-Shachar, Lee Bradshaw, Rachel Berman, Sass Berman, Mike Blake, Serge Bogdanov, Ronen Boneh, Gregg Bouchard, Derek Bosch, Bill Bruce, Lauren Carlson, Paul Chan, Ta-Chung Chang, David Chen, Dave Colson, Derrick Dacosta, Erik Debriae, Paul Dormitzer, Duane Galbi, Allen Gallotta, Steve Glaser, Mike Goulet, Larry Gust, Larry Herman, Dave Horan, Steve Hoover, Nathan Hughes, Tom Hunt, Tracey Jones, Mike Kagen, Dan Katz, Sol Katzman, Steve Kolecki, Steve Lang, Charlie Lind, Greg Loxtercamp, Dan Lussier, Ben Marshall, Bob McNamara, Harunobu Miyashita, John Murphy, Aki Niimura, Lisa Noack, Mitch Norcross, Michael Quadri, Reinhard Schumann, Simcha, Jai Singh, Dean Sovie, Julie Staraitis, Dominik Strasser, Bob Walsh, Paul Wasson, Steve Wilson, Bob Yodlowski, and Craig Ziegler.

Invoking Dinotrace
******************

Dinotrace accepts switches and filenames on the command line.  Any filenames on the command line will be read in before Dinotrace gives control to the user.

Dinotrace accepts switches with leading -, and everything else is a trace filename.  Filenames are in standard Unix format, with a optional .gz or .Z extension to indicate the trace should be piped before opening through gunzip or uncompress respectively.

These switches are supported, in addition to the standard X-11 switches, like -display.

-verilog

     Read following trace filenames using Verilog format.  This is the default format.

-vpd

     Read following trace filenames using Verilog Plus Dump format.

-decsim

     Read following trace filenames using Decsim format.  If running on a VMS system, Decsim Binary format is also supported.

-tempest

     Read following trace filenames using Tempest/CCLI format.

-noconfig

     Skip reading the standard global, user, and directory .dino files. Do read any trace-specific .dino files.

-geometry GEOMETRY

     Specifies the window size and position in standard X format (WIDTHXHEIGHT+XPOS+YPOS).

-res RESOLUTION

     Specify the trace resolution.

Screen Description
******************

This chapter describes the layout of the screen, and the function of the various widget and menu items.

Window Widgets
==============

The main window is broken into the display area, with signal names on the left and values stretching to the vertical scroll bar.

The state of each signal across time is indicated by the way the line is drawn.  As usual, low, tristate, and high are low, middle, and high strait lines.  The high value has a bolder line to aid in discriminating it from a low.  Unknowns are filled areas.

Busses are drawn in one of four ways; if zero they are low, if all bits are one it it is two parallel lines with the upper one bolded.  If the bus is some mix of zeros and ones it is two narrow parallel lines.  If there is space the value of the bus will be shown based on the Signal Radix menu option.  Finally, the Signal Waveform allows analog waveforms, or signed waveforms (two's complement with 0 making a centered trace.)

Gadgets surround the main area.  The vertical scroll bar on the right is the Signal Slider used to scroll signals, if they all cannot fit on the screen at once.  At the bottom of the screen is the Time Slider on the right, and the Name Slider on the left.

Time Slider
-----------

On the left bottom of the main window is the Time Slider.

Drag

     Dragging the Time Slider will scroll the time across the screen.  Lines are printed in the scroll area to indicate where cursors are located.

Unit Dec

     Clicking the <- arrow at the left of the Time Slider, or pressing left will move the time one grid #0 (or the first visible grid) resolution earlier.

Unit Inc

     Clicking the -> arrow at the right of the Time Slider, or pressing right will move the time one grid #0 resolution (usually one clock) later.

Page Dec

     Clicking the blank area at the left of the Time Slider, or pressing S-right will move the time one screen width earlier, so the time at the left of the screen is now at the right.  (Or 1/2 or 1/4 screen width, depending on the page_inc customization setting.)

Page Inc

     Clicking the blank area at the right of the Time Slider, or pressing S-right will move the time one screen width later, so the time at the right of the screen is now at the left. (Or 1/2 or 1/4 screen width, depending on the page_inc customization setting.)

Name Slider
-----------

The Name Slider is the horizontal scroll bar left of the Time Slider.

Drag

     Dragging the Name Slider will scroll the signal names left and right so that they may be completely seen.  Dinotrace aligns the signals on the last dot (hierarchy character).

Signal Slider
-------------

The Signal Slider is the vertical scroll bar to the right of the window.

Drag

     Dragging the Signal Slider will scroll the signals so that new signals can be seen.  Lines are printed in the scroll area to indicate where highlighted signals are located.

Unit Dec

     Clicking the <- arrow at the top of the Signal Slider, or pressing up will move the signals down one, displaying a new signal at the top.

Unit Inc

     Clicking the -> arrow at the bottom of the Signal Slider, or pressing down will move the Moves signals up one, displaying a new signal at the bottom.

Page Dec

     Clicking the blank area above the Signal Slider, or pressing pageup will move the signals up one screen full, so the previous top signal is now at the bottom.

Page Inc

     Clicking the blank area below the Signal Slider, or pressing pagedown will move the signals down one screen full, so the previous bottom signal is now at the top.

Buttons
-------

The buttons below the lower sliders perform common functions that affect the display.

Begin

     Clicking the Begin button below the Time Slider, or pressing begin will move to the earliest time in the trace.

End

     Clicking the End button below the Time Slider, or pressing end will move to the earliest time in the trace.

Goto

     Clicking the Goto button below the Time Slider, or pressing g will make a popup that prompts for a time.  The window will scroll horizontally so that the entered time is centered on the screen.  A option menu will place a cursor of the selected color at the time entered.  A note may be attached to the cursor, and seen with Value Examine.

Refresh

     Clicking the Refresh button below the scroll bar will refresh the screen.  Normally this is automatic.  When using Dinotrace over slow links, it may be desirable to refresh manually, see refreshing.

Resolution

     Clicking the Resolution number button at the middle bottom will make a popup that can change the resolution to the number specified.

Inc Res

     Clicking the arrow button to the right of the Resolution button expands the trace so the same amount of time takes more space.

Dec Res

     Clicking the arrow button to the left of the Resolution button expands the trace so the same amount of time takes less space.

Zoom

     Clicking the Zoom button, then clicking MB1 on two times expands the trace so that the time between the clicks occupies the entire screen.

Full

     Clicking the Full button shrinks the resolution so that the entire trace fits onto the screen.  It is often quicker to press Full then zoom to the desired location rather than scrolling.

Trace Menu
==========

Trace Read...
-------------

Selecting the Trace Read... menu option, or pressing C-o pops up a file requester to read a trace.  If a file ends in a .Z or .gz extension, it will be piped through uncompress or gunzip respectively before being read.  The type of trace may be set with the option box; the default is set by the file_format configuration command.  If Preserve Signal Ordering is checked, the signals in the new trace will be reorganized to attempt to match the ordering of the current trace in the window.

Trace ReRead
------------

Selecting Trace ReRead checks if there is a new version of the file currently begin displayed and reads it.  The file will only be read if a new one exists.  If no file is displayed, it is the same as the Trace Read option.

This is useful for rereading a trace after it has changed due to a new simulation run.

Trace ReRead All
----------------

Selecting Trace ReRead All, or pressing C-r, checks every window to see if that window's file has been updated, and rereads if it has.

Trace Open...
-------------

Selecting Trace Open... shrinks the current window in half, and opens another Dinotrace window, linked in time to the original.  The two traces will then pan together and share cursors, etc.  Multiple window support is intended for traces that have the same time lengths. See open_geometry for how to change the default window sizes, such as to not shrink the original window when opening.

Trace Close
-----------

Selecting Trace Close closes the current window if more than one is open.  If this is the only one remaining open, use Trace Exit instead.

Trace Clear
-----------

Selecting Trace Clear closes all other windows and resets Dinotrace as if Dinotrace was exited and ran again.

Trace Print...
--------------

Selecting Trace Print... pops up a file requester allowing the current screen to be printed to a file.  The amount of time, and number of signals on the screen will match the time and signals put onto one page of paper.

The Filename and Note specify where to put the output, and a note to be placed on the bottom of each page.

The Layout option selects the size of the page.  EPS will make a Encapsulated Postscript file that does not include all of the headers.  This is suitable for making figures for inclusion in other documents.

The Include off-screen times button will print multiple horizontal pages of paper, so that all times in the trace is printed.  The Include off-screen signals button will print multiple vertical pages, so that all signals are printed.  Both may be checked and taped together to get a nice wall hanging.

The Begin printing at and End printing at select the region to be printed.  This may be based on the whole trace, what is displayed on the screen, or the cursors.

Trace Print
-----------

Selecting Trace Print performs a print using the last Trace
Print... settings.

Trace Exit
----------

Selecting Trace Exit will exit Dinotrace.

Customize Menu
==============

Customize Change...
-------------------

Selecting Customize Change pops up a requester that allows the configuration to be customized.  See Customization Files for permanent configuration, and additional options that are not selectable here.

The Page Increment option selects how much of a screen clicking on the Page Inc space on the Time Slider will increment.

The Time Representation option selects how times are displayed and entered in the Goto popup.  Selecting Grid #0
Cycles will put all times in the period defined by Grid #0.

The Signal Height option controls how many signals can fit on the screen and printout.  Small sizes have more information, but may cause the values to be hard to read.

The Click To Edge button enables Cursor Add and other menu items that require mouse clicks to find the closest transition and add it at that point.  The search will be only within 20 pixels; if there is no edge within that distance, the cursor is added right where the cursor is.

The Rise/Fall Time slider controls how fast signals transition.

Thw Draw Prefix enables displaying the entire signal name, instead of the default where a prefix common to every signal in the design is not shown.

Thw Manual Refreshing button disables automatic refreshing, for dialup lines.  The Refresh button must be pressed to refresh the screen.

Customize Grid...
-----------------

Selecting Customize Grid pops up a requester that allows the configuration to be customized.  See Customization Files for permanent configuration.  Note that the lowest numbered grid that is visible is used for moving one increment, stepping cursors forward and back, and for counting cycles.

Customize Read...
-----------------

Selecting Customize Read pops up a requester that reads the specified .dino file.  The requester also allows enabling and disabling of which .dino files will be read when a new trace is read.

Customize ReRead
----------------

Selecting Customize ReRead will reread the customize .dino files.  This is useful for applying changes to Dinotrace after a .dino file has been edited outside Dinotrace.

Customize Save As...
--------------------

Selecting Customize Save As... will create a popup.  A filename may then be entered to save the current customization settings.  Buttons allow different portions of the configuration to be written.  Note that many of the settings that will be saved can be applied only to one window, and should be edited out before being included in any global dinotrace.dino files.

Customize Restore
-----------------

Selecting Customize Restore will restore the customization options to their program defaults.  It will not read any .dino files.

Cursor Menu
===========

Cursor Add
----------

Selecting Cursor Add, or pressing c, then clicking MB1 will insert cursors at the clicked on times.  The Next color button, or pressing C will select the next color down in the menu from the last color selected.  See cursor_add for the equivalent configuration file command.

Cursor Highlight
----------------

Selecting Cursor Delete then clicking MB1 on cursors will change the color of those cursors.

Cursor Move
-----------

Selecting Cursor Move then Dragging MB1 on a cursor will move that cursor.  Press and hold mouse button one and release when the cursor is at the new time desired.  Moving a cursor that was created with Signal Search will make that cursor permanent; the cursor will not go away if the search is changed.

Cursor Delete
-------------

Selecting Cursor Delete then clicking MB1 on cursors will delete those cursors.  To delete cursors that were created by Value Search (those with dotted lines), turn off the second button on the Value Search requester.

Cursor Note
-----------

Selecting Cursor Note then clicking MB1 on a cursor will pop up a dialog box to change the note attached to that cursor.

Cursor Step Forward
-------------------

Selecting Cursor Step Forward or pressing > will move all user cursors forward the by grid #0's (or the first visible grid's) period.

Cursor Step Backward
--------------------

Selecting Cursor Step Back or pressing < will move all user cursors backward the by grid #0's (or the first visible grid's) period.

Cursor Clear
------------

Selecting Cursor Clear will delete all cursors.

Cursor Cancel
-------------

Selecting Cursor Cancel, or pressing esc will stop MB1 mouse clicks from having any affect.

Signal Menu
===========

Signal Add...
-------------

Selecting Signal Add will pop up a popup allowing a signal to be selected then added at the point where MB1 is clicked. See signal_add for the equivalent configuration file command.

Signal Highlight
----------------

Selecting Signal Highlight, or pressing s, then clicking MB1 on signals changes the color of those signals. See signal_highlight for the equivalent configuration file command.

Signal Move
-----------

Selecting Signal Move then clicking MB1 on a signal and clicking MB1 again on a new position moves a signal. Signals may be moved between traces, but closing a trace eliminates all signals that were originally from that trace.  See signal_move for the equivalent configuration file command.

Signal Copy
-----------

Selecting Signal Copy then clicking MB1 on a signal and clicking MB1 again on a new position copies a signal. Signals may be copied between traces, but closing a trace eliminates all signals that were originally from that trace.  See signal_copy for the equivalent configuration file command.

Signal Delete
-------------

Selecting Signal Delete then clicking MB1 on signals deletes those signals.  Signal Select may be used to recover the deleted signals.  See signal_delete for the equivalent configuration file command.

Signal Note
-----------

Selecting Signal Note then clicking MB1 on a signal will pop up a dialog box to change the note attached to that signal.

Signal Radix
------------

Selecting Signal Radix then clicking MB1 on signals changes the radix of the signals to the one selected.  Note that the real radix is detected for Verilog automatically, and changing other non-real signals to a real format probably won't display the values you wish.  See signal_radix for the equivalent configuration file command.

Signal Waveform
---------------

Selecting Signal Waveform then clicking MB1 on signals changes the signal to be displayed as either analog or digital. See signal_waveform for the equivalent configuration file command.

Signal Search...
----------------

Selecting Signal Search opens a popup for highlighting signal names.  Nine signal names which will be searched for in the trace are specified.  Any signal name which matches the signal name pattern will be highlighted using the color of the toggle button, just as if Signal Highlight was used to color it.  Unlike Signal
Search, highlighting a signal with Signal Highlight makes it permanent; it will not go away when the search that found that signal changes.

The Signal name pattern indicates which signal names to highlight, potentially containing * to match any number of characters, or ? to match any single character.  Case never matters when matching signal names.

The Enable button enables the search, and shows the color to be used for highlighting when the signal is found.

Signal Select...
----------------

Selecting Signal Select, or pressing C-f, presents a requester which lists the names of the signals which are being displayed, and those which are deleted.  Both lists have a pattern at the top which a signal must match to be displayed.  Clicking on a signal will add it to the bottom of the other list.  Clicking on the Add All or Delete All will affect all of those in the list.  By specifying a pattern then Add All or Delete
All, signals which match a pattern can be added or deleted.

The Delete Constants button will delete only those signals which have a single constant value for all times in the trace.  Likewise the Delete Const or X/Z button will delete only those signals which have a constant value, or are unknown or tristated.  This is useful for deleting those signals which have uninitialized values before reset then later in the trace are initalized to constants.

The Sort Wholename and Sort Basename buttons will sort the selected signals and place them at the bottom of the trace.  The former uses the entire signal name, while the latter sorts by the basename, ignoring the hierarchy portion of the signal name.

Clear Highlight
---------------

Selecting Signal Clear Highlight will remove all highlighting from signals.

Keep Highlight
--------------

Selecting Signal Keep Highlighted will delete signals from the trace which are not highlighted.  This allows signals to be highlighed that match a given pattern using Signal Select..., then all others deleted using this selection.

Signal Cancel
-------------

Selecting Signal Cancel, or pressing esc will stop MB1 mouse clicks from having any affect.

Value Menu
==========

Value Annotate...
-----------------

Selecting Value Annotate... makes a file with the highlighted signals, and values under every cursor.  Behavioral code can then be highlighted with the values by dinotrace.el's reading the written file.  Cursors which are exactly on a edge of a signal will get the value that the signal is changing to, not from.

Buttons specify which cursor and signal colors are included in the file. If a button is on, the color is included, else it is as if the cursor did not exist, or the signal was not highlighted.

User cursors are those placed using the Cursor Add menu. Automatic cursors are from searching for values or cursors placed by .dino files.

See Dinotrace and Emacs

Value Annotate
--------------

Selecting Value Annotate, or pressing a annotates code using the last Annotate... settings.  See annotate for the equivalent configuration file command.

Value Highlight
---------------

Selecting Value Highlight, or pressing v, then clicking MB1 on a value loads that value into one of the 9 search values, and highlights it where it occurs in the trace.  The search value can then be seen and modified with the Value Search popup. See value_highlight for the equivalent configuration file command.

Value Examine
-------------

Selecting Value Examine then holding MB1 will show the state of the entity under the mouse.  MB2 can always be used for this feature.

Signal transitions can be examined when over the transition lines. Signal names and base information can be seen when over the signal names.  Cursors can be examined when at the bottom of the screen, and grids when at the top.

Value Search...
---------------

Selecting Value Search... allows specification of 9 values to be searched for in the trace.  Each value is entered into a text widget and one or two toggle buttons to the left are activated.  The Value
Highlight menu can be used to load a search automatically. See value_highlight for the equivalent configuration file command.

The Highlight value button will make anywhere that the value appears in a trace to be printed using the color of the toggle button.

The Add cursor button will add a cursor at the time where the value begins.  Cursors that are placed in this fashion are displayed as dotted lines, and will go away if the search value is changed. Highlighting or moving a cursor makes it permanent; it will not go away when the search changes.

The Signal name pattern indicates which signals names to search for the value, potentially containing * to match any number of characters, or ? to match any single character.  Often a single * is useful to search all signals.

The Value indicates the value to be found.  Unfortunately wildcards are not supported.  A standard verilog or VHDL prefix may be added to specify the radix of the number being entered.  (The radix of the signal found does not have to match the radix entered; 'h10 will match 'd16.

'h<num>
X"<num>"
     Hex

'o<num>
O"<num>"
     Octal

'b<num>
B"<num>"
     Binary

'd<num>
D"<num>"
     Decimal

'r<num>
R"<num>"
     Real

's<strg>

S"<strg>"

"<strg>"
     Ascii (String)

Value Cancel
------------

Selecting Value Cancel, or pressing esc will stop MB1 mouse clicks from having any affect.

Keyboard Shortcuts
******************

This chapter describes the keyboard shortcuts for Dinotrace.

Any menu function may be invoked with the standard Motif accelerators; hold down ALT then press the first letter of the menu name. Release ALT and press the underlined letter of the sub menu item, and so on.

The following keys are also hard-coded: Function keys have the identical function when using GNU Emacs's Verilog, C, Merlin, or CCLI modes.

MB2
     Value Examine.

up
     Signal scroll up one signal.

S-up
     Signal scroll up a screen full.

down
     Signal scroll down one signal.

S-down
     Signal scroll down a screen full.

pageup
     Signal scroll up a screen full.

pagedown
     Signal scroll down a screen full.

left
     Time scroll left a grid #0 increment.

S-left
     Time scroll left a screen full.

right
     Time scroll left a grid #0 increment.

S-right
     Time scroll left a screen full.

begin
     Beginning of time.

end
     End of time.

esc
     Signal Cancel.

>
     Cursor Step Forward.

<
     Cursor Step Backward.

a
     Value Annotate.

c
     Cursor Add with current color.

C
     Cursor Add with next color.

g
     Goto time.

s
     Signal Highlight with current color.

S
     Signal Highlight with next color.

v
     Value Highlight with current color.

V
     Value Highlight with next color.

C-f
     Signal Search....

C-o
     Trace Read....

C-r
     Trace ReRead All.

Customization Files
*******************

This chapter describes customization files, and the commands that may be used in them.

Customization files allow the options and display in Dinotrace to be customized to suit a specific site, user, directory, and trace.

Automatically Read Files
========================

When a trace file is read using the Trace Read menu option, several configuration files are read automatically:

$DINODISK:dinotrace.dino

     The $DINODISK:dinotrace.dino file is intended to have site wide defaults.  This will probably contain a file_format verilog or similar commands.  (On Unix, $DINODISK represents the contents of the DINODISK environment variable.  On VMS, it represents the value of the system define.)

$DINOCONFIG

     The $DINOCONFIG file is intended to be used for session specific start-up, like setting screen size depending on what type of system you are using.  Users will probably point this to several possible sources using their .login.

~/dinotrace.dino

     The ~/dinotrace.dino file is for user defaults.  The author for example has a signal_height 15 and signal_delete_constant *, which are both personal preference items.  (On VMS, SYS$LOGIN: is used instead of ~/.)

{current/trace/directory}/dinotrace.dino

     The {current/trace/directory}/dinotrace.dino is for signal_states and other information on a per-simulation setup basis.  This probably includes signal_state commands (unless they are in the global dinotrace.dino).

{current/trace/directory}/CURRENT_TRACE_NAME.dino

     The {current/trace/directory}/CURRENT_TRACE_NAME.dino is for highlighting and such that only apply to the current file.  See the enclosed example Perl script that will parse a log file for times that errors occurred and write a dino that places a cursor at every such time.

Configuration Commands
======================

Configuration files are organized with one command per line, with the exception of signal_states, which may be multiple lines.  Case is ignored in all but state names.  The commands are:

#
-

#	COMMENT

Comments out the remainder of the line.

page_inc
--------

page_inc		4 | 2 | 1

Changes the increment used during Page Inc and Page
Dec clicks on the horizontal scroll-bar.  1=full page, 2=half, 4=quarter.  Same as the page option menu in Customize Change.

rise_fall_time
--------------

rise_fall_time	NUMBER

Changes the slope used when drawing signal assertions and deassertion. Use 0 to minimize the rise_fall_time.

signal_height
-------------

signal_height	NUMBER

Changes the vertical spacing between signals on the screen.  Same as the slider in Customize Change.

grid
----

grid		GRID_NUMBER       ON | OFF

Enables or disables the grid.  Same as the visible toggle buttons in Customize Grid.

grid_resolution
---------------

grid_resolution	GRID_NUMBER       NUMBER | AUTO | EDGE

Changes the horizontal space between grids, normally the period of a clock.  Specify a number in nanoseconds, or AUTO to compute the grid based on the grid_signal.  Use EDGE to place a grid on each change of the grid_signal.

grid_align
----------

grid_align	GRID_NUMBER       NUMBER | ASSERTION | DEASSERTION | BOTH

Changes the horizontal location of the first grid mark.  Specify a number in nanoseconds, ASSERTION to align with the asserting edge of the grid_signal, or DEASSERTION to align with the deasserting edge of the grid_signal, or BOTH to align with both edges of the grid_signal.  The grid may also align with changes in a bus, although in that case ASSERTION and DEASSERTION have the same effect.

grid_signal
-----------

grid_signal	GRID_NUMBER	PATTERN

Specifies which signal is to be used when calculating the period and alignment with grid_resolution and grid_alignment respectively.  The first signal that matches the pattern is used, it defaults to "*", which is the first signal in the trace.  If no signal is found that matches the pattern, that grid will be disabled.

grid_type
---------

grid_type	PATTERN	NORMAL | WIDE

Specifies normal grids, or extra wide grids.  Wide grids are plotted 2 pixels wide, and help low-contrast colors show up better.

grid_color
----------

grid_color	GRID_NUMBER	COLOR

Changes the color used to display the grid.

refreshing
----------

refreshing		AUTO | MANUAL

In automatic refresh mode, any change in the screen such as zooming, Dragging, or exposing refreshes (redraws) the screen.  When set to manual the screen will only redraw when the refresh gadget is pressed.  Note that when in manual mode, it is just as if the display was refreshed, so for example clicking on the display is relative to the new display. Useful when using slow network links, such as dialup eXcursion or exceed.

refresh
-------

refresh

Refresh the screen, even if in manual refresh mode.  When a .dino file is being read, the screen will not be refreshed until the entire file is completely read, unless a refresh command is used.

draw_prefix
-----------

draw_prefix

By default, a prefix common to every signal in the design is not shown in the main window.  With this setting, the signal name will be shown in it's entirety.

annotate
--------

annotate

Makes the annotation file, like the Value Annotate menu.

resolution
----------

resolution		NUMBER

Sets the screen resolution, like the Resolution Button on the bottom of the screen.

save_enables
------------

save_enables	ON | OFF

When reading in verilator CCLI traces, Dinotrace converts two-state enables and data signals into a single four-state signal, then deletes the original signals.  When save_enables is on, the original signals are not deleted.  This is useful for debugging problems related to tristating.

save_duplicates
---------------

save_duplicates	ON | OFF

When reading in verilog traces, Dinotrace by default drops signals that connect to a signal higher in the hierarchy.  This saves space and reduces clutter.  When save_duplicates is on, the duplicate signals are not deleted, except under rare situations.

save_ordering
-------------

save_ordering	ON | OFF

When set, Dinotrace will attempt to preserve signal colors, ordering, and deletions between the trace that existed before and the new trace being read in.  Signals that were deleted because they were constants are not preserved, they will be recalculated.  When clear, the new trace does not preserve any ordering information.

signal_goto
-----------

signal_goto		SIGNAL

Move the window so that signal is in the center of the window.  If the signal was already on the screen, do nothing.

time_goto
---------

time_goto		TIME

Move the window so that time is in the center of the window.  If time was already on the screen, do nothing.

time_rep
--------

time_rep		NUMBER | FS | PS | NS | US | CYCLE

Changes the time representation to be in picoseconds, nanoseconds, microseconds or in number of grid #0 cycles.  Cycle based timing is good for performance estimates.  Same as the buttons in Customize
Change.  If a number, then that number is the baseline in picoseconds. For example, 2000 will make one unit on the screen be equal to 2 ns in the trace file.  Default is nanoseconds.

time_precision
--------------

time_precision	FS | PS | NS | US

Changes the internal precision to be in picoseconds, nanoseconds, or microseconds.  Traces that are read in will have all times rounded to this number.  Setting to higher units requires less memory and speeds up execution.  This parameter must only be changed in the global or user dinotrace.dino files, as it should not change between reading different traces.  Default is nanoseconds.

Only Decsim Binary and Verilog formats contain absolute time periods, and these will be scaled by the precision.  Decsim Ascii traces are always assumed to be in nanoseconds.  The Tempest format will be assumed to be in the same units as the time_precision, and will not be scaled.

time_format
-----------

time_format		%0.6lf | %0.6lg | %lg | ""

Changes the number of decimal places used to print times.  This format string is the same as that used by the C-Language printf command.  (See man printf or HELP CC RUN PRINTF.) Some of the useful choices are %0.6lf which will print 6 decimal places with trailing zeros (123.450000), %0.6lg which will print up to 6 decimal places (123.45), and %lg which will print the number of decimal places required to fully show the number.

The default is null ("").  When null time_precision and time_rep will set the preferred format for time stamps.  For example, setting time_precision PS and time_rep NS will make times display as "nn.ppp ns" where n is the nanoseconds, and p is the picoseconds.

time_divisor
------------

time_divisor	NUMBER

When reading Ascii traces, all times are divided by this number. Generally the time_precision is what is wanted instead, as time_precision doesn't change the internal times but instead the display. Time_divisor changes the value that is read in from the file, and is most useful for Ascii traces which do not specify any time units in the file itself.

time_multiplier
---------------

time_multiplier	NUMBER

When reading Tempest traces, the multiplier will be used to convert the phase counter to the time.  Defaults to 2.

file_format
-----------

file_format		DECSIM | TEMPEST | VERILOG | VPD

Changes the file format to be read.  Same as the buttons in the Trace Open menu.

cursor
------

cursor		ON | OFF

Enables or disables the cursors.  Same as the toggle buttons in Customize Change.

cursor_add
----------

cursor_add	TIME COLOR [-USER] [COMMENT]

Adds a cursor of color number COLOR (0 to 9) at the specified time.  If specified, add COMMENT that may be seen with Value Examine.  The cursor will be dotted, and will disappear the next time a file is read in.  The -USER flag makes the cursor like a manual cursor; it will be a solid line and will not disappear on rereads.

click_to_edge
-------------

click_to_edge	ON | OFF

Enables or disables whether adding a cursor or grid close to a signal edge will place the cursor on that edge.

debug
-----

debug		ON | OFF

Enables or disables debugging mode.

print
-----

print		NUMBER | ON | OFF

Enables or disables debugging print mode at the specified informational level.

print_size
----------

print_size		A | B | EPSPORT | EPSLAND

Selects the paper size, A (8 1/2" by 11") or B (11" by 17"). EPSPORT and EPSLAND make an Encapsulated Postscript file without headers, in portrait or landscape layout, suitable for inclusion in other documents.

Same as the buttons in the Trace Print popup.

vector_separator
----------------

vector_separator	"CHARACTER"

Sets the character that separates the base signal name from vector numbers.  The default is [, which means that the signal alpha[1] consists of vector number 1 in the signal named alpha. Three other useful combinations are _ for spider signals alpha_1, < for Decsim signals alpha<1>, and null ("") for no separator alpha1.  If the separator is null ("") then < will still be accepted.  Tempest traces are assumed to use the < separator, and setting it otherwise will split up all of the bits into individual entries.

start_geometry
--------------

start_geometry	WIDTHxHEIGHT+XOFFSET+YOFFSET

Specifies the geometry to be used when the first window is opened by Dinotrace.  Specified in standard X-Windows format, for example start_geometry 1200x900+20+95 specifies a window at position 20, 95 of width 1200 and height 900.

open_geometry
-------------

open_geometry	WIDTH[%]xHEIGHT[%]+XOFFSET[%]+YOFF[%]

Specifies the geometry to be used when a new trace window is created with Trace Open menu.  The format may be the same as start_geometry, in which case the exact dimensions specified will be used for the new window.  Percentage may be used to specify a position and size relative to the old window.  For example the default is open_geometry 100%x50%+0%+50% which means that the new window will have the same width and half the height of the old window. The position will be the same in the x direction and 50% more (not 50% of the value) in the y direction.

shrink_geometry
---------------

shrink_geometry	WIDTH%xHEIGHT%+XOFFSET%+YOFF%

Specifies the geometry to be used when a old trace window is being shrunk with Trace Open menu option.  Absolute positions should not be used, instead percentages should be used to specify a position and size relative to the original window size.  For example the default is shrink_geometry 100%x50%+0%+0% which means that when the new opened window is created the old window will have the same width, X, and Y position, but half the height of the old window.

value_highlight
---------------

value_highlight VALUE COLOR [SIGNAL_PATTERN] -COLOR -CURSOR

Searches for the value in signals matching the pattern.  If the -COLOR flag is set, changes the color of the value to COLOR (0 to 9).  If the -CURSOR flag is set, adds a cursor of the specified COLOR. The signal_pattern is the name of the signal inside the trace, with * being a wild card that matches any number of characters.

signal_highlight
----------------

signal_highlight       SIGNAL_PATTERN   COLOR

Changes the color of any signals matching SIGNAL_PATTERN to the given color number COLOR (0 to 9).  The signal_pattern is the name of the signal inside the trace, with * being a wild card that matches any number of characters.

signal_add
----------

signal_add		SIGNAL_PATTERN [AFTER_SIGNAL] [COLOR]

Adds signals matching SIGNAL_PATTERN from the trace, if the signal was deleted.  If the signal hasn't been deleted, nothing happens.  If the AFTER_SIGNAL is provided, the signal is added after the first signal that matches the AFTER_SIGNAL pattern.  If AFTER_SIGNAL is not provided, the new signal is added to the end of the trace.

signal_delete
-------------

signal_delete	SIGNAL_PATTERN

Deletes signals matching SIGNAL_PATTERN from the trace.

signal_delete_constant
----------------------

signal_delete_constant	SIGNAL_PATTERN [-IGNOREXZ]

Deletes signals matching the pattern, which have a constant value, from the trace.  If -IGNOREXZ is specified, don't consider transitions to/from unknown or tristate as making a signal non-constant.  Useful for reducing a large number of signals down to only those which change.

signal_copy
-----------

signal_copy		SIGNAL_PATTERN [AFTER_SIGNAL] [COLOR]

Copies signals matching SIGNAL_PATTERN from the trace to a new position.  If the AFTER_SIGNAL is provided, the signal is added after the first signal that matches the AFTER_SIGNAL pattern.  If AFTER_SIGNAL is not provided or is not found, the new signal is added to the end of the trace.

signal_move
-----------

signal_move		SIGNAL_PATTERN [AFTER_SIGNAL] [COLOR]

Move signals matching SIGNAL_PATTERN to a new position.  If the AFTER_SIGNAL is provided, the signal is moved after the first signal that matches the AFTER_SIGNAL pattern.  If AFTER_SIGNAL is not provided, the new signal is added to the end of the trace.

signal_note
-----------

signal_note		SIGNAL_PATTERN NOTE

Add the specified note to signals matching SIGNAL_PATTERN.  The signal note may be viewed by pressing with the Examine button over the signal name.

signal_rename
-------------

signal_rename	SIGNAL_PATTERN NEW_SIGNAL_NAME [COLOR]

Changes the first signal matching SIGNAL_PATTERN to have the name NEW_SIGNAL_NAME This can be used to make a alias copy of a signal by copying a signal, then renaming it.

signal_radix
------------

signal_radix	SIGNAL_PATTERN RADIX

Changes signals matching SIGNAL_PATTERN to have the specified radix.  Note that the real radix is detected for Verilog automatically, and changing other non-real signals to a real format probably won't display the values you wish.

signal_waveform
---------------

signal_waveform	SIGNAL_PATTERN ANALOG | ANALOG_SIGNED | DIGITAL

Changes signals matching SIGNAL_PATTERN to have the specified waveform representation on the display.

signal_states
-------------

signal_states	SIGNAL_PATTERN = {STATE, STATE...};

Allows the value of a bus to be translated to a text string.  The SIGNAL_PATTERN is the name of the signal inside the trace, with * being a wild card that matches any number of characters.  Each state is the text to be displayed, using the characters 0-9A-Z%._/.  States are assigned in numerical order starting with zero, unless a ##= proceeds a state name: If a state name is of the form ##=name, for example in 7=Read the Read name is assigned to the bus value seven.  (The number is always in decimal.) The next assignment will be to 8 if no number is specified.

Example:

     signal_states *cpucreq[2:0] = {
        1=Barrier, Fetch, FetchM, Read, Write, LDx_L, STx_C};

In this example, any signal ending in cpucreq[2:0] (any case) will convert 1 to Barrier, 2 to Fetch, etc.  Unspecified values, such as 0 and 8 will be displayed as a number.  If the state does not fit on the screen, the number will be printed instead.  Text strings may only be defined for state numbers 0-255.

X Resources
***********

This chapter describes the X-Windows resources that Dinotrace supports.

Dinotrace uses the X resource database for color and font selection.

To use a resource, put in your ~/.Xdefaults file

     Dinotrace*Foreground: Black
     Dinotrace*Background: #cacaaaaa9191
     Dinotrace*color1: DarkOliveGreen

Then type at the shell xrdb ~/.Xdefaults to reread the database.

Dinotrace adds the following resources over and above the core X Toolkit resource names and classes (such as foreground and background):

color#

     color#, where # is 1-9, specifies the colors for searches, highlighting, and cursors.  color0 is fixed to the foreground color.

barcolor

     barcolor specifies the color to be used for the background of alternate signals.  Defaults to 7% greener than the background color. Those that remember green bar tractor-feed paper should feel comfortable with this default.

signalfont

     signalfont specifies the font to be used for signal names along the sides of the trace window.  Defaults to -*-Fixed-Medium-R-Normal--*-120-*-*-*-*-*-1

timefont

     timefont specifies the font to be used for time values along the top of the trace window.  Defaults to -*-Courier-Medium-R-Normal--*-120-*-*-*-*-*-1

valuefont

     valuefont specifies the font to be used for values inside buses.  Defaults to -*-Fixed-Medium-R-Normal--*-100-*-*-*-*-*-1

Remote Control
**************

Dinotrace can be triggered to reread traces by sending a USR1 signal to it.  This allows build environments to automatically refresh dinotrace when a new waves file is available.  See the kill manpage for details on sending a signal, usually it's kill -USR1 %?dino.

After annotation, Emacs creates a socket that can be used to send commands into it.  See the Emacs chapter and internal code for details.

Dinotrace and Emacs
*******************

This chapter describes the interaction between Dinotrace and Emacs.

Dinotrace provides the means for back-annotating highlighting and values into Emacs buffers, and from Emacs, highlighting signals, values, and the like.  This is what separates Dinotrace from the rest.

Installation
============

The appropriate Emacs code should have been installed along with the rest of Dinotrace.  If you encounter problems, you should return to this section.

You'll probably also need verilog-mode.el from http://www.veripool.org/verilog-mode.  Make sure that file, and the distribution's files lisp/dinotrace.el and lisp/sim-mode.el are installed in your Emacs site-lisp directory. (In Emacs C-h v load-path RET should list the name of that directory.)  Check that in your .emacs file, or better yet, the site's site-start.el file there are the lines:

     (autoload 'sim-log-mode "sim-log" "Mode for Simulation Log files." t)
     (setq auto-mode-alist (append (list '("\\.log$" . sim-log-mode)) auto-mode-alist))
     (autoload 'dinotrace-update "dinotrace" "Update dinotrace annotations in this buffer" t)
     (autoload 'dinotrace-mode   "dinotrace" "Toggle dinotrace annotations in this buffer" t)
     (global-set-key "\C-x\C-aa" 'dinotrace-update)
     (global-set-key "\C-x\C-ad" 'dinotrace-mode)

Annotation
==========

With a trace up in Dinotrace, select the Value Annotate... menu item.  This will create a magic file in your home directory.

In Emacs, visit a Verilog or C file which has some signals that are in the trace.  Press C-x C-a a.  Emacs will read the annotation file and add highlighting to your buffer.  A new menu will appear on the screen, and the mode line will indicate Dinotrace.

In a simulation log file (ending in .log), Pressing C-x C-a a will likewise add annotations of where cursors exist.

Signal Matching
===============

Emacs chooses what to highlight based upon only the base part of the signal name; all hierarchy and bus descriptors are stripped.  If multiple signals exist with the same basename, all signals other than those with the desired hierarchy should be deleted so they won't participate in the annotation.

Entering Dinotrace-Mode
=======================

There are two keys used to enter Dinotrace Mode:

C-x C-a a
M-x dinotrace-update

     C-x C-a a will enter dinotrace-mode in this buffer. If there is a new annotation file, read it, update all annotations in all visible widows, and remove outdated annotations from invisible buffers.

C-x C-a d
M-x dinotrace-mode

     C-x C-a d will toggle Dinotrace Mode in this buffer. With arg, turn Dinotrace mode on if and only if arg is positive.

     It will not read a new annotation file if one has already been read in.

Exiting Dinotrace Mode
======================

There are two ways to exit Dinotrace Mode:

C-x C-a d
M-x dinotrace-mode

     C-x C-a d will toggle Dinotrace Mode in this buffer.  With zero or negative arg, turn off Dinotrace mode.

C-x C-q
M-x dinotrace-toggle-read-only

     C-x C-q will toggle read-only status.  Dinotrace traps this key and will remove annotations and make the buffer writable.

Configuring Dinotrace-Mode
==========================

These keys configure Dinotrace Mode:

C-x C-a a
M-x dinotrace-hierarchy-set

     C-x C-a a will specify the hierarchy as a regular expression.  Any signals must match this regular expression in order to be annotated. This is useful if the same signal name appears in many modules with different values; you can thus choose which modules the signals will come from.

Keys in Dinotrace Mode
======================

When inside a Dinotrace Mode buffer, many keys are defined to affect both Emacs and also Dinotrace.  All begin with C-x C-a, and are also selectable from the Emacs menubar.  Most match the keyboard accelerator keys for Dinotrace itself.

C-x C-a c
M-x dinotrace-goto-and-cursor-time

     Take the time that the point is over, and scroll Dinotrace so time is visible.  Add a cursor using the current color.

C-x C-a C
M-x dinotrace-goto-and-cursor-time-next-color

     Take the time that the point is over, and scroll Dinotrace so time is visible.  Add a cursor using the next color.

C-x C-a s
M-x dinotrace-goto-and-highlight-signal

     C-x C-a s will take the signal name the point is over, and scroll Dinotrace so the signal is visible.  The signal is highlighted using the current color.

C-x C-a S
M-x dinotrace-goto-and-highlight-signal-next-color

     C-x C-a S will take the signal name the point is over, and scroll Dinotrace so the signal is visible.  The signal is highlighted using the next color.

C-x C-a v
M-x dinotrace-highlight-value

     C-x C-a v will take the value the point is over, and highlight it using the current color.  With a prefix-arg, cursors will also be put where the value occurs.

C-x C-a V
M-x dinotrace-highlight-value-next-color

     C-x C-a S will take the value the point is over, and highlight it using the next color.  With a prefix-arg, cursors will also be put where the value occurs.

C-x C-a >
M-x dinotrace-cursor-step-forward

     C-x C-a > will move all cursors forward one grid #0 period and reannotate the buffer.  If the grid is set correctly, this will change the values to represent one clock period later.

C-x C-a <
M-x dinotrace-cursor-step-backward

     C-x C-a < will move all cursors back one grid #0 period and reannotate the buffer.  If the grid is set correctly, this will change the values to represent one clock period earlier.

File Formats
************

This chapter describes the file formats supported by Dinotrace, and how to produce them with various simulators.

If you're making a quick trace that is small, the ASCII format is probably quickest and dirtiest.  If you're making a real 4-state simulator, Tempest XOR format is very compact and fast.  A example reader for this format is included with the Dinotrace distribution.

Verilog Value Change Dumps
==========================

Dinotrace can read the Value Change Dump format, common with simulators such as Verilog-XL, VCS, and many others.

VCD files have a .vcd extension.  Under the Trace Read menu, select Verilog Format.  Select Trace Read to read the file. If this is your standard format, you can set it permanently by placing in the $DINODISK:dinotrace.dino file:

     file_format verilog
     vector_separator "["

VCD files can contain a great number of signals, potentially every net in the design.  To cut down on the clutter, Dinotrace removes any signal that is identical to a signal higher up in the design hierarchy.  For example, if the signal top.cpu.cache.index_addr[7:0] is the same net as top.cpu.addr[27:20], then only the latter will be shown in Dinotrace.  This can be disabled with save_duplicates.

To save disk space you may wish to store files as gziped.  This will result in about a 10 times space savings, and Dinotrace will uncompress them automatically.  (By detecting the .gz extension and piping through gunzip.  Gunzip must exist in your $PATH for this to work.)

Making VCDs in Verilog
----------------------

To create a value change dump file inside of Verilog, add the code somewhere in a module:

     // Create a dump file
     initial begin
             $dumpfile ("|gzip --fast --stdout >trace_top.vcd.gz");
             $dumpvars (12, top);
     end

Where top is the name of the module to be traced, trace_top.vcd.gz is the output file, and 12 is the number of levels of hierarchy underneath top to be traced.  Dinotrace expects the .vcd extension.  This command will dump all signals in the module top.  For more information on dump files, see Chapter 18 of the Verilog-XL reference manual.

VCD File Format
---------------

For a description of the VCD file format, see Chapter 18 of the Verilog-XL reference manual.

Verilog Value Plus Dumps
========================

Dinotrace can read the Value Plus Dump format, common with VCS.

VPD files have a .vpd extension.  Under the Trace Read menu, select Verilog VPD Format.  Select Trace Read to read the file. If this is your standard format, you can set it permanently by placing in the $DINODISK:dinotrace.dino file:

     file_format vpd
     vector_separator "["

For this to work, you must have the vpd2vcd program installed in your search path.  It was distributed with VCS, and requires a key to operate; contact your simulation vendor for details.

Dinotrace will convert the format to a standard VCD file using a pipe. Thus all of the notes above for the Verilog Value Change Dumps also apply to this format.

Making VPDs in Verilog
----------------------

To create a value plus dump file inside of Verilog, add the code somewhere in a module:

     // Create a vpd file
     initial begin
             $vcdpluson (12, top);
     end

Where top is the name of the module to be traced, and 12 is the number of levels of hierarchy underneath top to be traced.  For this to work you may also need a -I or other compile time option for your simulator.

ASCII Traces
============

The initial format that Dinotrace supported was a Decsim ASCII format. This format is still very useful for reading traces created by perl scripts and other quick programs.  For large traces, any of the other formats will make significantly smaller files.

Making Decsim ASCII Traces
--------------------------

Decsim provides both ASCII and binary formats.  For a Decsim ASCII trace, type at the command prompt:

     set trace/radix=2/vector/header/exact/logname=name
     	clock, signal1, signal2, signal3

For information, see Making Decsim Binary Traces.

ASCII Trace Format
------------------

The ASCII Trace format is broken into two pieces, the header, and the data lines.

The header consists of a leading !, followed by signal names that are read vertically, with each bit in a independent column.  Some character separates the signal name from the bit number, this exact character varies depending on the simulator.  The header is actually optional, Dinotrace will create some pretty boring names if the header is not present.

Here's a header, with the signal names SIG[2:0] and OUT.  (Read it sideways.)

     !     SSS
     !     III
     !     GGGO
     !     ___U
     !     210T

The data follows, with one time per line.  The spaces leading the header above were added so that the first signal column lines up with the first value after the time stamp.  Actually, the time stamps are optional, in which case Dinotrace will assign successive times, starting at 0 and incrementing by 100 for each data line.

     0     xxxx
     100   000x
     103   0000
     200   1100
     203   0001

Dinotrace understands the values 0, 1, the tristate Z, and the unknowns ?, X, and U.  Case does not matter.

Tempest Traces
==============

Dinotrace supports Digital's tempest (BT02) format, as produced by CCLI, COSMOS and other tools.  After creating a trace, start up Dinotrace. Under the Trace Read menu section, select Tempest
Format.  (To make this the default, read the instructions about configuration files.)  Select Trace Read to read the file.

Tempest designs use underscores to indicate bus subscripts.  To have Dinotrace collapse signals into vectors, create a configuration file with the lines:

     vector_separator "<"
     hierarchy_separator ">"

Some CPU groups use a timestamp that is a integer that increases every other cycle.  The half cycle is a phase.  Dinotrace can either count phases, which is the default, or cycles.  Since Dinotrace times are integers, the trick is to change the time resolution so that fractional values can be displayed:

     time_multiplier 500
     time_precision ps
     time_rep ns

To detect traces that start on phase B, the second signal in the trace, right after the cycle_count, must be "phase", which toggles zero/one every phase.  If this signal is not present, it is assumed the trace starts on phase A.  (If incorrect - it starts on phase B and there is no phase signal, the first phase in the entire trace will seem to be stretched one cycle.)

To save disk space you may wish to store files as gziped.  This will result in about a 50 times space savings, and Dinotrace will uncompress them automatically.

Making Verilator Traces
=======================

Dinotrace can read in Verilator traces created using CCLI.  Dinotrace will convert the two signals that Verilator creates for tristate busses (foo and foo__en) into a single signal with tristates shown normally.

Making Cosmos Traces
====================

Dinotrace can read in COSMOS traces created under Merlin.  Dinotrace will convert the two signals that COSMOS creates for each signal (foo and foo__cos) into a single signal with unknowns shown normally.

Tempest Trace Format
====================

The Tempest Trace Format is a relatively simple binary format.  Files all have a .bt extension, and are stored by unix write()s of arrays of little-endian longwords.  (Little is the endianness as Windows NT and Digital Unix, and opposite that of Suns.)

The first record is at the head of the file, and is the identification block.

char (4 bytes)
     File signature plus revision (e.g. BT02).

uint (32 bits)
     Number of bytes for the header.

uint (32 bits)
     Number of signals.

uint (32 bits)
     Number of simulation rows (Do not rely on this, it is not correct if not known when the header is written)

uint (32 bits)
     Number of bits per simulation 'row', non-padded.

uint (32 bits)
     Number of bits per simulation 'row', padded to mod 64.

Following that is a signal description block for every signal in the design. The number of such records was read from the above identification block.

uint (32 bits)
     Flags for signal characteristics:

     bit 0
          Signal is input.

     bit 1
          Signal is output.

     bit 2
          Signal is pseudo-pin.

     bit 3
          Signal contains time-stamp value (not a real signal in design).

     bit 4
          Signal is 3 or 4 state (not 2 state).

uint (32 bits)
     Offset in body row (in bits).

uint (32 bits)
     Width of signal (in bits).

uint (32 bits)
     Number of chars in signal name.  N below.

char (N bytes)
     Signal name, not null terminated.

char padding (8-(N%(8 bytes))) if N%8 != 0
     Padding characters to insure quadword alignment.

Finally is binary packed data.  Each simulation row contains the value of all signals at that time stamp.  The location of each bit was defined in the signal description blocks above.  For example, storage of 300 signals requires 320 bits per row of simulation data.  This data continues to EOF.  (The number of simulation rows in the header may not be correct if it was unknown at the time the header was written.)

For three and four state signals, the four state bit in the flag section is set for that signal.  Two bits are stored in the file per wire bit, where 00=0, 01=1, 10=tristate, and 11=unknown.

Tempest XOR Traces
==================

Dinotrace and Verilator have colluded to make a derivative of the Tempest format, called XOR format (format string BX02).  This format is detected by Dinotrace automatically when tempest format is selected.

Ungziped files are only slightly smaller than as traditional Tempest files.  Gziping however yields a 90% shrink in file size.  Since the code to generate the trace is compiled in, the actual simulation time to create the trace is also greatly reduced, speeding simulations by 30% or so.

Making Verilator XOR Traces
===========================

Verilator makes Tempest XOR traces using the fast trace perl script (see the Verilator Manual).  A list of signals to be traced must be provided at compile time.

Tempest XOR Format
==================

Tempest XOR format is very close to tempest normal format.  The first difference is that the format characters are BX02 rather than BT02.

The second difference is that the binary data for each time record is a XOR of the previous row's binary data.  (Starting with all zeros before the first record.)  Thus if a single signal changes in a given time, the first longword will have a couple of bits set to indicate the bits that changed in the time stamp, and a single bit will be set in a later longword for the bit that changed.

This seemingly trivial change greatly improves compression, as 0's are now the majority of the file, and compress to near nothing.

Any Tempest XOR format readers and writers should only operate on gziped files.  Thus the normal file extension is .bt.gz.

Decsim Binary
=============

The Digital internal Decsim simulator has a proprietary format supported by Dinotrace built under VMS only.

Decsim designs use <>'s to indicate bus subscripts.  To have Dinotrace collapse signals into vectors, create a configuration file with the line: vector_separator "<".

Making Decsim Binary Traces
---------------------------

Decsim uses the set trace command to create Dinotrace compatible traces.  Usually a clock should be the first signal as Dinotrace will automatically align the grid to the first signal in a trace.

At the command prompt, type:

     set trace/radix=2/vector/binary/exact/logname=name
     	clock, signal1, signal2, signal3

Our group creates a trace file for each sub chip, and turns that trace into a macro in a separate file.  This way the same trace may be called from many tests. For example:

TRACE_subchip.IND:

     macro/command TRACE_subchip [$text] =
     set trace/radix=2/vector/binary/exact/logname=$text
     	clock,
     	signal1,
     	signal2
     $endmacro

A test would then call:

     @TRACE_subchip.IND
     TRACE_subchip testname_subchip

The test will create a file testname_subchip.TRA.  We find this naming convention convenient as it will group all of the traces from one chip together.  For example, running the test ERRORS with the trace files TRACE_SSM.IND and TRACE_CSR.IND creates the trace files ERRORS_SSM.TRA and ERRORS_CSR.TRA.

Bugs
****

This chapter describes bug reporting and the known bugs in the current version.

Please report bugs to wsnyder@wsnyder.org

The following bugs are known to exist:

  * When using lessTIF, the lines indicating highlighted signals and cursors that appear in the scroll bars may not always appear.  To make them reappear, simply press the refresh widget.

  * The Ultrix version of Dinotrace requires Motif V1.1.3.  It will run under older versions, however toolkit warnings will be printed which may be ignored and Trace Open will make the window size too large.

  * Decsim does not correctly create binary traces of arrays.  For example signal[1:0]<1:0> will not display the correct data in Dinotrace because Decsim incorrectly creates the file.  Decsim will work correctly if the trace is changed to ASCII.

  * There is a problem with the X-11 Toolkit that causes strange dots to appear in the trace window.  This only occurs on some systems. Please contact me if this occurs on your systems.

Index
*****

This is an alphabetical index of this manual.