Skip to content

Commit

Permalink
Added IDDR2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lane Brooks committed Feb 28, 2010
1 parent 802fd62 commit b25bcbc
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions IDDR2.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module IDDR2 (Q0, Q1, C0, C1, CE, D, R, S);

output reg Q0;
output reg Q1;

input C0;
input C1;
input CE;
input D;
input R;
input S;


always @(posedge C0 or posedge R or posedge S) begin
if(R) begin
Q0 <= 0;
end else if(S) begin
Q0 <= 1;
end else begin
Q0 <= D;
end
end

always @(posedge C1 or posedge R or posedge S) begin
if(R) begin
Q1 <= 0;
end else if(S) begin
Q1 <= 1;
end else begin
Q1 <= D;
end
end


endmodule

0 comments on commit b25bcbc

Please sign in to comment.