aboutsummaryrefslogtreecommitdiff
path: root/j1demo/verilog/ck_div.v
blob: a753804fc580850087aaa7430a925bc52ead439e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module ck_div(
input ck_in,
output ck_out,
input sys_rst_i
//output locked;
);
parameter DIV_BY = 1;
parameter MULT_BY = 1;

wire ck_fb;

//DCM #(
//   .CLKDV_DIVIDE(DIV_BY),
//   .DFS_FREQUENCY_MODE("LOW"), // HIGH or LOW frequency mode for frequency synthesis
//   .DUTY_CYCLE_CORRECTION("TRUE"), // Duty cycle correction, TRUE or FALSE
//   .STARTUP_WAIT("TRUE")    // Delay configuration DONE until DCM LOCK, TRUE/FALSE
//) DCM_inst (
//   .CLK0(ck_fb),    
//   .CLKDV(ck_out), 
//   .CLKFB(ck_fb),    // DCM clock feedback
//   .CLKIN(ck_in),     // Clock input (from IBUFG, BUFG or DCM)
//   .RST(0)
//);

DCM #(
   .CLKFX_MULTIPLY(MULT_BY),
   .CLKFX_DIVIDE(DIV_BY),
   .DFS_FREQUENCY_MODE("LOW"), // HIGH or LOW frequency mode for frequency synthesis
   .DUTY_CYCLE_CORRECTION("TRUE"), // Duty cycle correction, TRUE or FALSE
   .STARTUP_WAIT("TRUE")    // Delay configuration DONE until DCM LOCK, TRUE/FALSE
) DCM_inst (
   .CLK0(ck_fb),    
   .CLKFX(ck_out), 
   .CLKFB(ck_fb),    // DCM clock feedback
   .CLKIN(ck_in),     // Clock input (from IBUFG, BUFG or DCM)
   .RST(0)
);

//BUFG BUFG_inst(.I(ck_int), .O(ck_out));

endmodule