data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v
1: b'%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:25: Define or directive not defined: \'`LUT_WIDTH\'\n    if (_TECHMAP_CELLTYPE_ == "" || `LUT_WIDTH < 2)\n                                    ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:25: syntax error, unexpected \'<\', expecting TYPE-IDENTIFIER\n    if (_TECHMAP_CELLTYPE_ == "" || `LUT_WIDTH < 2)\n                                               ^\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:29: Unsupported or unknown PLI call: $gt\n        $gt #(.A_SIGNED(B_SIGNED), .B_SIGNED(A_SIGNED), .A_WIDTH(B_WIDTH), .B_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) _TECHMAP_REPLACE_ (.A(B), .B(A), .Y(Y));\n        ^~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:33: Unsupported or unknown PLI call: $ge\n        $ge #(.A_SIGNED(B_SIGNED), .B_SIGNED(A_SIGNED), .A_WIDTH(B_WIDTH), .B_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) _TECHMAP_REPLACE_ (.A(B), .B(A), .Y(Y));\n        ^~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:48: Unsupported or unknown PLI call: $__CMP2LCU\n        $__CMP2LCU #(.AB_WIDTH(WIDTH), .AB_SIGNED(A_SIGNED && B_SIGNED), .LCU_WIDTH(1), .BUDGET(`LUT_WIDTH), .CI(CI))\n        ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:48: syntax error, unexpected ${ignored-bbox-sys}\n        $__CMP2LCU #(.AB_WIDTH(WIDTH), .AB_SIGNED(A_SIGNED && B_SIGNED), .LCU_WIDTH(1), .BUDGET(`LUT_WIDTH), .CI(CI))\n                  ^\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:48: Define or directive not defined: \'`LUT_WIDTH\'\n        $__CMP2LCU #(.AB_WIDTH(WIDTH), .AB_SIGNED(A_SIGNED && B_SIGNED), .LCU_WIDTH(1), .BUDGET(`LUT_WIDTH), .CI(CI))\n                                                                                                ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:54: Unsupported or unknown PLI call: $__CMP2LCU\nmodule $__CMP2LCU (A, B, P, G, Y);\n       ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:63: syntax error, unexpected input\ninput [AB_WIDTH-1:0] A;  \n^~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:76: syntax error, unexpected generate\ngenerate\n^~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:80: Unsupported or unknown PLI call: $lcu\n        $lcu #(.WIDTH(LCU_WIDTH)) _TECHMAP_REPLACE_ (.P(P), .G(G), .CI(CI), .CO(CO));\n        ^~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:82: syntax error, unexpected end\n    end\n    ^~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:92: Unsupported or unknown PLI call: $__CMP2LCU\n             $__CMP2LCU #(.AB_WIDTH(AB_WIDTH), .AB_SIGNED(AB_SIGNED), .LCU_WIDTH(LCU_WIDTH+1), .BUDGET(`LUT_WIDTH), .CI(CI))\n             ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:92: syntax error, unexpected ${ignored-bbox-sys}\n             $__CMP2LCU #(.AB_WIDTH(AB_WIDTH), .AB_SIGNED(AB_SIGNED), .LCU_WIDTH(LCU_WIDTH+1), .BUDGET(`LUT_WIDTH), .CI(CI))\n                       ^\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:92: Define or directive not defined: \'`LUT_WIDTH\'\n             $__CMP2LCU #(.AB_WIDTH(AB_WIDTH), .AB_SIGNED(AB_SIGNED), .LCU_WIDTH(LCU_WIDTH+1), .BUDGET(`LUT_WIDTH), .CI(CI))\n                                                                                                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:124: Unsupported or unknown PLI call: $__CMP2LCU\n               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1\'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))\n               ^~~~~~~~~~\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:124: syntax error, unexpected ${ignored-bbox-sys}\n               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1\'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))\n                         ^\n%Error: data/full_repos/permissive/441359809/src/yosys/techlibs/common/cmp2lcu.v:127: Unsupported or unknown PLI call: $__CMP2LCU\n               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1\'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))\n               ^~~~~~~~~~\n%Error: Cannot continue\n'
module $__CMP2LCU (A, B, P, G, Y);

parameter AB_WIDTH = 0;
parameter AB_SIGNED = 0;
parameter LCU_WIDTH = 1;
parameter BUDGET = 0;
parameter CI = 0;

(* force_downto *)
input [AB_WIDTH-1:0] A;
(* force_downto *)
input [AB_WIDTH-1:0] B;
(* force_downto *)
input [LCU_WIDTH-1:0] P;
(* force_downto *)
input [LCU_WIDTH-1:0] G;
output Y;

parameter [AB_WIDTH-1:0] _TECHMAP_CONSTMSK_A_ = 0;
parameter [AB_WIDTH-1:0] _TECHMAP_CONSTMSK_B_ = 0;
parameter [LCU_WIDTH-1:0] _TECHMAP_CONSTMSK_P_ = 0;

generate
    if (AB_WIDTH == 0) begin
        (* force_downto *)
        wire [LCU_WIDTH-1:0] CO;
        $lcu #(.WIDTH(LCU_WIDTH)) _TECHMAP_REPLACE_ (.P(P), .G(G), .CI(CI), .CO(CO));
        assign Y = CO[LCU_WIDTH-1];
    end
    else begin
        if (_TECHMAP_CONSTMSK_A_[AB_WIDTH-1:0] && _TECHMAP_CONSTMSK_B_[AB_WIDTH-1:0])
            localparam COST = 0;
        else if (_TECHMAP_CONSTMSK_A_[AB_WIDTH-1:0] || _TECHMAP_CONSTMSK_B_[AB_WIDTH-1:0])
            localparam COST = 1;
        else
            localparam COST = 2;

        if (BUDGET < COST)
             $__CMP2LCU #(.AB_WIDTH(AB_WIDTH), .AB_SIGNED(AB_SIGNED), .LCU_WIDTH(LCU_WIDTH+1), .BUDGET(`LUT_WIDTH), .CI(CI))
                _TECHMAP_REPLACE_ (.A(A), .B(B), .P({P, 1'b1}), .G({G, 1'b0}), .Y(Y));
        else begin
            wire PP, GG;

            assign PP = A[AB_WIDTH-1] ^~ B[AB_WIDTH-1];
            if (AB_SIGNED)
                assign GG = ~A[AB_WIDTH-1] & B[AB_WIDTH-1];
            else if (_TECHMAP_CONSTMSK_P_[LCU_WIDTH-1])
                assign GG = A[AB_WIDTH-1] & ~B[AB_WIDTH-1];
            else



                assign GG = P[0] & (A[AB_WIDTH-1] & ~B[AB_WIDTH-1]);
            if (LCU_WIDTH == 1) begin


                wire P_ = P[0] & PP;

                wire G_ = G[0] | GG;
            end
            else begin


                (* force_downto *)
                wire [LCU_WIDTH-1:0] P_ = {P[LCU_WIDTH-1:1], P[0] & PP};

                (* force_downto *)
                wire [LCU_WIDTH-1:0] G_ = {G[LCU_WIDTH-1:1], G[0] | GG};
            end
            if (AB_WIDTH == 1)
               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))
                    _TECHMAP_REPLACE_ (.A(), .B(), .P(P_), .G(G_), .Y(Y));
            else
               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))
                    _TECHMAP_REPLACE_ (.A(A[AB_WIDTH-2:0]), .B(B[AB_WIDTH-2:0]), .P(P_), .G(G_), .Y(Y));
        end
    end
endgenerate
endmodule
module $__CMP2LCU (A, B, P, G, Y);


parameter AB_WIDTH = 0;
parameter AB_SIGNED = 0;
parameter LCU_WIDTH = 1;
parameter BUDGET = 0;
parameter CI = 0;

(* force_downto *)
input [AB_WIDTH-1:0] A;
(* force_downto *)
input [AB_WIDTH-1:0] B;
(* force_downto *)
input [LCU_WIDTH-1:0] P;
(* force_downto *)
input [LCU_WIDTH-1:0] G;
output Y;

parameter [AB_WIDTH-1:0] _TECHMAP_CONSTMSK_A_ = 0;
parameter [AB_WIDTH-1:0] _TECHMAP_CONSTMSK_B_ = 0;
parameter [LCU_WIDTH-1:0] _TECHMAP_CONSTMSK_P_ = 0;

generate
    if (AB_WIDTH == 0) begin
        (* force_downto *)
        wire [LCU_WIDTH-1:0] CO;
        $lcu #(.WIDTH(LCU_WIDTH)) _TECHMAP_REPLACE_ (.P(P), .G(G), .CI(CI), .CO(CO));
        assign Y = CO[LCU_WIDTH-1];
    end
    else begin
        if (_TECHMAP_CONSTMSK_A_[AB_WIDTH-1:0] && _TECHMAP_CONSTMSK_B_[AB_WIDTH-1:0])
            localparam COST = 0;
        else if (_TECHMAP_CONSTMSK_A_[AB_WIDTH-1:0] || _TECHMAP_CONSTMSK_B_[AB_WIDTH-1:0])
            localparam COST = 1;
        else
            localparam COST = 2;

        if (BUDGET < COST)
             $__CMP2LCU #(.AB_WIDTH(AB_WIDTH), .AB_SIGNED(AB_SIGNED), .LCU_WIDTH(LCU_WIDTH+1), .BUDGET(`LUT_WIDTH), .CI(CI))
                _TECHMAP_REPLACE_ (.A(A), .B(B), .P({P, 1'b1}), .G({G, 1'b0}), .Y(Y));
        else begin
            wire PP, GG;

            assign PP = A[AB_WIDTH-1] ^~ B[AB_WIDTH-1];
            if (AB_SIGNED)
                assign GG = ~A[AB_WIDTH-1] & B[AB_WIDTH-1];
            else if (_TECHMAP_CONSTMSK_P_[LCU_WIDTH-1])
                assign GG = A[AB_WIDTH-1] & ~B[AB_WIDTH-1];
            else



                assign GG = P[0] & (A[AB_WIDTH-1] & ~B[AB_WIDTH-1]);
            if (LCU_WIDTH == 1) begin


                wire P_ = P[0] & PP;

                wire G_ = G[0] | GG;
            end
            else begin


                (* force_downto *)
                wire [LCU_WIDTH-1:0] P_ = {P[LCU_WIDTH-1:1], P[0] & PP};

                (* force_downto *)
                wire [LCU_WIDTH-1:0] G_ = {G[LCU_WIDTH-1:1], G[0] | GG};
            end
            if (AB_WIDTH == 1)
               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))
                    _TECHMAP_REPLACE_ (.A(), .B(), .P(P_), .G(G_), .Y(Y));
            else
               $__CMP2LCU #(.AB_WIDTH(AB_WIDTH-1), .AB_SIGNED(1'b0), .LCU_WIDTH(LCU_WIDTH), .BUDGET(BUDGET-COST), .CI(CI))
                    _TECHMAP_REPLACE_ (.A(A[AB_WIDTH-2:0]), .B(B[AB_WIDTH-2:0]), .P(P_), .G(G_), .Y(Y));
        end
    end
endgenerate
endmodule