data/full_repos/permissive/143278/ivltests/function3.11B.v
data/verilator_xmls/631aa351-81e0-4272-865a-d89ffdce5eb9.xml
module main ();

reg [31:0] val1,val2 ;
reg error;

function [31:0] myfunc ;
  input [31:0] in1 ;
  myfunc = in1 ;
endfunction

initial
  begin
    error = 0;
    val1 = myfunc(32'h0) ;
    if(val1 != 32'h0)
      begin
        $display("FAILED - function3.11B - func(lit) != lit ");
        error = 1;
      end

    val2 = 32'h12345678 ;
    val1 = myfunc(val2);
    if(val1 != val2)
      begin
        $display("FAILED - function3.11B - func(reg var) != reg var ");
        error = 1;
      end

    if(myfunc(32'h10101010) != 32'h10101010)
      begin
        $display("FAILED - function3.11B - if(func(reg var) != reg var) ");
        error = 1;
      end

    if(error == 0)
       $display("PASSED");
  end

endmodule
module main ();


reg [31:0] val1,val2 ;
reg error;

function [31:0] myfunc ;
  input [31:0] in1 ;
  myfunc = in1 ;
endfunction

initial
  begin
    error = 0;
    val1 = myfunc(32'h0) ;
    if(val1 != 32'h0)
      begin
        $display("FAILED - function3.11B - func(lit) != lit ");
        error = 1;
      end

    val2 = 32'h12345678 ;
    val1 = myfunc(val2);
    if(val1 != val2)
      begin
        $display("FAILED - function3.11B - func(reg var) != reg var ");
        error = 1;
      end

    if(myfunc(32'h10101010) != 32'h10101010)
      begin
        $display("FAILED - function3.11B - if(func(reg var) != reg var) ");
        error = 1;
      end

    if(error == 0)
       $display("PASSED");
  end

endmodule