3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-09 04:31:25 +00:00

Merge branch 'master' into clifford/pmgen

This commit is contained in:
Clifford Wolf 2019-08-20 11:39:23 +02:00 committed by GitHub
commit d0117d7d12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 85 additions and 39 deletions

1
tests/proc/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.log

23
tests/proc/bug_1268.v Normal file
View file

@ -0,0 +1,23 @@
module gold (input clock, ctrl, din, output reg dout);
always @(posedge clock) begin
if (1'b1) begin
if (1'b0) begin end else begin
dout <= 0;
end
if (ctrl)
dout <= din;
end
end
endmodule
module gate (input clock, ctrl, din, output reg dout);
always @(posedge clock) begin
if (1'b1) begin
if (1'b0) begin end else begin
dout <= 0;
end
end
if (ctrl)
dout <= din;
end
endmodule

5
tests/proc/bug_1268.ys Normal file
View file

@ -0,0 +1,5 @@
read_verilog bug_1268.v
proc
equiv_make gold gate equiv
equiv_induct
equiv_status -assert

6
tests/proc/run-test.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -e
for x in *.ys; do
echo "Running $x.."
../../yosys -ql ${x%.ys}.log $x
done

View file

@ -1,4 +1,3 @@
module demo_001(y1, y2, y3, y4);
output [7:0] y1, y2, y3, y4;
@ -22,3 +21,13 @@ module demo_002(y0, y1, y2, y3);
assign y3 = 1 ? -1 : 'd0;
endmodule
module demo_003(output A, B);
parameter real p = 0;
assign A = (p==1.0);
assign B = (p!="1.000000");
endmodule
module demo_004(output A, B, C, D);
demo_003 #(1.0) demo_real (A, B);
demo_003 #(1) demo_int (C, D);
endmodule

View file

@ -1,3 +1,4 @@
*.v
*.sv
*.log
*.out