From: Clifford Wolf Date: Sun, 24 Nov 2013 18:40:23 +0000 (+0100) Subject: Early wire/reg/parameter width calculation in ast/simplify X-Git-Tag: yosys-0.2.0~310 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=019b3015418aaf848313ca05ce1ac59df1715052;p=yosys.git Early wire/reg/parameter width calculation in ast/simplify --- diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index a3518ff03..80cf230e6 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -212,6 +212,11 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, current_scope[node->str] = node; } } + for (size_t i = 0; i < children.size(); i++) { + AstNode *node = children[i]; + if (node->type == AST_PARAMETER || node->type == AST_LOCALPARAM || node->type == AST_WIRE || node->type == AST_AUTOWIRE) + while (node->simplify(true, false, false, 1, -1, false)) { } + } } auto backup_current_block = current_block;