From 9f00a0cd2d972a5fc4a75f8c1bdba723a5f66b7d Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 2 Sep 2014 03:28:46 +0200 Subject: [PATCH] Using "xdot" instead of "yosys-svgviewer" in show command --- README | 2 +- passes/cmds/show.cc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README b/README index 2e713ffef..2c7703a15 100644 --- a/README +++ b/README @@ -58,7 +58,7 @@ will install all prerequisites for building yosys: $ yosys_deps="git g++ clang make bison flex libreadline-dev tcl8.5-dev zlib1g-dev libqt4-dev libffi-dev - mercurial iverilog graphviz" + mercurial iverilog graphviz xdot" $ sudo apt-get install $yosys_deps There are also pre-compiled packages for Yosys on Ubuntu. Visit the Yosys diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc index 3468eae78..6ab0e1ba1 100644 --- a/passes/cmds/show.cc +++ b/passes/cmds/show.cc @@ -751,8 +751,8 @@ struct ShowPass : public Pass { if (worker.page_counter == 0) log_cmd_error("Nothing there to show.\n"); - if (format != "dot") { - std::string cmd = stringf("dot -T%s -o '%s' '%s'", format.empty() ? "svg" : format.c_str(), out_file.c_str(), dot_file.c_str()); + if (format != "dot" && !format.empty()) { + std::string cmd = stringf("dot -T%s -o '%s' '%s'", format.c_str(), out_file.c_str(), dot_file.c_str()); log("Exec: %s\n", cmd.c_str()); if (system(cmd.c_str()) != 0) log_cmd_error("Shell command failed!\n"); @@ -765,8 +765,7 @@ struct ShowPass : public Pass { log_cmd_error("Shell command failed!\n"); } else if (format.empty()) { - std::string svgviewer = proc_self_dirname() + "yosys-svgviewer"; - std::string cmd = stringf("fuser -s '%s' || '%s' '%s' &", out_file.c_str(), svgviewer.c_str(), out_file.c_str()); + std::string cmd = stringf("fuser -s '%s' || xdot '%s' < '%s' &", dot_file.c_str(), dot_file.c_str(), dot_file.c_str()); log("Exec: %s\n", cmd.c_str()); if (system(cmd.c_str()) != 0) log_cmd_error("Shell command failed!\n"); -- 2.30.2