summaryrefslogtreecommitdiff
path: root/techlibs/cmos/cmos_cells.v
diff options
context:
space:
mode:
Diffstat (limited to 'techlibs/cmos/cmos_cells.v')
-rw-r--r--techlibs/cmos/cmos_cells.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/techlibs/cmos/cmos_cells.v b/techlibs/cmos/cmos_cells.v
index 802f5871..da75270c 100644
--- a/techlibs/cmos/cmos_cells.v
+++ b/techlibs/cmos/cmos_cells.v
@@ -21,3 +21,15 @@ always @(posedge C)
Q <= D;
endmodule
+module DFFSR(C, D, Q, S, R);
+input C, D, S, R;
+output reg Q;
+always @(posedge C, posedge S, posedge R)
+ if (S)
+ Q <= 1'b1;
+ else if (R)
+ Q <= 1'b0;
+ else
+ Q <= D;
+endmodule
+