diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-03-14 18:42:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 18:42:45 +0100 |
commit | 44a44a06ed0a7489d6d3500c5fddc4a122afffa0 (patch) | |
tree | 5702034ed2245a403d2921a8edb35be76ae46a02 /frontends/ast/genrtlil.cc | |
parent | 53b28b3f01b1ccef0cc5ba0af8000c6013d284bb (diff) | |
parent | 17caaa3fa898e39d1dbcfd8b92750a9d713a24af (diff) | |
download | yosys-44a44a06ed0a7489d6d3500c5fddc4a122afffa0.tar.gz yosys-44a44a06ed0a7489d6d3500c5fddc4a122afffa0.tar.bz2 yosys-44a44a06ed0a7489d6d3500c5fddc4a122afffa0.zip |
Merge pull request #872 from YosysHQ/clifford/pmuxfix
Improve handling of "full_case" attributes
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-rw-r--r-- | frontends/ast/genrtlil.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index d7da6fb40..b3a2a84be 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -525,7 +525,16 @@ struct AST_INTERNAL::ProcessGenerator } if (last_generated_case != NULL && ast->get_bool_attribute("\\full_case") && default_case == NULL) { + #if 0 + // this is a valid transformation, but as optimization it is premature. + // better: add a default case that assigns 'x' to everything, and let later + // optimizations take care of the rest last_generated_case->compare.clear(); + #else + default_case = new RTLIL::CaseRule; + addChunkActions(default_case->actions, this_case_eq_ltemp, SigSpec(State::Sx, GetSize(this_case_eq_rvalue))); + sw->cases.push_back(default_case); + #endif } else { if (default_case == NULL) { default_case = new RTLIL::CaseRule; |