aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2019-01-02 03:01:25 +0000
committerwhitequark <whitequark@whitequark.org>2019-01-02 03:01:25 +0000
commit9e9846a6ead700756fbd7a5e6c72ccb424006934 (patch)
tree783de7ff1ca6ee5eae53b0335ab62e18d0cace32 /tests/opt
parent8e53d2e0bf3584709cd320447ad5a89a80dcfd94 (diff)
downloadyosys-9e9846a6ead700756fbd7a5e6c72ccb424006934.tar.gz
yosys-9e9846a6ead700756fbd7a5e6c72ccb424006934.tar.bz2
yosys-9e9846a6ead700756fbd7a5e6c72ccb424006934.zip
opt_expr: refactor simplification of signed X>=0 and X<0. NFCI.
Diffstat (limited to 'tests/opt')
-rw-r--r--tests/opt/opt_expr_cmp.v22
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/opt/opt_expr_cmp.v b/tests/opt/opt_expr_cmp.v
index 7eb65d531..72372bdf0 100644
--- a/tests/opt/opt_expr_cmp.v
+++ b/tests/opt/opt_expr_cmp.v
@@ -1,11 +1,17 @@
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;
+
+ output o1_1 = 4'b0000 > a;
+ output o1_2 = 4'b0000 <= a;
+ output o1_3 = 4'b1111 < a;
+ output o1_4 = 4'b1111 >= a;
+ output o1_5 = a < 4'b0000;
+ output o1_6 = a >= 4'b0000;
+ output o1_7 = a > 4'b1111;
+ output o1_8 = a <= 4'b1111;
+
+ output o2_1 = 4'sb0000 > $signed(a);
+ output o2_2 = 4'sb0000 <= $signed(a);
+ output o2_3 = $signed(a) < 4'sb0000;
+ output o2_4 = $signed(a) >= 4'sb0000;
endmodule