From: Clifford Wolf Date: Fri, 8 Aug 2014 12:55:11 +0000 (+0200) Subject: Another fsm_extract bugfix X-Git-Tag: yosys-0.4~288 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58ac605470aed3b2a537b4f99ac17a199f8b5233;p=yosys.git Another fsm_extract bugfix --- diff --git a/passes/fsm/fsm_extract.cc b/passes/fsm/fsm_extract.cc index 7533b4a33..ebe3073de 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