Fix size of value from vpiTypespec Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
diff --git a/uhdm-plugin/UhdmAst.cc b/uhdm-plugin/UhdmAst.cc index fd6f3f0..1d88f21 100644 --- a/uhdm-plugin/UhdmAst.cc +++ b/uhdm-plugin/UhdmAst.cc
@@ -1093,7 +1093,7 @@ visit_one_to_one({vpiTypespec}, obj_h, [&](AST::AstNode *node) { if (node && node->attributes.count(UhdmAst::packed_ranges()) && node->attributes[UhdmAst::packed_ranges()]->children.size() && node->attributes[UhdmAst::packed_ranges()]->children[0]->children.size()) { - size = node->attributes[UhdmAst::packed_ranges()]->children[0]->children[0]->integer; + size = node->attributes[UhdmAst::packed_ranges()]->children[0]->children[0]->integer + 1; } }); if (size == -1) {