aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-20 18:40:23 +0100
committerDavid Shah <dave@ds0.me>2019-10-03 09:54:45 +0100
commit5501d9090aaf2d508b2f082f8453effe7fce08df (patch)
tree899e9961649b455e3a19372fc015b6882f5d046e /frontends/ast
parent8cc1bee33c04690d729d1a8b8622be05d65f7911 (diff)
downloadyosys-5501d9090aaf2d508b2f082f8453effe7fce08df.tar.gz
yosys-5501d9090aaf2d508b2f082f8453effe7fce08df.tar.bz2
yosys-5501d9090aaf2d508b2f082f8453effe7fce08df.zip
sv: Fix typedefs in blocks
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/simplify.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index aaf1188b4..0ebc183b2 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -3002,7 +3002,7 @@ void AstNode::expand_genblock(std::string index_var, std::string prefix, std::ma
}
}
- if ((type == AST_IDENTIFIER || type == AST_FCALL || type == AST_TCALL) && name_map.count(str) > 0)
+ if ((type == AST_IDENTIFIER || type == AST_FCALL || type == AST_TCALL || type == AST_WIRETYPE) && name_map.count(str) > 0)
str = name_map[str];
std::map<std::string, std::string> backup_name_map;
@@ -3010,7 +3010,7 @@ void AstNode::expand_genblock(std::string index_var, std::string prefix, std::ma
for (size_t i = 0; i < children.size(); i++) {
AstNode *child = children[i];
if (child->type == AST_WIRE || child->type == AST_MEMORY || child->type == AST_PARAMETER || child->type == AST_LOCALPARAM ||
- child->type == AST_FUNCTION || child->type == AST_TASK || child->type == AST_CELL) {
+ child->type == AST_FUNCTION || child->type == AST_TASK || child->type == AST_CELL || child->type == AST_TYPEDEF) {
if (backup_name_map.size() == 0)
backup_name_map = name_map;
std::string new_name = prefix[0] == '\\' ? prefix.substr(1) : prefix;