mirror of
https://github.com/aolofsson/oh.git
synced 2025-02-07 06:44:09 +08:00
Fixed ODDR model for SAME_EDGE mode
This commit is contained in:
parent
836c4a65a8
commit
ee363f6119
@ -1,3 +1,5 @@
|
||||
/*WARNING: ONLY SAME EDGE SUPPORTED FOR NOW*/
|
||||
//D1,D2 sampled on rising edge of C
|
||||
module ODDR (/*AUTOARG*/
|
||||
// Outputs
|
||||
Q,
|
||||
@ -18,6 +20,7 @@ module ODDR (/*AUTOARG*/
|
||||
output Q; // Data Output that connects to the IOB pad
|
||||
|
||||
reg Q1,Q2;
|
||||
reg Q2_reg;
|
||||
|
||||
//Generate different logic based on parameters
|
||||
|
||||
@ -35,7 +38,10 @@ module ODDR (/*AUTOARG*/
|
||||
else
|
||||
Q2 <= D2;
|
||||
|
||||
assign Q = C ? Q1 : Q2;
|
||||
always @ (negedge C)
|
||||
Q2_reg <= Q2;
|
||||
|
||||
assign Q = C ? Q1 : Q2_reg;
|
||||
|
||||
endmodule // ODDR
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user