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