projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3556e9
)
proc_clean: fix fully def check to consider compare/signal length.
author
whitequark
<whitequark@whitequark.org>
Fri, 18 Jan 2019 23:22:02 +0000
(23:22 +0000)
committer
whitequark
<whitequark@whitequark.org>
Fri, 18 Jan 2019 23:22:19 +0000
(23:22 +0000)
Fixes #790.
passes/proc/proc_clean.cc
patch
|
blob
|
history
diff --git
a/passes/proc/proc_clean.cc
b/passes/proc/proc_clean.cc
index 3919e4b9c1a8016119d8ba662739032fe9482ed4..0e2f95226039301c73397b3938dab00f6769f4e6 100644
(file)
--- 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)
{