From d6363e3221049fc9d9d9a7b27e900813dc573524 Mon Sep 17 00:00:00 2001 From: Lane Brooks Date: Sat, 13 Feb 2010 13:45:24 -0700 Subject: [PATCH] Added ODDR2 model --- ODDR2.v | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ODDR2.v diff --git a/ODDR2.v b/ODDR2.v new file mode 100644 index 0000000..69f16b0 --- /dev/null +++ b/ODDR2.v @@ -0,0 +1,27 @@ +module ODDR2 (Q, C0, C1, CE, D0, D1, R, S); + + output reg Q; + + input C0; + input C1; + input CE; + input D0; + input D1; + input R; + input S; + + + always @(posedge C0 or posedge C1 or posedge R or posedge S) begin + if(R) begin + Q <= 0; + end else if(S) begin + Q <= 1; + end else if(C0 && CE) begin + Q <= D0; + end else if(C1 && CE) begin + Q <= D1; + end + end + +endmodule +