From 16c63b810935b44dd496cf0e35550de27bfa56f0 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Thu, 3 Dec 2020 16:23:00 -0700 Subject: [PATCH] test coverage for wildcard inequality --- test/basic/inside_exhaust.sv | 5 +++++ test/basic/inside_exhaust.v | 5 +++++ test/basic/inside_exhaust.vh | 2 ++ 3 files changed, 12 insertions(+) diff --git a/test/basic/inside_exhaust.sv b/test/basic/inside_exhaust.sv index 669cef0..5671d1c 100644 --- a/test/basic/inside_exhaust.sv +++ b/test/basic/inside_exhaust.sv @@ -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}; diff --git a/test/basic/inside_exhaust.v b/test/basic/inside_exhaust.v index cebc757..f0276d0 100644 --- a/test/basic/inside_exhaust.v +++ b/test/basic/inside_exhaust.v @@ -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)}; diff --git a/test/basic/inside_exhaust.vh b/test/basic/inside_exhaust.vh index aa40edb..46489e2 100644 --- a/test/basic/inside_exhaust.vh +++ b/test/basic/inside_exhaust.vh @@ -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));