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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [camera_link/] [src/] [camera_link.v] - Blame information for rev 30

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

Line No. Rev Author Line
1 27 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2013 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
 
29
module camera_link
30
(
31
  input [3:0] x_data_in,
32
  input       x_clk,
33
 
34
  input [3:0] y_data_in,
35
  input       y_clk,
36
 
37
  input [3:0] z_data_in,
38
  input       z_clk,
39
 
40
  input       reset
41
);
42
 
43
  // --------------------------------------------------------------------
44
  //
45
  wire  [27:0]  x_data_out;
46
  wire          x_dval      = x_data_out[26];
47
  wire          x_fval      = x_data_out[25];
48
  wire          x_lval      = x_data_out[24];
49
  wire          x_spare     = x_data_out[23];
50
 
51
  channel_link
52
    i_channel_link_x
53
      (
54
          .clk_in(x_clk),
55
          .data_in(x_data_in),
56
          .data_out(x_data_out),
57
 
58
          .reset(reset)
59
      );
60
 
61
 
62
  // --------------------------------------------------------------------
63
  //
64
  wire  [27:0]  y_data_out;
65
  wire          y_dval      = y_data_out[26];
66
  wire          y_fval      = y_data_out[25];
67
  wire          y_lval      = y_data_out[24];
68
  wire          y_spare     = y_data_out[23];
69
 
70
  channel_link
71
    i_channel_link_y
72
      (
73
          .clk_in(y_clk),
74
          .data_in(y_data_in),
75
          .data_out(y_data_out),
76
 
77
          .reset(reset)
78
      );
79
 
80
 
81
  // --------------------------------------------------------------------
82
  //
83
  wire  [27:0]  z_data_out;
84
  wire          z_dval      = z_data_out[26];
85
  wire          z_fval      = z_data_out[25];
86
  wire          z_lval      = z_data_out[24];
87
  wire          z_spare     = z_data_out[23];
88
 
89
  channel_link
90
    i_channel_link_z
91
      (
92
          .clk_in(z_clk),
93
          .data_in(z_data_in),
94
          .data_out(z_data_out),
95
 
96
          .reset(reset)
97
      );
98
 
99
 
100
  // --------------------------------------------------------------------
101
  //
102
  wire [7:0] cl_port_a = { x_data_out[5], x_data_out[27], x_data_out[6], x_data_out[4:0] };
103
  wire [7:0] cl_port_b = { x_data_out[11], x_data_out[10], x_data_out[14:12], x_data_out[9:7] };
104
  wire [7:0] cl_port_c = { x_data_out[17:16], x_data_out[22:18], x_data_out[15] };
105
  wire [7:0] cl_port_d = { y_data_out[5], y_data_out[27], y_data_out[6], y_data_out[4:0] };
106
  wire [7:0] cl_port_e = { y_data_out[11], y_data_out[10], y_data_out[14:12], y_data_out[9:7] };
107
  wire [7:0] cl_port_f = { y_data_out[17:16], y_data_out[22:18], y_data_out[15] };
108
  wire [7:0] cl_port_g = { z_data_out[5], z_data_out[27], z_data_out[6], z_data_out[4:0] };
109
  wire [7:0] cl_port_h = { z_data_out[11], z_data_out[10], z_data_out[14:12], z_data_out[9:7] };
110
 
111
  wire [13:0] fpa_pixel_0 = { cl_port_a[5:0], cl_port_b };
112
  wire [13:0] fpa_pixel_1 = { cl_port_c[5:0], cl_port_d };
113
  wire [13:0] fpa_pixel_2 = { cl_port_e[5:0], cl_port_f };
114
  wire [13:0] fpa_pixel_3 = { cl_port_g[5:0], cl_port_h };
115
 
116
endmodule
117
 
118
 
119
 

powered by: WebSVN 2.1.0

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