Tcldot


Tcldot Overview

The Tcldot package is used by the Bluespec Development Workstation to display graphical views of scheduling graphs.

Note, the standalone Bluespec compiler ('bsc' command) does not depend on Tcldot. It merely generates scheduling graphs during compilation when given the flag -sched-dot. It creates several files which are named in the following style:

<Module>_<GraphType>.dot

To view the graphs without the Bluespec Development Workstation, you can use any of a number of 3rd-party packages capable of displaying dot files. An example is graphviz (http://www.graphviz.org), where the viewer application is called dot, which converts a .dot file to a pdf or png format. For example, you can use the following alias in your .cshrc file to process and view .dot files

alias showdot 'dot -Tpdf \!:1 > /tmp/\!:1.pdf && xpdf /tmp/\!:1.pdf && rm -f /tmp/\!:1.pdf'

To view the graphs from the Bluespec Development Workstation, you must install Tcldot, which is an add-on to the graphviz package.   Unfortunately, a newer version of Tcldot (2.21 or greater) is required than the one which come with the standard linux distributions. Here are some instructions which we have used to install Tcldot on Linux Ubuntu v8.10.


Installing Tcldot

This is a list of installation instructions for the Bluespec Development Workstation to be able to display scheduling graphs in the window obtained by:
Window->Schedule Analysis->Scheduling Graphs

1.  Goto http://graphviz.org/

2.  Click the download tab, and agree to the license.

3.  Select the Ubuntu download page.

4.  Follow this procedure:

4.1  Download libgraphviz4_2.21.20090226.1309-1_i386.deb (third from top of package list)

Use Synaptic or dpkg to install these prerequisites:
libdevil1c2
libgts-0.7-5
liblasi0

Install the downloaded package: sudo dpkg -i libbgraphviz....deb

4.2  Download graphviz_2.21.20090226.1309-1_i386.deb (top of package list)

Install the downloaded package: sudo dpkg -i graphviz....deb

4.3  Download libgv-tcl_2.21.20090226.1309-1_i386.deb (third from bottom of package list)

Use Synaptic or dpkg to install these prerequisites:
tk8.5

Install the downloaded package: sudo dpkg -i libgv-tcl....deb


----------------
You should now be able to use:

Window->Schedule Analysis->Scheduling Graphs

in the Bluespec Development Workstation.

Verifying Tcldot is installed

To verify if Tcldot is installed, start a Tcl/wish shell to see if and where Tcldot is available

1.  On a linux command line, start wish:

linux>wish

An empty window will pop-up and the shell where wish was started will have the tcl command prompt %.

2.  Load the Tcldot package (graphviz) from the wish shell:

%  package require Tcldot

The version number should be returned, e.g. 2.26.3.  The version must be greater than 2.21.  If this step fails (package not found), then Tcldot is not installed.

3.  Verify where in Tcl's search path Tcldot was found:

% puts $auto_path

This will return a list of directories which is tcl's search path 

(for example: /usr/share/tcltk/tcl8.5 /usr/lib /usr/local/lib/tcltk /usr/local/share/tcltk /usr/lib/tcltk  /usr/lib/tcltk/graphviz)  

You should find an obvious entry for Tcldot/graphviz.


Finding Tcldot from the Bluespec Development Workstation

To update the tcl search path in the Bluespec Development Workstation

1.  Create the file ${HOME}/.bluetclrc

2.  Add the following line using the path found in the earlier step:

lappend auto_path /usr/lib/tcltk/graphviz/

3.  Save the file and launch the workstation


Comments