From: Aman Goel Date: Wed, 4 Jul 2018 19:14:28 +0000 (-0400) Subject: Merging with official repo X-Git-Tag: yosys-0.8~10^2~4^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d343fc1cdafe469484846051680ca0b1f948549;p=yosys.git Merging with official repo --- 4d343fc1cdafe469484846051680ca0b1f948549 diff --cc passes/cmds/setundef.cc index c67953976,3a3ebedf1..1cd942796 --- a/passes/cmds/setundef.cc +++ b/passes/cmds/setundef.cc @@@ -144,9 -90,6 +153,9 @@@ struct SetundefPass : public Pass log(" -undriven\n"); log(" also set undriven nets to constant values\n"); log("\n"); + log(" -expose\n"); - log(" also expose undriven nets as inputs\n"); ++ log(" also expose undriven nets as inputs (use with -undriven)\n"); + log("\n"); log(" -zero\n"); log(" replace with bits cleared (0)\n"); log("\n"); @@@ -184,14 -129,9 +196,14 @@@ undriven_mode = true; continue; } + if (args[argidx] == "-expose") { + got_value = true; + expose_mode = true; + continue; + } if (args[argidx] == "-zero") { got_value = true; - worker.next_bit_mode = 0; + worker.next_bit_mode = MODE_ZERO; worker.next_bit_state = 0; continue; } @@@ -229,10 -175,11 +247,13 @@@ } extra_args(args, argidx, design); + if (expose_mode && !undriven_mode) + log_cmd_error("Option -expose must be used with option -undriven.\n"); if (!got_value) - log_cmd_error("One of the options -zero, -one, -anyseq, or -random must be specified.\n"); + log_cmd_error("One of the options -zero, -one, -anyseq, -anyconst, or -random must be specified.\n"); + + if (init_mode && (worker.next_bit_mode == MODE_ANYSEQ || worker.next_bit_mode == MODE_ANYCONST)) + log_cmd_error("The options -init and -anyseq / -anyconst are exclusive.\n"); for (auto module : design->selected_modules()) {