diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-01-19 09:31:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-19 09:31:17 +0100 |
commit | c4b61f2d69e88ddefd8ceec02ccf074c1b713004 (patch) | |
tree | 782154b88c14c839bd7640fd144d16f94a594062 /passes/proc/proc_clean.cc | |
parent | f3556e9f7ac6947be440a51699af773655de4911 (diff) | |
parent | 95b6c3588222564b86cfa73f0601be44e3af5786 (diff) | |
download | yosys-c4b61f2d69e88ddefd8ceec02ccf074c1b713004.tar.gz yosys-c4b61f2d69e88ddefd8ceec02ccf074c1b713004.tar.bz2 yosys-c4b61f2d69e88ddefd8ceec02ccf074c1b713004.zip |
Merge pull request #793 from whitequark/proc_clean_fix_fully_def
proc_clean: fix fully def check to consider compare/signal length
Diffstat (limited to 'passes/proc/proc_clean.cc')
-rw-r--r-- | passes/proc/proc_clean.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/passes/proc/proc_clean.cc b/passes/proc/proc_clean.cc index 3919e4b9c..0e2f95226 100644 --- a/passes/proc/proc_clean.cc +++ b/passes/proc/proc_clean.cc @@ -82,9 +82,15 @@ void proc_clean_switch(RTLIL::SwitchRule *sw, RTLIL::CaseRule *parent, bool &did { if (max_depth != 0) proc_clean_case(cs, did_something, count, max_depth-1); + int size = 0; for (auto cmp : cs->compare) - if (!cmp.is_fully_def()) + { + size += cmp.size(); + if (cmp.is_fully_def()) all_fully_def = false; + } + if (sw->signal.size() != size) + all_fully_def = false; } if (all_fully_def) { |