mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-17 20:02:53 +08:00
Adding PLL LOCK functionality
-not accurate, but at least it gives some dunmy behavior for PLLLOCK
This commit is contained in:
parent
02cc0f2b4f
commit
a2d8c5c453
@ -168,9 +168,21 @@ module MMCME2_ADV # (
|
||||
//#DUMMY DRIVES
|
||||
//##############
|
||||
assign CLKFBOUT=CLKIN1;
|
||||
assign LOCKED=1'b0;
|
||||
|
||||
|
||||
//###########################
|
||||
//#SANITY CHECK LOCK COUNTER
|
||||
//############################
|
||||
parameter LCW=4;
|
||||
reg [LCW-1:0] lock_counter;
|
||||
wire reset = POR | RST;
|
||||
|
||||
always @ (posedge CLKIN1 or posedge reset)
|
||||
if(reset)
|
||||
lock_counter[LCW-1:0] <= {(LCW){1'b1}};
|
||||
else if(~LOCKED)
|
||||
lock_counter[LCW-1:0] <= lock_counter[LCW-1:0] - 1'b1;
|
||||
|
||||
assign LOCKED = ~(|lock_counter[LCW-1:0]);
|
||||
|
||||
endmodule // MMCME2_ADV
|
||||
// Local Variables:
|
||||
|
Loading…
x
Reference in New Issue
Block a user