Skip to content

Commit f527ced

Browse files
authored
Merge pull request chipsalliance#513 from antmicro/kr/fix_packed_array
systemverilog-plugin: fix unnamed packed array
2 parents dd4cf9b + deaff5f commit f527ced

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

systemverilog-plugin/UhdmAst.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,9 @@ void UhdmAst::process_packed_array_typespec()
17421742
visit_one_to_one({vpiElemTypespec}, obj_h, [&](AST::AstNode *node) {
17431743
if (node && node->type == AST::AST_STRUCT) {
17441744
auto str = current_node->str;
1745+
// unnamed array of named (struct) array
1746+
if (str.empty() && !node->str.empty())
1747+
str = node->str;
17451748
node->cloneInto(current_node);
17461749
current_node->str = str;
17471750
delete node;

0 commit comments

Comments
 (0)