3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-09 09:21:58 +00:00

Merge pull request #3991 from adrianparvino/alumacc-sign

alumacc: merge independent of sign
This commit is contained in:
Miodrag Milanović 2025-10-08 13:02:10 +02:00 committed by GitHub
commit 4cdaac003f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 73 additions and 22 deletions

33
tests/opt/alumacc.ys Normal file
View file

@ -0,0 +1,33 @@
read_verilog <<EOT
module top(...);
input [7:0] ra;
input [7:0] rb;
output gt;
output sgt;
output lt;
output slt;
output ge;
output eq;
output seq;
output ne;
assign gt = ra > rb;
assign sgt = $signed(ra) > $signed(rb);
assign lt = ra < rb;
assign slt = $signed(ra) < $signed(rb);
assign ge = ra >= rb;
assign eq = ra == rb;
assign seq = $signed(ra) == $signed(rb);
assign ne = ra != rb;
endmodule
EOT
proc
equiv_opt -assert alumacc
alumacc
select -assert-count 1 t:$alu