data/full_repos/permissive/42434302/ivltests/pr2824189.v
1: b'%Error: data/full_repos/permissive/42434302/ivltests/pr2824189.v:3: syntax error, unexpected var, expecting IDENTIFIER or \'=\' or do or final\n  reg [3:0] var;\n            ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/pr2824189.v:9: syntax error, unexpected var, expecting TYPE-IDENTIFIER\n    code = $fscanf(fd, "%x\\n", var);\n                               ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/pr2824189.v:14: syntax error, unexpected var, expecting TYPE-IDENTIFIER\n    if (var !== 4\'ha) begin\n        ^~~\n%Error: data/full_repos/permissive/42434302/ivltests/pr2824189.v:19: syntax error, unexpected \'=\', expecting IDENTIFIER\n    code = $fscanf(fd, "%x\\n", var);\n         ^\n%Error: data/full_repos/permissive/42434302/ivltests/pr2824189.v:21: syntax error, unexpected $display\n      $display("Failed $fscanf() at EOF");\n      ^~~~~~~~\n%Error: data/full_repos/permissive/42434302/ivltests/pr2824189.v:27: syntax error, unexpected $display\n    if (pass)  $display("PASSED");\n               ^~~~~~~~\n%Error: Cannot continue\n'
module top;
  reg pass;
  reg [3:0] var;
  integer fd, code;

  initial begin
    pass = 1'b1;
    fd = $fopen("ivltests/pr2824189.txt", "r");
    code = $fscanf(fd, "%x\n", var);
    if (code != 1) begin
      $display("Failed initial variable read count expected 1, got %d", code);
      pass = 1'b0;
    end
    if (var !== 4'ha) begin
      $display("Failed initial variable read value expected a, got %h", var);
      pass = 1'b0;
    end

    code = $fscanf(fd, "%x\n", var);
    if (code != -1) begin
      $display("Failed $fscanf() at EOF");
      pass = 1'b0;
    end

    $fclose(fd);

    if (pass)  $display("PASSED");
  end
endmodule
module top;

  reg pass;
  reg [3:0] var;
  integer fd, code;

  initial begin
    pass = 1'b1;
    fd = $fopen("ivltests/pr2824189.txt", "r");
    code = $fscanf(fd, "%x\n", var);
    if (code != 1) begin
      $display("Failed initial variable read count expected 1, got %d", code);
      pass = 1'b0;
    end
    if (var !== 4'ha) begin
      $display("Failed initial variable read value expected a, got %h", var);
      pass = 1'b0;
    end

    code = $fscanf(fd, "%x\n", var);
    if (code != -1) begin
      $display("Failed $fscanf() at EOF");
      pass = 1'b0;
    end

    $fclose(fd);

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