aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-12-22 01:31:25 +0000
committerGitHub <noreply@github.com>2020-12-22 01:31:25 +0000
commit3e67ab1ebb62a1cc69f2cb02546ae8b1cf838e07 (patch)
tree8be33088a759dd474cfc5f30ffdbacdc6782872f /tests
parentdf905709ca8bc2a92e8cef6855b53c5f032e491d (diff)
parent186d6df4c3e612667b1eb945ce3e27a92e2cb485 (diff)
downloadyosys-3e67ab1ebb62a1cc69f2cb02546ae8b1cf838e07.tar.gz
yosys-3e67ab1ebb62a1cc69f2cb02546ae8b1cf838e07.tar.bz2
yosys-3e67ab1ebb62a1cc69f2cb02546ae8b1cf838e07.zip
Merge pull request #2479 from zachjs/const-arg-hint
Allow constant function calls in constant function arguments
Diffstat (limited to 'tests')
-rw-r--r--tests/various/const_arg_loop.v9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/various/const_arg_loop.v b/tests/various/const_arg_loop.v
index 3bfff4acd..76cc67abb 100644
--- a/tests/various/const_arg_loop.v
+++ b/tests/various/const_arg_loop.v
@@ -14,6 +14,11 @@ module top;
end
endfunction
+ function automatic [31:0] pass_through;
+ input [31:0] inp;
+ pass_through = inp;
+ endfunction
+
function automatic [31:0] operation2;
input [4:0] var;
input integer num;
@@ -47,6 +52,9 @@ module top;
wire [31:0] x1;
assign x1 = operation1(A, a);
+ wire [31:0] x1b;
+ assign x1b = operation1(pass_through(A), a);
+
wire [31:0] x2;
assign x2 = operation2(A, a);
@@ -58,6 +66,7 @@ module top;
assert property (a == 2);
assert property (A == 3);
assert property (x1 == 16);
+ assert property (x1b == 16);
assert property (x2 == 4);
assert property (x3 == 16);
`endif