File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed
regression/verilog/expressions Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
CORE
2
2
constants1.v
3
3
--bound 1
4
+ ^\[.*\] always main\.w == 32'hFFFF: PROVED up to bound 1$
5
+ ^\[.*\] always main\.X == 16: PROVED up to bound 1$
4
6
^EXIT=0$
5
7
^SIGNAL=0$
6
8
--
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ equality1.v
10
10
^\[.*\] always 1'bx != 10 === 1'bx: PROVED up to bound 0$
11
11
^\[.*\] always 1'bz != 20 === 1'bx: PROVED up to bound 0$
12
12
^\[.*\] always 2'b11 == 2'b11 === 0: REFUTED$
13
- ^\[.*\] always 2'sb-1 == 2'sb-1 === 1: PROVED up to bound 0$
13
+ ^\[.*\] always 2'sb11 == 2'sb11 === 1: PROVED up to bound 0$
14
14
^EXIT=10$
15
15
^SIGNAL=0$
16
16
--
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ equality2.v
11
11
^\[.*\] always 1'bx === 1 == 0: PROVED up to bound 0$
12
12
^\[.*\] always 1'bz === 1 == 0: PROVED up to bound 0$
13
13
^\[.*\] always 1 === 1 == 1: PROVED up to bound 0$
14
- ^\[.*\] always 3'b11 === 3'b111 == 1: REFUTED$
15
- ^\[.*\] always 3'sb-1 === 3'sb-1 == 1: PROVED up to bound 0$
14
+ ^\[.*\] always 3'b011 === 3'b111 == 1: REFUTED$
15
+ ^\[.*\] always 3'sb111 === 3'sb111 == 1: PROVED up to bound 0$
16
16
^EXIT=10$
17
17
^SIGNAL=0$
18
18
--
Original file line number Diff line number Diff line change @@ -1020,14 +1020,20 @@ std::string expr2verilogt::convert_constant(
1020
1020
auto i = numeric_cast_v<mp_integer>(src);
1021
1021
1022
1022
if (i>=256 )
1023
- dest=" 'h" +integer2string (i, 16 );
1023
+ {
1024
+ dest = std::to_string (width);
1025
+ dest += " 'h" ;
1026
+ if (type.id () == ID_signedbv)
1027
+ dest += ' s' ;
1028
+ dest += integer2string (i, 16 );
1029
+ }
1024
1030
else if (width<=7 )
1025
1031
{
1026
1032
dest=std::to_string (width);
1027
1033
dest+=" '" ;
1028
1034
if (type.id ()==ID_signedbv) dest+=' s' ;
1029
1035
dest+=' b' ;
1030
- dest+= integer2string (i, 2 );
1036
+ dest += integer2binary (i, width );
1031
1037
}
1032
1038
else
1033
1039
dest=integer2string (i);
You can’t perform that action at this time.
0 commit comments