Skip to content

Commit

Permalink
Added ODDR2 model
Browse files Browse the repository at this point in the history
  • Loading branch information
Lane Brooks committed Feb 13, 2010
1 parent 6099f59 commit d6363e3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ODDR2.v
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d6363e3

Please sign in to comment.