mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-05 10:50:25 +00:00
Fixed AST handling of variables declared inside a functions main block
This commit is contained in:
parent
0bb6942218
commit
0129d41efa
2 changed files with 16 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue