File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2096,7 +2096,15 @@ std::string expr2verilogt::convert(const typet &type)
2096
2096
else if (type.id ()==ID_array)
2097
2097
{
2098
2098
auto &array_type = to_array_type (type);
2099
- std::string dest=" array [" ;
2099
+
2100
+ std::string dest;
2101
+
2102
+ if (type.get (ID_C_verilog_type) == ID_verilog_unpacked_array)
2103
+ dest += " unpacked " ;
2104
+ else if (type.get (ID_C_verilog_type) == ID_verilog_packed_array)
2105
+ dest += " packed " ;
2106
+
2107
+ dest += " array [" ;
2100
2108
2101
2109
dest += convert (array_type.size ());
2102
2110
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ array_typet verilog_typecheck_exprt::convert_unpacked_array_type(
73
73
auto result = array_typet{element_type, final_size_expr};
74
74
result.set (ID_offset, from_integer (offset, integer_typet ()));
75
75
result.set (ID_C_increasing, increasing);
76
+ result.set (ID_C_verilog_type, ID_verilog_unpacked_array);
76
77
77
78
return result;
78
79
}
@@ -123,6 +124,7 @@ typet verilog_typecheck_exprt::convert_packed_array_type(
123
124
dest.set_width (width.to_ulong ());
124
125
dest.set (ID_C_increasing, range.increasing ());
125
126
dest.set (ID_C_offset, integer2string (offset));
127
+ dest.set (ID_C_verilog_type, ID_verilog_packed_array);
126
128
127
129
return std::move (dest).with_source_location (source_location);
128
130
}
@@ -142,6 +144,7 @@ typet verilog_typecheck_exprt::convert_packed_array_type(
142
144
143
145
array_typet result{element_type, size};
144
146
result.set (ID_offset, from_integer (offset, integer_typet ()));
147
+ result.set (ID_C_verilog_type, ID_verilog_packed_array);
145
148
146
149
return std::move (result).with_source_location (source_location);
147
150
}
You can’t perform that action at this time.
0 commit comments