data/full_repos/permissive/175100691/gpu/lpm/lpm_ff.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Warning-WIDTH: data/full_repos/permissive/175100691/gpu/lpm/lpm_ff.v:134: Operator ASSIGN expects 1 bits on the Assign RHS, but Assign RHS\'s ADD generates 32 or 8 bits.\n                                                                         : ... In instance lpm_ff\n            ivalue = ivalue * 10 + digit;\n                   ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/175100691/gpu/lpm/lpm_ff.v:152: Operator NEQ expects 48 bits on the LHS, but LHS\'s VARREF \'lpm_fftype\' generates 24 bits.\n                                                                         : ... In instance lpm_ff\n            (lpm_fftype != "UNUSED"))           \n                        ^~\n%Warning-WIDTH: data/full_repos/permissive/175100691/gpu/lpm/lpm_ff.v:162: Operator TASKREF \'string_to_reg\' expects 320 bits on the Function Argument, but Function Argument\'s VARREF \'lpm_avalue\' generates 48 bits.\n                                                                         : ... In instance lpm_ff\n            string_to_reg(lpm_avalue, avalue);\n            ^~~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/175100691/gpu/lpm/lpm_ff.v:167: Operator TASKREF \'string_to_reg\' expects 320 bits on the Function Argument, but Function Argument\'s VARREF \'lpm_svalue\' generates 48 bits.\n                                                                         : ... In instance lpm_ff\n            string_to_reg(lpm_svalue, svalue);\n            ^~~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/175100691/gpu/lpm/lpm_ff.v:172: Operator TASKREF \'string_to_reg\' expects 320 bits on the Function Argument, but Function Argument\'s VARREF \'lpm_pvalue\' generates 48 bits.\n                                                                         : ... In instance lpm_ff\n            string_to_reg(lpm_pvalue, pvalue);\n            ^~~~~~~~~~~~~\n%Error: Exiting due to 5 warning(s)\n'
module lpm_ff (
    data,


    clock,
    enable,
    aclr,
    aset,

    aload,


    sclr,
    sset,

    sload,


    q
);


    parameter lpm_width  = 1;
    parameter lpm_avalue = "UNUSED";
    parameter lpm_svalue = "UNUSED";

    parameter lpm_pvalue = "UNUSED";
    parameter lpm_fftype = "DFF";
    parameter lpm_type = "lpm_ff";
    parameter lpm_hint = "UNUSED";


    input  [lpm_width-1:0] data;
    input  clock;
    input  enable;
    input  aclr;
    input  aset;
    input  aload;
    input  sclr;
    input  sset;
    input  sload ;


    output [lpm_width-1:0] q;


    reg  [lpm_width-1:0] tmp_q;
    reg  [lpm_width-1:0] adata;
    reg  use_adata;
    reg  [lpm_width-1:0] svalue;
    reg  [lpm_width-1:0] avalue;
    reg  [lpm_width-1:0] pvalue;


    wire [lpm_width-1:0] final_q;


    integer i;


    logic  [lpm_width-1:0] data;
    logic enable;
    logic sload;
    logic sclr;
    logic sset;
    logic aload;
    logic aclr;
    logic aset;

    wire i_enable;
    wire i_sload;
    wire i_sclr;
    wire i_sset;
    wire i_aload;
    wire i_aclr;
    wire i_aset;
    assign i_enable = enable;
    assign i_sload = sload;
    assign i_sclr = sclr;
    assign i_sset = sset;
    assign i_aload = aload;
    assign i_aclr = aclr;
    assign i_aset = aset;


    task string_to_reg;
    input  [8*40:1] string_value;
    output [lpm_width-1:0] value;

    reg [8*40:1] reg_s;
    reg [8:1] digit;
    reg [8:1] tmp;
    reg [lpm_width-1:0] ivalue;

    integer m;

    begin
        ivalue = {lpm_width{1'b0}};
        reg_s = string_value;
        for (m=1; m<=40; m=m+1)
        begin
            tmp = reg_s[320:313];
            digit = tmp & 8'b00001111;
            reg_s = reg_s << 8;
            ivalue = ivalue * 10 + digit;
        end
        value = ivalue;
    end
    endtask


    initial
    begin
        if (lpm_width <= 0)
        begin
            $display("Value of lpm_width parameter must be greater than 0(ERROR)");
            $display("Time: %0t  Instance: %m", $time);
            $finish;
        end

        if ((lpm_fftype != "DFF") &&
            (lpm_fftype != "TFF") &&
            (lpm_fftype != "UNUSED"))
        begin
            $display("Error!  LPM_FFTYPE value must be \"DFF\" or \"TFF\".");
            $display("Time: %0t  Instance: %m", $time);
            $finish;
        end

        if (lpm_avalue == "UNUSED")
            avalue =  {lpm_width{1'b1}};
        else
            string_to_reg(lpm_avalue, avalue);

        if (lpm_svalue == "UNUSED")
            svalue =  {lpm_width{1'b1}};
        else
            string_to_reg(lpm_svalue, svalue);

        if (lpm_pvalue == "UNUSED")
            pvalue =  {lpm_width{1'b0}};
        else
            string_to_reg(lpm_pvalue, pvalue);

        tmp_q = pvalue;
        use_adata = 1'b0;
    end


    always @(posedge i_aclr or posedge i_aset or posedge i_aload or posedge clock)
    begin
        if (i_aclr || i_aset || i_aload)
            use_adata <= 1'b1;
        else if ($time > 0)
        begin
            if (i_enable)
            begin
                use_adata <= 1'b0;

                if (i_sclr)
                    tmp_q <= 0;
                else if (i_sset)
                    tmp_q <= svalue;
                else if (i_sload)
                    tmp_q <= data;
                else
                begin
                    if (lpm_fftype == "TFF")
                    begin
                        for (i = 0; i < lpm_width; i=i+1)
                            if (data[i] == 1'b1)
                                tmp_q[i] <= ~final_q[i];
                            else
                                tmp_q[i] <= final_q[i];
                    end
                    else
                        tmp_q <= data;
                end
            end
        end
    end

    always @(i_aclr or i_aset or i_aload or data or avalue or pvalue)
    begin
        if (i_aclr === 1'b1)
            adata <= {lpm_width{1'b0}};
        else if (i_aclr === 1'b0)
            adata <= {lpm_width{1'b0}};
        else if (i_aset)
            adata <= avalue;
        else if (i_aload)
            adata <= data;
        else if ((i_aclr === 1'b0) && ($time == 0))
            adata <= pvalue;
    end


    assign q = final_q;
    assign final_q = (use_adata == 1'b1) ? adata : tmp_q;

endmodule
module lpm_ff (
    data,


    clock,
    enable,
    aclr,
    aset,

    aload,


    sclr,
    sset,

    sload,


    q
);



    parameter lpm_width  = 1;
    parameter lpm_avalue = "UNUSED";
    parameter lpm_svalue = "UNUSED";

    parameter lpm_pvalue = "UNUSED";
    parameter lpm_fftype = "DFF";
    parameter lpm_type = "lpm_ff";
    parameter lpm_hint = "UNUSED";


    input  [lpm_width-1:0] data;
    input  clock;
    input  enable;
    input  aclr;
    input  aset;
    input  aload;
    input  sclr;
    input  sset;
    input  sload ;


    output [lpm_width-1:0] q;


    reg  [lpm_width-1:0] tmp_q;
    reg  [lpm_width-1:0] adata;
    reg  use_adata;
    reg  [lpm_width-1:0] svalue;
    reg  [lpm_width-1:0] avalue;
    reg  [lpm_width-1:0] pvalue;


    wire [lpm_width-1:0] final_q;


    integer i;


    logic  [lpm_width-1:0] data;
    logic enable;
    logic sload;
    logic sclr;
    logic sset;
    logic aload;
    logic aclr;
    logic aset;

    wire i_enable;
    wire i_sload;
    wire i_sclr;
    wire i_sset;
    wire i_aload;
    wire i_aclr;
    wire i_aset;
    assign i_enable = enable;
    assign i_sload = sload;
    assign i_sclr = sclr;
    assign i_sset = sset;
    assign i_aload = aload;
    assign i_aclr = aclr;
    assign i_aset = aset;


    task string_to_reg;
    input  [8*40:1] string_value;
    output [lpm_width-1:0] value;

    reg [8*40:1] reg_s;
    reg [8:1] digit;
    reg [8:1] tmp;
    reg [lpm_width-1:0] ivalue;

    integer m;

    begin
        ivalue = {lpm_width{1'b0}};
        reg_s = string_value;
        for (m=1; m<=40; m=m+1)
        begin
            tmp = reg_s[320:313];
            digit = tmp & 8'b00001111;
            reg_s = reg_s << 8;
            ivalue = ivalue * 10 + digit;
        end
        value = ivalue;
    end
    endtask


    initial
    begin
        if (lpm_width <= 0)
        begin
            $display("Value of lpm_width parameter must be greater than 0(ERROR)");
            $display("Time: %0t  Instance: %m", $time);
            $finish;
        end

        if ((lpm_fftype != "DFF") &&
            (lpm_fftype != "TFF") &&
            (lpm_fftype != "UNUSED"))
        begin
            $display("Error!  LPM_FFTYPE value must be \"DFF\" or \"TFF\".");
            $display("Time: %0t  Instance: %m", $time);
            $finish;
        end

        if (lpm_avalue == "UNUSED")
            avalue =  {lpm_width{1'b1}};
        else
            string_to_reg(lpm_avalue, avalue);

        if (lpm_svalue == "UNUSED")
            svalue =  {lpm_width{1'b1}};
        else
            string_to_reg(lpm_svalue, svalue);

        if (lpm_pvalue == "UNUSED")
            pvalue =  {lpm_width{1'b0}};
        else
            string_to_reg(lpm_pvalue, pvalue);

        tmp_q = pvalue;
        use_adata = 1'b0;
    end


    always @(posedge i_aclr or posedge i_aset or posedge i_aload or posedge clock)
    begin
        if (i_aclr || i_aset || i_aload)
            use_adata <= 1'b1;
        else if ($time > 0)
        begin
            if (i_enable)
            begin
                use_adata <= 1'b0;

                if (i_sclr)
                    tmp_q <= 0;
                else if (i_sset)
                    tmp_q <= svalue;
                else if (i_sload)
                    tmp_q <= data;
                else
                begin
                    if (lpm_fftype == "TFF")
                    begin
                        for (i = 0; i < lpm_width; i=i+1)
                            if (data[i] == 1'b1)
                                tmp_q[i] <= ~final_q[i];
                            else
                                tmp_q[i] <= final_q[i];
                    end
                    else
                        tmp_q <= data;
                end
            end
        end
    end

    always @(i_aclr or i_aset or i_aload or data or avalue or pvalue)
    begin
        if (i_aclr === 1'b1)
            adata <= {lpm_width{1'b0}};
        else if (i_aclr === 1'b0)
            adata <= {lpm_width{1'b0}};
        else if (i_aset)
            adata <= avalue;
        else if (i_aload)
            adata <= data;
        else if ((i_aclr === 1'b0) && ($time == 0))
            adata <= pvalue;
    end


    assign q = final_q;
    assign final_q = (use_adata == 1'b1) ? adata : tmp_q;

endmodule