aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-11-18 12:35:41 +0100
committerClifford Wolf <clifford@clifford.at>2013-11-18 12:35:41 +0100
commitde031841500ca7ef50daa4bb28c534f8b05dd6ee (patch)
tree62e9cb49180df4071df7d53f32e23923090b838b /frontends/ast
parent97f2979bbae05cb8b4ead4522a8343a0b149c7a0 (diff)
downloadyosys-de031841500ca7ef50daa4bb28c534f8b05dd6ee.tar.gz
yosys-de031841500ca7ef50daa4bb28c534f8b05dd6ee.tar.bz2
yosys-de031841500ca7ef50daa4bb28c534f8b05dd6ee.zip
Fixed mem2reg for reg usage outside always block
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/simplify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index fdb6e9edd..372a2bfd6 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -1290,7 +1290,7 @@ void AstNode::mem2reg_as_needed_pass2(std::set<AstNode*> &mem2reg_set, AstNode *
mod->children.push_back(wire_data);
while (wire_data->simplify(true, false, false, 1, -1, false)) { }
- AstNode *assign_addr = new AstNode(AST_ASSIGN_EQ, new AstNode(AST_IDENTIFIER), children[0]->children[0]->clone());
+ AstNode *assign_addr = new AstNode(block ? AST_ASSIGN_EQ : AST_ASSIGN, new AstNode(AST_IDENTIFIER), children[0]->children[0]->clone());
assign_addr->children[0]->str = id_addr;
AstNode *case_node = new AstNode(AST_CASE, new AstNode(AST_IDENTIFIER));