3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

Merge pull request #2326 from YosysHQ/mwk/peeopt-muldiv-sign

peepopt.muldiv: Add a signedness check.
This commit is contained in:
clairexen 2020-08-20 16:19:37 +02:00 committed by GitHub
commit 16bb3fc8bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

12
tests/opt/bug2318.ys Normal file
View file

@ -0,0 +1,12 @@
read_verilog <<EOT
module t(input [3:0] A, input [3:0] B, output signed [3:0] Y);
wire [7:0] P = A * B;
wire signed [7:0] SP = P;
wire signed [3:0] SB = B;
assign Y = SP / SB;
endmodule
EOT
equiv_opt -assert peepopt