Flip-flop cells¶
The cell types $_DFF_N_ and $_DFF_P_ represent d-type flip-flops.
Verilog |
Cell Type |
|---|---|
|
|
|
|
The cell types $_DFFE_[NP][NP]_ implement d-type flip-flops with enable. The
values in the table for these cell types relate to the following Verilog code
template.
always @(CLK_EDGE C)
if (EN == EN_LVL)
Q <= D;
\(ClkEdge\) |
\(EnLvl\) |
Cell Type |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The cell types $_DFF_[NP][NP][01]_ implement d-type flip-flops with
asynchronous reset. The values in the table for these cell types relate to the
following Verilog code template, where RST_EDGE is posedge if
RST_LVL if 1, and negedge otherwise.
always @(CLK_EDGE C, RST_EDGE R)
if (R == RST_LVL)
Q <= RST_VAL;
else
Q <= D;
The cell types $_SDFF_[NP][NP][01]_ implement d-type flip-flops with
synchronous reset. The values in the table for these cell types relate to the
following Verilog code template:
always @(CLK_EDGE C)
if (R == RST_LVL)
Q <= RST_VAL;
else
Q <= D;
\(ClkEdge\) |
\(RstLvl\) |
\(RstVal\) |
Cell Type |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The cell types $_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 RST_EDGE is posedge
if RST_LVL if 1, and negedge otherwise.
always @(CLK_EDGE C, RST_EDGE R)
if (R == RST_LVL)
Q <= RST_VAL;
else if (EN == EN_LVL)
Q <= D;
The cell types $_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:
always @(CLK_EDGE C)
if (R == RST_LVL)
Q <= RST_VAL;
else if (EN == EN_LVL)
Q <= D;
The cell types $_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:
always @(CLK_EDGE C)
if (EN == EN_LVL)
if (R == RST_LVL)
Q <= RST_VAL;
else
Q <= D;
\(ClkEdge\) |
\(RstLvl\) |
\(RstVal\) |
\(EnLvl\) |
Cell Type |
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The cell types $_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 RST_EDGE is posedge if
RST_LVL if 1, negedge otherwise, and SET_EDGE is posedge if
SET_LVL if 1, negedge otherwise.
always @(CLK_EDGE C, RST_EDGE R, SET_EDGE S)
if (R == RST_LVL)
Q <= 0;
else if (S == SET_LVL)
Q <= 1;
else
Q <= D;
\(ClkEdge\) |
\(SetLvl\) |
\(RstLvl\) |
Cell Type |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The cell types $_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 RST_EDGE is
posedge if RST_LVL if 1, negedge otherwise, and SET_EDGE is
posedge if SET_LVL if 1, negedge otherwise.
always @(CLK_EDGE C, RST_EDGE R, SET_EDGE S)
if (R == RST_LVL)
Q <= 0;
else if (S == SET_LVL)
Q <= 1;
else if (E == EN_LVL)
Q <= D;
\(ClkEdge\) |
\(SetLvl\) |
\(RstLvl\) |
\(EnLvl\) |
Cell Type |
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|