data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v:23: Unsupported: Ignoring delay on this delayed statement.\n    #0.9;\n    ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v:45: Unsupported: Ignoring delay on this delayed statement.\n    #0.1;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v:46: Unsupported: Ignoring delay on this delayed statement.\n    #0;\n    ^\n%Warning-WIDTH: data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v:16: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS\'s RTOIS generates 32 bits.\n                                                                                 : ... In instance top\n  assign #1 isfunc = $rtoi(2.0);  \n                   ^\n%Warning-WIDTH: data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v:19: Operator FUNCREF \'int_func\' expects 32 bits on the Function Argument, but Function Argument\'s VARREF \'ia\' generates 4 bits.\n                                                                                 : ... In instance top\n  assign #1 iufunc = int_func(ia);  \n                     ^~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/42434302/ivltests/pr1883052b-v0.9.v:19: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS\'s FUNCREF \'int_func\' generates 32 bits.\n                                                                                 : ... In instance top\n  assign #1 iufunc = int_func(ia);  \n                   ^\n%Error: Exiting due to 6 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module top;
  reg pass = 1'b1;

  reg [3:0] ia = 4'd1;
  wire signed [3:0] iconstp, iconstm, isfunc, iufunc;
  wire [7:0] istring;


  assign #1 iconstp = 2;
  assign #1 iconstm = -2;
  assign #1 istring = "0";


  assign #1 isfunc = $rtoi(2.0);


  assign #1 iufunc = int_func(ia);

  initial begin

    #0.9;
    if (iconstp !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: constant (positive) value not delayed.");
    end
    if (iconstm !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: constant (negative) value not delayed.");
    end
    if (istring !== 8'bz) begin
      pass = 1'b0;
      $display("Integer: string value not delayed.");
    end
    if (isfunc !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: system function value not delayed.");
    end
    if (iufunc !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: user function value not delayed.");
    end

    #0.1;
    #0;
    if (iconstp !== 2) begin
      pass = 1'b0;
      $display("Integer: constant (positive) value not delayed correctly.");
    end
    if (iconstm !== -2) begin
      pass = 1'b0;
      $display("Integer: constant (negative) value not delayed correctly.");
    end
    if (istring !== "0") begin
      pass = 1'b0;
      $display("Integer: string value not delayed correctly.");
    end
    if (isfunc !== 2) begin
      pass = 1'b0;
      $display("Integer: system function value not delayed correctly.");
    end
    if (iufunc !== 2) begin
      pass = 1'b0;
      $display("Integer: user function value not delayed correctly.");
    end

    if (pass) $display("PASSED");
  end

  function [31:0] int_func;
    input [31:0] in;
    int_func = in * 2;
  endfunction

endmodule
module top;

  reg pass = 1'b1;

  reg [3:0] ia = 4'd1;
  wire signed [3:0] iconstp, iconstm, isfunc, iufunc;
  wire [7:0] istring;


  assign #1 iconstp = 2;
  assign #1 iconstm = -2;
  assign #1 istring = "0";


  assign #1 isfunc = $rtoi(2.0);


  assign #1 iufunc = int_func(ia);

  initial begin

    #0.9;
    if (iconstp !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: constant (positive) value not delayed.");
    end
    if (iconstm !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: constant (negative) value not delayed.");
    end
    if (istring !== 8'bz) begin
      pass = 1'b0;
      $display("Integer: string value not delayed.");
    end
    if (isfunc !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: system function value not delayed.");
    end
    if (iufunc !== 4'bz) begin
      pass = 1'b0;
      $display("Integer: user function value not delayed.");
    end

    #0.1;
    #0;
    if (iconstp !== 2) begin
      pass = 1'b0;
      $display("Integer: constant (positive) value not delayed correctly.");
    end
    if (iconstm !== -2) begin
      pass = 1'b0;
      $display("Integer: constant (negative) value not delayed correctly.");
    end
    if (istring !== "0") begin
      pass = 1'b0;
      $display("Integer: string value not delayed correctly.");
    end
    if (isfunc !== 2) begin
      pass = 1'b0;
      $display("Integer: system function value not delayed correctly.");
    end
    if (iufunc !== 2) begin
      pass = 1'b0;
      $display("Integer: user function value not delayed correctly.");
    end

    if (pass) $display("PASSED");
  end

  function [31:0] int_func;
    input [31:0] in;
    int_func = in * 2;
  endfunction

endmodule