mirror of https://github.com/YosysHQ/yosys.git
proc_clean: fix fully def check to consider compare/signal length.
Fixes #790.
This commit is contained in:
parent
f3556e9f7a
commit
95b6c35882
|
@ -82,8 +82,14 @@ void proc_clean_switch(RTLIL::SwitchRule *sw, RTLIL::CaseRule *parent, bool &did
|
||||||
{
|
{
|
||||||
if (max_depth != 0)
|
if (max_depth != 0)
|
||||||
proc_clean_case(cs, did_something, count, max_depth-1);
|
proc_clean_case(cs, did_something, count, max_depth-1);
|
||||||
|
int size = 0;
|
||||||
for (auto cmp : cs->compare)
|
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;
|
all_fully_def = false;
|
||||||
}
|
}
|
||||||
if (all_fully_def)
|
if (all_fully_def)
|
||||||
|
|
Loading…
Reference in New Issue