diff options
author | David Shah <dave@ds0.me> | 2019-02-07 10:35:36 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-02-07 10:35:36 +0000 |
commit | a4515712cb4ebf62168583fae0f3d60418c803c6 (patch) | |
tree | cb50f0842727297f4924791eb5cf4e675f0f7f74 | |
parent | e112d2fbf5a31f00ef19e6d05f28fecc1e9c56b9 (diff) | |
download | yosys-a4515712cb4ebf62168583fae0f3d60418c803c6.tar.gz yosys-a4515712cb4ebf62168583fae0f3d60418c803c6.tar.bz2 yosys-a4515712cb4ebf62168583fae0f3d60418c803c6.zip |
fsm_opt: Fix runtime error for FSMs without a reset state
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | passes/fsm/fsm_opt.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/passes/fsm/fsm_opt.cc b/passes/fsm/fsm_opt.cc index 3a6ac2746..048daee55 100644 --- a/passes/fsm/fsm_opt.cc +++ b/passes/fsm/fsm_opt.cc @@ -72,7 +72,8 @@ struct FsmOpt new_transition_table.swap(fsm_data.transition_table); new_state_table.swap(fsm_data.state_table); - fsm_data.reset_state = old_to_new_state.at(fsm_data.reset_state); + if (fsm_data.reset_state != -1) + fsm_data.reset_state = old_to_new_state.at(fsm_data.reset_state); } } |