diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-11-24 19:40:23 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-11-24 19:40:23 +0100 |
commit | 019b3015418aaf848313ca05ce1ac59df1715052 (patch) | |
tree | 833ea5625d06cba7cb5dbc0d925833a5eb4214f5 /frontends/ast | |
parent | 620b7c900a851526339c265ba6ea9510530de985 (diff) | |
download | yosys-019b3015418aaf848313ca05ce1ac59df1715052.tar.gz yosys-019b3015418aaf848313ca05ce1ac59df1715052.tar.bz2 yosys-019b3015418aaf848313ca05ce1ac59df1715052.zip |
Early wire/reg/parameter width calculation in ast/simplify
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/simplify.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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; |