aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-11-12 13:02:36 +0100
committerClifford Wolf <clifford@clifford.at>2015-11-12 13:02:36 +0100
commit7ae3d1b5a99edf84fd543fe78ed68b0470005959 (patch)
tree7d5db102aa1fa3866f4b5df48b47d0809805f990 /tests/simple
parent34f2b84fb60445210ff9ffdf33b90ef6f50b91ed (diff)
downloadyosys-7ae3d1b5a99edf84fd543fe78ed68b0470005959.tar.gz
yosys-7ae3d1b5a99edf84fd543fe78ed68b0470005959.tar.bz2
yosys-7ae3d1b5a99edf84fd543fe78ed68b0470005959.zip
More bugfixes in handling of parameters in tasks and functions
Diffstat (limited to 'tests/simple')
-rw-r--r--tests/simple/task_func.v13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/simple/task_func.v b/tests/simple/task_func.v
index 36ac768ea..fa50c1d5c 100644
--- a/tests/simple/task_func.v
+++ b/tests/simple/task_func.v
@@ -83,8 +83,9 @@ endmodule
// -------------------------------------------------------------------
-module task_func_test04(input [7:0] in, output [7:0] out1, out2, out3);
+module task_func_test04(input [7:0] in, output [7:0] out1, out2, out3, out4);
parameter p = 23;
+ parameter px = 42;
function [7:0] test1;
input [7:0] i;
parameter p = 42;
@@ -105,7 +106,17 @@ module task_func_test04(input [7:0] in, output [7:0] out1, out2, out3);
test3 = i + p;
end
endfunction
+ function [7:0] test4;
+ input [7:0] i;
+ parameter px = p + 13;
+ parameter p3 = px - 37;
+ parameter p4 = p3 ^ px;
+ begin
+ test4 = i + p4;
+ end
+ endfunction
assign out1 = test1(in);
assign out2 = test2(in);
assign out3 = test3(in);
+ assign out4 = test4(in);
endmodule