Skip to content

Commit 609912f

Browse files
authored
Merge pull request #209 from diffblue/verilog-integer-type
Verilog: use verilog_integer instead of integer
2 parents bb810fd + ebc8acf commit 609912f

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
bit-extract4.sv
3+
--bound 0
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module main;
2+
3+
wire integer x = 'hff;
4+
5+
p0: assert property (x[7] == 1);
6+
7+
endmodule

src/verilog/parser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ integer_atom_type:
13361336
| TOK_SHORTINT { init($$, ID_verilog_shortint); }
13371337
| TOK_INT { init($$, ID_verilog_int); }
13381338
| TOK_LONGINT { init($$, ID_verilog_longint); }
1339-
| TOK_INTEGER { init($$, ID_integer); }
1339+
| TOK_INTEGER { init($$, ID_verilog_integer); }
13401340
| TOK_TIME { init($$, ID_verilog_time); }
13411341
;
13421342

@@ -1830,7 +1830,7 @@ range_or_type_opt:
18301830
range_or_type:
18311831
packed_dimension
18321832
| TOK_INTEGER
1833-
{ init($$, ID_integer); }
1833+
{ init($$, ID_verilog_integer); }
18341834
| TOK_REAL
18351835
{ init($$, ID_verilog_real); }
18361836
| TOK_REALTIME

src/verilog/verilog_typecheck_type.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ typet verilog_typecheck_exprt::convert_type(const typet &src)
3535
// it's just a bit
3636
return bool_typet().with_source_location(source_location);
3737
}
38-
else if(src.id() == ID_integer)
39-
{
40-
return integer_typet().with_source_location(source_location);
41-
}
4238
else if(src.id() == ID_verilog_byte)
4339
{
4440
return signedbv_typet{8}.with_source_location(source_location);

0 commit comments

Comments
 (0)