1
0
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:
Andreas Olofsson 2015-05-15 09:46:08 -04:00
parent 836c4a65a8
commit ee363f6119

View File

@ -1,3 +1,5 @@
/*WARNING: ONLY SAME EDGE SUPPORTED FOR NOW*/
//D1,D2 sampled on rising edge of C
module ODDR (/*AUTOARG*/ module ODDR (/*AUTOARG*/
// Outputs // Outputs
Q, Q,
@ -18,6 +20,7 @@ module ODDR (/*AUTOARG*/
output Q; // Data Output that connects to the IOB pad output Q; // Data Output that connects to the IOB pad
reg Q1,Q2; reg Q1,Q2;
reg Q2_reg;
//Generate different logic based on parameters //Generate different logic based on parameters
@ -35,7 +38,10 @@ module ODDR (/*AUTOARG*/
else else
Q2 <= D2; Q2 <= D2;
assign Q = C ? Q1 : Q2; always @ (negedge C)
Q2_reg <= Q2;
assign Q = C ? Q1 : Q2_reg;
endmodule // ODDR endmodule // ODDR