mirror of https://github.com/YosysHQ/yosys.git
Fix existing DFF mapping and add new types
This commit is contained in:
parent
94675a5e0b
commit
0c4bbf7e4b
|
@ -35,38 +35,57 @@ module \$lut (A, Y);
|
|||
endmodule
|
||||
|
||||
(* techmap_celltype = "$_DFF_[NP]P[01]_" *)
|
||||
module dff(input D, C, R, output Q);
|
||||
parameter _TECHMAP_CELLTYPE = "$_DFF_PP1_";
|
||||
localparam dff_edge = _TECHMAP_CELLTYPE[6*8 +: 8] == "N";
|
||||
localparam dff_type = _TECHMAP_CELLTYPE[8*8 +: 8] == "1";
|
||||
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";
|
||||
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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'b0), .R(R), .O(Q));
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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));
|
||||
endmodule
|
||||
|
||||
//(* techmap_celltype = "$_ALDFF_[NP]P_" *)
|
||||
//module aldff(input D, C, L, AD, output Q);
|
||||
// parameter _TECHMAP_CELLTYPE = "$_ALDFF_PP_";
|
||||
// localparam dff_edge = _TECHMAP_CELLTYPE[8*8 +: 8] == "N";
|
||||
// wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
|
||||
// NX_DFF #(.dff_ctxt(1'b0), .dff_edge(dff_edge), .dff_init(1'b1), .dff_load(1'b1), .dff_sync(1'b0), .dff_type(2)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(AD), .R(L), .O(Q));
|
||||
//endmodule
|
||||
|
||||
module \$_SDFF_PP0_ (input D, C, R, output Q);
|
||||
(* 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;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .dff_edge(1'b0), .dff_init(1'b1), .dff_load(1'b0), .dff_sync(1'b1), .dff_type(1'b0)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b0), .R(R), .O(Q));
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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
|
||||
|
||||
module \$_SDFF_PP1_ (input D, C, R, output Q);
|
||||
(* 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;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .dff_edge(1'b0), .dff_init(1'b1), .dff_load(1'b0), .dff_sync(1'b1), .dff_type(1'b1)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b0), .R(R), .O(Q));
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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
|
||||
|
||||
module \$_SDFF_NP0_ (input D, C, R, output Q);
|
||||
(* 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;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .dff_edge(1'b1), .dff_init(1'b1), .dff_load(1'b0), .dff_sync(1'b1), .dff_type(1'b0)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b0), .R(R), .O(Q));
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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
|
||||
|
||||
module \$_SDFF_NP1_ (input D, C, R, output Q);
|
||||
module \$_DFF_P_ (input D, C, output Q);
|
||||
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .dff_edge(1'b1), .dff_init(1'b1), .dff_load(1'b0), .dff_sync(1'b1), .dff_type(1'b1)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b0), .R(R), .O(Q));
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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));
|
||||
endmodule
|
||||
|
||||
module \$_DFF_N_ (input D, C, output Q);
|
||||
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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));
|
||||
endmodule
|
||||
|
||||
module \$_DFFE_PP_ (input D, C, E, output Q);
|
||||
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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));
|
||||
endmodule
|
||||
|
||||
module \$_DFFE_NN_ (input D, C, E, output Q);
|
||||
wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
|
||||
NX_DFF #(.dff_ctxt(1'b0), .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));
|
||||
endmodule
|
||||
|
|
Loading…
Reference in New Issue