3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 20:38:44 +00:00

show: add -viewer none option

This commit is contained in:
N. Engelhardt 2023-06-01 10:02:30 +02:00
parent 4b986c9c65
commit 0707b911c7

View file

@ -329,7 +329,7 @@ struct ShowWorker
}
code += stringf("x%d [ shape=record, style=rounded, label=\"", dot_idx) \
+ join_label_pieces(label_pieces) + "\" ];\n";
+ join_label_pieces(label_pieces) + stringf("\", %s ];\n", nextColor(sig).c_str());
if (!port.empty()) {
currentColor = xorshift32(currentColor);
@ -655,6 +655,7 @@ struct ShowPass : public Pass {
log(" -viewer <viewer>\n");
log(" Run the specified command with the graphics file as parameter.\n");
log(" On Windows, this pauses yosys until the viewer exits.\n");
log(" Use \"-viewer none\" to not run any command.\n");
log("\n");
log(" -format <format>\n");
log(" Generate a graphics file in the specified format. Use 'dot' to just\n");
@ -915,6 +916,7 @@ struct ShowPass : public Pass {
#if defined(YOSYS_DISABLE_SPAWN)
log_assert(viewer_exe.empty() && !format.empty());
#else
if (viewer_exe != "none") {
if (!viewer_exe.empty()) {
#ifdef _WIN32
// system()/cmd.exe does not understand single quotes nor
@ -938,6 +940,7 @@ struct ShowPass : public Pass {
if (run_command(cmd) != 0)
log_cmd_error("Shell command failed!\n");
}
}
#endif
if (flag_pause) {