data/full_repos/permissive/482974241/CosineFunctionApproximation.srcs/sim_1/new/tb_PLA.v
1: b'%Error: data/full_repos/permissive/482974241/CosineFunctionApproximation.srcs/sim_1/new/tb_PLA.v:29: Unsupported: $fopen with multichannel descriptor.  Add ,"w" as second argument to open a file descriptor.\n        c = $fopen("outputcosine2.txt");\n            ^~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/482974241/CosineFunctionApproximation.srcs/sim_1/new/tb_PLA.v:48: Unsupported: Ignoring delay on this delayed statement.\n            #1 x = mem[i]; $fwrite(c,"%b\\n",cosine);\n            ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/482974241/CosineFunctionApproximation.srcs/sim_1/new/tb_PLA.v:50: Unsupported: Ignoring delay on this delayed statement.\n        #5 $fclose(c); $finish;\n        ^\n%Error: Exiting due to 1 error(s), 2 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module tb_PLA;
    reg signed [15:0] x;
    wire signed [15:0] cosine;
    
    PieceWiseLinearApproximation #(.WL(16),.WA(6),.WO(16)) DUT (.x(x),.cosine(cosine));
    
    integer c;
    initial begin
        c = $fopen("outputcosine2.txt");
    end
    
    integer i;
    reg [15:0] mem [255:0];
    
    initial begin









        x = 'b0000000000000000; $fwrite(c,"%b\n",cosine);
        $readmemb("inputX.mem", mem);
        for(i = 1; i < 256; i=i+1) begin
            #1 x = mem[i]; $fwrite(c,"%b\n",cosine);
        end
        #5 $fclose(c); $finish;
    end
endmodule
module tb_PLA;

    reg signed [15:0] x;
    wire signed [15:0] cosine;
    
    PieceWiseLinearApproximation #(.WL(16),.WA(6),.WO(16)) DUT (.x(x),.cosine(cosine));
    
    integer c;
    initial begin
        c = $fopen("outputcosine2.txt");
    end
    
    integer i;
    reg [15:0] mem [255:0];
    
    initial begin









        x = 'b0000000000000000; $fwrite(c,"%b\n",cosine);
        $readmemb("inputX.mem", mem);
        for(i = 1; i < 256; i=i+1) begin
            #1 x = mem[i]; $fwrite(c,"%b\n",cosine);
        end
        #5 $fclose(c); $finish;
    end
endmodule