-
Notifications
You must be signed in to change notification settings - Fork 0
/
video_lvds.v
78 lines (66 loc) · 2.15 KB
/
video_lvds.v
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
`timescale 1ns / 1ps
module video_lvds(
input DotClock,
input HSync,
input VSync,
input DataEnable,
input [7:0] Red,
input [7:0] Green,
input [7:0] Blue,
output channel1_p,
output channel1_n,
output channel2_p,
output channel2_n,
output channel3_p,
output channel3_n,
output clock_p,
output clock_n
);
wire clk35, notclk35, c1,c2,c3,c4, lvdsclk, rst_clk, DataClock;
wire [27:0] VideoData;
OBUFDS #(.IOSTANDARD("LVDS_33")) lvds_channel1_obuf (.I(c1), .O(channel1_p), .OB(channel1_n) );
OBUFDS #(.IOSTANDARD("LVDS_33")) lvds_channel2_obuf (.I(c2), .O(channel2_p), .OB(channel2_n) );
OBUFDS #(.IOSTANDARD("LVDS_33")) lvds_channel3_obuf (.I(c3), .O(channel3_p), .OB(channel3_n) );
OBUFDS #(.IOSTANDARD("LVDS_33")) lvds_clock_obuf (.I(lvdsclk), .O(clock_p), .OB(clock_n) );
lvds_clockgen clockgenerator (
.clk(DotClock),
.clk35(clk35),
.nclk35(notclk35),
.rstclk(rst_clk),
.dataclock(DataClock),
.lvdsclk(lvdsclk)
);
serializer channel1_ser (
.clk(DataClock),
.clk35(clk35),
.notclk35(notclk35),
.data(VideoData[6:0]),
.rst(rst_clk),
.out(c1)
);
serializer channel2_ser (
.clk(DataClock),
.clk35(clk35),
.notclk35(notclk35),
.data(VideoData[13:7]),
.rst(rst_clk),
.out(c2)
);
serializer channel3_ser (
.clk(DataClock),
.clk35(clk35),
.notclk35(notclk35),
.data(VideoData[20:14]),
.rst(rst_clk),
.out(c3)
);
assign VideoData[20:14] = {Blue[2], Blue[3], Blue[4], Blue[5], HSync, VSync, DataEnable};
assign VideoData[13:7] = {Green[1], Green[2], Green[3], Green[4], Green[5], Blue[0], Blue[1]};
assign VideoData[6:0] = {Red[0], Red[1], Red[2], Red[3], Red[4], Red[5], Green[0]};
/*
assign VideoData[27:21] = {Red[6], Red[7], Green[6], Green[7], Blue[6], Blue[7], DataEnable};
assign VideoData[20:14] = {Blue[2], Blue[3], Blue[4], Blue[5], HSync, VSync, DataEnable};
assign VideoData[13:7] = {Green[1], Green[2], Green[3], Green[4], Green[5], Blue[0], Blue[1]};
assign VideoData[6:0] = {Red[0], Red[1], Red[2], Red[3], Red[4], Red[5], Green[0]};
*/
endmodule