summaryrefslogtreecommitdiff
path: root/passes/fsm/fsm_extract.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-08 14:55:11 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-08 14:56:04 +0200
commit58ac605470aed3b2a537b4f99ac17a199f8b5233 (patch)
tree5357c379e22153e23cc5ec4aa418127e6720de7e /passes/fsm/fsm_extract.cc
parent7067c43ec09cca176ad72378aa9ad868171c2471 (diff)
Another fsm_extract bugfix
Diffstat (limited to 'passes/fsm/fsm_extract.cc')
-rw-r--r--passes/fsm/fsm_extract.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/passes/fsm/fsm_extract.cc b/passes/fsm/fsm_extract.cc
index 7533b4a3..ebe3073d 100644
--- a/passes/fsm/fsm_extract.cc
+++ b/passes/fsm/fsm_extract.cc
@@ -231,6 +231,10 @@ static void extract_fsm(RTLIL::Wire *wire)
log(" fsm extraction failed: state selection tree is not closed.\n");
return;
}
+ if (SIZE(states) <= 1) {
+ log(" fsm extraction failed: at least two states are required.\n");
+ return;
+ }
// find control outputs
// (add the state signals to the list of control outputs. if everything goes right, this signals