data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v
1: b"%Error: data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v:4: Unsupported: Parameters in functions.\n  localparam incr = 1;\n             ^~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v:5: Unsupported: Parameters in functions.\n  localparam mult = 1;\n             ^~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v:13: Unsupported: Parameters in functions.\n     localparam other_mult = 2;\n                ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v:10: Can't find definition of variable: 'mult'\n    for (i = 0; i * mult < 2; i = i + incr)\n                    ^~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v:14: Can't find definition of variable: 'other_mult'\n     for (j = i; j < i * other_mult; j = j + incr)\n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/tests/various/const_func_block_var.v:15: Can't find definition of variable: 'incr'\n      num = num + incr;\n                  ^~~~\n%Error: Exiting due to 6 error(s)\n        ... See the manual and https://verilator.org for more assistance.\n"
module top(out);
	function integer operation;
		input integer num;
		localparam incr = 1;
		localparam mult = 1;
		begin
			operation = 0;
			begin : op_i
				integer i;
				for (i = 0; i * mult < 2; i = i + incr)
				begin : op_j
					integer j;
					localparam other_mult = 2;
					for (j = i; j < i * other_mult; j = j + incr)
						num = num + incr;
				end
				num = num * 2;
			end
			operation = num;
		end
	endfunction

	localparam res = operation(4);
	output wire [31:0] out;
	assign out = res;
endmodule
module top(out);

	function integer operation;
		input integer num;
		localparam incr = 1;
		localparam mult = 1;
		begin
			operation = 0;
			begin : op_i
				integer i;
				for (i = 0; i * mult < 2; i = i + incr)
				begin : op_j
					integer j;
					localparam other_mult = 2;
					for (j = i; j < i * other_mult; j = j + incr)
						num = num + incr;
				end
				num = num * 2;
			end
			operation = num;
		end
	endfunction

	localparam res = operation(4);
	output wire [31:0] out;
	assign out = res;
endmodule