aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-05-13 16:36:12 +0200
committerClifford Wolf <clifford@clifford.at>2018-05-13 16:36:12 +0200
commit0fad1570b5ab07aabf212242039921c63d1db32a (patch)
treebfbc46bceef69d1e4d742fc361134ef413d2cfda /passes/cmds
parentae33026799e0f6e05d00557e8f98f5805e3d6f13 (diff)
downloadyosys-0fad1570b5ab07aabf212242039921c63d1db32a.tar.gz
yosys-0fad1570b5ab07aabf212242039921c63d1db32a.tar.bz2
yosys-0fad1570b5ab07aabf212242039921c63d1db32a.zip
Some cleanups in setundef.cc
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'passes/cmds')
-rw-r--r--passes/cmds/setundef.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/passes/cmds/setundef.cc b/passes/cmds/setundef.cc
index 389c3790e..c11ddbdc1 100644
--- a/passes/cmds/setundef.cc
+++ b/passes/cmds/setundef.cc
@@ -40,6 +40,9 @@ struct SetundefWorker
if (next_bit_mode == 1)
return RTLIL::State::S1;
+ if (next_bit_mode == 2)
+ log_abort();
+
if (next_bit_mode == 4)
return RTLIL::State::Sx;
@@ -117,21 +120,25 @@ struct SetundefPass : public Pass {
if (args[argidx] == "-zero") {
got_value = true;
worker.next_bit_mode = 0;
+ worker.next_bit_state = 0;
continue;
}
if (args[argidx] == "-one") {
got_value = true;
worker.next_bit_mode = 1;
+ worker.next_bit_state = 0;
continue;
}
if (args[argidx] == "-anyseq") {
got_value = true;
worker.next_bit_mode = 2;
+ worker.next_bit_state = 0;
continue;
}
if (args[argidx] == "-undef") {
got_value = true;
worker.next_bit_mode = 4;
+ worker.next_bit_state = 0;
continue;
}
if (args[argidx] == "-init") {