Added GreenPak inverter support

This commit is contained in:
Andrew Zonenberg 2016-04-01 21:18:29 -07:00
parent b0a28c793c
commit 2386885f22
3 changed files with 13 additions and 4 deletions

View File

@ -33,8 +33,13 @@ module \$lut (A, Y);
generate
if (WIDTH == 1) begin
GP_2LUT #(.INIT({2'b00, LUT})) _TECHMAP_REPLACE_ (.OUT(Y),
.IN0(A[0]), .IN1(1'b0));
if(LUT == 2'b01) begin
GP_INV _TECHMAP_REPLACE_ (.OUT(Y), .IN(A[0]) );
end
else begin
GP_2LUT #(.INIT({2'b00, LUT})) _TECHMAP_REPLACE_ (.OUT(Y),
.IN0(A[0]), .IN1(1'b0));
end
end else
if (WIDTH == 2) begin
GP_2LUT #(.INIT(LUT)) _TECHMAP_REPLACE_ (.OUT(Y),

View File

@ -40,6 +40,10 @@ module GP_DFFSR(input D, CLK, nSR, output reg Q);
end
endmodule
module GP_INV(input IN, output OUT);
assign OUT = ~IN;
endmodule
module GP_2LUT(input IN0, IN1, output OUT);
parameter [3:0] INIT = 0;
assign OUT = INIT[{IN1, IN0}];

View File

@ -207,8 +207,8 @@ struct SynthGreenPAK4Pass : public Pass {
if (check_label(active, run_from, run_to, "map_luts"))
{
if (part == "SLG46140V") Pass::call(design, "nlutmap -luts 0,6,8,2");
if (part == "SLG46620V") Pass::call(design, "nlutmap -luts 0,8,16,2");
if (part == "SLG46621V") Pass::call(design, "nlutmap -luts 0,8,16,2");
if (part == "SLG46620V") Pass::call(design, "nlutmap -luts 2,8,16,2");
if (part == "SLG46621V") Pass::call(design, "nlutmap -luts 2,8,16,2");
Pass::call(design, "clean");
}