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

Closed
veripoolbot opened this issue Aug 27, 2012 · 1 comment
Closed

Tidy up DOT file output #555

veripoolbot opened this issue Aug 27, 2012 · 1 comment
Labels
area: usability Issue involves general usability resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 555 from https://www.veripool.org
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 http://www.graphviz.org/doc/info/attrs.html

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 {
         label="obj_dir/t_unopt_array/Vt_unopt_array_58_gate_opt.dot";
         labelloc=t;
         labeljust=l;
         //size="7.5,10";
         rankdir=TB;

Use

digraph v3graph {
         graph   [label="obj_dir/t_unopt_array/Vt_unopt_array_58_gate_opt.dot",
                  labelloc=t, labeljust=l,
                  //size="7.5,10",
                  rankdir=TB];

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

@veripoolbot
Copy link
Contributor Author


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


Makes sense; pushed to git for 3.841.

@veripoolbot veripoolbot added area: usability Issue involves general usability resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: usability Issue involves general usability resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant