From: clairexen Date: Thu, 1 Oct 2020 16:17:36 +0000 (+0200) Subject: Merge pull request #2378 from udif/pr_dollar_high_low X-Git-Tag: working-ls180~253 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e2fc2eaeb70179c8da3e5dc8be800f486d5b912;p=yosys.git Merge pull request #2378 from udif/pr_dollar_high_low Added $high(), $low(), $left(), $right() --- 7e2fc2eaeb70179c8da3e5dc8be800f486d5b912 diff --cc frontends/ast/simplify.cc index 153a42e19,95f2d1810..fb6623f02 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@@ -1521,9 -1523,10 +1523,10 @@@ bool AstNode::simplify(bool const_fold { AstNode *index_expr = nullptr; + integer = children[0]->children.size(); // save original number of dimensions for $size() etc. for (int i = 0; 2*i < GetSize(id2ast->multirange_dimensions); i++) { - if (GetSize(children[0]->children) < i) + if (GetSize(children[0]->children) <= i) log_file_error(filename, location.first_line, "Insufficient number of array indices for %s.\n", log_id(str)); AstNode *new_index_expr = children[0]->children[i]->children.at(0)->clone();