mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-06 09:28:58 +02:00
integer atom explicit sign cast support
This commit is contained in:
@@ -33,4 +33,12 @@ module top;
|
||||
$display("%b", 5'(1'sb1));
|
||||
end
|
||||
|
||||
parameter W = 9;
|
||||
initial begin
|
||||
byte i = -1;
|
||||
byte unsigned j = -1;
|
||||
$display("%b", W'(i));
|
||||
$display("%b", W'(j));
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
@@ -36,4 +36,18 @@ module top;
|
||||
$display("%b", 5'sb11111);
|
||||
end
|
||||
|
||||
parameter W = 9;
|
||||
initial begin : block
|
||||
reg signed [7:0] i;
|
||||
reg [7:0] j;
|
||||
reg [8:0] i_extended;
|
||||
reg [8:0] j_extended;
|
||||
i = -1;
|
||||
j = -1;
|
||||
i_extended = i;
|
||||
j_extended = j;
|
||||
$display("%b", i_extended);
|
||||
$display("%b", j_extended);
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
@@ -66,7 +66,7 @@ assertConverts() {
|
||||
assertFalse "conversion of $ac_file still contains dimension queries" $?
|
||||
echo "$filtered" | egrep "\s(int\|bit\|logic\|byte\|struct\|enum\|longint\|shortint)\s"
|
||||
assertFalse "conversion of $ac_file still contains SV types" $?
|
||||
echo "$filtered" | grep "[^$]unsigned" > /dev/null
|
||||
echo "$filtered" | grep "[^\$a-zA-Z_]unsigned" > /dev/null
|
||||
assertFalse "conversion of $ac_file still contains unsigned keyword" $?
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user