ID($dff),
                ID($dffe),
                ID($dffsr),
+               ID($dffsre),
                ID($adff),
+               ID($adffe),
+               ID($sdff),
+               ID($sdffe),
+               ID($sdffce),
                ID($dlatch),
+               ID($adlatch),
                ID($dlatchsr),
                ID($_DFFE_NN_),
                ID($_DFFE_NP_),
                ID($_DFFSR_PNP_),
                ID($_DFFSR_PPN_),
                ID($_DFFSR_PPP_),
+               ID($_DFFSRE_NNNN_),
+               ID($_DFFSRE_NNNP_),
+               ID($_DFFSRE_NNPN_),
+               ID($_DFFSRE_NNPP_),
+               ID($_DFFSRE_NPNN_),
+               ID($_DFFSRE_NPNP_),
+               ID($_DFFSRE_NPPN_),
+               ID($_DFFSRE_NPPP_),
+               ID($_DFFSRE_PNNN_),
+               ID($_DFFSRE_PNNP_),
+               ID($_DFFSRE_PNPN_),
+               ID($_DFFSRE_PNPP_),
+               ID($_DFFSRE_PPNN_),
+               ID($_DFFSRE_PPNP_),
+               ID($_DFFSRE_PPPN_),
+               ID($_DFFSRE_PPPP_),
+               ID($_DFF_N_),
+               ID($_DFF_P_),
                ID($_DFF_NN0_),
                ID($_DFF_NN1_),
                ID($_DFF_NP0_),
                ID($_DFF_NP1_),
-               ID($_DFF_N_),
                ID($_DFF_PN0_),
                ID($_DFF_PN1_),
                ID($_DFF_PP0_),
                ID($_DFF_PP1_),
-               ID($_DFF_P_),
+               ID($_DFFE_NN0N_),
+               ID($_DFFE_NN0P_),
+               ID($_DFFE_NN1N_),
+               ID($_DFFE_NN1P_),
+               ID($_DFFE_NP0N_),
+               ID($_DFFE_NP0P_),
+               ID($_DFFE_NP1N_),
+               ID($_DFFE_NP1P_),
+               ID($_DFFE_PN0N_),
+               ID($_DFFE_PN0P_),
+               ID($_DFFE_PN1N_),
+               ID($_DFFE_PN1P_),
+               ID($_DFFE_PP0N_),
+               ID($_DFFE_PP0P_),
+               ID($_DFFE_PP1N_),
+               ID($_DFFE_PP1P_),
+               ID($_SDFF_NN0_),
+               ID($_SDFF_NN1_),
+               ID($_SDFF_NP0_),
+               ID($_SDFF_NP1_),
+               ID($_SDFF_PN0_),
+               ID($_SDFF_PN1_),
+               ID($_SDFF_PP0_),
+               ID($_SDFF_PP1_),
+               ID($_SDFFE_NN0N_),
+               ID($_SDFFE_NN0P_),
+               ID($_SDFFE_NN1N_),
+               ID($_SDFFE_NN1P_),
+               ID($_SDFFE_NP0N_),
+               ID($_SDFFE_NP0P_),
+               ID($_SDFFE_NP1N_),
+               ID($_SDFFE_NP1P_),
+               ID($_SDFFE_PN0N_),
+               ID($_SDFFE_PN0P_),
+               ID($_SDFFE_PN1N_),
+               ID($_SDFFE_PN1P_),
+               ID($_SDFFE_PP0N_),
+               ID($_SDFFE_PP0P_),
+               ID($_SDFFE_PP1N_),
+               ID($_SDFFE_PP1P_),
+               ID($_SDFFCE_NN0N_),
+               ID($_SDFFCE_NN0P_),
+               ID($_SDFFCE_NN1N_),
+               ID($_SDFFCE_NN1P_),
+               ID($_SDFFCE_NP0N_),
+               ID($_SDFFCE_NP0P_),
+               ID($_SDFFCE_NP1N_),
+               ID($_SDFFCE_NP1P_),
+               ID($_SDFFCE_PN0N_),
+               ID($_SDFFCE_PN0P_),
+               ID($_SDFFCE_PN1N_),
+               ID($_SDFFCE_PN1P_),
+               ID($_SDFFCE_PP0N_),
+               ID($_SDFFCE_PP0P_),
+               ID($_SDFFCE_PP1N_),
+               ID($_SDFFCE_PP1P_),
+               ID($_SR_NN_),
+               ID($_SR_NP_),
+               ID($_SR_PN_),
+               ID($_SR_PP_),
+               ID($_DLATCH_N_),
+               ID($_DLATCH_P_),
+               ID($_DLATCH_NN0_),
+               ID($_DLATCH_NN1_),
+               ID($_DLATCH_NP0_),
+               ID($_DLATCH_NP1_),
+               ID($_DLATCH_PN0_),
+               ID($_DLATCH_PN1_),
+               ID($_DLATCH_PP0_),
+               ID($_DLATCH_PP1_),
                ID($_DLATCHSR_NNN_),
                ID($_DLATCHSR_NNP_),
                ID($_DLATCHSR_NPN_),
                ID($_DLATCHSR_PNP_),
                ID($_DLATCHSR_PPN_),
                ID($_DLATCHSR_PPP_),
-               ID($_DLATCH_N_),
-               ID($_DLATCH_P_),
                ID($_FF_),
        };
        return res;
                                return;
                        }
 
+                       if (cell->type == ID($dffsre)) {
+                               param_bool(ID::CLK_POLARITY);
+                               param_bool(ID::SET_POLARITY);
+                               param_bool(ID::CLR_POLARITY);
+                               param_bool(ID::EN_POLARITY);
+                               port(ID::CLK, 1);
+                               port(ID::EN, 1);
+                               port(ID::SET, param(ID::WIDTH));
+                               port(ID::CLR, param(ID::WIDTH));
+                               port(ID::D, param(ID::WIDTH));
+                               port(ID::Q, param(ID::WIDTH));
+                               check_expected();
+                               return;
+                       }
+
                        if (cell->type == ID($adff)) {
                                param_bool(ID::CLK_POLARITY);
                                param_bool(ID::ARST_POLARITY);
                                return;
                        }
 
+                       if (cell->type == ID($sdff)) {
+                               param_bool(ID::CLK_POLARITY);
+                               param_bool(ID::SRST_POLARITY);
+                               param_bits(ID::SRST_VALUE, param(ID::WIDTH));
+                               port(ID::CLK, 1);
+                               port(ID::SRST, 1);
+                               port(ID::D, param(ID::WIDTH));
+                               port(ID::Q, param(ID::WIDTH));
+                               check_expected();
+                               return;
+                       }
+
+                       if (cell->type.in(ID($sdffe), ID($sdffce))) {
+                               param_bool(ID::CLK_POLARITY);
+                               param_bool(ID::EN_POLARITY);
+                               param_bool(ID::SRST_POLARITY);
+                               param_bits(ID::SRST_VALUE, param(ID::WIDTH));
+                               port(ID::CLK, 1);
+                               port(ID::EN, 1);
+                               port(ID::SRST, 1);
+                               port(ID::D, param(ID::WIDTH));
+                               port(ID::Q, param(ID::WIDTH));
+                               check_expected();
+                               return;
+                       }
+
+                       if (cell->type == ID($adffe)) {
+                               param_bool(ID::CLK_POLARITY);
+                               param_bool(ID::EN_POLARITY);
+                               param_bool(ID::ARST_POLARITY);
+                               param_bits(ID::ARST_VALUE, param(ID::WIDTH));
+                               port(ID::CLK, 1);
+                               port(ID::EN, 1);
+                               port(ID::ARST, 1);
+                               port(ID::D, param(ID::WIDTH));
+                               port(ID::Q, param(ID::WIDTH));
+                               check_expected();
+                               return;
+                       }
+
                        if (cell->type == ID($dlatch)) {
                                param_bool(ID::EN_POLARITY);
                                port(ID::EN, 1);
                                return;
                        }
 
+                       if (cell->type == ID($adlatch)) {
+                               param_bool(ID::EN_POLARITY);
+                               param_bool(ID::ARST_POLARITY);
+                               param_bits(ID::ARST_VALUE, param(ID::WIDTH));
+                               port(ID::EN, 1);
+                               port(ID::ARST, 1);
+                               port(ID::D, param(ID::WIDTH));
+                               port(ID::Q, param(ID::WIDTH));
+                               check_expected();
+                               return;
+                       }
+
                        if (cell->type == ID($dlatchsr)) {
                                param_bool(ID::EN_POLARITY);
                                param_bool(ID::SET_POLARITY);
                        if (cell->type == ID($_MUX8_))  { port(ID::A,1); port(ID::B,1); port(ID::C,1); port(ID::D,1); port(ID::E,1); port(ID::F,1); port(ID::G,1); port(ID::H,1); port(ID::S,1); port(ID::T,1); port(ID::U,1); port(ID::Y,1); check_expected(); return; }
                        if (cell->type == ID($_MUX16_)) { port(ID::A,1); port(ID::B,1); port(ID::C,1); port(ID::D,1); port(ID::E,1); port(ID::F,1); port(ID::G,1); port(ID::H,1); port(ID::I,1); port(ID::J,1); port(ID::K,1); port(ID::L,1); port(ID::M,1); port(ID::N,1); port(ID::O,1); port(ID::P,1); port(ID::S,1); port(ID::T,1); port(ID::U,1); port(ID::V,1); port(ID::Y,1); check_expected(); return; }
 
-                       if (cell->type == ID($_SR_NN_)) { port(ID::S,1); port(ID::R,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_SR_NP_)) { port(ID::S,1); port(ID::R,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_SR_PN_)) { port(ID::S,1); port(ID::R,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_SR_PP_)) { port(ID::S,1); port(ID::R,1); port(ID::Q,1); check_expected(); return; }
-
-                       if (cell->type == ID($_FF_))    { port(ID::D,1); port(ID::Q,1); check_expected();  return; }
-                       if (cell->type == ID($_DFF_N_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_P_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); check_expected(); return; }
-
-                       if (cell->type == ID($_DFFE_NN_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::E,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFE_NP_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::E,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFE_PN_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::E,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFE_PP_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::E,1); check_expected(); return; }
-
-                       if (cell->type == ID($_DFF_NN0_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_NN1_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_NP0_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_NP1_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_PN0_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_PN1_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_PP0_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-                       if (cell->type == ID($_DFF_PP1_)) { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
-
-                       if (cell->type == ID($_DFFSR_NNN_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_NNP_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_NPN_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_NPP_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_PNN_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_PNP_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_PPN_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DFFSR_PPP_)) { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-
-                       if (cell->type == ID($_DLATCH_N_)) { port(ID::E,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCH_P_)) { port(ID::E,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-
-                       if (cell->type == ID($_DLATCHSR_NNN_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_NNP_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_NPN_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_NPP_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_PNN_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_PNP_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_PPN_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
-                       if (cell->type == ID($_DLATCHSR_PPP_)) { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
+                       if (cell->type.in(ID($_SR_NN_), ID($_SR_NP_), ID($_SR_PN_), ID($_SR_PP_)))
+                               { port(ID::S,1); port(ID::R,1); port(ID::Q,1); check_expected(); return; }
+
+                       if (cell->type == ID($_FF_)) { port(ID::D,1); port(ID::Q,1); check_expected();  return; }
+
+                       if (cell->type.in(ID($_DFF_N_), ID($_DFF_P_)))
+                               { port(ID::D,1); port(ID::Q,1); port(ID::C,1); check_expected(); return; }
+
+                       if (cell->type.in(ID($_DFFE_NN_), ID($_DFFE_NP_), ID($_DFFE_PN_), ID($_DFFE_PP_)))
+                               { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::E,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_DFF_NN0_), ID($_DFF_NN1_), ID($_DFF_NP0_), ID($_DFF_NP1_),
+                                       ID($_DFF_PN0_), ID($_DFF_PN1_), ID($_DFF_PP0_), ID($_DFF_PP1_)))
+                               { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_DFFE_NN0N_), ID($_DFFE_NN0P_), ID($_DFFE_NN1N_), ID($_DFFE_NN1P_),
+                                       ID($_DFFE_NP0N_), ID($_DFFE_NP0P_), ID($_DFFE_NP1N_), ID($_DFFE_NP1P_),
+                                       ID($_DFFE_PN0N_), ID($_DFFE_PN0P_), ID($_DFFE_PN1N_), ID($_DFFE_PN1P_),
+                                       ID($_DFFE_PP0N_), ID($_DFFE_PP0P_), ID($_DFFE_PP1N_), ID($_DFFE_PP1P_)))
+                               { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); port(ID::E,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_DFFSR_NNN_), ID($_DFFSR_NNP_), ID($_DFFSR_NPN_), ID($_DFFSR_NPP_),
+                                       ID($_DFFSR_PNN_), ID($_DFFSR_PNP_), ID($_DFFSR_PPN_), ID($_DFFSR_PPP_)))
+                               { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_DFFSRE_NNNN_), ID($_DFFSRE_NNNP_), ID($_DFFSRE_NNPN_), ID($_DFFSRE_NNPP_),
+                                       ID($_DFFSRE_NPNN_), ID($_DFFSRE_NPNP_), ID($_DFFSRE_NPPN_), ID($_DFFSRE_NPPP_),
+                                       ID($_DFFSRE_PNNN_), ID($_DFFSRE_PNNP_), ID($_DFFSRE_PNPN_), ID($_DFFSRE_PNPP_),
+                                       ID($_DFFSRE_PPNN_), ID($_DFFSRE_PPNP_), ID($_DFFSRE_PPPN_), ID($_DFFSRE_PPPP_)))
+                               { port(ID::C,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::E,1); port(ID::Q,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_SDFF_NN0_), ID($_SDFF_NN1_), ID($_SDFF_NP0_), ID($_SDFF_NP1_),
+                                       ID($_SDFF_PN0_), ID($_SDFF_PN1_), ID($_SDFF_PP0_), ID($_SDFF_PP1_)))
+                               { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_SDFFE_NN0N_), ID($_SDFFE_NN0P_), ID($_SDFFE_NN1N_), ID($_SDFFE_NN1P_),
+                                       ID($_SDFFE_NP0N_), ID($_SDFFE_NP0P_), ID($_SDFFE_NP1N_), ID($_SDFFE_NP1P_),
+                                       ID($_SDFFE_PN0N_), ID($_SDFFE_PN0P_), ID($_SDFFE_PN1N_), ID($_SDFFE_PN1P_),
+                                       ID($_SDFFE_PP0N_), ID($_SDFFE_PP0P_), ID($_SDFFE_PP1N_), ID($_SDFFE_PP1P_),
+                                       ID($_SDFFCE_NN0N_), ID($_SDFFCE_NN0P_), ID($_SDFFCE_NN1N_), ID($_SDFFCE_NN1P_),
+                                       ID($_SDFFCE_NP0N_), ID($_SDFFCE_NP0P_), ID($_SDFFCE_NP1N_), ID($_SDFFCE_NP1P_),
+                                       ID($_SDFFCE_PN0N_), ID($_SDFFCE_PN0P_), ID($_SDFFCE_PN1N_), ID($_SDFFCE_PN1P_),
+                                       ID($_SDFFCE_PP0N_), ID($_SDFFCE_PP0P_), ID($_SDFFCE_PP1N_), ID($_SDFFCE_PP1P_)))
+                               { port(ID::D,1); port(ID::Q,1); port(ID::C,1); port(ID::R,1); port(ID::E,1); check_expected(); return; }
+
+                       if (cell->type.in(ID($_DLATCH_N_), ID($_DLATCH_P_)))
+                               { port(ID::E,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_DLATCH_NN0_), ID($_DLATCH_NN1_), ID($_DLATCH_NP0_), ID($_DLATCH_NP1_),
+                                       ID($_DLATCH_PN0_), ID($_DLATCH_PN1_), ID($_DLATCH_PP0_), ID($_DLATCH_PP1_)))
+                               { port(ID::E,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
+
+                       if (cell->type.in(
+                                       ID($_DLATCHSR_NNN_), ID($_DLATCHSR_NNP_), ID($_DLATCHSR_NPN_), ID($_DLATCHSR_NPP_),
+                                       ID($_DLATCHSR_PNN_), ID($_DLATCHSR_PNP_), ID($_DLATCHSR_PPN_), ID($_DLATCHSR_PPP_)))
+                               { port(ID::E,1); port(ID::S,1); port(ID::R,1); port(ID::D,1); port(ID::Q,1); check_expected(); return; }
 
                        error(__LINE__);
                }
 
 edge if this parameter is {\tt 1'b0}.
 \end{itemize}
 
-D-type flip-flops with enable are represented by {\tt \$dffe} cells. As the {\tt \$dff}
-cells they have \B{CLK}, \B{D} and \B{Q} ports. In addition they also have a single-bit \B{EN}
-input port for the enable pin and the following parameter:
-
-\begin{itemize}
-\item \B{EN\_POLARITY} \\
-The enable input is active-high if this parameter has the value {\tt 1'b1} and active-low
-if this parameter is {\tt 1'b0}.
-\end{itemize}
-
 D-type flip-flops with asynchronous reset are represented by {\tt \$adff} cells. As the {\tt \$dff}
 cells they have \B{CLK}, \B{D} and \B{Q} ports. In addition they also have a single-bit \B{ARST}
 input port for the reset pin and the following additional two parameters:
 The state of \B{Q} will be set to this value when the reset is active.
 \end{itemize}
 
-Note that the {\tt \$adff} cell can only be used when the reset value is constant.
-
 \begin{sloppypar}
 Usually these cells are generated by the {\tt proc} pass using the information
 in the designs RTLIL::Process objects.
 \end{sloppypar}
 
+D-type flip-flops with synchronous reset are represented by {\tt \$sdff} cells. As the {\tt \$dff}
+cells they have \B{CLK}, \B{D} and \B{Q} ports. In addition they also have a single-bit \B{SRST}
+input port for the reset pin and the following additional two parameters:
+
+\begin{itemize}
+\item \B{SRST\_POLARITY} \\
+The synchronous reset is active-high if this parameter has the value {\tt 1'b1} and active-low
+if this parameter is {\tt 1'b0}.
+
+\item \B{SRST\_VALUE} \\
+The state of \B{Q} will be set to this value when the reset is active.
+\end{itemize}
+
+Note that the {\tt \$adff} and {\tt \$sdff} cells can only be used when the reset value is constant.
+
 D-type flip-flops with asynchronous set and reset are represented by {\tt \$dffsr} cells.
 As the {\tt \$dff} cells they have \B{CLK}, \B{D} and \B{Q} ports. In addition they also have
 a single-bit \B{SET} input port for the set pin, a single-bit \B{CLR} input port for the reset pin,
 When both the set and reset inputs of a {\tt \$dffsr} cell are active, the reset input takes
 precedence.
 
+D-type flip-flops with enable are represented by {\tt \$dffe}, {\tt \$adffe}, {\tt \$dffsre},
+{\tt \$sdffe}, and {\tt \$sdffce} cells, which are enhanced variants of {\tt \$dff}, {\tt \$adff}, {\tt \$dffsr},
+{\tt \$sdff} (with reset over enable) and {\tt \$sdff} (with enable over reset)
+cells, respectively.  They have the same ports and parameters as their base cell.
+In addition they also have a single-bit \B{EN} input port for the enable pin and the following parameter:
+
+\begin{itemize}
+\item \B{EN\_POLARITY} \\
+The enable input is active-high if this parameter has the value {\tt 1'b1} and active-low
+if this parameter is {\tt 1'b0}.
+\end{itemize}
+
 \begin{fixme}
 Add information about {\tt \$sr} cells (set-reset flip-flops), {\tt \$dlatch} cells (d-type latches),
-and {\tt \$dlatchsr} cells (d-type latches with set/reset).
+{\tt \$adlatch} and {\tt \$dlatchsr} cells (d-type latches with set/reset).
 \end{fixme}
 
 \subsection{Memories}
 \lstinline[language=Verilog]; always @(negedge C) Q <= D; & {\tt \$\_DFF\_N\_} \\
 \lstinline[language=Verilog]; always @(posedge C) Q <= D; & {\tt \$\_DFF\_P\_} \\
 \end{tabular}
+\caption{Cell types for gate level logic networks (main list)}
+\label{tab:CellLib_gates}
+\end{table}
+
+\begin{table}[t]
 \hfil
 \begin{tabular}[t]{llll}
 $ClkEdge$ & $RstLvl$ & $RstVal$ & Cell Type \\
 \hline
-\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_NN0\_} \\
-\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_NN1\_} \\
-\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_NP0\_} \\
-\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_NP1\_} \\
-\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_PN0\_} \\
-\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_PN1\_} \\
-\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_PP0\_} \\
-\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_PP1\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_NN0\_}, {\tt \$\_SDFF\_NN0\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_NN1\_}, {\tt \$\_SDFF\_NN1\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_NP0\_}, {\tt \$\_SDFF\_NP0\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_NP1\_}, {\tt \$\_SDFF\_NP1\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_PN0\_}, {\tt \$\_SDFF\_PN0\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_PN1\_}, {\tt \$\_SDFF\_PN1\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFF\_PP0\_}, {\tt \$\_SDFF\_PP0\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFF\_PP1\_}, {\tt \$\_SDFF\_PP1\_} \\
 \end{tabular}
-% FIXME: the layout of this is broken and I have no idea how to fix it
+\caption{Cell types for gate level logic networks (FFs with reset)}
+\label{tab:CellLib_gates_adff}
+\end{table}
+
+\begin{table}[t]
 \hfil
 \begin{tabular}[t]{lll}
 $ClkEdge$ & $EnLvl$ & Cell Type \\
 \lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_PN\_} \\
 \lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_PP\_} \\
 \end{tabular}
-% FIXME: the layout of this is broken too
+\caption{Cell types for gate level logic networks (FFs with enable)}
+\label{tab:CellLib_gates_dffe}
+\end{table}
+
+\begin{table}[t]
+\begin{tabular}[t]{lllll}
+$ClkEdge$ & $RstLvl$ & $RstVal$ & $EnLvl$ & Cell Type \\
+\hline
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_NN0N\_}, {\tt \$\_SDFFE\_NN0N\_}, {\tt \$\_SDFFCE\_NN0N\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_NN0P\_}, {\tt \$\_SDFFE\_NN0P\_}, {\tt \$\_SDFFCE\_NN0P\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_NN1N\_}, {\tt \$\_SDFFE\_NN1N\_}, {\tt \$\_SDFFCE\_NN1N\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_NN1P\_}, {\tt \$\_SDFFE\_NN1P\_}, {\tt \$\_SDFFCE\_NN1P\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_NP0N\_}, {\tt \$\_SDFFE\_NP0N\_}, {\tt \$\_SDFFCE\_NP0N\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_NP0P\_}, {\tt \$\_SDFFE\_NP0P\_}, {\tt \$\_SDFFCE\_NP0P\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_NP1N\_}, {\tt \$\_SDFFE\_NP1N\_}, {\tt \$\_SDFFCE\_NP1N\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_NP1P\_}, {\tt \$\_SDFFE\_NP1P\_}, {\tt \$\_SDFFCE\_NP1P\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_PN0N\_}, {\tt \$\_SDFFE\_PN0N\_}, {\tt \$\_SDFFCE\_PN0N\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_PN0P\_}, {\tt \$\_SDFFE\_PN0P\_}, {\tt \$\_SDFFCE\_PN0P\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_PN1N\_}, {\tt \$\_SDFFE\_PN1N\_}, {\tt \$\_SDFFCE\_PN1N\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_PN1P\_}, {\tt \$\_SDFFE\_PN1P\_}, {\tt \$\_SDFFCE\_PN1P\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_PP0N\_}, {\tt \$\_SDFFE\_PP0N\_}, {\tt \$\_SDFFCE\_PP0N\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_PP0P\_}, {\tt \$\_SDFFE\_PP0P\_}, {\tt \$\_SDFFCE\_PP0P\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFE\_PP1N\_}, {\tt \$\_SDFFE\_PP1N\_}, {\tt \$\_SDFFCE\_PP1N\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFE\_PP1P\_}, {\tt \$\_SDFFE\_PP1P\_}, {\tt \$\_SDFFCE\_PP1P\_} \\
+\end{tabular}
+\caption{Cell types for gate level logic networks (FFs with reset and enable)}
+\label{tab:CellLib_gates_adffe}
+\end{table}
+
+\begin{table}[t]
 \hfil
 \begin{tabular}[t]{llll}
 $ClkEdge$ & $SetLvl$ & $RstLvl$ & Cell Type \\
 \lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSR\_PPN\_} \\
 \lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSR\_PPP\_} \\
 \end{tabular}
-\caption{Cell types for gate level logic networks}
-\label{tab:CellLib_gates}
+\caption{Cell types for gate level logic networks (FFs with set and reset)}
+\label{tab:CellLib_gates_dffsr}
+\end{table}
+
+\begin{table}[t]
+\hfil
+\begin{tabular}[t]{lllll}
+$ClkEdge$ & $SetLvl$ & $RstLvl$ & $EnLvl$ & Cell Type \\
+\hline
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_NNNN\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_NNNP\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_NNPN\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_NNPP\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_NPNN\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_NPNP\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_NPPN\_} \\
+\lstinline[language=Verilog];negedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_NPPP\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_PNNN\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_PNNP\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_PNPN\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_PNPP\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_PPNN\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_PPNP\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];0; & {\tt \$\_DFFSRE\_PPPN\_} \\
+\lstinline[language=Verilog];posedge; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & \lstinline[language=Verilog];1; & {\tt \$\_DFFSRE\_PPPP\_} \\
+\end{tabular}
+\caption{Cell types for gate level logic networks (FFs with set and reset and enable)}
+\label{tab:CellLib_gates_dffsre}
 \end{table}
 
-Table~\ref{tab:CellLib_gates} lists all cell types used for gate level logic. The cell types
+Tables~\ref{tab:CellLib_gates}, \ref{tab:CellLib_gates_dffe}, \ref{tab:CellLib_gates_adff}, \ref{tab:CellLib_gates_adffe}, \ref{tab:CellLib_gates_dffsr} and \ref{tab:CellLib_gates_dffsre} list all cell types used for gate level logic. The cell types
 {\tt \$\_NOT\_}, {\tt \$\_AND\_}, {\tt \$\_NAND\_}, {\tt \$\_ANDNOT\_}, {\tt \$\_OR\_}, {\tt \$\_NOR\_},
 {\tt \$\_ORNOT\_}, {\tt \$\_XOR\_}, {\tt \$\_XNOR\_} and {\tt \$\_MUX\_} are used to model combinatorial logic.
 The cell type {\tt \$\_TBUF\_} is used to model tristate logic.
                        Q <= D;
 \end{lstlisting}
 
-The cell types {\tt \$\_DFFSR\_NNN\_}, {\tt \$\_DFFSR\_NNP\_}, {\tt \$\_DFFSR\_NPN\_}, {\tt \$\_DFFSR\_NPP\_},
-{\tt \$\_DFFSR\_PNN\_}, {\tt \$\_DFFSR\_PNP\_}, {\tt \$\_DFFSR\_PPN\_} and {\tt \$\_DFFSR\_PPP\_} implement
+The cell types {\tt \$\_SDFF\_NN0\_}, {\tt \$\_SDFF\_NN1\_}, {\tt \$\_SDFF\_NP0\_}, {\tt \$\_SDFF\_NP1\_},
+{\tt \$\_SDFF\_PN0\_}, {\tt \$\_SDFF\_PN1\_}, {\tt \$\_SDFF\_PP0\_} and {\tt \$\_SDFF\_PP1\_} implement
+d-type flip-flops with synchronous reset. The values in the table for these cell types relate to the
+following Verilog code template:
+
+\begin{lstlisting}[mathescape,language=Verilog]
+       always @($ClkEdge$ C)
+               if (R == $RstLvl$)
+                       Q <= $RstVal$;
+               else
+                       Q <= D;
+\end{lstlisting}
+
+The cell types {\tt \$\_DFFE\_[NP][NP][01][NP]\_} implement
+d-type flip-flops with asynchronous reset and enable.  The values in the table for these cell types relate to the
+following Verilog code template, where \lstinline[mathescape,language=Verilog];$RstEdge$; is \lstinline[language=Verilog];posedge;
+if \lstinline[mathescape,language=Verilog];$RstLvl$; if \lstinline[language=Verilog];1;, and \lstinline[language=Verilog];negedge;
+otherwise.
+
+\begin{lstlisting}[mathescape,language=Verilog]
+       always @($ClkEdge$ C, $RstEdge$ R)
+               if (R == $RstLvl$)
+                       Q <= $RstVal$;
+               else if (EN == $EnLvl$)
+                       Q <= D;
+\end{lstlisting}
+
+The cell types {\tt \$\_SDFFE\_[NP][NP][01][NP]\_} implement d-type flip-flops
+with synchronous reset and enable, with reset having priority over enable.
+The values in the table for these cell types relate to the
+following Verilog code template:
+
+\begin{lstlisting}[mathescape,language=Verilog]
+       always @($ClkEdge$ C)
+               if (R == $RstLvl$)
+                       Q <= $RstVal$;
+               else if (EN == $EnLvl$)
+                       Q <= D;
+\end{lstlisting}
+
+The cell types {\tt \$\_SDFFCE\_[NP][NP][01][NP]\_} implement d-type flip-flops
+with synchronous reset and enable, with enable having priority over reset.
+The values in the table for these cell types relate to the
+following Verilog code template:
+
+\begin{lstlisting}[mathescape,language=Verilog]
+       always @($ClkEdge$ C)
+               if (EN == $EnLvl$)
+                       if (R == $RstLvl$)
+                               Q <= $RstVal$;
+                       else
+                               Q <= D;
+\end{lstlisting}
+
+The cell types {\tt \$\_DFFSR\_[NP][NP][NP]\_} implement
 d-type flip-flops with asynchronous set and reset. The values in the table for these cell types relate to the
 following Verilog code template, where \lstinline[mathescape,language=Verilog];$RstEdge$; is \lstinline[language=Verilog];posedge;
 if \lstinline[mathescape,language=Verilog];$RstLvl$; if \lstinline[language=Verilog];1;, \lstinline[language=Verilog];negedge;
                        Q <= D;
 \end{lstlisting}
 
+The cell types {\tt \$\_DFFSRE\_[NP][NP][NP][NP]\_} implement
+d-type flip-flops with asynchronous set and reset and enable. The values in the table for these cell types relate to the
+following Verilog code template, where \lstinline[mathescape,language=Verilog];$RstEdge$; is \lstinline[language=Verilog];posedge;
+if \lstinline[mathescape,language=Verilog];$RstLvl$; if \lstinline[language=Verilog];1;, \lstinline[language=Verilog];negedge;
+otherwise, and \lstinline[mathescape,language=Verilog];$SetEdge$; is \lstinline[language=Verilog];posedge;
+if \lstinline[mathescape,language=Verilog];$SetLvl$; if \lstinline[language=Verilog];1;, \lstinline[language=Verilog];negedge;
+otherwise.
+
+\begin{lstlisting}[mathescape,language=Verilog]
+       always @($ClkEdge$ C, $RstEdge$ R, $SetEdge$ S)
+               if (R == $RstLvl$)
+                       Q <= 0;
+               else if (S == $SetLvl$)
+                       Q <= 1;
+               else if (E == $EnLvl$)
+                       Q <= D;
+\end{lstlisting}
+
 In most cases gate level logic networks are created from RTL networks using the {\tt techmap} pass. The flip-flop cells
 from the gate level logic network can be mapped to physical flip-flop cells from a Liberty file using the {\tt dfflibmap}
 pass. The combinatorial logic cells can be mapped to physical cells from a Liberty file via ABC \citeweblink{ABC}
 
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_NNN_ (C, S, R, D, Q)
+//-     $_DFFE_NN0N_ (D, C, R, E, Q)
 //-
-//- A negative edge D-type flip-flop with negative polarity set and negative
-//- polarity reset.
+//- A negative edge D-type flip-flop with negative polarity reset and negative
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
 //-                 - - 0 - | 0
-//-                 - 0 - - | 1
-//-                 \ - - d | d
+//-                 d \ - 0 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_NNN_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_NN0N_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(negedge C, negedge S, negedge R) begin
+always @(negedge C or negedge R) begin
        if (R == 0)
                Q <= 0;
-       else if (S == 0)
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFE_NN0P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity reset and positive
+//- polarity clock enable.
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 0 - | 0
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_DFFE_NN0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C or negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFE_NN1N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set and negative
+//- polarity clock enable.
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 0 - | 1
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_DFFE_NN1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C or negedge R) begin
+       if (R == 0)
                Q <= 1;
-       else
+       else if (E == 0)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_NNP_ (C, S, R, D, Q)
+//-     $_DFFE_NN1P_ (D, C, R, E, Q)
 //-
 //- A negative edge D-type flip-flop with negative polarity set and positive
-//- polarity reset.
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 0 - | 1
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_DFFE_NN1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C or negedge R) begin
+       if (R == 0)
+               Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFE_NP0N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity reset and negative
+//- polarity clock enable.
+//-
+//- Truth table:    D C R E | Q
 //-                ---------+---
 //-                 - - 1 - | 0
-//-                 - 0 - - | 1
-//-                 \ - - d | d
+//-                 d \ - 0 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_NNP_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_NP0N_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(negedge C, negedge S, posedge R) begin
+always @(negedge C or posedge R) begin
        if (R == 1)
                Q <= 0;
-       else if (S == 0)
-               Q <= 1;
-       else
+       else if (E == 0)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_NPN_ (C, S, R, D, Q)
+//-     $_DFFE_NP0P_ (D, C, R, E, Q)
 //-
-//- A negative edge D-type flip-flop with positive polarity set and negative
-//- polarity reset.
+//- A negative edge D-type flip-flop with positive polarity reset and positive
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
-//-                 - - 0 - | 0
-//-                 - 1 - - | 1
-//-                 \ - - d | d
+//-                 - - 1 - | 0
+//-                 d \ - 1 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_NPN_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_NP0P_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(negedge C, posedge S, negedge R) begin
-       if (R == 0)
+always @(negedge C or posedge R) begin
+       if (R == 1)
                Q <= 0;
-       else if (S == 1)
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFE_NP1N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set and negative
+//- polarity clock enable.
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 1 - | 1
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_DFFE_NP1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C or posedge R) begin
+       if (R == 1)
                Q <= 1;
-       else
+       else if (E == 0)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_NPP_ (C, S, R, D, Q)
+//-     $_DFFE_NP1P_ (D, C, R, E, Q)
 //-
 //- A negative edge D-type flip-flop with positive polarity set and positive
-//- polarity reset.
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
-//-                 - - 1 - | 0
-//-                 - 1 - - | 1
-//-                 \ - - d | d
+//-                 - - 1 - | 1
+//-                 d \ - 1 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_NPP_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_NP1P_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(negedge C, posedge S, posedge R) begin
+always @(negedge C or posedge R) begin
        if (R == 1)
-               Q <= 0;
-       else if (S == 1)
                Q <= 1;
-       else
+       else if (E == 1)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_PNN_ (C, S, R, D, Q)
+//-     $_DFFE_PN0N_ (D, C, R, E, Q)
 //-
-//- A positive edge D-type flip-flop with negative polarity set and negative
-//- polarity reset.
+//- A positive edge D-type flip-flop with negative polarity reset and negative
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
 //-                 - - 0 - | 0
-//-                 - 0 - - | 1
-//-                 / - - d | d
+//-                 d / - 0 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_PNN_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_PN0N_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(posedge C, negedge S, negedge R) begin
+always @(posedge C or negedge R) begin
        if (R == 0)
                Q <= 0;
-       else if (S == 0)
-               Q <= 1;
-       else
+       else if (E == 0)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_PNP_ (C, S, R, D, Q)
+//-     $_DFFE_PN0P_ (D, C, R, E, Q)
 //-
-//- A positive edge D-type flip-flop with negative polarity set and positive
-//- polarity reset.
+//- A positive edge D-type flip-flop with negative polarity reset and positive
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
-//-                 - - 1 - | 0
-//-                 - 0 - - | 1
-//-                 / - - d | d
+//-                 - - 0 - | 0
+//-                 d / - 1 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_PNP_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_PN0P_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(posedge C, negedge S, posedge R) begin
-       if (R == 1)
+always @(posedge C or negedge R) begin
+       if (R == 0)
                Q <= 0;
-       else if (S == 0)
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFE_PN1N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set and negative
+//- polarity clock enable.
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 0 - | 1
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_DFFE_PN1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C or negedge R) begin
+       if (R == 0)
                Q <= 1;
-       else
+       else if (E == 0)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_PPN_ (C, S, R, D, Q)
+//-     $_DFFE_PN1P_ (D, C, R, E, Q)
 //-
-//- A positive edge D-type flip-flop with positive polarity set and negative
-//- polarity reset.
+//- A positive edge D-type flip-flop with negative polarity set and positive
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
-//-                 - - 0 - | 0
-//-                 - 1 - - | 1
-//-                 / - - d | d
+//-                 - - 0 - | 1
+//-                 d / - 1 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_PPN_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_PN1P_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(posedge C, posedge S, negedge R) begin
+always @(posedge C or negedge R) begin
        if (R == 0)
-               Q <= 0;
-       else if (S == 1)
                Q <= 1;
-       else
+       else if (E == 1)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DFFSR_PPP_ (C, S, R, D, Q)
+//-     $_DFFE_PP0N_ (D, C, R, E, Q)
 //-
-//- A positive edge D-type flip-flop with positive polarity set and positive
-//- polarity reset.
+//- A positive edge D-type flip-flop with positive polarity reset and negative
+//- polarity clock enable.
 //-
-//- Truth table:    C S R D | Q
+//- Truth table:    D C R E | Q
 //-                ---------+---
 //-                 - - 1 - | 0
-//-                 - 1 - - | 1
-//-                 / - - d | d
+//-                 d / - 0 | d
 //-                 - - - - | q
 //-
-module \$_DFFSR_PPP_ (C, S, R, D, Q);
-input C, S, R, D;
+module \$_DFFE_PP0N_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @(posedge C, posedge S, posedge R) begin
+always @(posedge C or posedge R) begin
        if (R == 1)
                Q <= 0;
-       else if (S == 1)
-               Q <= 1;
-       else
+       else if (E == 0)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DLATCH_N_ (E, D, Q)
+//-     $_DFFE_PP0P_ (D, C, R, E, Q)
 //-
-//- A negative enable D-type latch.
+//- A positive edge D-type flip-flop with positive polarity reset and positive
+//- polarity clock enable.
 //-
-//- Truth table:    E D | Q
-//-                -----+---
-//-                 0 d | d
-//-                 - - | q
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 1 - | 0
+//-                 d / - 1 | d
+//-                 - - - - | q
 //-
-module \$_DLATCH_N_ (E, D, Q);
-input E, D;
+module \$_DFFE_PP0P_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @* begin
-       if (E == 0)
+always @(posedge C or posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (E == 1)
                Q <= D;
 end
 endmodule
 
 //  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 //-
-//-     $_DLATCH_P_ (E, D, Q)
+//-     $_DFFE_PP1N_ (D, C, R, E, Q)
 //-
-//- A positive enable D-type latch.
+//- A positive edge D-type flip-flop with positive polarity set and negative
+//- polarity clock enable.
 //-
-//- Truth table:    E D | Q
-//-                -----+---
-//-                 1 d | d
-//-                 - - | q
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 1 - | 1
+//-                 d / - 0 | d
+//-                 - - - - | q
 //-
-module \$_DLATCH_P_ (E, D, Q);
-input E, D;
+module \$_DFFE_PP1N_ (D, C, R, E, Q);
+input D, C, R, E;
 output reg Q;
-always @* begin
-       if (E == 1)
+always @(posedge C or posedge R) begin
+       if (R == 1)
+               Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFE_PP1P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set and positive
+//- polarity clock enable.
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - - 1 - | 1
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_DFFE_PP1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C or posedge R) begin
+       if (R == 1)
+               Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_NNN_ (C, S, R, D, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set and negative
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 0 - | 0
+//-                 - 0 - - | 1
+//-                 \ - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_NNN_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(negedge C, negedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_NNP_ (C, S, R, D, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set and positive
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 1 - | 0
+//-                 - 0 - - | 1
+//-                 \ - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_NNP_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(negedge C, negedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_NPN_ (C, S, R, D, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set and negative
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 0 - | 0
+//-                 - 1 - - | 1
+//-                 \ - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_NPN_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(negedge C, posedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_NPP_ (C, S, R, D, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set and positive
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 1 - | 0
+//-                 - 1 - - | 1
+//-                 \ - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_NPP_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(negedge C, posedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_PNN_ (C, S, R, D, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set and negative
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 0 - | 0
+//-                 - 0 - - | 1
+//-                 / - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_PNN_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(posedge C, negedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_PNP_ (C, S, R, D, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set and positive
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 1 - | 0
+//-                 - 0 - - | 1
+//-                 / - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_PNP_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(posedge C, negedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_PPN_ (C, S, R, D, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set and negative
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 0 - | 0
+//-                 - 1 - - | 1
+//-                 / - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_PPN_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(posedge C, posedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSR_PPP_ (C, S, R, D, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set and positive
+//- polarity reset.
+//-
+//- Truth table:    C S R D | Q
+//-                ---------+---
+//-                 - - 1 - | 0
+//-                 - 1 - - | 1
+//-                 / - - d | d
+//-                 - - - - | q
+//-
+module \$_DFFSR_PPP_ (C, S, R, D, Q);
+input C, S, R, D;
+output reg Q;
+always @(posedge C, posedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NNNN_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set, negative
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 0 - - - | 1
+//-                 \ - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NNNN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, negedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NNNP_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set, negative
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 0 - - - | 1
+//-                 \ - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NNNP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, negedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NNPN_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set, positive
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 0 - - - | 1
+//-                 \ - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NNPN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, negedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NNPP_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity set, positive
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 0 - - - | 1
+//-                 \ - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NNPP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, negedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NPNN_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set, negative
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 1 - - - | 1
+//-                 \ - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NPNN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, posedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NPNP_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set, negative
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 1 - - - | 1
+//-                 \ - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NPNP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, posedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NPPN_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set, positive
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 1 - - - | 1
+//-                 \ - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NPPN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, posedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_NPPP_ (C, S, R, E, D, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity set, positive
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 1 - - - | 1
+//-                 \ - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_NPPP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(negedge C, posedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PNNN_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set, negative
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 0 - - - | 1
+//-                 / - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PNNN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, negedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PNNP_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set, negative
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 0 - - - | 1
+//-                 / - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PNNP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, negedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PNPN_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set, positive
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 0 - - - | 1
+//-                 / - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PNPN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, negedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PNPP_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity set, positive
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 0 - - - | 1
+//-                 / - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PNPP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, negedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 0)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PPNN_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set, negative
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 1 - - - | 1
+//-                 / - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PPNN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, posedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PPNP_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set, negative
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 0 - - | 0
+//-                 - 1 - - - | 1
+//-                 / - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PPNP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, posedge S, negedge R) begin
+       if (R == 0)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PPPN_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set, positive
+//- polarity reset and negative polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 1 - - - | 1
+//-                 / - - 0 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PPPN_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, posedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DFFSRE_PPPP_ (C, S, R, E, D, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity set, positive
+//- polarity reset and positive polarity clock enable.
+//-
+//- Truth table:    C S R E D | Q
+//-                -----------+---
+//-                 - - 1 - - | 0
+//-                 - 1 - - - | 1
+//-                 / - - 1 d | d
+//-                 - - - - - | q
+//-
+module \$_DFFSRE_PPPP_ (C, S, R, E, D, Q);
+input C, S, R, E, D;
+output reg Q;
+always @(posedge C, posedge S, posedge R) begin
+       if (R == 1)
+               Q <= 0;
+       else if (S == 1)
+               Q <= 1;
+        else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_NN0_ (D, C, R, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous reset.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - \ 0 | 0
+//-                 d \ - | d
+//-                 - - - | q
+//-
+module \$_SDFF_NN0_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(negedge C) begin
+       if (R == 0)
+               Q <= 0;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_NN1_ (D, C, R, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous set.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - \ 0 | 1
+//-                 d \ - | d
+//-                 - - - | q
+//-
+module \$_SDFF_NN1_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(negedge C) begin
+       if (R == 0)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_NP0_ (D, C, R, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous reset.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - \ 1 | 0
+//-                 d \ - | d
+//-                 - - - | q
+//-
+module \$_SDFF_NP0_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(negedge C) begin
+       if (R == 1)
+               Q <= 0;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_NP1_ (D, C, R, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous set.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - \ 1 | 1
+//-                 d \ - | d
+//-                 - - - | q
+//-
+module \$_SDFF_NP1_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(negedge C) begin
+       if (R == 1)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_PN0_ (D, C, R, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous reset.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - / 0 | 0
+//-                 d / - | d
+//-                 - - - | q
+//-
+module \$_SDFF_PN0_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(posedge C) begin
+       if (R == 0)
+               Q <= 0;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_PN1_ (D, C, R, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous set.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - / 0 | 1
+//-                 d / - | d
+//-                 - - - | q
+//-
+module \$_SDFF_PN1_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(posedge C) begin
+       if (R == 0)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_PP0_ (D, C, R, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous reset.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - / 1 | 0
+//-                 d / - | d
+//-                 - - - | q
+//-
+module \$_SDFF_PP0_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(posedge C) begin
+       if (R == 1)
+               Q <= 0;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFF_PP1_ (D, C, R, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous set.
+//-
+//- Truth table:    D C R | Q
+//-                -------+---
+//-                 - / 1 | 1
+//-                 d / - | d
+//-                 - - - | q
+//-
+module \$_SDFF_PP1_ (D, C, R, Q);
+input D, C, R;
+output reg Q;
+always @(posedge C) begin
+       if (R == 1)
+               Q <= 1;
+       else
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NN0N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous reset and negative
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 - | 0
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NN0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 0)
+               Q <= 0;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NN0P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous reset and positive
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 - | 0
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NN0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 0)
+               Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NN1N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous set and negative
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 - | 1
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NN1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 0)
+               Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NN1P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous set and positive
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 - | 1
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NN1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 0)
+               Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NP0N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous reset and negative
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 - | 0
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NP0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 1)
+               Q <= 0;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NP0P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous reset and positive
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 - | 0
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NP0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 1)
+               Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NP1N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous set and negative
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 - | 1
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NP1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 1)
+               Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_NP1P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous set and positive
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 - | 1
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_NP1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (R == 1)
+               Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PN0N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous reset and negative
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 - | 0
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PN0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 0)
+               Q <= 0;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PN0P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous reset and positive
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 - | 0
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PN0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 0)
+               Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PN1N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous set and negative
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 - | 1
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PN1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 0)
+               Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PN1P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous set and positive
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 - | 1
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PN1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 0)
+               Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PP0N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous reset and negative
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 - | 0
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PP0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 1)
+               Q <= 0;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PP0P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous reset and positive
+//- polarity clock enable (with reset having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 - | 0
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PP0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 1)
+               Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PP1N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous set and negative
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 - | 1
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PP1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 1)
+               Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFE_PP1P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous set and positive
+//- polarity clock enable (with set having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 - | 1
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFE_PP1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (R == 1)
+               Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NN0N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous reset and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 0 | 0
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NN0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 0) begin
+               if (R == 0)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NN0P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous reset and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 1 | 0
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NN0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 1) begin
+               if (R == 0)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NN1N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous set and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 0 | 1
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NN1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 0) begin
+               if (R == 0)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NN1P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with negative polarity synchronous set and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 0 1 | 1
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NN1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 1) begin
+               if (R == 0)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NP0N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous reset and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 0 | 0
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NP0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 0) begin
+               if (R == 1)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NP0P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous reset and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 1 | 0
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NP0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 1) begin
+               if (R == 1)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NP1N_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous set and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 0 | 1
+//-                 d \ - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NP1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 0) begin
+               if (R == 1)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_NP1P_ (D, C, R, E, Q)
+//-
+//- A negative edge D-type flip-flop with positive polarity synchronous set and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - \ 1 1 | 1
+//-                 d \ - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_NP1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(negedge C) begin
+       if (E == 1) begin
+               if (R == 1)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PN0N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous reset and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 0 | 0
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PN0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 0) begin
+               if (R == 0)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PN0P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous reset and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 1 | 0
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PN0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 1) begin
+               if (R == 0)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PN1N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous set and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 0 | 1
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PN1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 0) begin
+               if (R == 0)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PN1P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with negative polarity synchronous set and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 0 1 | 1
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PN1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 1) begin
+               if (R == 0)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PP0N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous reset and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 0 | 0
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PP0N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 0) begin
+               if (R == 1)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PP0P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous reset and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 1 | 0
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PP0P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 1) begin
+               if (R == 1)
+                       Q <= 0;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PP1N_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous set and negative
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 0 | 1
+//-                 d / - 0 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PP1N_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 0) begin
+               if (R == 1)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_SDFFCE_PP1P_ (D, C, R, E, Q)
+//-
+//- A positive edge D-type flip-flop with positive polarity synchronous set and positive
+//- polarity clock enable (with clock enable having priority).
+//-
+//- Truth table:    D C R E | Q
+//-                ---------+---
+//-                 - / 1 1 | 1
+//-                 d / - 1 | d
+//-                 - - - - | q
+//-
+module \$_SDFFCE_PP1P_ (D, C, R, E, Q);
+input D, C, R, E;
+output reg Q;
+always @(posedge C) begin
+       if (E == 1) begin
+               if (R == 1)
+                       Q <= 1;
+               else
+                       Q <= D;
+       end
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_N_ (E, D, Q)
+//-
+//- A negative enable D-type latch.
+//-
+//- Truth table:    E D | Q
+//-                -----+---
+//-                 0 d | d
+//-                 - - | q
+//-
+module \$_DLATCH_N_ (E, D, Q);
+input E, D;
+output reg Q;
+always @* begin
+       if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_P_ (E, D, Q)
+//-
+//- A positive enable D-type latch.
+//-
+//- Truth table:    E D | Q
+//-                -----+---
+//-                 1 d | d
+//-                 - - | q
+//-
+module \$_DLATCH_P_ (E, D, Q);
+input E, D;
+output reg Q;
+always @* begin
+       if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_NN0_ (E, R, D, Q)
+//-
+//- A negative enable D-type latch with negative polarity reset.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 0 - | 0
+//-                 0 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_NN0_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 0)
+                Q <= 0;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_NN1_ (E, R, D, Q)
+//-
+//- A negative enable D-type latch with negative polarity set.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 0 - | 1
+//-                 0 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_NN1_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 0)
+                Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_NP0_ (E, R, D, Q)
+//-
+//- A negative enable D-type latch with positive polarity reset.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 1 - | 0
+//-                 0 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_NP0_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 0)
+                Q <= 0;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_NP1_ (E, R, D, Q)
+//-
+//- A negative enable D-type latch with positive polarity set.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 1 - | 1
+//-                 0 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_NP1_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 0)
+                Q <= 1;
+       else if (E == 0)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_PN0_ (E, R, D, Q)
+//-
+//- A positive enable D-type latch with negative polarity reset.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 0 - | 0
+//-                 1 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_PN0_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 1)
+                Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_PN1_ (E, R, D, Q)
+//-
+//- A positive enable D-type latch with negative polarity set.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 0 - | 1
+//-                 1 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_PN1_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 1)
+                Q <= 1;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_PP0_ (E, R, D, Q)
+//-
+//- A positive enable D-type latch with positive polarity reset.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 1 - | 0
+//-                 1 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_PP0_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 1)
+                Q <= 0;
+       else if (E == 1)
+               Q <= D;
+end
+endmodule
+
+//  |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//-     $_DLATCH_PP1_ (E, R, D, Q)
+//-
+//- A positive enable D-type latch with positive polarity set.
+//-
+//- Truth table:    E R D | Q
+//-                -------+---
+//-                 - 1 - | 1
+//-                 1 - d | d
+//-                 - - - | q
+//-
+module \$_DLATCH_PP1_ (E, R, D, Q);
+input E, R, D;
+output reg Q;
+always @* begin
+       if (R == 1)
+                Q <= 1;
+       else if (E == 1)
                Q <= D;
 end
 endmodule