Add regression tests for issue #1074.

This commit is contained in:
Martin Whitaker 2024-01-27 16:17:31 +00:00
parent ab275a0841
commit fbb2d91927
5 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,24 @@
module test();
bit [7:0] a;
bit [7:0] b;
bit [7:0] c;
bit [7:0] d;
assign a[7:4] = 4'b0010;
assign b[7:6] = 2'b01;
assign b[5:4] = 2'b10;
assign c = 8'bx;
assign d = c + b - a;
initial begin
#0 $display("%b %b %b %b", a, b, c, d);
if (d === 8'b01000000)
$display("PASSED");
else
$display("FAILED");
end
endmodule

View File

@ -0,0 +1,24 @@
module test();
bit [7:0] a;
bit [7:0] b;
bit [7:0] c;
bit [7:0] d;
assign a[7:4] = 4'b0010;
assign b[7:6] = 2'b01;
assign b[5:4] = a[5:4];
assign c = 8'bz;
assign d = c + b - a;
initial begin
#0 $display("%b %b %b %b", a, b, c, d);
if (d === 8'b01000000)
$display("PASSED");
else
$display("FAILED");
end
endmodule

View File

@ -32,6 +32,8 @@ br_gh710c vvp_tests/br_gh710c.json
br_gh939 vvp_tests/br_gh939.json
br_gh1018 vvp_tests/br_gh1018.json
br_gh1029 vvp_tests/br_gh1029.json
br_gh1075a vvp_tests/br_gh1074a.json
br_gh1075b vvp_tests/br_gh1074b.json
ca_time_real` vvp_tests/ca_time_real.json
case1 vvp_tests/case1.json
case2 vvp_tests/case2.json

View File

@ -0,0 +1,5 @@
{
"type" : "normal",
"source" : "br_gh1074a.v",
"iverilog-args" : [ "-g2009" ]
}

View File

@ -0,0 +1,5 @@
{
"type" : "normal",
"source" : "br_gh1074b.v",
"iverilog-args" : [ "-g2009" ]
}