Bugfix in fsm_map for FSMs without reset state
authorClifford Wolf <clifford@clifford.at>
Tue, 25 Oct 2016 21:21:37 +0000 (23:21 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 25 Oct 2016 21:21:37 +0000 (23:21 +0200)
passes/fsm/fsm_map.cc

index 5b32ed599c37ba8c618586bf6c852f46bef755db..c42303752387126b06f7c8e68446ab0cec53133f 100644 (file)
@@ -272,7 +272,8 @@ static void map_fsm(RTLIL::Cell *fsm_cell, RTLIL::Module *module)
                }
                else
                {
-                       RTLIL::SigSpec sig_a, sig_b, sig_s;
+                       RTLIL::SigSpec sig_a(RTLIL::State::Sx, next_state_wire->width);
+                       RTLIL::SigSpec sig_b, sig_s;
                        int reset_state = fsm_data.reset_state;
                        if (reset_state < 0)
                                reset_state = 0;