Fixed handling of local memories in functions
authorClifford Wolf <clifford@clifford.at>
Thu, 5 Jan 2017 12:18:58 +0000 (13:18 +0100)
committerClifford Wolf <clifford@clifford.at>
Thu, 5 Jan 2017 12:19:03 +0000 (13:19 +0100)
frontends/ast/simplify.cc

index 0e77df6113fb0f827831193c305952a3e88ff7bb..de85355b5b0fcae5afc827a4d09294079c543f31 100644 (file)
@@ -2173,7 +2173,7 @@ skip_dynamic_range_lvalue_expansion:;
                }
 
                for (auto child : decl->children)
-                       if (child->type == AST_WIRE || child->type == AST_PARAMETER || child->type == AST_LOCALPARAM)
+                       if (child->type == AST_WIRE || child->type == AST_MEMORY || child->type == AST_PARAMETER || child->type == AST_LOCALPARAM)
                        {
                                AstNode *wire = nullptr;
 
@@ -2233,7 +2233,7 @@ skip_dynamic_range_lvalue_expansion:;
                }
 
                for (auto child : decl->children)
-                       if (child->type != AST_WIRE && child->type != AST_PARAMETER && child->type != AST_LOCALPARAM)
+                       if (child->type != AST_WIRE && child->type != AST_MEMORY && child->type != AST_PARAMETER && child->type != AST_LOCALPARAM)
                        {
                                AstNode *stmt = child->clone();
                                stmt->replace_ids(prefix, replace_rules);