projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e112d2f
)
fsm_opt: Fix runtime error for FSMs without a reset state
author
David Shah
<dave@ds0.me>
Thu, 7 Feb 2019 10:35:36 +0000
(10:35 +0000)
committer
David Shah
<dave@ds0.me>
Thu, 7 Feb 2019 10:35:36 +0000
(10:35 +0000)
Signed-off-by: David Shah <dave@ds0.me>
passes/fsm/fsm_opt.cc
patch
|
blob
|
history
diff --git
a/passes/fsm/fsm_opt.cc
b/passes/fsm/fsm_opt.cc
index 3a6ac274607fa71d7df1f74787ffbeddb6a11d03..048daee55f5c3ec81f7819211c73c324b80d9ab1 100644
(file)
--- 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);
}
}