vt52-fpga  1.0.0 Initial
vt52-fpga is a serial terminal implemented on a FPGA
clock_pll48.v
Go to the documentation of this file.
1 module clock_pll48
2  (input clk_in,
3  output clk_out,
4  output clk_reset,
5  output clk_tick
6  );
7 
8  wire pll_feedback;
9  wire clk_out_unbuf;
10  reg [23:0] ledCounter;
11 
12  PLLE2_BASE #(
13  .CLKFBOUT_MULT(36),
14  .CLKOUT0_DIVIDE(25),
15  .CLKOUT0_DUTY_CYCLE(0.5),
16  .CLKOUT0_PHASE(0.0)
17  ) PLL_1 (
18  .CLKIN1(clk_in),
19  .CLKOUT0(clk_out_unbuf),
20  .CLKFBOUT(pll_feedback),
21  .CLKFBIN(pll_feedback),
22  .PWRDWN(1'b0),
23  .LOCKED(clk_locked),
24  .RST(1'b0)
25  );
26 
27  BUFG pixel_clk_buf (
28  .O(clk_out),
29  .I(clk_out_unbuf)
30  );
31 
32  // Generate reset signal
33  reg [5:0] reset_cnt = 0;
34  assign clk_reset = ~reset_cnt[5];
35  always @(posedge clk_out) begin
36  if (clk_locked)
37  reset_cnt <= reset_cnt + clk_reset;
38  ledCounter <= ledCounter + 1;
39  end
40 
41  assign clk_tick = ledCounter[ 23 ];
42 
43 endmodule
module clock_pll48(input clk_in, output clk_out, output clk_reset, output clk_tick)
Definition: clock_pll48.v:2
always(posedge clk)
Definition: uart_rx.v:86