data/full_repos/permissive/138961980/powlib_std.vh
 line:10: before: "function"
1: b"%Error: data/full_repos/permissive/138961980/powlib_std.vh:59: Unsupported: Parameters in functions.\n  parameter                      BASE = 10;          \n                                 ^~~~\n%Error: data/full_repos/permissive/138961980/powlib_std.vh:60: Unsupported: Parameters in functions.\n  parameter                      CW   = 8;  \n                                 ^~\n%Error: data/full_repos/permissive/138961980/powlib_std.vh:68: Unsupported: Parameters in functions.\n  parameter                      BASE = 10;          \n                                 ^~~~\n%Error: data/full_repos/permissive/138961980/powlib_std.vh:69: Unsupported: Parameters in functions.\n  parameter                      CW   = 8;  \n                                 ^~\n%Error: data/full_repos/permissive/138961980/powlib_std.vh:63: Can't find definition of variable: 'BASE'\n    powlib_itoaw = (powlib_digits(value,BASE)+1)*CW;\n                                        ^~~~\n%Error: data/full_repos/permissive/138961980/powlib_std.vh:63: Can't find definition of variable: 'CW'\n    powlib_itoaw = (powlib_digits(value,BASE)+1)*CW;\n                                                 ^~\n%Error: Exiting due to 6 error(s)\n        ... See the manual and https://verilator.org for more assistance.\n"
function [`POWLIB_DW*`POWLIB_BW-1:0] powlib_itoa;
  parameter                      BASE = 10;
  parameter                      CW   = `POWLIB_BW;
  input     reg [`POWLIB_DW-1:0] value;  
            reg [CW-1:0]         digit;
            integer              i;
  begin
    powlib_itoa = 0;
    i           = 1;
    while (value!=0) begin
      digit                 = value%BASE;
      value                 = value/BASE;
      powlib_itoa[i*CW+:CW] = digit + "0";
      i                     = i+1;
    end
    if (i==1) begin
      powlib_itoa[1*CW+:CW] = "0";
    end
  end
endfunction
function [`POWLIB_DW*`POWLIB_BW-1:0] powlib_itoa;

  parameter                      BASE = 10;
  parameter                      CW   = `POWLIB_BW;
  input     reg [`POWLIB_DW-1:0] value;  
            reg [CW-1:0]         digit;
            integer              i;
  begin
    powlib_itoa = 0;
    i           = 1;
    while (value!=0) begin
      digit                 = value%BASE;
      value                 = value/BASE;
      powlib_itoa[i*CW+:CW] = digit + "0";
      i                     = i+1;
    end
    if (i==1) begin
      powlib_itoa[1*CW+:CW] = "0";
    end
  end
endfunction