diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-10-22 11:05:49 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-10-22 11:05:49 +0200 |
commit | aa7226233023dcd53a28de837de74fb60fa9d691 (patch) | |
tree | 9cf5abd4a5eba771e06225aba7e931692943a6dd /frontends/ast | |
parent | 3655d7fea7ce7f41716bd383d962119b7bf84038 (diff) | |
download | yosys-aa7226233023dcd53a28de837de74fb60fa9d691.tar.gz yosys-aa7226233023dcd53a28de837de74fb60fa9d691.tar.bz2 yosys-aa7226233023dcd53a28de837de74fb60fa9d691.zip |
Added avail params to ilang format, check module params in 'hierarchy -check'
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/ast.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index fd2724009..92513a244 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -934,10 +934,15 @@ static AstModule* process_module(AstNode *ast, bool defer) if (flag_lib) { std::vector<AstNode*> new_children; for (auto child : ast->children) { - if (child->type == AST_WIRE && (child->is_input || child->is_output)) + if (child->type == AST_WIRE && (child->is_input || child->is_output)) { new_children.push_back(child); - else + } else if (child->type == AST_PARAMETER) { + child->delete_children(); + child->children.push_back(AstNode::mkconst_int(0, false, 0)); + new_children.push_back(child); + } else { delete child; + } } ast->children.swap(new_children); ast->attributes["\\blackbox"] = AstNode::mkconst_int(1, false); |