Some cleanups in setundef.cc

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-05-13 16:36:12 +02:00
parent ae33026799
commit 0fad1570b5
1 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,9 @@ struct SetundefWorker
if (next_bit_mode == 1) if (next_bit_mode == 1)
return RTLIL::State::S1; return RTLIL::State::S1;
if (next_bit_mode == 2)
log_abort();
if (next_bit_mode == 4) if (next_bit_mode == 4)
return RTLIL::State::Sx; return RTLIL::State::Sx;
@ -117,21 +120,25 @@ struct SetundefPass : public Pass {
if (args[argidx] == "-zero") { if (args[argidx] == "-zero") {
got_value = true; got_value = true;
worker.next_bit_mode = 0; worker.next_bit_mode = 0;
worker.next_bit_state = 0;
continue; continue;
} }
if (args[argidx] == "-one") { if (args[argidx] == "-one") {
got_value = true; got_value = true;
worker.next_bit_mode = 1; worker.next_bit_mode = 1;
worker.next_bit_state = 0;
continue; continue;
} }
if (args[argidx] == "-anyseq") { if (args[argidx] == "-anyseq") {
got_value = true; got_value = true;
worker.next_bit_mode = 2; worker.next_bit_mode = 2;
worker.next_bit_state = 0;
continue; continue;
} }
if (args[argidx] == "-undef") { if (args[argidx] == "-undef") {
got_value = true; got_value = true;
worker.next_bit_mode = 4; worker.next_bit_mode = 4;
worker.next_bit_state = 0;
continue; continue;
} }
if (args[argidx] == "-init") { if (args[argidx] == "-init") {