Merging with official repo
authorAman Goel <amangoel@umich.edu>
Wed, 4 Jul 2018 19:14:28 +0000 (15:14 -0400)
committerAman Goel <amangoel@umich.edu>
Wed, 4 Jul 2018 19:14:28 +0000 (15:14 -0400)
1  2 
passes/cmds/setundef.cc

index c67953976a88b9be2d40581fdf6d8b8cde8259f2,3a3ebedf1eabb9cfe207a77224dd1acbb4fb9739..1cd942796dadb33e44c8ca70e422a938d040f721
@@@ -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("        also expose undriven nets as inputs\n");
 +              log("    -expose\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");
                                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;
                        }
                }
                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 <seed> must be specified.\n");
+                       log_cmd_error("One of the options -zero, -one, -anyseq, -anyconst, or -random <seed> 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())
                {