diff options
author | Aman Goel <amangoel@umich.edu> | 2018-09-10 21:44:36 -0400 |
---|---|---|
committer | Aman Goel <amangoel@umich.edu> | 2018-09-10 21:44:36 -0400 |
commit | 75c1f8d241d67ebb6db56516b4f9fdb0a312aa0b (patch) | |
tree | a08c21da4083183ac305ae5f5c2816b5452b1490 /passes | |
parent | 83b41260f6c8dd3ba617cc03b06435521038e7db (diff) | |
download | yosys-75c1f8d241d67ebb6db56516b4f9fdb0a312aa0b.tar.gz yosys-75c1f8d241d67ebb6db56516b4f9fdb0a312aa0b.tar.bz2 yosys-75c1f8d241d67ebb6db56516b4f9fdb0a312aa0b.zip |
Minor revision to -expose in setundef pass
Adds default value option as -undef when -expose used. Not having set the value mode set can cause the setundef pass to abort.
Diffstat (limited to 'passes')
-rw-r--r-- | passes/cmds/setundef.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/passes/cmds/setundef.cc b/passes/cmds/setundef.cc index 62d940ce6..a1dfa9b5c 100644 --- a/passes/cmds/setundef.cc +++ b/passes/cmds/setundef.cc @@ -162,7 +162,6 @@ struct SetundefPass : public Pass { continue; } if (args[argidx] == "-expose") { - got_value = true; expose_mode = true; continue; } @@ -212,6 +211,13 @@ struct SetundefPass : public Pass { } extra_args(args, argidx, design); + if (!got_value && expose_mode) { + log("Using default as -undef with -expose.\n"); + got_value = true; + worker.next_bit_mode = MODE_UNDEF; + worker.next_bit_state = 0; + } + if (expose_mode && !undriven_mode) log_cmd_error("Option -expose must be used with option -undriven.\n"); if (!got_value) |