data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v
None: at end of input
1: b'%Error: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:17: Cannot find include file: qlf_k6n10f/cells_sim.v\n`include "qlf_k6n10f/cells_sim.v" \n         ^~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params,data/full_repos/permissive/220229160/qlf_k6n10f/cells_sim.v\n             data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params,data/full_repos/permissive/220229160/qlf_k6n10f/cells_sim.v.v\n             data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params,data/full_repos/permissive/220229160/qlf_k6n10f/cells_sim.v.sv\n             qlf_k6n10f/cells_sim.v\n             qlf_k6n10f/cells_sim.v.v\n             qlf_k6n10f/cells_sim.v.sv\n             obj_dir/qlf_k6n10f/cells_sim.v\n             obj_dir/qlf_k6n10f/cells_sim.v.v\n             obj_dir/qlf_k6n10f/cells_sim.v.sv\n%Warning-STMTDLY: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:24: Unsupported: Ignoring delay on this delayed statement.\n    always #0.5 clk <= ~clk;\n           ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:30: Unsupported: Ignoring delay on this delayed statement.\n        #2  rst <= 1\'b1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:31: Unsupported: Ignoring delay on this delayed statement.\n        #2  rst <= 1\'b0;\n        ^\n%Error: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:146: Unsupported or unknown PLI call: $dumpfile\n        $dumpfile(`VCD_FILE);\n        ^~~~~~~~~\n%Error: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:146: Define or directive not defined: \'`VCD_FILE\'\n        $dumpfile(`VCD_FILE);\n                  ^~~~~~~~~\n%Error: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:147: Unsupported or unknown PLI call: $dumpvars\n        $dumpvars(0, tb);\n        ^~~~~~~~~\n%Error: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:148: Unsupported or unknown PLI call: $finish_and_return\n        #150 $finish_and_return( (error_count == 0) ? 0 : -1 );\n             ^~~~~~~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10f/sim_dsp_fir_cfg_params/sim_dsp_fir_cfg_params.v:148: Unsupported: Ignoring delay on this delayed statement.\n        #150 $finish_and_return( (error_count == 0) ? 0 : -1 );\n        ^\n%Error: Exiting due to 5 error(s), 4 warning(s)\n'
module tb();


    reg clk;
    initial clk <= 1'b0;
    always #0.5 clk <= ~clk;


    reg rst;
    initial begin
            rst <= 1'b0;
        #2  rst <= 1'b1;
        #2  rst <= 1'b0;
    end


    reg [2:0] fcnt;
    reg [3:0] dcnt;

    initial begin
        fcnt <= 0;
        dcnt <= 0;
    end


    always @(posedge clk)
        if (rst) fcnt <= 0;
        else begin
            if (fcnt == 4)
                fcnt <= 0;
            else
                fcnt <= fcnt + 1;
        end

    wire stb = (fcnt == 4);


    always @(posedge clk)
        if (rst)      dcnt <= 0;
        else if (stb) dcnt <= dcnt + 1;


    reg signed [19:0] coeff;
    always @(*) case (fcnt)
        2'd0: coeff <= 20'h0000B;
        2'd1: coeff <= 20'h0000E;
        2'd2: coeff <= 20'h0000E;
        2'd3: coeff <= 20'h0000F;

        default: coeff <= 20'h00000;
    endcase


    reg signed [17:0] data;
    always @(*) case (dcnt)
        'd0:  data  <= 18'h00400;
        'd1:  data  <= 18'h00000;
        'd2:  data  <= 18'h00000;
        'd3:  data  <= 18'h00000;
        'd4:  data  <= 18'h00000;
        'd5:  data  <= 18'h00000;
        'd6:  data  <= 18'h00000;
        'd7:  data  <= 18'h00000;
        'd8:  data  <= 18'h00800;
        default data <= 18'h00000;
    endcase


    wire signed [5:0] acc_fir_i = 6'h0;
    wire signed [19:0] A = coeff;
    wire signed [17:0] B = data;
    wire signed [37:0] Z;

    dsp_t1_sim_cfg_params # (
        .SHIFT_RIGHT        (6'd10),
        .REGISTER_INPUTS    (1'b0),
        .OUTPUT_SELECT      (3'h1),
        .ROUND              (1'b1),
        .SATURATE_ENABLE    (1'b1)
    ) uut (
        .clock_i            (clk),
        .s_reset            (rst),
        .a_i                ((!stb) ? A : 20'h0),
        .b_i                ((!stb) ? B : 18'h0),
        .acc_fir_i          ((!stb) ? acc_fir_i : 4'h0),
        .unsigned_a_i       (1'b0),
        .unsigned_b_i       (1'b0),
        .feedback_i         (stb),
        .load_acc_i         (1'b1),
        .subtract_i         (1'b0),
        .z_o                (Z)
    );


    integer ocnt;
    initial ocnt <= 0;

    always @(posedge clk)
        if (stb) ocnt <= ocnt + 1;


    reg signed [31:0] odata;
    always @(*) case (ocnt)
    'd0: odata <= 32'h000036;
    'd1: odata <= 32'h000000;
    'd2: odata <= 32'h000000;
    'd3: odata <= 32'h000000;
    'd4: odata <= 32'h000000;
    'd5: odata <= 32'h000000;
    'd6: odata <= 32'h000000;
    'd7: odata <= 32'h000000;
    'd8: odata <= 32'h00006C;
    default: odata <= 32'h000000;
    endcase


    wire error = stb && (odata !== Z[31:0]);


    integer error_count;
    initial error_count <= 0;
    always @(posedge clk) begin
        if (error) error_count <= error_count + 1;
    end


    initial begin
        $dumpfile(`VCD_FILE);
        $dumpvars(0, tb);
        #150 $finish_and_return( (error_count == 0) ? 0 : -1 );
    end

endmodule
module tb();



    reg clk;
    initial clk <= 1'b0;
    always #0.5 clk <= ~clk;


    reg rst;
    initial begin
            rst <= 1'b0;
        #2  rst <= 1'b1;
        #2  rst <= 1'b0;
    end


    reg [2:0] fcnt;
    reg [3:0] dcnt;

    initial begin
        fcnt <= 0;
        dcnt <= 0;
    end


    always @(posedge clk)
        if (rst) fcnt <= 0;
        else begin
            if (fcnt == 4)
                fcnt <= 0;
            else
                fcnt <= fcnt + 1;
        end

    wire stb = (fcnt == 4);


    always @(posedge clk)
        if (rst)      dcnt <= 0;
        else if (stb) dcnt <= dcnt + 1;


    reg signed [19:0] coeff;
    always @(*) case (fcnt)
        2'd0: coeff <= 20'h0000B;
        2'd1: coeff <= 20'h0000E;
        2'd2: coeff <= 20'h0000E;
        2'd3: coeff <= 20'h0000F;

        default: coeff <= 20'h00000;
    endcase


    reg signed [17:0] data;
    always @(*) case (dcnt)
        'd0:  data  <= 18'h00400;
        'd1:  data  <= 18'h00000;
        'd2:  data  <= 18'h00000;
        'd3:  data  <= 18'h00000;
        'd4:  data  <= 18'h00000;
        'd5:  data  <= 18'h00000;
        'd6:  data  <= 18'h00000;
        'd7:  data  <= 18'h00000;
        'd8:  data  <= 18'h00800;
        default data <= 18'h00000;
    endcase


    wire signed [5:0] acc_fir_i = 6'h0;
    wire signed [19:0] A = coeff;
    wire signed [17:0] B = data;
    wire signed [37:0] Z;

    dsp_t1_sim_cfg_params # (
        .SHIFT_RIGHT        (6'd10),
        .REGISTER_INPUTS    (1'b0),
        .OUTPUT_SELECT      (3'h1),
        .ROUND              (1'b1),
        .SATURATE_ENABLE    (1'b1)
    ) uut (
        .clock_i            (clk),
        .s_reset            (rst),
        .a_i                ((!stb) ? A : 20'h0),
        .b_i                ((!stb) ? B : 18'h0),
        .acc_fir_i          ((!stb) ? acc_fir_i : 4'h0),
        .unsigned_a_i       (1'b0),
        .unsigned_b_i       (1'b0),
        .feedback_i         (stb),
        .load_acc_i         (1'b1),
        .subtract_i         (1'b0),
        .z_o                (Z)
    );


    integer ocnt;
    initial ocnt <= 0;

    always @(posedge clk)
        if (stb) ocnt <= ocnt + 1;


    reg signed [31:0] odata;
    always @(*) case (ocnt)
    'd0: odata <= 32'h000036;
    'd1: odata <= 32'h000000;
    'd2: odata <= 32'h000000;
    'd3: odata <= 32'h000000;
    'd4: odata <= 32'h000000;
    'd5: odata <= 32'h000000;
    'd6: odata <= 32'h000000;
    'd7: odata <= 32'h000000;
    'd8: odata <= 32'h00006C;
    default: odata <= 32'h000000;
    endcase


    wire error = stb && (odata !== Z[31:0]);


    integer error_count;
    initial error_count <= 0;
    always @(posedge clk) begin
        if (error) error_count <= error_count + 1;
    end


    initial begin
        $dumpfile(`VCD_FILE);
        $dumpvars(0, tb);
        #150 $finish_and_return( (error_count == 0) ? 0 : -1 );
    end

endmodule