3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00
yosys/tests/opt/opt_expr_cmp.v
whitequark 8e53d2e0bf opt_expr: simplify any unsigned comparisons with all-0 and all-1.
Before this commit, only unsigned comparisons with all-0 would be
simplified. This commit also makes the code handling such comparisons
to be more rigorous and not abort on unexpected input.
2019-01-02 02:45:49 +00:00

12 lines
268 B
Verilog

module top(...);
input [3:0] a;
output o1 = 4'b0000 > a;
output o2 = 4'b0000 <= a;
output o3 = 4'b1111 < a;
output o4 = 4'b1111 >= a;
output o5 = a < 4'b0000;
output o6 = a >= 4'b0000;
output o7 = a > 4'b1111;
output o8 = a <= 4'b1111;
endmodule