data/full_repos/permissive/143278/ivltests/countdrivers4.v
 line:50: before: "integer"
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:86: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:87: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:89: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:91: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:93: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:98: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:99: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:101: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:103: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:105: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:110: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:111: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:113: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:115: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:117: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:122: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:123: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:125: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:127: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:129: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:134: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:135: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:137: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:139: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:141: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:146: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:147: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:149: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:151: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:153: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/countdrivers4.v:158: Unsupported: Ignoring delay on this delayed statement.\n  #1;\n  ^\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:159: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:161: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:163: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143278/ivltests/countdrivers4.v:165: Unsupported or unknown PLI call: $countdrivers\n  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);\n          ^~~~~~~~~~~~~\n%Error: Exiting due to 28 error(s), 7 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module test();

wire bus0;
wire bus1;

reg  oe1 = 1'b0;
reg  oe2 = 1'b0;
reg  oe3 = 1'b0;
reg  oe4 = 1'b0;
reg  oe5 = 1'b0;
reg  oe6 = 1'b0;

wire op1 = 1'b0;
wire op2 = 1'b1;
wire op3 = 1'b1;
wire op4 = 1'b0;
wire op5 = 1'bx;
wire op6 = 1'bx;

ts_pad pad1(bus0, oe1, op1);
ts_pad pad2(bus1, oe2, op2);

ts_pad pad3(bus0, oe3, op3);
ts_pad pad4(bus1, oe4, op4);

bufif1(bus0, op5, oe5);
bufif1(bus1, op6, oe6);

integer multi;
integer forced;
integer countD;
integer count0;
integer count1;
integer countX;

reg failed = 0;

task check_results;

input integer expected_multi;
input integer expected_forced;
input integer expected_countD;
input integer expected_count0;
input integer expected_count1;
input integer expected_countX;

begin
  $write("multi = %0d ", multi);
  if (multi !== expected_multi) failed = 1;
  if (expected_forced != -1) begin
    $write("forced = %0d ", forced);
    if (forced !== expected_forced) failed = 1;
  end
  if (expected_countD != -1) begin
    $write("countD = %0d ", countD);
    if (countD !== expected_countD) failed = 1;
  end
  if (expected_count0 != -1) begin
    $write("count0 = %0d ", count0);
    if (count0 !== expected_count0) failed = 1;
  end
  if (expected_count1 != -1) begin
    $write("count1 = %0d ", count1);
    if (count1 !== expected_count1) failed = 1;
  end
  if (expected_countX != -1) begin
    $write("countX = %0d ", countX);
    if (countX !== expected_countX) failed = 1;
  end
  $write("\n");
end

endtask

initial begin
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  $display("");

  oe1 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  $display("");

  oe2 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  $display("");

  oe3 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  $display("");

  oe4 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  $display("");

  oe5 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  $display("");

  oe6 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  $display("");

  if (failed)
    $display("FAILED");
  else
    $display("PASSED");
end

endmodule
module test();


wire bus0;
wire bus1;

reg  oe1 = 1'b0;
reg  oe2 = 1'b0;
reg  oe3 = 1'b0;
reg  oe4 = 1'b0;
reg  oe5 = 1'b0;
reg  oe6 = 1'b0;

wire op1 = 1'b0;
wire op2 = 1'b1;
wire op3 = 1'b1;
wire op4 = 1'b0;
wire op5 = 1'bx;
wire op6 = 1'bx;

ts_pad pad1(bus0, oe1, op1);
ts_pad pad2(bus1, oe2, op2);

ts_pad pad3(bus0, oe3, op3);
ts_pad pad4(bus1, oe4, op4);

bufif1(bus0, op5, oe5);
bufif1(bus1, op6, oe6);

integer multi;
integer forced;
integer countD;
integer count0;
integer count1;
integer countX;

reg failed = 0;

task check_results;

input integer expected_multi;
input integer expected_forced;
input integer expected_countD;
input integer expected_count0;
input integer expected_count1;
input integer expected_countX;

begin
  $write("multi = %0d ", multi);
  if (multi !== expected_multi) failed = 1;
  if (expected_forced != -1) begin
    $write("forced = %0d ", forced);
    if (forced !== expected_forced) failed = 1;
  end
  if (expected_countD != -1) begin
    $write("countD = %0d ", countD);
    if (countD !== expected_countD) failed = 1;
  end
  if (expected_count0 != -1) begin
    $write("count0 = %0d ", count0);
    if (count0 !== expected_count0) failed = 1;
  end
  if (expected_count1 != -1) begin
    $write("count1 = %0d ", count1);
    if (count1 !== expected_count1) failed = 1;
  end
  if (expected_countX != -1) begin
    $write("countX = %0d ", countX);
    if (countX !== expected_countX) failed = 1;
  end
  $write("\n");
end

endtask

initial begin
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  $display("");

  oe1 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 0, 0, 0, 0);
  $display("");

  oe2 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 1, 0, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  $display("");

  oe3 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(0, 0, 1, 0, 1, 0);
  $display("");

  oe4 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  $display("");

  oe5 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 2, 1, 1, 0);
  $display("");

  oe6 = 1'b1;
  #1;
  multi = $countdrivers(bus0, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(bus1, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(pad1.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  multi = $countdrivers(pad2.pad, forced, countD, count0, count1, countX);
  check_results(1, 0, 3, 1, 1, 1);
  $display("");

  if (failed)
    $display("FAILED");
  else
    $display("PASSED");
end

endmodule