data/full_repos/permissive/114519317/knowles32_testbench.v
 line:96: before: "~|"
1: b'%Error: data/full_repos/permissive/114519317/knowles32_testbench.v:10: Cannot find include file: knowles32.v\n`include "knowles32.v" \n         ^~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/114519317,data/full_repos/permissive/114519317/knowles32.v\n             data/full_repos/permissive/114519317,data/full_repos/permissive/114519317/knowles32.v.v\n             data/full_repos/permissive/114519317,data/full_repos/permissive/114519317/knowles32.v.sv\n             knowles32.v\n             knowles32.v.v\n             knowles32.v.sv\n             obj_dir/knowles32.v\n             obj_dir/knowles32.v.v\n             obj_dir/knowles32.v.sv\n%Error: data/full_repos/permissive/114519317/knowles32_testbench.v:33: Unsupported or unknown PLI call: $dumpfile\n        $dumpfile("knowles32.vcd");\n        ^~~~~~~~~\n%Error: data/full_repos/permissive/114519317/knowles32_testbench.v:34: Unsupported or unknown PLI call: $dumpvars\n        $dumpvars(0,knowles32_testbench);  \n        ^~~~~~~~~\n%Error: data/full_repos/permissive/114519317/knowles32_testbench.v:36: Unsupported or unknown PLI call: $monitor\n        $monitor("%b\\t%d\\t%d\\t%d\\t%d%d", success, S_exp, S, Co_exp, Co, $time);\n        ^~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/114519317/knowles32_testbench.v:44: Unsupported: Ignoring delay on this delayed statement.\n    always #arbitrary_delay begin\n           ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/114519317/knowles32_testbench.v:53: Unsupported: Seeding $random doesn\'t map to C++, use $c("srand")\n            Ci = $random(SEED);\n                 ^~~~~~~\n%Error: Internal Error: data/full_repos/permissive/114519317/knowles32_testbench.v:53: ../V3Ast.cpp:358: Null item passed to setOp1p\n            Ci = $random(SEED);\n               ^\n'
module knowles32_testbench();
    integer SEED = 255;
    parameter TRIALS = 100000;
    parameter arbitrary_delay = 10;


    reg [31:0] A, B;
    reg Ci;


    wire [31:0] S;
    wire Co;
    

    wire [31:0] S_exp = A + B + Ci;
    wire Co_exp = (S < A) | (S < B);
    wire success;
    


    initial begin
        $dumpfile("knowles32.vcd");
        $dumpvars(0,knowles32_testbench);  
        $display("success\tout\t\texpect\t\tCo\texpect\t\tTime");
        $monitor("%b\t%d\t%d\t%d\t%d%d", success, S_exp, S, Co_exp, Co, $time);
    end 
        

    knowles32 dut (.A(A), .B(B), .Ci(Ci), .S(S), .Co(Co));


    assign success = (S_exp == S) && (Co == Co_exp);
    always #arbitrary_delay begin
        if (~success)
            $stop;
    end
    

    integer i;
    initial begin          
        for (i = 0; i <= TRIALS; i = i + 1) begin
            Ci = $random(SEED);
            A = $random(SEED);
            B = $random(SEED);
            #arbitrary_delay;
        end
                  
        $finish;
    end
endmodule
module knowles32_testbench();

    integer SEED = 255;
    parameter TRIALS = 100000;
    parameter arbitrary_delay = 10;


    reg [31:0] A, B;
    reg Ci;


    wire [31:0] S;
    wire Co;
    

    wire [31:0] S_exp = A + B + Ci;
    wire Co_exp = (S < A) | (S < B);
    wire success;
    


    initial begin
        $dumpfile("knowles32.vcd");
        $dumpvars(0,knowles32_testbench);  
        $display("success\tout\t\texpect\t\tCo\texpect\t\tTime");
        $monitor("%b\t%d\t%d\t%d\t%d%d", success, S_exp, S, Co_exp, Co, $time);
    end 
        

    knowles32 dut (.A(A), .B(B), .Ci(Ci), .S(S), .Co(Co));


    assign success = (S_exp == S) && (Co == Co_exp);
    always #arbitrary_delay begin
        if (~success)
            $stop;
    end
    

    integer i;
    initial begin          
        for (i = 0; i <= TRIALS; i = i + 1) begin
            Ci = $random(SEED);
            A = $random(SEED);
            B = $random(SEED);
            #arbitrary_delay;
        end
                  
        $finish;
    end
endmodule