From d93afadcb239726513d1fc8e83729d9b92e4032b Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Wed, 6 Dec 2023 18:36:59 -0800 Subject: [PATCH] MultiDimHierPath5 test --- frontends/systemverilog/uhdm_ast.cc | 2 +- tests/formal/passlist.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontends/systemverilog/uhdm_ast.cc b/frontends/systemverilog/uhdm_ast.cc index b539d87d2..54a149c3c 100644 --- a/frontends/systemverilog/uhdm_ast.cc +++ b/frontends/systemverilog/uhdm_ast.cc @@ -1032,7 +1032,7 @@ static AST::AstNode *convert_dot(AST::AstNode *wire_node, AST::AstNode *node, AS auto target_l = target->children.at(0); auto target_r = target->children.at(1); auto index = dot->children.at(0)->children.at(0); - if (index->type == AST::AST_CONSTANT) { + if (index->type == AST::AST_CONSTANT || index->type == AST::AST_IDENTIFIER) { // target_size = l - r + 1 auto target_size = new AST::AstNode(AST::AST_ADD, new AST::AstNode(AST::AST_SUB, target_l->clone(), target_r->clone()), AST::AstNode::mkconst_int(1, true, 32)); diff --git a/tests/formal/passlist.txt b/tests/formal/passlist.txt index 45178dcf9..c8f3e25c8 100644 --- a/tests/formal/passlist.txt +++ b/tests/formal/passlist.txt @@ -138,6 +138,7 @@ simple:MultiDimHierPath/dut.sv simple:MultiDimHierPath2/dut.sv simple:MultiDimHierPath3/dut.sv simple:MultiDimHierPath4/dut.sv +simple:MultiDimHierPath5/dut.sv simple:MultiDimHierPath6/dut.sv simple:MultipleAssignments/top.sv simple:MultipleCells/top.sv