Add regression tests for issue #1074.
This commit is contained in:
parent
ab275a0841
commit
fbb2d91927
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -32,6 +32,8 @@ br_gh710c vvp_tests/br_gh710c.json
|
||||||
br_gh939 vvp_tests/br_gh939.json
|
br_gh939 vvp_tests/br_gh939.json
|
||||||
br_gh1018 vvp_tests/br_gh1018.json
|
br_gh1018 vvp_tests/br_gh1018.json
|
||||||
br_gh1029 vvp_tests/br_gh1029.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
|
ca_time_real` vvp_tests/ca_time_real.json
|
||||||
case1 vvp_tests/case1.json
|
case1 vvp_tests/case1.json
|
||||||
case2 vvp_tests/case2.json
|
case2 vvp_tests/case2.json
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"type" : "normal",
|
||||||
|
"source" : "br_gh1074a.v",
|
||||||
|
"iverilog-args" : [ "-g2009" ]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"type" : "normal",
|
||||||
|
"source" : "br_gh1074b.v",
|
||||||
|
"iverilog-args" : [ "-g2009" ]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue