diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-05 08:35:51 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-05 08:35:51 +0200 |
commit | 0129d41efad623ee95878a673c1c1190261ba3ef (patch) | |
tree | 42037ffccc4158a8753db177ee3041c51c136601 /tests/simple | |
parent | 0bb694221832f250977437f29365bc5e17c4cd09 (diff) | |
download | yosys-0129d41efad623ee95878a673c1c1190261ba3ef.tar.gz yosys-0129d41efad623ee95878a673c1c1190261ba3ef.tar.bz2 yosys-0129d41efad623ee95878a673c1c1190261ba3ef.zip |
Fixed AST handling of variables declared inside a functions main block
Diffstat (limited to 'tests/simple')
-rw-r--r-- | tests/simple/task_func.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/simple/task_func.v b/tests/simple/task_func.v index 8dbc90c56..51e31015f 100644 --- a/tests/simple/task_func.v +++ b/tests/simple/task_func.v @@ -33,3 +33,16 @@ end endmodule + +module task_func_test02( input [7:0] din_a, input [7:0] din_b, output [7:0] dout_a); + assign dout_a = test(din_a,din_b); + function [7:0] test; + input [7:0] a; + input [7:0] b; + begin : TEST + integer i; + for (i = 0; i <= 7; i = i + 1) + test[i] = a[i] & b[i]; + end + endfunction +endmodule |