aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorClaire Wolf <clifford@clifford.at>2020-04-01 08:38:14 +0200
committerGitHub <noreply@github.com>2020-04-01 08:38:14 +0200
commit926a010b495ff6568bef7043fcfd657470c2feee (patch)
tree602fe58c10edcfb04ea5c26e087e81a82fb63c93 /frontends/ast
parent1bb5a5215fc3e1e84af3cb77bb26cc5705ab7837 (diff)
parent5132f4099b0a09b542cdb32c3bcdee24917ca5f1 (diff)
downloadyosys-926a010b495ff6568bef7043fcfd657470c2feee.tar.gz
yosys-926a010b495ff6568bef7043fcfd657470c2feee.tar.bz2
yosys-926a010b495ff6568bef7043fcfd657470c2feee.zip
Merge pull request #1848 from YosysHQ/eddie/fix_dynslice
ast: simplify to fully populate dynamic slicing case transformation
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/simplify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 10e9f2683..f801a17e0 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -1727,7 +1727,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
}
did_something = true;
newNode = new AstNode(AST_CASE, shift_expr);
- for (int i = 0; i <= source_width-result_width; i++) {
+ for (int i = 0; i < source_width; i++) {
int start_bit = children[0]->id2ast->range_right + i;
AstNode *cond = new AstNode(AST_COND, mkconst_int(start_bit, true));
AstNode *lvalue = children[0]->clone();