data/full_repos/permissive/434837003/test/function.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/434837003/test/function.v:47: Multiple top level modules\n                                                                          : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                          : ... Top module \'tryfact\'\nmodule tryfact;\n       ^~~~~~~\n                                                                          : ... Top module \'ram_model\'\nmodule ram_model (address, write, chip_select, data);\n       ^~~~~~~~~\n%Error: data/full_repos/permissive/434837003/test/function.v:13: Duplicate declaration of function: \'getbyte\'\nfunction [7:0] getbyte (input [15:0] address);\n               ^~~~~~~\n        data/full_repos/permissive/434837003/test/function.v:5: ... Location of original declaration\nfunction [7:0] getbyte;\n               ^~~~~~~\n%Error: data/full_repos/permissive/434837003/test/function.v:9: Can\'t find definition of variable: \'result_expression\'\n    getbyte = result_expression;\n              ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/434837003/test/function.v:29: Found definition of \'factorial\' as a VAR but expected a task/function\n        factorial = factorial (operand - 1) * operand;\n                    ^~~~~~~~~\n%Error: Exiting due to 3 error(s), 1 warning(s)\n'
module tryfact;

function [7:0] getbyte;
input [15:0] address;
begin

    getbyte = result_expression;
end
endfunction

function [7:0] getbyte (input [15:0] address);
begin

    getbyte = result_expression;
end
endfunction


function automatic [3:0] b;
endfunction


function automatic integer factorial;
input [31:0] operand;
    integer i;
    if (operand >= 2)
        factorial = factorial (operand - 1) * operand;
    else
        factorial = 1;
endfunction


integer result;
integer n;

initial begin
    for (n = 0; n <= 7; n = n+1) begin
        result = factorial(n);
        $display("%0d factorial=%0d", n, result);
    end
end
endmodule
module tryfact;


function [7:0] getbyte;
input [15:0] address;
begin

    getbyte = result_expression;
end
endfunction

function [7:0] getbyte (input [15:0] address);
begin

    getbyte = result_expression;
end
endfunction


function automatic [3:0] b;
endfunction


function automatic integer factorial;
input [31:0] operand;
    integer i;
    if (operand >= 2)
        factorial = factorial (operand - 1) * operand;
    else
        factorial = 1;
endfunction


integer result;
integer n;

initial begin
    for (n = 0; n <= 7; n = n+1) begin
        result = factorial(n);
        $display("%0d factorial=%0d", n, result);
    end
end
endmodule