Skip to content

Commit f8af8a5

Browse files
committed
Support longint typespec
Signed-off-by: Krzysztof Bieganski <[email protected]>
1 parent c9af547 commit f8af8a5

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

systemverilog-plugin/UhdmAst.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3427,6 +3427,16 @@ void UhdmAst::process_shortint_typespec()
34273427
current_node->is_signed = true;
34283428
}
34293429

3430+
void UhdmAst::process_longint_typespec()
3431+
{
3432+
std::vector<AST::AstNode *> packed_ranges; // comes before wire name
3433+
std::vector<AST::AstNode *> unpacked_ranges; // comes after wire name
3434+
current_node = make_ast_node(AST::AST_WIRE);
3435+
packed_ranges.push_back(make_range(63, 0));
3436+
add_multirange_wire(current_node, packed_ranges, unpacked_ranges);
3437+
current_node->is_signed = true;
3438+
}
3439+
34303440
void UhdmAst::process_byte_typespec()
34313441
{
34323442
std::vector<AST::AstNode *> packed_ranges; // comes before wire name
@@ -3616,6 +3626,7 @@ void UhdmAst::process_port()
36163626
case vpiUnionVar:
36173627
case vpiEnumVar:
36183628
case vpiShortIntVar:
3629+
case vpiLongIntVar:
36193630
case vpiIntVar:
36203631
case vpiIntegerVar:
36213632
break;
@@ -4098,6 +4109,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle)
40984109
case vpiShortIntTypespec:
40994110
process_shortint_typespec();
41004111
break;
4112+
case vpiLongIntTypespec:
4113+
process_longint_typespec();
4114+
break;
41014115
case vpiTimeTypespec:
41024116
process_time_typespec();
41034117
break;

systemverilog-plugin/UhdmAst.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class UhdmAst
127127
void process_logic_typespec();
128128
void process_int_typespec();
129129
void process_shortint_typespec();
130+
void process_longint_typespec();
130131
void process_time_typespec();
131132
void process_bit_typespec();
132133
void process_string_var();

0 commit comments

Comments
 (0)