OpenCores
URL https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [camera_link/] [camera_link_clk.v] - Blame information for rev 24

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 qaztronic
//
2
//
3
//
4
 
5
`timescale 10ps/1ps
6
 
7
 
8
module camera_link_clk
9
(
10
  input             clk_in,
11
 
12
  output reg [3:0]  clk_7x_index,
13
  output            clk_out_7x,
14
  output            clock_good,
15
 
16
  input             reset
17
);
18
 
19
  // --------------------------------------------------------------------
20
  //
21
  clock_mult
22
    #( .MULT(7) )
23
    clk_out_7x_i
24
    (
25
      .clock_in(clk_in),
26
      .clock_out(clk_out_7x),
27
      .clock_good(clock_good),
28
 
29
      .reset(reset)
30
    );
31
 
32
 
33
  // --------------------------------------------------------------------
34
  //
35
  wire delayed_clk_in;
36
 
37
  assign #1 delayed_clk_in = clk_in;
38
 
39
  wire clk_in_rise = (delayed_clk_in == 1'b0) & (clk_in == 1'b1);
40
 
41
  always @(posedge clk_out_7x)
42
    begin
43
      if(clk_in_rise)
44
        clk_7x_index <= 5;
45
      else if( clk_7x_index >= 6 )
46
        clk_7x_index <= 0;
47
      else
48
        clk_7x_index <= clk_7x_index + 1;
49
    end
50
 
51
 
52
endmodule
53
 
54
 
55
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.