yosys/techlibs/nanoxplore/cells_map.v

96 lines
4.3 KiB
Verilog
Raw Normal View History

2024-03-01 03:43:34 -06:00
`default_nettype none
module \$lut (A, Y);
parameter WIDTH = 0;
parameter LUT = 0;
(* force_downto *)
input [WIDTH-1:0] A;
output Y;
generate
if (WIDTH == 1) begin
2024-03-01 03:44:42 -06:00
localparam [15:0] INIT = {{2{LUT[1:0]}}, {2{LUT[1:0]}}, {2{LUT[1:0]}}, {2{LUT[1:0]}},
{2{LUT[1:0]}}, {2{LUT[1:0]}}, {2{LUT[1:0]}}, {2{LUT[1:0]}}};
2024-03-01 03:43:34 -06:00
NX_LUT #(.lut_table(INIT)) _TECHMAP_REPLACE_ (.O(Y),
2024-03-01 03:44:42 -06:00
.I1(A[0]), .I2(1'b0), .I3(1'b0), .I4(1'b0));
2024-03-01 03:43:34 -06:00
end else
if (WIDTH == 2) begin
2024-03-01 03:44:42 -06:00
localparam [15:0] INIT = {{4{LUT[3:0]}}, {4{LUT[3:0]}}, {4{LUT[3:0]}}, {4{LUT[3:0]}}};
2024-03-01 03:43:34 -06:00
NX_LUT #(.lut_table(INIT)) _TECHMAP_REPLACE_ (.O(Y),
2024-03-01 03:44:42 -06:00
.I1(A[0]), .I2(A[1]), .I3(1'b0), .I4(1'b0), );
2024-03-01 03:43:34 -06:00
end else
if (WIDTH == 3) begin
2024-03-01 03:44:42 -06:00
localparam [15:0] INIT = {{8{LUT[7:0]}}, {8{LUT[7:0]}}};
2024-03-01 03:43:34 -06:00
NX_LUT #(.lut_table(INIT)) _TECHMAP_REPLACE_ (.O(Y),
2024-03-01 03:44:42 -06:00
.I1(A[0]), .I2(A[1]), .I3(A[2]), .I4(1'b0));
2024-03-01 03:43:34 -06:00
end else
if (WIDTH == 4) begin
NX_LUT #(.lut_table(LUT)) _TECHMAP_REPLACE_ (.O(Y),
.I1(A[0]), .I2(A[1]), .I3(A[2]), .I4(A[3]));
end else begin
wire _TECHMAP_FAIL_ = 1;
end
endgenerate
endmodule
2024-03-01 03:55:54 -06:00
(* techmap_celltype = "$_DFF_[NP]P[01]_" *)
module \$_DFF_xxxx_ (input D, C, R, output Q);
parameter _TECHMAP_CELLTYPE_ = "";
localparam dff_edge = _TECHMAP_CELLTYPE_[3*8 +: 8] == "N";
localparam dff_type = _TECHMAP_CELLTYPE_[1*8 +: 8] == "1";
2024-03-01 03:55:54 -06:00
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:29:03 -05:00
NX_DFF #(.dff_ctxt(dff_type), .dff_edge(dff_edge), .dff_init(1'b1), .dff_load(1'b0), .dff_sync(1'b0), .dff_type(dff_type)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b1), .R(R), .O(Q));
2024-03-01 03:55:54 -06:00
endmodule
(* techmap_celltype = "$_SDFF_[NP]P[01]_" *)
module \$_SDFF_xxxx_ (input D, C, R, output Q);
parameter _TECHMAP_CELLTYPE_ = "";
localparam dff_edge = _TECHMAP_CELLTYPE_[3*8 +: 8] == "N";
localparam dff_type = _TECHMAP_CELLTYPE_[1*8 +: 8] == "1";
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:29:03 -05:00
NX_DFF #(.dff_ctxt(dff_type), .dff_edge(dff_edge), .dff_init(1'b1), .dff_load(1'b0), .dff_sync(1'b1), .dff_type(dff_type)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b1), .R(R), .O(Q));
endmodule
(* techmap_celltype = "$_DFFE_[NP]P[01]P_" *)
module \$_DFFE_xxxx_ (input D, C, R, E, output Q);
parameter _TECHMAP_CELLTYPE_ = "";
localparam dff_edge = _TECHMAP_CELLTYPE_[4*8 +: 8] == "N";
localparam dff_type = _TECHMAP_CELLTYPE_[2*8 +: 8] == "1";
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:29:03 -05:00
NX_DFF #(.dff_ctxt(dff_type), .dff_edge(dff_edge), .dff_init(1'b1), .dff_load(1'b1), .dff_sync(1'b0), .dff_type(dff_type)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(E), .R(R), .O(Q));
endmodule
(* techmap_celltype = "$_SDFFE_[NP]P[01]P_" *)
module \$_SDFFE_xxxx_ (input D, C, R, E, output Q);
parameter _TECHMAP_CELLTYPE_ = "";
localparam dff_edge = _TECHMAP_CELLTYPE_[4*8 +: 8] == "N";
localparam dff_type = _TECHMAP_CELLTYPE_[2*8 +: 8] == "1";
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:29:03 -05:00
NX_DFF #(.dff_ctxt(dff_type), .dff_edge(dff_edge), .dff_init(1'b1), .dff_load(1'b1), .dff_sync(1'b1), .dff_type(dff_type)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(E), .R(R), .O(Q));
endmodule
2024-03-01 03:55:54 -06:00
module \$_DFF_P_ (input D, C, output Q);
2024-04-30 06:40:35 -05:00
parameter _TECHMAP_WIREINIT_Q_ = 1'b0;
2024-03-01 08:25:24 -06:00
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:40:35 -05:00
NX_DFF #(.dff_ctxt(_TECHMAP_WIREINIT_Q_), .dff_edge(1'b0), .dff_init(1'b0), .dff_load(1'b0), .dff_sync(1'b0), .dff_type(1'b0)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b1), .R(1'b0), .O(Q));
2024-03-01 03:55:54 -06:00
endmodule
module \$_DFF_N_ (input D, C, output Q);
2024-04-30 06:40:35 -05:00
parameter _TECHMAP_WIREINIT_Q_ = 1'b0;
2024-03-01 08:25:24 -06:00
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:40:35 -05:00
NX_DFF #(.dff_ctxt(_TECHMAP_WIREINIT_Q_), .dff_edge(1'b1), .dff_init(1'b0), .dff_load(1'b0), .dff_sync(1'b0), .dff_type(1'b0)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b1), .R(1'b0), .O(Q));
2024-03-01 03:55:54 -06:00
endmodule
module \$_DFFE_PP_ (input D, C, E, output Q);
2024-04-30 06:40:35 -05:00
parameter _TECHMAP_WIREINIT_Q_ = 1'b0;
2024-03-01 08:25:24 -06:00
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:40:35 -05:00
NX_DFF #(.dff_ctxt(_TECHMAP_WIREINIT_Q_), .dff_edge(1'b0), .dff_init(1'b0), .dff_load(1'b1), .dff_sync(1'b0), .dff_type(1'b0)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(E), .R(1'b0), .O(Q));
2024-03-01 03:55:54 -06:00
endmodule
2024-04-30 03:35:45 -05:00
module \$_DFFE_NP_ (input D, C, E, output Q);
2024-04-30 06:40:35 -05:00
parameter _TECHMAP_WIREINIT_Q_ = 1'b0;
2024-03-01 08:25:24 -06:00
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
2024-04-30 06:40:35 -05:00
NX_DFF #(.dff_ctxt(_TECHMAP_WIREINIT_Q_), .dff_edge(1'b1), .dff_init(1'b0), .dff_load(1'b1), .dff_sync(1'b0), .dff_type(1'b0)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(E), .R(1'b0), .O(Q));
2024-03-01 03:55:54 -06:00
endmodule