Tests: Check equality of complex types.
This commit is contained in:
parent
519792d02b
commit
cfce92645f
|
|
@ -14,6 +14,7 @@ module t (/*AUTOARG*/
|
||||||
input clk;
|
input clk;
|
||||||
|
|
||||||
logic [3:0] foo [1:0];
|
logic [3:0] foo [1:0];
|
||||||
|
logic [3:0] fooe [1:0];
|
||||||
initial begin
|
initial begin
|
||||||
foo[0] = 4'b0101;
|
foo[0] = 4'b0101;
|
||||||
foo[1] = 4'b0011;
|
foo[1] = 4'b0011;
|
||||||
|
|
@ -24,6 +25,10 @@ module t (/*AUTOARG*/
|
||||||
`checkh(foo.sum, 4'b1000);
|
`checkh(foo.sum, 4'b1000);
|
||||||
`checkh(foo.product, 4'b1111);
|
`checkh(foo.product, 4'b1111);
|
||||||
|
|
||||||
|
fooe[0] = 4'b0101;
|
||||||
|
fooe[1] = 4'b0011;
|
||||||
|
if (foo != fooe) $stop;
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,11 @@ module t (/*AUTOARG*/);
|
||||||
i = qe.xor();
|
i = qe.xor();
|
||||||
`checkh(i, 32'b0);
|
`checkh(i, 32'b0);
|
||||||
|
|
||||||
|
q = '{10:1, 11:2};
|
||||||
|
qe = '{10:1, 11:2};
|
||||||
|
`checkh(q == qe, 1'b1);
|
||||||
|
`checkh(q != qe, 1'b0);
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,11 @@ module t (/*AUTOARG*/);
|
||||||
`checkh(qi.size, 1);
|
`checkh(qi.size, 1);
|
||||||
`checkh(qi[0], 2);
|
`checkh(qi[0], 2);
|
||||||
|
|
||||||
|
d = '{1, 2};
|
||||||
|
de = '{1, 2};
|
||||||
|
`checkh(d == de, 1'b1);
|
||||||
|
`checkh(d != de, 1'b0);
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,11 @@ module t (/*AUTOARG*/);
|
||||||
i = qe.xor;
|
i = qe.xor;
|
||||||
`checkh(i, 32'b0);
|
`checkh(i, 32'b0);
|
||||||
|
|
||||||
|
q = '{1, 2};
|
||||||
|
qe = '{1, 2};
|
||||||
|
`checkh(q == qe, 1'b1);
|
||||||
|
`checkh(q != qe, 1'b0);
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue