mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-01 18:16:05 +02:00
test coverage for wildcard inequality
This commit is contained in:
@@ -7,6 +7,11 @@ module Suite;
|
||||
return x ==? y;
|
||||
endfunction
|
||||
|
||||
function [0:0] test_wne;
|
||||
input [WIDTH-1:0] x, y;
|
||||
return x !=? y;
|
||||
endfunction
|
||||
|
||||
function [0:0] test_inside;
|
||||
input [WIDTH-1:0] x, y, z;
|
||||
return x inside {y, z};
|
||||
|
||||
@@ -20,6 +20,11 @@ module Suite;
|
||||
end
|
||||
endfunction
|
||||
|
||||
function [0:0] test_wne;
|
||||
input [WIDTH-1:0] x, y;
|
||||
test_wne = !test_weq(x, y);
|
||||
endfunction
|
||||
|
||||
function [0:0] test_inside;
|
||||
input [WIDTH-1:0] x, y, z;
|
||||
test_inside = |{test_weq(x, y), test_weq(x, z)};
|
||||
|
||||
@@ -32,6 +32,8 @@ initial begin : x
|
||||
for (j = 0; j < 4**WIDTH; ++j) begin
|
||||
$display("%b ==? %b = 1'b%b",
|
||||
a, b, test_weq(a, b));
|
||||
$display("%b !=? %b = 1'b%b",
|
||||
a, b, test_wne(a, b));
|
||||
for (k = 0; k < 4**WIDTH; ++k) begin
|
||||
$display("%b inside {%b, %b} = 1'b%b",
|
||||
a, b, c, test_inside(a, b, c));
|
||||
|
||||
Reference in New Issue
Block a user