aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-12-04 21:33:00 +0100
committerClifford Wolf <clifford@clifford.at>2013-12-04 21:33:00 +0100
commit853538d78b0207ca218524cb766fd5cdb165478d (patch)
tree7393e353df4028bb4bc2ac58c1c8a862de5a5960 /frontends
parent3c220e0b3271af2505f45c9828d878a492831174 (diff)
downloadyosys-853538d78b0207ca218524cb766fd5cdb165478d.tar.gz
yosys-853538d78b0207ca218524cb766fd5cdb165478d.tar.bz2
yosys-853538d78b0207ca218524cb766fd5cdb165478d.zip
Fixed generate-for (and disabled double warning for auto-wire)
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/simplify.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 94b588f25..3d512d6f0 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -513,7 +513,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
}
}
if (current_scope.count(str) == 0) {
- log("Warning: Creating auto-wire `%s' in module `%s'.\n", str.c_str(), current_ast_mod->str.c_str());
+ // log("Warning: Creating auto-wire `%s' in module `%s'.\n", str.c_str(), current_ast_mod->str.c_str());
AstNode *auto_wire = new AstNode(AST_AUTOWIRE);
auto_wire->str = str;
current_ast_mod->children.push_back(auto_wire);
@@ -580,6 +580,10 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
AstNode *next_ast = children[2];
AstNode *body_ast = children[3];
+ while (body_ast->type == AST_GENBLOCK && body_ast->str.empty() &&
+ body_ast->children.size() == 1 && body_ast->children.at(0)->type == AST_GENBLOCK)
+ body_ast = body_ast->children.at(0);
+
if (init_ast->type != AST_ASSIGN_EQ)
log_error("Unsupported 1st expression of generate for-loop at %s:%d!\n", filename.c_str(), linenum);
if (next_ast->type != AST_ASSIGN_EQ)