diff options
author | whitequark <whitequark@whitequark.org> | 2020-12-23 23:15:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 23:15:30 +0000 |
commit | 8ef6b77dc366563410c88ec3687f777e74685377 (patch) | |
tree | f6ef03305cfb344a0485f62818486e2a6b844af0 /tests | |
parent | 832f6aa777558ccef3b06798d182372b5783c51f (diff) | |
parent | 8206546c45d8fe74ac291a548fa372d1bd98f966 (diff) | |
download | yosys-8ef6b77dc366563410c88ec3687f777e74685377.tar.gz yosys-8ef6b77dc366563410c88ec3687f777e74685377.tar.bz2 yosys-8ef6b77dc366563410c88ec3687f777e74685377.zip |
Merge pull request #2476 from zachjs/const-arg-width
Fix constants bound to single bit arguments (fixes #2383)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/various/const_arg_loop.v | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/various/const_arg_loop.v b/tests/various/const_arg_loop.v index 76cc67abb..ed15aa135 100644 --- a/tests/various/const_arg_loop.v +++ b/tests/various/const_arg_loop.v @@ -44,6 +44,12 @@ module top; end endfunction + function automatic [16:0] operation4; + input [15:0] a; + input b; + operation4 = {a, b}; + endfunction + wire [31:0] a; assign a = 2; @@ -61,6 +67,9 @@ module top; wire [31:0] x3; assign x3 = operation3(A, a); + wire [16:0] x4; + assign x4 = operation4(a[15:0], 0); + // `define VERIFY `ifdef VERIFY assert property (a == 2); @@ -69,5 +78,6 @@ module top; assert property (x1b == 16); assert property (x2 == 4); assert property (x3 == 16); + assert property (x4 == a << 1); `endif endmodule |