diff --git a/techlibs/nanoxplore/cells_map.v b/techlibs/nanoxplore/cells_map.v index 8e27b6992..8d6fb09fc 100644 --- a/techlibs/nanoxplore/cells_map.v +++ b/techlibs/nanoxplore/cells_map.v @@ -40,7 +40,7 @@ module \$_DFF_xxxx_ (input D, C, R, output Q); 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'b1), .R(R), .O(Q)); + 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)); endmodule (* techmap_celltype = "$_SDFF_[NP]P[01]_" *) @@ -49,7 +49,7 @@ module \$_SDFF_xxxx_ (input D, C, R, output Q); 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'b1), .dff_type(dff_type)) _TECHMAP_REPLACE_ (.I(D), .CK(C), .L(1'b1), .R(R), .O(Q)); + 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_" *) @@ -58,7 +58,7 @@ module \$_DFFE_xxxx_ (input D, C, R, E, output Q); 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(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)); + 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_" *) @@ -67,7 +67,7 @@ module \$_SDFFE_xxxx_ (input D, C, R, E, output Q); 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(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)); + 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 module \$_DFF_P_ (input D, C, output Q); diff --git a/techlibs/nanoxplore/synth_nanoxplore.cc b/techlibs/nanoxplore/synth_nanoxplore.cc index 3b8351abc..38f1d2f22 100644 --- a/techlibs/nanoxplore/synth_nanoxplore.cc +++ b/techlibs/nanoxplore/synth_nanoxplore.cc @@ -302,11 +302,11 @@ struct SynthNanoXplorePass : public ScriptPass if (check_label("map_ffs")) { - std::string dfflegalize_args = " -cell $_DFF_?_ 0 -cell $_DFF_?P0_ 0 -cell $_SDFF_?P0_ 0"; + std::string dfflegalize_args = " -cell $_DFF_?_ 0 -cell $_DFF_?P?_ r -cell $_SDFF_?P?_ r"; if (help_mode) { - dfflegalize_args += " [-cell $_DFFE_?P_ 0 -cell $_DFFE_?P0P_ 0 -cell $_SDFFE_?P0P_ 0]"; + dfflegalize_args += " [-cell $_DFFE_?P_ 0 -cell $_DFFE_?P?P_ r -cell $_SDFFE_?P?P_ r]"; } else if (!nodffe) { - dfflegalize_args += " -cell $_DFFE_?P_ 0 -cell $_DFFE_?P0P_ 0 -cell $_SDFFE_?P0P_ 0"; + dfflegalize_args += " -cell $_DFFE_?P_ 0 -cell $_DFFE_?P?P_ r -cell $_SDFFE_?P?P_ r"; } dfflegalize_args += " -cell $_DLATCH_?_ x"; run("dfflegalize" + dfflegalize_args,"($_*DFFE_* only if not -nodffe)");