-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lane Brooks
committed
Feb 28, 2010
1 parent
802fd62
commit b25bcbc
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|