Skip to content

Commit ba8c453

Browse files
committed
Don't reverse only flattened nodes
Signed-off-by: Kamil Rakoczy <[email protected]>
1 parent 2acc97d commit ba8c453

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

uhdm-plugin/UhdmAst.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,10 @@ void UhdmAst::process_assignment_pattern_op()
24792479
for (auto p : ordered_children) {
24802480
current_node->children.push_back(p.second);
24812481
}
2482+
// flattened nodes have correct order, but unflattened ones still needs to be reversed
2483+
if (!(vpi_get(vpiFlattened, obj_h) == 1)) {
2484+
std::reverse(current_node->children.begin(), current_node->children.end());
2485+
}
24822486
return;
24832487
}
24842488
auto assign_node = find_ancestor({AST::AST_ASSIGN, AST::AST_ASSIGN_EQ, AST::AST_ASSIGN_LE});

0 commit comments

Comments
 (0)