Commit 16c63b81 by Zachary Snow

test coverage for wildcard inequality

parent 5c0f414d
...@@ -7,6 +7,11 @@ module Suite; ...@@ -7,6 +7,11 @@ module Suite;
return x ==? y; return x ==? y;
endfunction endfunction
function [0:0] test_wne;
input [WIDTH-1:0] x, y;
return x !=? y;
endfunction
function [0:0] test_inside; function [0:0] test_inside;
input [WIDTH-1:0] x, y, z; input [WIDTH-1:0] x, y, z;
return x inside {y, z}; return x inside {y, z};
......
...@@ -20,6 +20,11 @@ module Suite; ...@@ -20,6 +20,11 @@ module Suite;
end end
endfunction endfunction
function [0:0] test_wne;
input [WIDTH-1:0] x, y;
test_wne = !test_weq(x, y);
endfunction
function [0:0] test_inside; function [0:0] test_inside;
input [WIDTH-1:0] x, y, z; input [WIDTH-1:0] x, y, z;
test_inside = |{test_weq(x, y), test_weq(x, z)}; test_inside = |{test_weq(x, y), test_weq(x, z)};
......
...@@ -32,6 +32,8 @@ initial begin : x ...@@ -32,6 +32,8 @@ initial begin : x
for (j = 0; j < 4**WIDTH; ++j) begin for (j = 0; j < 4**WIDTH; ++j) begin
$display("%b ==? %b = 1'b%b", $display("%b ==? %b = 1'b%b",
a, b, test_weq(a, 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 for (k = 0; k < 4**WIDTH; ++k) begin
$display("%b inside {%b, %b} = 1'b%b", $display("%b inside {%b, %b} = 1'b%b",
a, b, c, test_inside(a, b, c)); a, b, c, test_inside(a, b, c));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment