summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-07-09 18:59:59 +0200
committerClifford Wolf <clifford@clifford.at>2013-07-09 18:59:59 +0200
commit7daeee340a7edad3f4450e1392f8bad8d8b9cb7c (patch)
tree42106533b2f4b23bfcc594a2ac73301895faf182 /tests
parente8da3ea7b647f2c1eeba8a84590df7b05ca4e046 (diff)
Fixed shift ops with large right hand side
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/vloghammer.v46
1 files changed, 43 insertions, 3 deletions
diff --git a/tests/simple/vloghammer.v b/tests/simple/vloghammer.v
index a0cde043..9269ff05 100644
--- a/tests/simple/vloghammer.v
+++ b/tests/simple/vloghammer.v
@@ -3,8 +3,48 @@
// https://github.com/cliffordwolf/VlogHammer
module test01(a, y);
- input [7:0] a;
- output [3:0] y;
- assign y = ~a >> 4;
+ input [7:0] a;
+ output [3:0] y;
+ assign y = ~a >> 4;
+endmodule
+
+module test02(a, y);
+ input signed [3:0] a;
+ output signed [4:0] y;
+ assign y = (~a) >> 1;
+endmodule
+
+module test03(a, b, y);
+ input [2:0] a;
+ input signed [1:0] b;
+ output y;
+ assign y = ~(a >>> 1) == b;
+endmodule
+
+module test04(a, y);
+ input a;
+ output [1:0] y;
+ assign y = ~(a - 1'b0);
+endmodule
+
+module test05(a, y);
+ input a;
+ output y;
+ assign y = 12345 >> {a, 32'd0};
+endmodule
+
+module test06(a, b, c, y);
+ input signed [3:0] a;
+ input signed [1:0] b;
+ input signed [1:0] c;
+ output [5:0] y;
+ assign y = (a >> b) >>> c;
+endmodule
+
+module test07(a, b, y);
+ input signed [1:0] a;
+ input signed [2:0] b;
+ output y;
+ assign y = 2'b11 != a+b;
endmodule