Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up DOT file output #555

veripoolbot opened this issue Aug 27, 2012 · 1 comment

Tidy up DOT file output #555

veripoolbot opened this issue Aug 27, 2012 · 1 comment


Copy link

@veripoolbot veripoolbot commented Aug 27, 2012

Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 555 from
Original Date: 2012-08-27
Original Assignee: Jeremy Bennett (@jeremybennett)

I've been working on some utilities to analyze the DOT files generated by Verilator, using the GraphViz cgraph library (more about this shortly). Verilator labels its graphs by creating a custom node, nTITLE, formatted with a black box around it. However this is mildly inconvenient - it creates a "special" node, which has to be found to determine the title.

I've modified V3Graph.cpp to generate instead a "label" attribute for the graph title, along with labelloc and labeljust to position it at the top left of the graph. This is not quite as powerful visually as a custom node (you can't specify a box around it), but it avoids having a "special" node, and allows the graph title to be easily found. Details of the permitted attributes can be found at

It seems from cgraph that GraphViz prefers DOT graph attributes to be specified as attributes of the graph entity, rather than just within the graph itself. I.e. rather than:

digraph v3graph {


digraph v3graph {
         graph   [label="obj_dir/t_unopt_array/",
                  labelloc=t, labeljust=l,

This patch also makes this change. Please pull the patch from the graphviz-fix branch at git://


This comment has been minimized.

Copy link

@veripoolbot veripoolbot commented Aug 27, 2012

Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-08-27T23:03:27Z

Makes sense; pushed to git for 3.841.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.