forked from iPogot/Ping-pong-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.v
65 lines (47 loc) · 1.01 KB
/
main.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
`include "D:/verilog/projects/new_course_project/clk25.v"
`include "D:/verilog/projects/new_course_project/signal_sync.v"
`include "D:/verilog/projects/new_course_project/ps2.v"
module vga(
//keyboard
input kb_clock,
input kb_input_data,
//vga
input clk50,
input reset,
output [7:0] red,
output [7:0] green,
output [7:0] blue,
output blank_n,
output sync_n,
output h_sync,
output v_sync,
output clk25
);
wire kb_break;
wire [7:0] kb_output;
syncronisation u1(
.pixel_clk (clk25),
.reset (reset),
.h_sync (h_sync),
.v_sync (v_sync),
.red (red),
.green (green),
.blue (blue),
.sync_n (sync_n),
.blank_n (blank_n),
.break (main_break),
.keyboard_data (kb_output)
);
vga_clk25 u2(
.reset (reset),
.clk50 (clk50),
.clk25 (clk25)
);
keyboard u3(
.reset (reset),
.kb_clock (kb_clock),
.input_data (kb_input_data),
.output_data (kb_output),
.break (main_break)
);
endmodule