data/full_repos/permissive/143278/ivltests/constfunc9.v
[Errno 2] No such file or directory: 'preprocess.output'
data/verilator_xmls/5505e11e-7516-468e-ab5c-b8e608980cd0.xml
module constfunc10();

function [31:0] pow2(input [5:0] x);

begin:body
  pow2 = 1;
  while (1) begin:loop
    if (x == 0) disable body;
    pow2 = 2 * pow2;
    x = x - 1;
    disable loop;
    pow2 = 0;
  end
end

endfunction

localparam val = pow2(8);

initial begin
  $display("%0d", val);
  if (val === 256)
    $display("PASSED");
  else
    $display("FAILED");
end

endmodule
module constfunc10();


function [31:0] pow2(input [5:0] x);

begin:body
  pow2 = 1;
  while (1) begin:loop
    if (x == 0) disable body;
    pow2 = 2 * pow2;
    x = x - 1;
    disable loop;
    pow2 = 0;
  end
end

endfunction

localparam val = pow2(8);

initial begin
  $display("%0d", val);
  if (val === 256)
    $display("PASSED");
  else
    $display("FAILED");
end

endmodule